From dcd1157d390c625c0b33a43f66bbdc46a9726e33 Mon Sep 17 00:00:00 2001 From: faluco Date: Tue, 8 Dec 2020 13:55:56 +0100 Subject: [PATCH 01/59] - Prototype the extension of enb metrics. --- lib/include/srslte/interfaces/enb_metrics_interface.h | 10 ++++++++++ srsenb/hdr/stack/mac/mac_metrics.h | 1 + 2 files changed, 11 insertions(+) diff --git a/lib/include/srslte/interfaces/enb_metrics_interface.h b/lib/include/srslte/interfaces/enb_metrics_interface.h index a8aaba8a3..fc2bf7cd2 100644 --- a/lib/include/srslte/interfaces/enb_metrics_interface.h +++ b/lib/include/srslte/interfaces/enb_metrics_interface.h @@ -27,8 +27,18 @@ namespace srsenb { +//:TODO: move this struct to the layer it belongs to. +struct bearer_container_t { + uint32_t id; + uint32_t qci; +}; +using bearer_list_t = std::vector; + struct stack_metrics_t { std::vector mac; + // For XICO: Each position in the vector represents a ue. Should have the same number of ues and ue order as the mac vector + // above. + std::vector bearers; rrc_metrics_t rrc; s1ap_metrics_t s1ap; }; diff --git a/srsenb/hdr/stack/mac/mac_metrics.h b/srsenb/hdr/stack/mac/mac_metrics.h index e97cb1b05..7ec7df665 100644 --- a/srsenb/hdr/stack/mac/mac_metrics.h +++ b/srsenb/hdr/stack/mac/mac_metrics.h @@ -20,6 +20,7 @@ namespace srsenb { struct mac_metrics_t { uint16_t rnti; uint32_t nof_tti; + uint32_t cc_idx; int tx_pkts; int tx_errors; int tx_brate; From 43e0a3209df0ebe0293fa8b395e0e2ca5bec7e5e Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 8 Dec 2020 15:55:42 +0000 Subject: [PATCH 02/59] fill enb rrc metrics with drb info --- srsenb/hdr/stack/rrc/rrc_metrics.h | 3 ++- srsenb/hdr/stack/rrc/rrc_ue.h | 1 + srsenb/src/stack/rrc/rrc.cc | 2 +- srsenb/src/stack/rrc/rrc_ue.cc | 12 ++++++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/srsenb/hdr/stack/rrc/rrc_metrics.h b/srsenb/hdr/stack/rrc/rrc_metrics.h index f09c2a327..bccb219b6 100644 --- a/srsenb/hdr/stack/rrc/rrc_metrics.h +++ b/srsenb/hdr/stack/rrc/rrc_metrics.h @@ -32,7 +32,8 @@ typedef enum { } rrc_state_t; struct rrc_ue_metrics_t { - rrc_state_t state; + rrc_state_t state; + std::vector > drb_qci_map; }; struct rrc_metrics_t { diff --git a/srsenb/hdr/stack/rrc/rrc_ue.h b/srsenb/hdr/stack/rrc/rrc_ue.h index 3d5afad37..e832c8dd6 100644 --- a/srsenb/hdr/stack/rrc/rrc_ue.h +++ b/srsenb/hdr/stack/rrc/rrc_ue.h @@ -38,6 +38,7 @@ public: void activity_timer_expired(); rrc_state_t get_state(); + void get_metrics(rrc_ue_metrics_t& ue_metrics) const; void send_connection_setup(); void send_connection_reest(uint8_t ncc); diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index a10b364b6..8efd62f55 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -103,7 +103,7 @@ void rrc::get_metrics(rrc_metrics_t& m) m.ues.resize(users.size()); size_t count = 0; for (auto& ue : users) { - m.ues[count++].state = ue.second->get_state(); + ue.second->get_metrics(m.ues[count++]); } } } diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index cabd180b9..b1db223b2 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -60,6 +60,18 @@ rrc_state_t rrc::ue::get_state() return state; } +void rrc::ue::get_metrics(rrc_ue_metrics_t& ue_metrics) const +{ + ue_metrics.state = state; + const auto& drb_list = bearer_list.get_established_drbs(); + const auto& erab_list = bearer_list.get_erabs(); + ue_metrics.drb_qci_map.resize(drb_list.size()); + for (size_t i = 0; i < drb_list.size(); ++i) { + ue_metrics.drb_qci_map[i] = + std::make_pair(drb_list[i].lc_ch_id, erab_list.at(drb_list[i].eps_bearer_id).qos_params.qci); + } +} + void rrc::ue::set_activity() { // re-start activity timer with current timeout value From f1c05f6826a34426066cf53df3b4361531e2ef90 Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 8 Dec 2020 16:25:51 +0000 Subject: [PATCH 03/59] add sector id to ues in mac metrics --- srsenb/src/stack/mac/ue.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srsenb/src/stack/mac/ue.cc b/srsenb/src/stack/mac/ue.cc index 7ece3521b..b2c596af6 100644 --- a/srsenb/src/stack/mac/ue.cc +++ b/srsenb/src/stack/mac/ue.cc @@ -525,6 +525,11 @@ void ue::metrics_read(mac_metrics_t* metrics_) metrics.ul_buffer = sched->get_ul_buffer(rnti); metrics.dl_buffer = sched->get_dl_buffer(rnti); + // set PCell sector id + std::array cc_list = sched->get_enb_ue_cc_map(rnti); + auto it = std::find(cc_list.begin(), cc_list.end(), 0); + metrics.cc_idx = std::distance(cc_list.begin(), it); + memcpy(metrics_, &metrics, sizeof(mac_metrics_t)); phr_counter = 0; From 5529943172e35179ffe3802e925eee79e9949961 Mon Sep 17 00:00:00 2001 From: faluco Date: Tue, 8 Dec 2020 18:25:31 +0100 Subject: [PATCH 04/59] Add a per sector rach preable counter for the metrics. --- lib/include/srslte/interfaces/enb_metrics_interface.h | 11 +---------- srsenb/hdr/stack/mac/mac.h | 5 ++++- srsenb/src/stack/enb_stack_lte.cc | 2 +- srsenb/src/stack/mac/mac.cc | 8 +++++++- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/include/srslte/interfaces/enb_metrics_interface.h b/lib/include/srslte/interfaces/enb_metrics_interface.h index fc2bf7cd2..c5247b218 100644 --- a/lib/include/srslte/interfaces/enb_metrics_interface.h +++ b/lib/include/srslte/interfaces/enb_metrics_interface.h @@ -27,18 +27,9 @@ namespace srsenb { -//:TODO: move this struct to the layer it belongs to. -struct bearer_container_t { - uint32_t id; - uint32_t qci; -}; -using bearer_list_t = std::vector; - struct stack_metrics_t { std::vector mac; - // For XICO: Each position in the vector represents a ue. Should have the same number of ues and ue order as the mac vector - // above. - std::vector bearers; + std::vector cc_rach_counter; rrc_metrics_t rrc; s1ap_metrics_t s1ap; }; diff --git a/srsenb/hdr/stack/mac/mac.h b/srsenb/hdr/stack/mac/mac.h index babecb584..0d1a3d711 100644 --- a/srsenb/hdr/stack/mac/mac.h +++ b/srsenb/hdr/stack/mac/mac.h @@ -89,7 +89,7 @@ public: bool process_pdus(); - void get_metrics(std::vector& metrics); + void get_metrics(std::vector& metrics, std::vector &detected_rachs); void write_mcch(const srslte::sib2_mbms_t* sib2_, const srslte::sib13_t* sib13_, const srslte::mcch_msg_t* mcch_, @@ -170,6 +170,9 @@ private: // pointer to MAC PCAP object srslte::mac_pcap* pcap = nullptr; + + // Number of rach preambles detected for a cc. + std::vector detected_rachs; }; } // namespace srsenb diff --git a/srsenb/src/stack/enb_stack_lte.cc b/srsenb/src/stack/enb_stack_lte.cc index d076981ed..e402683ec 100644 --- a/srsenb/src/stack/enb_stack_lte.cc +++ b/srsenb/src/stack/enb_stack_lte.cc @@ -171,7 +171,7 @@ bool enb_stack_lte::get_metrics(stack_metrics_t* metrics) // use stack thread to query metrics auto ret = enb_task_queue.try_push([this]() { stack_metrics_t metrics{}; - mac.get_metrics(metrics.mac); + mac.get_metrics(metrics.mac, metrics.cc_rach_counter); rrc.get_metrics(metrics.rrc); s1ap.get_metrics(metrics.s1ap); pending_stack_metrics.push(metrics); diff --git a/srsenb/src/stack/mac/mac.cc b/srsenb/src/stack/mac/mac.cc index 66773b765..4a4e86f5a 100644 --- a/srsenb/src/stack/mac/mac.cc +++ b/srsenb/src/stack/mac/mac.cc @@ -85,6 +85,8 @@ bool mac::init(const mac_args_t& args_, // Pre-alloc UE objects for first attaching users prealloc_ue(10); + detected_rachs.resize(cells.size()); + started = true; } @@ -267,11 +269,12 @@ int mac::cell_cfg(const std::vector& cell_cfg_) return scheduler.cell_cfg(cell_config); } -void mac::get_metrics(std::vector& metrics) +void mac::get_metrics(std::vector& metrics, std::vector& _detected_rachs) { srslte::rwlock_read_guard lock(rwlock); int cnt = 0; metrics.resize(ue_db.size()); + _detected_rachs = detected_rachs; for (auto& u : ue_db) { u.second->metrics_read(&metrics[cnt]); cnt++; @@ -507,6 +510,9 @@ void mac::rach_detected(uint32_t tti, uint32_t enb_cc_idx, uint32_t preamble_idx rar_info.msg3_size = 7; rar_info.prach_tti = tti; + // Log this event. + ++detected_rachs[enb_cc_idx]; + // Add new user to the scheduler so that it can RX/TX SRB0 sched_interface::ue_cfg_t ue_cfg = {}; ue_cfg.supported_cc_list.emplace_back(); From f20b75a05f9c0f88315e90193baef504b6b61d60 Mon Sep 17 00:00:00 2001 From: faluco Date: Fri, 11 Dec 2020 15:51:46 +0100 Subject: [PATCH 05/59] Re-structure enb metrics a bit. Create a generic mac metric struct and per ue mac metrics struct. --- .../srslte/interfaces/enb_metrics_interface.h | 7 +- srsenb/hdr/stack/mac/mac.h | 2 +- srsenb/hdr/stack/mac/mac_metrics.h | 16 +++- srsenb/hdr/stack/mac/ue.h | 12 +-- srsenb/src/metrics_csv.cc | 4 +- srsenb/src/metrics_stdout.cc | 45 +++++----- srsenb/src/stack/enb_stack_lte.cc | 2 +- srsenb/src/stack/mac/mac.cc | 8 +- srsenb/src/stack/mac/ue.cc | 42 +++++----- srsenb/test/enb_metrics_test.cc | 84 +++++++++---------- 10 files changed, 115 insertions(+), 107 deletions(-) diff --git a/lib/include/srslte/interfaces/enb_metrics_interface.h b/lib/include/srslte/interfaces/enb_metrics_interface.h index c5247b218..ca3c25c0f 100644 --- a/lib/include/srslte/interfaces/enb_metrics_interface.h +++ b/lib/include/srslte/interfaces/enb_metrics_interface.h @@ -28,10 +28,9 @@ namespace srsenb { struct stack_metrics_t { - std::vector mac; - std::vector cc_rach_counter; - rrc_metrics_t rrc; - s1ap_metrics_t s1ap; + mac_metrics_t mac; + rrc_metrics_t rrc; + s1ap_metrics_t s1ap; }; struct enb_metrics_t { diff --git a/srsenb/hdr/stack/mac/mac.h b/srsenb/hdr/stack/mac/mac.h index 0d1a3d711..e3e4beaf1 100644 --- a/srsenb/hdr/stack/mac/mac.h +++ b/srsenb/hdr/stack/mac/mac.h @@ -89,7 +89,7 @@ public: bool process_pdus(); - void get_metrics(std::vector& metrics, std::vector &detected_rachs); + void get_metrics(mac_metrics_t& metrics); void write_mcch(const srslte::sib2_mbms_t* sib2_, const srslte::sib13_t* sib13_, const srslte::mcch_msg_t* mcch_, diff --git a/srsenb/hdr/stack/mac/mac_metrics.h b/srsenb/hdr/stack/mac/mac_metrics.h index 7ec7df665..b055acd1b 100644 --- a/srsenb/hdr/stack/mac/mac_metrics.h +++ b/srsenb/hdr/stack/mac/mac_metrics.h @@ -13,11 +13,13 @@ #ifndef SRSENB_MAC_METRICS_H #define SRSENB_MAC_METRICS_H -namespace srsenb { +#include +#include -// MAC metrics per user +namespace srsenb { -struct mac_metrics_t { +/// MAC metrics per user +struct mac_ue_metrics_t { uint16_t rnti; uint32_t nof_tti; uint32_t cc_idx; @@ -35,6 +37,14 @@ struct mac_metrics_t { float phr; }; +/// Main MAC metrics. +struct mac_metrics_t { + /// RACH preamble counter per cc. + std::vector cc_rach_counter; + /// Per UE MAC metrics. + std::vector ues; +}; + } // namespace srsenb #endif // SRSENB_MAC_METRICS_H diff --git a/srsenb/hdr/stack/mac/ue.h b/srsenb/hdr/stack/mac/ue.h index 4aee18bc8..7127c088b 100644 --- a/srsenb/hdr/stack/mac/ue.h +++ b/srsenb/hdr/stack/mac/ue.h @@ -76,7 +76,7 @@ public: void push_pdu(const uint32_t ue_cc_idx, const uint32_t tti, uint32_t len); void deallocate_pdu(const uint32_t ue_cc_idx, const uint32_t tti); - void metrics_read(srsenb::mac_metrics_t* metrics); + void metrics_read(mac_ue_metrics_t* metrics_); void metrics_rx(bool crc, uint32_t tbs); void metrics_tx(bool crc, uint32_t tbs); void metrics_phr(float phr); @@ -95,11 +95,11 @@ private: bool process_ce(srslte::sch_subh* subh); void allocate_ce(srslte::sch_pdu* pdu, uint32_t lcid); - uint32_t phr_counter = 0; - uint32_t dl_cqi_counter = 0; - uint32_t dl_ri_counter = 0; - uint32_t dl_pmi_counter = 0; - mac_metrics_t metrics = {}; + uint32_t phr_counter = 0; + uint32_t dl_cqi_counter = 0; + uint32_t dl_ri_counter = 0; + uint32_t dl_pmi_counter = 0; + mac_ue_metrics_t ue_metrics = {}; srslte::mac_pcap* pcap = nullptr; uint64_t conres_id = 0; diff --git a/srsenb/src/metrics_csv.cc b/srsenb/src/metrics_csv.cc index 447764934..9507dffd8 100644 --- a/srsenb/src/metrics_csv.cc +++ b/srsenb/src/metrics_csv.cc @@ -66,8 +66,8 @@ void metrics_csv::set_metrics(const enb_metrics_t& metrics, const uint32_t perio // Sum up rates for all UEs float dl_rate_sum = 0.0, ul_rate_sum = 0.0; for (size_t i = 0; i < metrics.stack.rrc.ues.size(); i++) { - dl_rate_sum += metrics.stack.mac[i].tx_brate / (metrics.stack.mac[i].nof_tti * 1e-3); - ul_rate_sum += metrics.stack.mac[i].rx_brate / (metrics.stack.mac[i].nof_tti * 1e-3); + dl_rate_sum += metrics.stack.mac.ues[i].tx_brate / (metrics.stack.mac.ues[i].nof_tti * 1e-3); + ul_rate_sum += metrics.stack.mac.ues[i].rx_brate / (metrics.stack.mac.ues[i].nof_tti * 1e-3); } // DL rate diff --git a/srsenb/src/metrics_stdout.cc b/srsenb/src/metrics_stdout.cc index 554a6d943..db05d0bf7 100644 --- a/srsenb/src/metrics_stdout.cc +++ b/srsenb/src/metrics_stdout.cc @@ -89,37 +89,36 @@ void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t pe for (size_t i = 0; i < metrics.stack.rrc.ues.size(); i++) { // make sure we have stats for MAC and PHY layer too - if (metrics.stack.mac.size() == 0 || metrics.phy.size() == 0 || i > metrics.stack.mac.size() || + if (metrics.stack.mac.ues.size() == 0 || metrics.phy.size() == 0 || i > metrics.stack.mac.ues.size() || i > metrics.phy.size()) { break; } - - if (metrics.stack.mac[i].tx_errors > metrics.stack.mac[i].tx_pkts) { - printf("tx caution errors %d > %d\n", metrics.stack.mac[i].tx_errors, metrics.stack.mac[i].tx_pkts); + if (metrics.stack.mac.ues[i].tx_errors > metrics.stack.mac.ues[i].tx_pkts) { + printf("tx caution errors %d > %d\n", metrics.stack.mac.ues[i].tx_errors, metrics.stack.mac.ues[i].tx_pkts); } - if (metrics.stack.mac[i].rx_errors > metrics.stack.mac[i].rx_pkts) { - printf("rx caution errors %d > %d\n", metrics.stack.mac[i].rx_errors, metrics.stack.mac[i].rx_pkts); + if (metrics.stack.mac.ues[i].rx_errors > metrics.stack.mac.ues[i].rx_pkts) { + printf("rx caution errors %d > %d\n", metrics.stack.mac.ues[i].rx_errors, metrics.stack.mac.ues[i].rx_pkts); } - cout << int_to_hex_string(metrics.stack.mac[i].rnti, 4) << " "; - cout << float_to_string(SRSLTE_MAX(0.1, metrics.stack.mac[i].dl_cqi), 1, 3); - cout << float_to_string(metrics.stack.mac[i].dl_ri, 1, 4); + cout << int_to_hex_string(metrics.stack.mac.ues[i].rnti, 4) << " "; + cout << float_to_string(SRSLTE_MAX(0.1, metrics.stack.mac.ues[i].dl_cqi), 1, 3); + cout << float_to_string(metrics.stack.mac.ues[i].dl_ri, 1, 4); if (not isnan(metrics.phy[i].dl.mcs)) { cout << float_to_string(SRSLTE_MAX(0.1, metrics.phy[i].dl.mcs), 1, 4); } else { cout << float_to_string(0, 2, 4); } - if (metrics.stack.mac[i].tx_brate > 0) { + if (metrics.stack.mac.ues[i].tx_brate > 0) { cout << float_to_eng_string( - SRSLTE_MAX(0.1, (float)metrics.stack.mac[i].tx_brate / (metrics.stack.mac[i].nof_tti * 1e-3)), 1); + SRSLTE_MAX(0.1, (float)metrics.stack.mac.ues[i].tx_brate / (metrics.stack.mac.ues[i].nof_tti * 1e-3)), 1); } else { cout << float_to_string(0, 1, 6) << ""; } - cout << std::setw(5) << metrics.stack.mac[i].tx_pkts - metrics.stack.mac[i].tx_errors; - cout << std::setw(5) << metrics.stack.mac[i].tx_errors; - if (metrics.stack.mac[i].tx_pkts > 0 && metrics.stack.mac[i].tx_errors) { + cout << std::setw(5) << metrics.stack.mac.ues[i].tx_pkts - metrics.stack.mac.ues[i].tx_errors; + cout << std::setw(5) << metrics.stack.mac.ues[i].tx_errors; + if (metrics.stack.mac.ues[i].tx_pkts > 0 && metrics.stack.mac.ues[i].tx_errors) { cout << float_to_string( - SRSLTE_MAX(0.1, (float)100 * metrics.stack.mac[i].tx_errors / metrics.stack.mac[i].tx_pkts), 1, 4) + SRSLTE_MAX(0.1, (float)100 * metrics.stack.mac.ues[i].tx_errors / metrics.stack.mac.ues[i].tx_pkts), 1, 4) << "%"; } else { cout << float_to_string(0, 1, 4) << "%"; @@ -132,29 +131,29 @@ void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t pe cout << float_to_string(0, 1, 4); } - cout << float_to_string(metrics.stack.mac[i].phr, 2, 5); + cout << float_to_string(metrics.stack.mac.ues[i].phr, 2, 5); if (not isnan(metrics.phy[i].ul.mcs)) { cout << float_to_string(SRSLTE_MAX(0.1, metrics.phy[i].ul.mcs), 1, 4); } else { cout << float_to_string(0, 1, 4); } - if (metrics.stack.mac[i].rx_brate > 0) { + if (metrics.stack.mac.ues[i].rx_brate > 0) { cout << float_to_eng_string( - SRSLTE_MAX(0.1, (float)metrics.stack.mac[i].rx_brate / (metrics.stack.mac[i].nof_tti * 1e-3)), 1); + SRSLTE_MAX(0.1, (float)metrics.stack.mac.ues[i].rx_brate / (metrics.stack.mac.ues[i].nof_tti * 1e-3)), 1); } else { cout << float_to_string(0, 1) << ""; } - cout << std::setw(5) << metrics.stack.mac[i].rx_pkts - metrics.stack.mac[i].rx_errors; - cout << std::setw(5) << metrics.stack.mac[i].rx_errors; + cout << std::setw(5) << metrics.stack.mac.ues[i].rx_pkts - metrics.stack.mac.ues[i].rx_errors; + cout << std::setw(5) << metrics.stack.mac.ues[i].rx_errors; - if (metrics.stack.mac[i].rx_pkts > 0 && metrics.stack.mac[i].rx_errors > 0) { + if (metrics.stack.mac.ues[i].rx_pkts > 0 && metrics.stack.mac.ues[i].rx_errors > 0) { cout << float_to_string( - SRSLTE_MAX(0.1, (float)100 * metrics.stack.mac[i].rx_errors / metrics.stack.mac[i].rx_pkts), 1, 4) + SRSLTE_MAX(0.1, (float)100 * metrics.stack.mac.ues[i].rx_errors / metrics.stack.mac.ues[i].rx_pkts), 1, 4) << "%"; } else { cout << float_to_string(0, 1, 4) << "%"; } - cout << float_to_eng_string(metrics.stack.mac[i].ul_buffer, 2); + cout << float_to_eng_string(metrics.stack.mac.ues[i].ul_buffer, 2); cout << endl; } diff --git a/srsenb/src/stack/enb_stack_lte.cc b/srsenb/src/stack/enb_stack_lte.cc index e402683ec..d076981ed 100644 --- a/srsenb/src/stack/enb_stack_lte.cc +++ b/srsenb/src/stack/enb_stack_lte.cc @@ -171,7 +171,7 @@ bool enb_stack_lte::get_metrics(stack_metrics_t* metrics) // use stack thread to query metrics auto ret = enb_task_queue.try_push([this]() { stack_metrics_t metrics{}; - mac.get_metrics(metrics.mac, metrics.cc_rach_counter); + mac.get_metrics(metrics.mac); rrc.get_metrics(metrics.rrc); s1ap.get_metrics(metrics.s1ap); pending_stack_metrics.push(metrics); diff --git a/srsenb/src/stack/mac/mac.cc b/srsenb/src/stack/mac/mac.cc index 4a4e86f5a..0d6d9fb98 100644 --- a/srsenb/src/stack/mac/mac.cc +++ b/srsenb/src/stack/mac/mac.cc @@ -269,16 +269,16 @@ int mac::cell_cfg(const std::vector& cell_cfg_) return scheduler.cell_cfg(cell_config); } -void mac::get_metrics(std::vector& metrics, std::vector& _detected_rachs) +void mac::get_metrics(mac_metrics_t& metrics) { srslte::rwlock_read_guard lock(rwlock); int cnt = 0; - metrics.resize(ue_db.size()); - _detected_rachs = detected_rachs; + metrics.ues.resize(ue_db.size()); for (auto& u : ue_db) { - u.second->metrics_read(&metrics[cnt]); + u.second->metrics_read(&metrics.ues[cnt]); cnt++; } + metrics.cc_rach_counter = detected_rachs; } /******************************************************** diff --git a/srsenb/src/stack/mac/ue.cc b/srsenb/src/stack/mac/ue.cc index b2c596af6..44ae26200 100644 --- a/srsenb/src/stack/mac/ue.cc +++ b/srsenb/src/stack/mac/ue.cc @@ -80,7 +80,7 @@ ue::~ue() void ue::reset() { - metrics = {}; + ue_metrics = {}; nof_failures = 0; for (auto cc : softbuffer_rx) { @@ -519,75 +519,75 @@ uint8_t* ue::generate_mch_pdu(uint32_t harq_pid, } /******* METRICS interface ***************/ -void ue::metrics_read(mac_metrics_t* metrics_) +void ue::metrics_read(mac_ue_metrics_t* metrics_) { - metrics.rnti = rnti; - metrics.ul_buffer = sched->get_ul_buffer(rnti); - metrics.dl_buffer = sched->get_dl_buffer(rnti); + ue_metrics.rnti = rnti; + ue_metrics.ul_buffer = sched->get_ul_buffer(rnti); + ue_metrics.dl_buffer = sched->get_dl_buffer(rnti); // set PCell sector id std::array cc_list = sched->get_enb_ue_cc_map(rnti); auto it = std::find(cc_list.begin(), cc_list.end(), 0); - metrics.cc_idx = std::distance(cc_list.begin(), it); + ue_metrics.cc_idx = std::distance(cc_list.begin(), it); - memcpy(metrics_, &metrics, sizeof(mac_metrics_t)); + *metrics_ = ue_metrics; phr_counter = 0; dl_cqi_counter = 0; - metrics = {}; + ue_metrics = {}; } void ue::metrics_phr(float phr) { - metrics.phr = SRSLTE_VEC_CMA(phr, metrics.phr, phr_counter); + ue_metrics.phr = SRSLTE_VEC_CMA(phr, ue_metrics.phr, phr_counter); phr_counter++; } void ue::metrics_dl_ri(uint32_t dl_ri) { - if (metrics.dl_ri == 0.0f) { - metrics.dl_ri = (float)dl_ri + 1.0f; + if (ue_metrics.dl_ri == 0.0f) { + ue_metrics.dl_ri = (float)dl_ri + 1.0f; } else { - metrics.dl_ri = SRSLTE_VEC_EMA((float)dl_ri + 1.0f, metrics.dl_ri, 0.5f); + ue_metrics.dl_ri = SRSLTE_VEC_EMA((float)dl_ri + 1.0f, ue_metrics.dl_ri, 0.5f); } dl_ri_counter++; } void ue::metrics_dl_pmi(uint32_t dl_ri) { - metrics.dl_pmi = SRSLTE_VEC_CMA((float)dl_ri, metrics.dl_pmi, dl_pmi_counter); + ue_metrics.dl_pmi = SRSLTE_VEC_CMA((float)dl_ri, ue_metrics.dl_pmi, dl_pmi_counter); dl_pmi_counter++; } void ue::metrics_dl_cqi(uint32_t dl_cqi) { - metrics.dl_cqi = SRSLTE_VEC_CMA((float)dl_cqi, metrics.dl_cqi, dl_cqi_counter); + ue_metrics.dl_cqi = SRSLTE_VEC_CMA((float)dl_cqi, ue_metrics.dl_cqi, dl_cqi_counter); dl_cqi_counter++; } void ue::metrics_rx(bool crc, uint32_t tbs) { if (crc) { - metrics.rx_brate += tbs * 8; + ue_metrics.rx_brate += tbs * 8; } else { - metrics.rx_errors++; + ue_metrics.rx_errors++; } - metrics.rx_pkts++; + ue_metrics.rx_pkts++; } void ue::metrics_tx(bool crc, uint32_t tbs) { if (crc) { - metrics.tx_brate += tbs * 8; + ue_metrics.tx_brate += tbs * 8; } else { - metrics.tx_errors++; + ue_metrics.tx_errors++; } - metrics.tx_pkts++; + ue_metrics.tx_pkts++; } void ue::metrics_cnt() { - metrics.nof_tti++; + ue_metrics.nof_tti++; } void ue::tic() diff --git a/srsenb/test/enb_metrics_test.cc b/srsenb/test/enb_metrics_test.cc index a08f4277e..6b1372db9 100644 --- a/srsenb/test/enb_metrics_test.cc +++ b/srsenb/test/enb_metrics_test.cc @@ -38,20 +38,20 @@ public: // first entry metrics[0].rf.rf_o = 10; metrics[0].stack.rrc.ues.resize(1); - metrics[0].stack.mac.resize(metrics[0].stack.rrc.ues.size()); - metrics[0].stack.mac[0].rnti = 0x46; - metrics[0].stack.mac[0].tx_pkts = 1000; - metrics[0].stack.mac[0].tx_errors = 1000; - metrics[0].stack.mac[0].tx_brate = 0; - metrics[0].stack.mac[0].rx_pkts = 50; - metrics[0].stack.mac[0].rx_errors = 49; - metrics[0].stack.mac[0].rx_brate = 2; - metrics[0].stack.mac[0].ul_buffer = 100; - metrics[0].stack.mac[0].dl_buffer = 200; - metrics[0].stack.mac[0].dl_cqi = 15.9; - metrics[0].stack.mac[0].dl_ri = 1.5; - metrics[0].stack.mac[0].dl_pmi = 1.0; - metrics[0].stack.mac[0].phr = 12.0; + metrics[0].stack.mac.ues.resize(metrics[0].stack.rrc.ues.size()); + metrics[0].stack.mac.ues[0].rnti = 0x46; + metrics[0].stack.mac.ues[0].tx_pkts = 1000; + metrics[0].stack.mac.ues[0].tx_errors = 1000; + metrics[0].stack.mac.ues[0].tx_brate = 0; + metrics[0].stack.mac.ues[0].rx_pkts = 50; + metrics[0].stack.mac.ues[0].rx_errors = 49; + metrics[0].stack.mac.ues[0].rx_brate = 2; + metrics[0].stack.mac.ues[0].ul_buffer = 100; + metrics[0].stack.mac.ues[0].dl_buffer = 200; + metrics[0].stack.mac.ues[0].dl_cqi = 15.9; + metrics[0].stack.mac.ues[0].dl_ri = 1.5; + metrics[0].stack.mac.ues[0].dl_pmi = 1.0; + metrics[0].stack.mac.ues[0].phr = 12.0; metrics[0].phy.resize(1); metrics[0].phy[0].dl.mcs = 28.0; metrics[0].phy[0].ul.mcs = 20.2; @@ -60,20 +60,20 @@ public: // second metrics[1].rf.rf_o = 10; metrics[1].stack.rrc.ues.resize(1); - metrics[1].stack.mac.resize(metrics[1].stack.rrc.ues.size()); - metrics[1].stack.mac[0].rnti = 0xffff; - metrics[1].stack.mac[0].tx_pkts = 100; - metrics[1].stack.mac[0].tx_errors = 0; - metrics[1].stack.mac[0].tx_brate = 1e6; - metrics[1].stack.mac[0].rx_pkts = 50; - metrics[1].stack.mac[0].rx_errors = 10; - metrics[1].stack.mac[0].rx_brate = 1e3; - metrics[1].stack.mac[0].ul_buffer = 100; - metrics[1].stack.mac[0].dl_buffer = 200; - metrics[1].stack.mac[0].dl_cqi = 1.2; - metrics[1].stack.mac[0].dl_ri = 1.5; - metrics[1].stack.mac[0].dl_pmi = 1.0; - metrics[1].stack.mac[0].phr = 99.1; + metrics[1].stack.mac.ues.resize(metrics[1].stack.rrc.ues.size()); + metrics[1].stack.mac.ues[0].rnti = 0xffff; + metrics[1].stack.mac.ues[0].tx_pkts = 100; + metrics[1].stack.mac.ues[0].tx_errors = 0; + metrics[1].stack.mac.ues[0].tx_brate = 1e6; + metrics[1].stack.mac.ues[0].rx_pkts = 50; + metrics[1].stack.mac.ues[0].rx_errors = 10; + metrics[1].stack.mac.ues[0].rx_brate = 1e3; + metrics[1].stack.mac.ues[0].ul_buffer = 100; + metrics[1].stack.mac.ues[0].dl_buffer = 200; + metrics[1].stack.mac.ues[0].dl_cqi = 1.2; + metrics[1].stack.mac.ues[0].dl_ri = 1.5; + metrics[1].stack.mac.ues[0].dl_pmi = 1.0; + metrics[1].stack.mac.ues[0].phr = 99.1; metrics[1].phy.resize(1); metrics[1].phy[0].dl.mcs = 6.2; metrics[1].phy[0].ul.mcs = 28.0; @@ -82,20 +82,20 @@ public: // third entry metrics[2].rf.rf_o = 10; metrics[2].stack.rrc.ues.resize(1); - metrics[2].stack.mac.resize(metrics[2].stack.rrc.ues.size()); - metrics[2].stack.mac[0].rnti = 0x1; - metrics[2].stack.mac[0].tx_pkts = 9999; - metrics[2].stack.mac[0].tx_errors = 1; - metrics[2].stack.mac[0].tx_brate = 776; - metrics[2].stack.mac[0].rx_pkts = 50; - metrics[2].stack.mac[0].rx_errors = 0; - metrics[2].stack.mac[0].rx_brate = 1e3; - metrics[2].stack.mac[0].ul_buffer = 100; - metrics[2].stack.mac[0].dl_buffer = 200; - metrics[2].stack.mac[0].dl_cqi = 15.9; - metrics[2].stack.mac[0].dl_ri = 1.5; - metrics[2].stack.mac[0].dl_pmi = 1.0; - metrics[2].stack.mac[0].phr = 12.0; + metrics[2].stack.mac.ues.resize(metrics[2].stack.rrc.ues.size()); + metrics[2].stack.mac.ues[0].rnti = 0x1; + metrics[2].stack.mac.ues[0].tx_pkts = 9999; + metrics[2].stack.mac.ues[0].tx_errors = 1; + metrics[2].stack.mac.ues[0].tx_brate = 776; + metrics[2].stack.mac.ues[0].rx_pkts = 50; + metrics[2].stack.mac.ues[0].rx_errors = 0; + metrics[2].stack.mac.ues[0].rx_brate = 1e3; + metrics[2].stack.mac.ues[0].ul_buffer = 100; + metrics[2].stack.mac.ues[0].dl_buffer = 200; + metrics[2].stack.mac.ues[0].dl_cqi = 15.9; + metrics[2].stack.mac.ues[0].dl_ri = 1.5; + metrics[2].stack.mac.ues[0].dl_pmi = 1.0; + metrics[2].stack.mac.ues[0].phr = 12.0; metrics[2].phy.resize(1); metrics[2].phy[0].dl.mcs = 28.0; metrics[2].phy[0].ul.mcs = 20.2; From 343587b32d233dfe62623f6a44d29a574fadbf31 Mon Sep 17 00:00:00 2001 From: faluco Date: Fri, 11 Dec 2020 16:11:00 +0100 Subject: [PATCH 06/59] Update NR classes after metrics interface changes. --- srsenb/hdr/stack/mac/mac_nr.h | 2 +- srsenb/src/stack/mac/mac_nr.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/srsenb/hdr/stack/mac/mac_nr.h b/srsenb/hdr/stack/mac/mac_nr.h index 0995e6dc6..1fb78b520 100644 --- a/srsenb/hdr/stack/mac/mac_nr.h +++ b/srsenb/hdr/stack/mac/mac_nr.h @@ -51,7 +51,7 @@ public: rrc_interface_mac_nr* rrc_); void stop(); - void get_metrics(std::vector& metrics); + void get_metrics(srsenb::mac_metrics_t& metrics); // MAC interface for RRC int cell_cfg(srsenb::sched_interface::cell_cfg_t* cell_cfg); diff --git a/srsenb/src/stack/mac/mac_nr.cc b/srsenb/src/stack/mac/mac_nr.cc index 495b0f490..05c284bba 100644 --- a/srsenb/src/stack/mac/mac_nr.cc +++ b/srsenb/src/stack/mac/mac_nr.cc @@ -76,7 +76,7 @@ void mac_nr::stop() } } -void mac_nr::get_metrics(std::vector& metrics) {} +void mac_nr::get_metrics(srsenb::mac_metrics_t& metrics) {} // Fills both, DL_CONFIG.request and TX.request structs void mac_nr::get_dl_config(const uint32_t tti, From 8c42ec26c3fe32248f8a1561fd7854b4dd3695fd Mon Sep 17 00:00:00 2001 From: faluco Date: Fri, 11 Dec 2020 17:23:28 +0100 Subject: [PATCH 07/59] Fix error in previous rebase from dev. --- srsenb/test/enb_metrics_test.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/srsenb/test/enb_metrics_test.cc b/srsenb/test/enb_metrics_test.cc index 6b1372db9..ebc3c60c0 100644 --- a/srsenb/test/enb_metrics_test.cc +++ b/srsenb/test/enb_metrics_test.cc @@ -104,20 +104,20 @@ public: // fourth entry with incomple PHY and MAC stats metrics[3].rf.rf_o = 10; metrics[3].stack.rrc.ues.resize(2); - metrics[3].stack.mac.resize(metrics[3].stack.rrc.ues.size()); - metrics[3].stack.mac[0].rnti = 0x1; - metrics[3].stack.mac[0].tx_pkts = 9999; - metrics[3].stack.mac[0].tx_errors = 1; - metrics[3].stack.mac[0].tx_brate = 776; - metrics[3].stack.mac[0].rx_pkts = 50; - metrics[3].stack.mac[0].rx_errors = 0; - metrics[3].stack.mac[0].rx_brate = 1e3; - metrics[3].stack.mac[0].ul_buffer = 100; - metrics[3].stack.mac[0].dl_buffer = 200; - metrics[3].stack.mac[0].dl_cqi = 15.9; - metrics[3].stack.mac[0].dl_ri = 1.5; - metrics[3].stack.mac[0].dl_pmi = 1.0; - metrics[3].stack.mac[0].phr = 12.0; + metrics[3].stack.mac.ues.resize(metrics[3].stack.rrc.ues.size()); + metrics[3].stack.mac.ues[0].rnti = 0x1; + metrics[3].stack.mac.ues[0].tx_pkts = 9999; + metrics[3].stack.mac.ues[0].tx_errors = 1; + metrics[3].stack.mac.ues[0].tx_brate = 776; + metrics[3].stack.mac.ues[0].rx_pkts = 50; + metrics[3].stack.mac.ues[0].rx_errors = 0; + metrics[3].stack.mac.ues[0].rx_brate = 1e3; + metrics[3].stack.mac.ues[0].ul_buffer = 100; + metrics[3].stack.mac.ues[0].dl_buffer = 200; + metrics[3].stack.mac.ues[0].dl_cqi = 15.9; + metrics[3].stack.mac.ues[0].dl_ri = 1.5; + metrics[3].stack.mac.ues[0].dl_pmi = 1.0; + metrics[3].stack.mac.ues[0].phr = 12.0; metrics[3].phy.resize(0); // no PHY metrics for this UE } From b0a7506a8aa4192524d01abdf8662c89b278bdbd Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 11 Dec 2020 16:42:47 +0000 Subject: [PATCH 08/59] add extra check to verify if erab is still available for rrc metric extraction --- srsenb/src/stack/rrc/rrc_ue.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index b1db223b2..8926f5a65 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -65,10 +65,12 @@ void rrc::ue::get_metrics(rrc_ue_metrics_t& ue_metrics) const ue_metrics.state = state; const auto& drb_list = bearer_list.get_established_drbs(); const auto& erab_list = bearer_list.get_erabs(); - ue_metrics.drb_qci_map.resize(drb_list.size()); + ue_metrics.drb_qci_map.reserve(drb_list.size()); for (size_t i = 0; i < drb_list.size(); ++i) { - ue_metrics.drb_qci_map[i] = - std::make_pair(drb_list[i].lc_ch_id, erab_list.at(drb_list[i].eps_bearer_id).qos_params.qci); + auto erab_it = erab_list.find(drb_list[i].eps_bearer_id); + if (erab_it != erab_list.end()) { + ue_metrics.drb_qci_map.push_back(std::make_pair(drb_list[i].lc_ch_id, erab_it->second.qos_params.qci)); + } } } From 98a2c868b5d83b51ed5e24efe3d3d0061d63e0ee Mon Sep 17 00:00:00 2001 From: faluco Date: Thu, 10 Dec 2020 18:10:49 +0100 Subject: [PATCH 09/59] Update srslog to latest version. --- .../srslte/srslog/detail/log_backend.h | 6 +- lib/include/srslte/srslog/detail/log_entry.h | 24 +- lib/include/srslte/srslog/log_channel.h | 110 +++++++-- lib/include/srslte/srslog/sink.h | 14 ++ lib/include/srslte/srslog/srslog.h | 56 ++++- lib/src/srslog/CMakeLists.txt | 4 +- lib/src/srslog/backend_worker.cpp | 13 +- lib/src/srslog/event_trace.cpp | 1 - lib/src/srslog/formatter.h | 87 ------- lib/src/srslog/sink_repository.h | 114 --------- lib/src/srslog/sinks/file_sink.h | 8 +- lib/src/srslog/sinks/file_utils.h | 16 +- lib/src/srslog/sinks/stream_sink.h | 5 +- lib/src/srslog/srslog.cpp | 232 +++++++++++++----- lib/src/srslog/srslog_c.cpp | 1 - lib/src/srslog/srslog_instance.h | 54 +++- lib/test/srslog/CMakeLists.txt | 18 +- lib/test/srslog/event_trace_test.cpp | 22 +- lib/test/srslog/file_sink_test.cpp | 11 +- lib/test/srslog/formatter_test.cpp | 112 --------- lib/test/srslog/log_backend_test.cpp | 39 ++- lib/test/srslog/log_channel_test.cpp | 177 ++++++++----- lib/test/srslog/logger_test.cpp | 41 +--- lib/test/srslog/srslog_test.cpp | 133 +++++++++- 24 files changed, 704 insertions(+), 594 deletions(-) delete mode 100644 lib/src/srslog/formatter.h delete mode 100644 lib/src/srslog/sink_repository.h delete mode 100644 lib/test/srslog/formatter_test.cpp diff --git a/lib/include/srslte/srslog/detail/log_backend.h b/lib/include/srslte/srslog/detail/log_backend.h index ecb08687b..840cc90b2 100644 --- a/lib/include/srslte/srslog/detail/log_backend.h +++ b/lib/include/srslte/srslog/detail/log_backend.h @@ -13,12 +13,12 @@ #ifndef SRSLOG_DETAIL_LOG_BACKEND_H #define SRSLOG_DETAIL_LOG_BACKEND_H -#include "srslte/srslog/detail/log_entry.h" - namespace srslog { namespace detail { +struct log_entry; + /// The log backend receives generated log entries from the application. Each /// entry gets distributed to the corresponding sinks. /// NOTE: Thread safe class. @@ -32,7 +32,7 @@ public: virtual void start() = 0; /// Pushes a log entry into the backend. - virtual void push(detail::log_entry&& entry) = 0; + virtual void push(log_entry&& entry) = 0; /// Returns true when the backend has been started, otherwise false. virtual bool is_running() const = 0; diff --git a/lib/include/srslte/srslog/detail/log_entry.h b/lib/include/srslte/srslog/detail/log_entry.h index 3d5eed764..64e30cba8 100644 --- a/lib/include/srslte/srslog/detail/log_entry.h +++ b/lib/include/srslte/srslog/detail/log_entry.h @@ -13,9 +13,8 @@ #ifndef SRSLOG_DETAIL_LOG_ENTRY_H #define SRSLOG_DETAIL_LOG_ENTRY_H -#include "srslte/srslog/bundled/fmt/printf.h" +#include "srslte/srslog/detail/log_entry_metadata.h" #include "srslte/srslog/detail/support/thread_utils.h" -#include namespace srslog { @@ -23,14 +22,6 @@ class sink; namespace detail { -/// This structure gives the user a way to log generic information as a context. -struct log_context { - /// Generic contxt value. - uint32_t value; - /// When true, the context value will be printed in the log entry. - bool enabled; -}; - /// This command flushes all the messages pending in the backend. struct flush_backend_cmd { shared_variable& completion_flag; @@ -39,16 +30,13 @@ struct flush_backend_cmd { /// This structure packs all the required data required to create a log entry in /// the backend. -//:TODO: provide proper command objects when we have custom formatting. +//:TODO: replace this object using a real command pattern when we have a raw +// memory queue for passing entries. struct log_entry { sink* s; - std::chrono::high_resolution_clock::time_point tp; - log_context context; - std::string fmtstring; - fmt::dynamic_format_arg_store store; - std::string log_name; - char log_tag; - std::vector hex_dump; + std::function + format_func; + log_entry_metadata metadata; std::unique_ptr flush_cmd; }; diff --git a/lib/include/srslte/srslog/log_channel.h b/lib/include/srslte/srslog/log_channel.h index cb926836c..0acd80146 100644 --- a/lib/include/srslte/srslog/log_channel.h +++ b/lib/include/srslte/srslog/log_channel.h @@ -14,7 +14,8 @@ #define SRSLOG_LOG_CHANNEL_H #include "srslte/srslog/detail/log_backend.h" -#include +#include "srslte/srslog/detail/log_entry.h" +#include "srslte/srslog/sink.h" namespace srslog { @@ -22,9 +23,7 @@ namespace srslog { struct log_channel_config { log_channel_config() = default; log_channel_config(std::string n, char tag, bool should_print_context) : - name(std::move(n)), - tag(tag), - should_print_context(should_print_context) + name(std::move(n)), tag(tag), should_print_context(should_print_context) {} /// Optional log channel name. If set, will get printed for each log entry. @@ -95,19 +94,25 @@ public: if (!enabled()) { return; } - assert(&log_sink); + // Populate the store with all incoming arguments. fmt::dynamic_format_arg_store store; (void)std::initializer_list{(store.push_back(args), 0)...}; // Send the log entry to the backend. - detail::log_entry entry = {&log_sink, - std::chrono::high_resolution_clock::now(), - {ctx_value, should_print_context}, - fmtstr, - std::move(store), - log_name, - log_tag}; + log_formatter& formatter = log_sink.get_formatter(); + detail::log_entry entry = { + &log_sink, + [&formatter](detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) { + formatter.format(std::move(metadata), buffer); + }, + {std::chrono::high_resolution_clock::now(), + {ctx_value, should_print_context}, + fmtstr, + std::move(store), + log_name, + log_tag}}; backend.push(std::move(entry)); } @@ -123,7 +128,6 @@ public: return; } - assert(&log_sink); // Populate the store with all incoming arguments. fmt::dynamic_format_arg_store store; (void)std::initializer_list{(store.push_back(args), 0)...}; @@ -133,14 +137,78 @@ public: len = std::min(len, hex_max_size); // Send the log entry to the backend. - detail::log_entry entry = {&log_sink, - std::chrono::high_resolution_clock::now(), - {ctx_value, should_print_context}, - fmtstr, - std::move(store), - log_name, - log_tag, - std::vector(buffer, buffer + len)}; + log_formatter& formatter = log_sink.get_formatter(); + detail::log_entry entry = { + &log_sink, + [&formatter](detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) { + formatter.format(std::move(metadata), buffer); + }, + {std::chrono::high_resolution_clock::now(), + {ctx_value, should_print_context}, + fmtstr, + std::move(store), + log_name, + log_tag, + std::vector(buffer, buffer + len)}}; + backend.push(std::move(entry)); + } + + /// Builds the provided log entry and passes it to the backend. When the + /// channel is disabled the log entry will be discarded. + template + void operator()(const context& ctx) + { + if (!enabled()) { + return; + } + + // Send the log entry to the backend. + log_formatter& formatter = log_sink.get_formatter(); + detail::log_entry entry = { + &log_sink, + [&formatter, ctx](detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) { + formatter.format_ctx(ctx, std::move(metadata), buffer); + }, + {std::chrono::high_resolution_clock::now(), + {ctx_value, should_print_context}, + "", + {}, + log_name, + log_tag}}; + backend.push(std::move(entry)); + } + + /// Builds the provided log entry and passes it to the backend. When the + /// channel is disabled the log entry will be discarded. + template + void operator()(const context& ctx, + const std::string& fmtstr, + Args&&... args) + { + if (!enabled()) { + return; + } + + // Populate the store with all incoming arguments. + fmt::dynamic_format_arg_store store; + (void)std::initializer_list{(store.push_back(args), 0)...}; + + // Send the log entry to the backend. + log_formatter& formatter = log_sink.get_formatter(); + detail::log_entry entry = { + &log_sink, + [&formatter, ctx](detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) { + formatter.format_ctx(ctx, std::move(metadata), buffer); + }, + {std::chrono::high_resolution_clock::now(), + {ctx_value, should_print_context}, + fmtstr, + std::move(store), + log_name, + log_tag}}; backend.push(std::move(entry)); } diff --git a/lib/include/srslte/srslog/sink.h b/lib/include/srslte/srslog/sink.h index 62b430d57..e0f704394 100644 --- a/lib/include/srslte/srslog/sink.h +++ b/lib/include/srslte/srslog/sink.h @@ -15,6 +15,8 @@ #include "srslte/srslog/detail/support/error_string.h" #include "srslte/srslog/detail/support/memory_buffer.h" +#include "srslte/srslog/formatter.h" +#include namespace srslog { @@ -23,13 +25,25 @@ namespace srslog { class sink { public: + explicit sink(std::unique_ptr f) : formatter(std::move(f)) + { + assert(formatter && "Invalid formatter"); + } + virtual ~sink() = default; + /// Returns the formatter used by this sink. + log_formatter& get_formatter() { return *formatter; } + const log_formatter& get_formatter() const { return *formatter; } + /// Writes the provided memory buffer into the sink. virtual detail::error_string write(detail::memory_buffer buffer) = 0; /// Flushes any buffered contents to the backing store. virtual detail::error_string flush() = 0; + +private: + std::unique_ptr formatter; }; } // namespace srslog diff --git a/lib/include/srslte/srslog/srslog.h b/lib/include/srslte/srslog/srslog.h index 0c59e7a50..968a7f514 100644 --- a/lib/include/srslte/srslog/srslog.h +++ b/lib/include/srslte/srslog/srslog.h @@ -52,6 +52,10 @@ fetch_log_channel(const std::string& id, sink& s, log_channel_config config); /// NOTE: Deprecated, use fetch_log_channel instead. log_channel* create_log_channel(const std::string& id, sink& s); +/// +/// Logger management functions. +/// + namespace detail { /// Internal helper functions. @@ -60,10 +64,6 @@ detail::any* find_logger(const std::string& id); } // namespace detail -/// -/// Logger management functions. -/// - /// Finds a logger with the specified id string and type in the repository. On /// success returns a pointer to the requested logger, otherwise nullptr. /// NOTE: T should be a type that is a logger. @@ -133,13 +133,30 @@ inline T* create_logger(const std::string& id, Args&&... args) return detail::any_cast(p); } +/// +/// Formatter management functions. +/// + +/// Installs the specified formatter to be used as the default one by new sinks. +/// The initial default formatter formats plain text. +void set_default_log_formatter(std::unique_ptr f); + +/// Returns the instance of the default formatter being used. +std::unique_ptr get_default_log_formatter(); + +/// Creates a new instance of a plain text formatter. +std::unique_ptr create_text_formatter(); + +/// Creates a new instance of a JSON formatter. +std::unique_ptr create_json_formatter(); + /// /// Sink management functions. /// /// Installs the specified sink to be used as the default one by new log /// channels and loggers. -/// The initial default sink writes to stdout. +/// The initial default sink writes to stdout with a text formatter. void set_default_sink(sink& s); /// Returns the instance of the default sink being used. @@ -149,18 +166,35 @@ sink& get_default_sink(); /// success returns a pointer to the requested sink, otherwise nullptr. sink* find_sink(const std::string& id); -/// Returns an instance of a sink that writes to the stdout stream. -sink& fetch_stdout_sink(); +/// Returns an instance of a sink that writes to the stdout stream. You may use +/// different ids if you need to create multiple stdout sinks with different +/// formatters. +sink& fetch_stdout_sink( + const std::string& id = "stdout", + std::unique_ptr f = get_default_log_formatter()); -/// Returns an instance of a sink that writes to the stderr stream. -sink& fetch_stderr_sink(); +/// Returns an instance of a sink that writes to the stderr stream. You may use +/// different ids if you need to create multiple stderr sinks with different +/// formatters. +sink& fetch_stderr_sink( + const std::string& id = "stderr", + std::unique_ptr f = get_default_log_formatter()); /// Returns an instance of a sink that writes into a file in the specified path. /// Specifying a max_size value different to zero will make the sink create a /// new file each time the current file exceeds this value. The units of /// max_size are bytes. -/// NOTE: Any '#' characters in the id will get removed. -sink& fetch_file_sink(const std::string& path, size_t max_size = 0); +/// NOTE: Any '#' characters in the path will get removed. +sink& fetch_file_sink( + const std::string& path, + size_t max_size = 0, + std::unique_ptr f = get_default_log_formatter()); + +/// Installs a custom user defined sink in the framework getting associated to +/// the specified id. Returns true on success, otherwise false. +/// WARNING: This function is an advanced feature and users should really know +/// what they are doing when using it. +bool install_custom_sink(const std::string& id, std::unique_ptr s); /// Creates a new sink that writes into the a file in the specified path and /// registers it into a sink repository so that it can be later retrieved in diff --git a/lib/src/srslog/CMakeLists.txt b/lib/src/srslog/CMakeLists.txt index de14d93bb..76ca5934b 100644 --- a/lib/src/srslog/CMakeLists.txt +++ b/lib/src/srslog/CMakeLists.txt @@ -13,9 +13,9 @@ set(SOURCES event_trace.cpp) add_subdirectory(bundled/fmt) +add_subdirectory(formatters) find_package(Threads REQUIRED) add_library(srslog STATIC ${SOURCES}) -target_link_libraries(srslog fmt "${CMAKE_THREAD_LIBS_INIT}") -INSTALL(TARGETS srslog DESTINATION ${LIBRARY_DIR}) +target_link_libraries(srslog formatters fmt "${CMAKE_THREAD_LIBS_INIT}") diff --git a/lib/src/srslog/backend_worker.cpp b/lib/src/srslog/backend_worker.cpp index 1d551cd85..f45721f53 100644 --- a/lib/src/srslog/backend_worker.cpp +++ b/lib/src/srslog/backend_worker.cpp @@ -11,9 +11,7 @@ */ #include "backend_worker.h" -#include "formatter.h" #include "srslte/srslog/sink.h" -#include using namespace srslog; @@ -90,13 +88,14 @@ void backend_worker::process_log_entry(detail::log_entry&& entry) return; } - // Save sink pointer before moving the entry. - sink* s = entry.s; + fmt::memory_buffer fmt_buffer; - std::string result = format_log_entry_to_text(std::move(entry)); - detail::memory_buffer buffer(result); + assert(entry.format_func && "Invalid format function"); + entry.format_func(std::move(entry.metadata), fmt_buffer); - if (auto err_str = s->write(buffer)) { + const auto str = fmt::to_string(fmt_buffer); + detail::memory_buffer buffer(str); + if (auto err_str = entry.s->write(buffer)) { err_handler(err_str.get_error()); } } diff --git a/lib/src/srslog/event_trace.cpp b/lib/src/srslog/event_trace.cpp index 8b9162008..e039bfe85 100644 --- a/lib/src/srslog/event_trace.cpp +++ b/lib/src/srslog/event_trace.cpp @@ -12,7 +12,6 @@ #include "srslte/srslog/event_trace.h" #include "srslte/srslog/srslog.h" -#include #include #undef trace_duration_begin diff --git a/lib/src/srslog/formatter.h b/lib/src/srslog/formatter.h deleted file mode 100644 index ea7d58c9b..000000000 --- a/lib/src/srslog/formatter.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * \section COPYRIGHT - * - * Copyright 2013-2020 Software Radio Systems Limited - * - * By using this file, you agree to the terms and conditions set - * forth in the LICENSE file which can be found at the top level of - * the distribution. - * - */ - -#ifndef SRSLOG_FORMATTER_H -#define SRSLOG_FORMATTER_H - -#include "srslte/srslog/bundled/fmt/chrono.h" -#include "srslte/srslog/bundled/fmt/ranges.h" -#include "srslte/srslog/detail/log_entry.h" - -namespace srslog { - -namespace detail { - -/// Formats into a hex dump a range of elements, storing the result in the input -/// buffer. -inline void format_hex_dump(const std::vector& v, - fmt::memory_buffer& buffer) -{ - if (v.empty()) { - return; - } - - const size_t elements_per_line = 16; - - for (auto i = v.cbegin(), e = v.cend(); i != e;) { - auto num_elements = - std::min(elements_per_line, std::distance(i, e)); - - fmt::format_to(buffer, - " {:04x}: {:02x}\n", - std::distance(v.cbegin(), i), - fmt::join(i, i + num_elements, " ")); - - std::advance(i, num_elements); - } -} - -} // namespace detail - -/// Formats to text all the fields of a log entry, -inline std::string format_log_entry_to_text(detail::log_entry&& entry) -{ - fmt::memory_buffer buffer; - - // Time stamp data preparation. - std::tm current_time = - fmt::gmtime(std::chrono::high_resolution_clock::to_time_t(entry.tp)); - auto us_fraction = std::chrono::duration_cast( - entry.tp.time_since_epoch()) - .count() % - 1000000u; - fmt::format_to(buffer, "{:%H:%M:%S}.{:06} ", current_time, us_fraction); - - // Format optional fields if present. - if (!entry.log_name.empty()) { - fmt::format_to(buffer, "[{: <4.4}] ", entry.log_name); - } - if (entry.log_tag != '\0') { - fmt::format_to(buffer, "[{}] ", entry.log_tag); - } - if (entry.context.enabled) { - fmt::format_to(buffer, "[{:5}] ", entry.context.value); - } - - // Message formatting. - fmt::format_to( - buffer, "{}\n", fmt::vsprintf(entry.fmtstring, std::move(entry.store))); - - // Optional hex dump formatting. - detail::format_hex_dump(entry.hex_dump, buffer); - - return fmt::to_string(buffer); -} - -} // namespace srslog - -#endif // SRSLOG_FORMATTER_H diff --git a/lib/src/srslog/sink_repository.h b/lib/src/srslog/sink_repository.h deleted file mode 100644 index bd506d2fe..000000000 --- a/lib/src/srslog/sink_repository.h +++ /dev/null @@ -1,114 +0,0 @@ -/** - * - * \section COPYRIGHT - * - * Copyright 2013-2020 Software Radio Systems Limited - * - * By using this file, you agree to the terms and conditions set - * forth in the LICENSE file which can be found at the top level of - * the distribution. - * - */ - -#ifndef SRSLOG_SINK_REPOSITORY_H -#define SRSLOG_SINK_REPOSITORY_H - -#include "object_repository.h" -#include "sinks/stream_sink.h" - -namespace srslog { - -/// The sink repository stores sink instances associated to an id. Both stdout -/// and stderr stream sinks are created on construction so they accessible -/// without the need of creating them previously. -/// NOTE: Thread safe class. -class sink_repository -{ - /// Identifiers for stdout and stderr sinks. - static constexpr char stdout_id[] = "stdout#"; - static constexpr char stderr_id[] = "stderr#"; - - object_repository > repo; - -public: - sink_repository() - { - //:TODO: GCC5 or lower versions emits an error if we use the new() expression directly, use redundant - //piecewise_construct instead. - repo.emplace(std::piecewise_construct, - std::forward_as_tuple(stdout_id), - std::forward_as_tuple(new stream_sink(sink_stream_type::stdout))); - repo.emplace(std::piecewise_construct, - std::forward_as_tuple(stderr_id), - std::forward_as_tuple(new stream_sink(sink_stream_type::stderr))); - } - - /// Returns the instance of the sink that writes to stdout. - sink& get_stdout_sink() - { - auto s = repo.find(stdout_id); - assert(s && "stdout sink should always exist"); - return *(s->get()); - } - const sink& get_stdout_sink() const - { - const auto s = repo.find(stdout_id); - assert(s && "stdout sink should always exist"); - return *(s->get()); - } - - /// Returns the instance of the sink that writes to stderr. - sink& get_stderr_sink() - { - auto s = repo.find(stderr_id); - assert(s && "stderr sink should always exist"); - return *(s->get()); - } - const sink& get_stderr_sink() const - { - const auto s = repo.find(stderr_id); - assert(s && "stderr sink should always exist"); - return *(s->get()); - } - - /// Finds a sink with the specified id in the repository. Returns a pointer to - /// the sink, otherwise nullptr if not found. - sink* find(const std::string& id) - { - auto p = repo.find(id); - return (p) ? p->get() : nullptr; - } - const sink* find(const std::string& id) const - { - const auto p = repo.find(id); - return (p) ? p->get() : nullptr; - } - - /// Returns an instance of a sink specified by the input arguments. - template - sink& fetch_sink(Args&&... args) - { - return *repo.emplace(std::forward(args)...); - } - - /// Returns a copy of the list of registered sinks. - std::vector contents() const - { - auto repo_contents = repo.contents(); - - std::vector data; - data.reserve(repo_contents.size()); - for (const auto& s : repo_contents) { - data.push_back(s->get()); - } - - return data; - } -}; - -constexpr char sink_repository::stdout_id[]; -constexpr char sink_repository::stderr_id[]; - -} // namespace srslog - -#endif // SRSLOG_SINK_REPOSITORY_H diff --git a/lib/src/srslog/sinks/file_sink.h b/lib/src/srslog/sinks/file_sink.h index 60dc8f6c9..3e7c085fd 100644 --- a/lib/src/srslog/sinks/file_sink.h +++ b/lib/src/srslog/sinks/file_sink.h @@ -15,7 +15,6 @@ #include "file_utils.h" #include "srslte/srslog/sink.h" -#include namespace srslog { @@ -25,7 +24,10 @@ namespace srslog { class file_sink : public sink { public: - file_sink(std::string name, size_t max_size) : + file_sink(std::string name, + size_t max_size, + std::unique_ptr f) : + sink(std::move(f)), base_filename(std::move(name)), max_size((max_size == 0) ? 0 : std::max(max_size, 4 * 1024)) {} @@ -33,8 +35,6 @@ public: file_sink(const file_sink& other) = delete; file_sink& operator=(const file_sink& other) = delete; - ~file_sink() override { handler.close(); } - detail::error_string write(detail::memory_buffer buffer) override { // Create a new file the first time we hit this method. diff --git a/lib/src/srslog/sinks/file_utils.h b/lib/src/srslog/sinks/file_utils.h index 77315a1e2..4499568ec 100644 --- a/lib/src/srslog/sinks/file_utils.h +++ b/lib/src/srslog/sinks/file_utils.h @@ -85,7 +85,7 @@ public: explicit operator bool() const { return handle; } /// Returns the handle of the underlying file. - std::FILE* get_handle() { return handle; } + std::FILE* get_handle() const { return handle; } /// Returns the path of the file. const std::string& get_path() const { return path; } @@ -101,8 +101,8 @@ public: return {}; } - return format_error(fmt::format("Unable to create log file \"{}\"", path), - errno); + return format_error( + fmt::format("Unable to create log file \"{}\"", new_path), errno); } /// Writes the provided memory buffer into an open file, otherwise does @@ -112,9 +112,10 @@ public: if (handle && std::fwrite(buffer.data(), sizeof(char), buffer.size(), handle) != buffer.size()) { + auto err_str = format_error( + fmt::format("Unable to write log file \"{}\"", path), errno); close(); - return format_error(fmt::format("Unable to write log file \"{}\"", path), - errno); + return err_str; } return {}; @@ -124,10 +125,11 @@ public: detail::error_string flush() { if (handle && ::fflush(handle) == EOF) { - close(); - return format_error( + auto err_str = format_error( fmt::format("Error encountered while flushing log file \"{}\"", path), errno); + close(); + return err_str; } return {}; diff --git a/lib/src/srslog/sinks/stream_sink.h b/lib/src/srslog/sinks/stream_sink.h index 2cc142c97..7404a17db 100644 --- a/lib/src/srslog/sinks/stream_sink.h +++ b/lib/src/srslog/sinks/stream_sink.h @@ -14,8 +14,6 @@ #define SRSLOG_STREAM_SINK_H #include "srslte/srslog/sink.h" -#include -#include namespace srslog { @@ -26,7 +24,8 @@ enum class sink_stream_type { stdout, stderr }; class stream_sink : public sink { public: - explicit stream_sink(sink_stream_type s) : + stream_sink(sink_stream_type s, std::unique_ptr f) : + sink(std::move(f)), handle((s == sink_stream_type::stdout) ? stdout : stderr) {} diff --git a/lib/src/srslog/srslog.cpp b/lib/src/srslog/srslog.cpp index bc211bbc6..9d416e328 100644 --- a/lib/src/srslog/srslog.cpp +++ b/lib/src/srslog/srslog.cpp @@ -11,6 +11,7 @@ */ #include "srslte/srslog/srslog.h" +#include "formatters/json_formatter.h" #include "sinks/file_sink.h" #include "srslog_instance.h" @@ -27,10 +28,13 @@ static std::string remove_sharp_chars(const std::string& s) /// Generic argument function that fetches a log channel from the repository. template -static log_channel& fetch_log_channel_helper(const std::string& id, Args&&... args) +static log_channel& fetch_log_channel_helper(const std::string& id, + Args&&... args) { return srslog_instance::get().get_channel_repo().emplace( - std::piecewise_construct, std::forward_as_tuple(id), std::forward_as_tuple(id, std::forward(args)...)); + std::piecewise_construct, + std::forward_as_tuple(id), + std::forward_as_tuple(id, std::forward(args)...)); } /// @@ -46,18 +50,46 @@ log_channel& srslog::fetch_log_channel(const std::string& id) { assert(!id.empty() && "Empty id string"); - std::string clean_id = remove_sharp_chars(id); + std::string clean_id = remove_sharp_chars(id); srslog_instance& instance = srslog_instance::get(); - return fetch_log_channel_helper(clean_id, instance.get_default_sink(), instance.get_backend()); + return fetch_log_channel_helper( + clean_id, instance.get_default_sink(), instance.get_backend()); } -log_channel& srslog::fetch_log_channel(const std::string& id, sink& s, log_channel_config config) +log_channel& srslog::fetch_log_channel(const std::string& id, + sink& s, + log_channel_config config) { assert(!id.empty() && "Empty id string"); - std::string clean_id = remove_sharp_chars(id); + std::string clean_id = remove_sharp_chars(id); srslog_instance& instance = srslog_instance::get(); - return fetch_log_channel_helper(clean_id, s, instance.get_backend(), std::move(config)); + return fetch_log_channel_helper( + clean_id, s, instance.get_backend(), std::move(config)); +} + +/// +/// Formatter management functions. +/// + +void srslog::set_default_log_formatter(std::unique_ptr f) +{ + srslog_instance::get().set_default_formatter(std::move(f)); +} + +std::unique_ptr srslog::get_default_log_formatter() +{ + return srslog_instance::get().get_default_formatter(); +} + +std::unique_ptr srslog::create_text_formatter() +{ + return std::unique_ptr(new text_formatter); +} + +std::unique_ptr srslog::create_json_formatter() +{ + return std::unique_ptr(new json_formatter); } /// @@ -76,29 +108,65 @@ sink& srslog::get_default_sink() sink* srslog::find_sink(const std::string& id) { - return srslog_instance::get().get_sink_repo().find(id); + auto ptr = srslog_instance::get().get_sink_repo().find(id); + return (ptr) ? ptr->get() : nullptr; } -sink& srslog::fetch_stdout_sink() +sink& srslog::fetch_stdout_sink(const std::string& id, + std::unique_ptr f) { - return srslog_instance::get().get_sink_repo().get_stdout_sink(); + assert(!id.empty() && "Empty id string"); + + auto& s = srslog_instance::get().get_sink_repo().emplace( + std::piecewise_construct, + std::forward_as_tuple(id), + std::forward_as_tuple( + new stream_sink(sink_stream_type::stdout, std::move(f)))); + + return *s; } -sink& srslog::fetch_stderr_sink() +sink& srslog::fetch_stderr_sink(const std::string& id, + std::unique_ptr f) { - return srslog_instance::get().get_sink_repo().get_stderr_sink(); + assert(!id.empty() && "Empty id string"); + + auto& s = srslog_instance::get().get_sink_repo().emplace( + std::piecewise_construct, + std::forward_as_tuple(id), + std::forward_as_tuple( + new stream_sink(sink_stream_type::stderr, std::move(f)))); + + return *s; } -sink& srslog::fetch_file_sink(const std::string& path, size_t max_size) +sink& srslog::fetch_file_sink(const std::string& path, + size_t max_size, + std::unique_ptr f) { assert(!path.empty() && "Empty path string"); - std::string clean_path = remove_sharp_chars(path); - //:TODO: GCC5 or lower versions emits an error if we use the new() expression directly, use redundant - // piecewise_construct instead. - return srslog_instance::get().get_sink_repo().fetch_sink(std::piecewise_construct, - std::forward_as_tuple(clean_path), - std::forward_as_tuple(new file_sink(clean_path, max_size))); + //:TODO: GCC5 or lower versions emits an error if we use the new() expression + // directly, use redundant piecewise_construct instead. + auto& s = srslog_instance::get().get_sink_repo().emplace( + std::piecewise_construct, + std::forward_as_tuple(path), + std::forward_as_tuple(new file_sink(path, max_size, std::move(f)))); + + return *s; +} + +bool srslog::install_custom_sink(const std::string& id, std::unique_ptr s) +{ + assert(!id.empty() && "Empty path string"); + + sink* input_sink = s.get(); + sink* returned_sink = + srslog_instance::get().get_sink_repo().emplace(id, std::move(s)).get(); + + // Successful insertion occurs when the returned object is the same one as the + // input object. + return input_sink == returned_sink; } /// @@ -122,9 +190,16 @@ void srslog::flush() // The backend will set this shared variable when done. detail::shared_variable completion_flag(false); + auto sink_ptrs = instance.get_sink_repo().contents(); + std::vector sinks; + sinks.reserve(sink_ptrs.size()); + for (const auto& s : sink_ptrs) { + sinks.push_back(s->get()); + } + detail::log_entry cmd; cmd.flush_cmd = std::unique_ptr( - new detail::flush_backend_cmd{completion_flag, instance.get_sink_repo().contents()}); + new detail::flush_backend_cmd{completion_flag, std::move(sinks)}); instance.get_backend().push(std::move(cmd)); @@ -148,10 +223,12 @@ detail::any* srslog::detail::find_logger(const std::string& id) return srslog_instance::get().get_logger_repo().find(id); } -detail::any* srslog::detail::fetch_logger(const std::string& id, detail::any&& logger) +detail::any* srslog::detail::fetch_logger(const std::string& id, + detail::any&& logger) { assert(!id.empty() && "Empty id string"); - return &srslog_instance::get().get_logger_repo().emplace(id, std::move(logger)); + return &srslog_instance::get().get_logger_repo().emplace(id, + std::move(logger)); } /// Builds a logger name out of the id and tag. @@ -161,7 +238,9 @@ static std::string build_logger_name(const std::string& id, char tag) } /// Fetches a logger with all its log channels. -static basic_logger& fetch_basic_logger_helper(const std::string& id, sink& s, bool should_print_context) +static basic_logger& fetch_basic_logger_helper(const std::string& id, + sink& s, + bool should_print_context) { static constexpr char basic_logger_chan_tags[] = {'E', 'W', 'I', 'D'}; @@ -170,36 +249,41 @@ static basic_logger& fetch_basic_logger_helper(const std::string& id, sink& s, b // User created log channels cannot have ids with a # character, encode the // ids here with a # to ensure all channels are unique. - log_channel& error = - fetch_log_channel_helper(build_logger_name(id, basic_logger_chan_tags[0]), - s, - instance.get_backend(), - log_channel_config{id, basic_logger_chan_tags[0], should_print_context}); - log_channel& warning = - fetch_log_channel_helper(build_logger_name(id, basic_logger_chan_tags[1]), - s, - instance.get_backend(), - log_channel_config{id, basic_logger_chan_tags[1], should_print_context}); - log_channel& info = fetch_log_channel_helper(build_logger_name(id, basic_logger_chan_tags[2]), - s, - instance.get_backend(), - log_channel_config{id, basic_logger_chan_tags[2], should_print_context}); - log_channel& debug = - fetch_log_channel_helper(build_logger_name(id, basic_logger_chan_tags[3]), - s, - instance.get_backend(), - log_channel_config{id, basic_logger_chan_tags[3], should_print_context}); + log_channel& error = fetch_log_channel_helper( + build_logger_name(id, basic_logger_chan_tags[0]), + s, + instance.get_backend(), + log_channel_config{id, basic_logger_chan_tags[0], should_print_context}); + log_channel& warning = fetch_log_channel_helper( + build_logger_name(id, basic_logger_chan_tags[1]), + s, + instance.get_backend(), + log_channel_config{id, basic_logger_chan_tags[1], should_print_context}); + log_channel& info = fetch_log_channel_helper( + build_logger_name(id, basic_logger_chan_tags[2]), + s, + instance.get_backend(), + log_channel_config{id, basic_logger_chan_tags[2], should_print_context}); + log_channel& debug = fetch_log_channel_helper( + build_logger_name(id, basic_logger_chan_tags[3]), + s, + instance.get_backend(), + log_channel_config{id, basic_logger_chan_tags[3], should_print_context}); return fetch_logger(id, error, warning, info, debug); } -basic_logger& srslog::fetch_basic_logger(const std::string& id, bool should_print_context) +basic_logger& srslog::fetch_basic_logger(const std::string& id, + bool should_print_context) { assert(!id.empty() && "Empty id string"); - return fetch_basic_logger_helper(id, srslog_instance::get().get_default_sink(), should_print_context); + return fetch_basic_logger_helper( + id, srslog_instance::get().get_default_sink(), should_print_context); } -basic_logger& srslog::fetch_basic_logger(const std::string& id, sink& s, bool should_print_context) +basic_logger& srslog::fetch_basic_logger(const std::string& id, + sink& s, + bool should_print_context) { assert(!id.empty() && "Empty id string"); return fetch_basic_logger_helper(id, s, should_print_context); @@ -211,28 +295,33 @@ basic_logger& srslog::fetch_basic_logger(const std::string& id, sink& s, bool sh /// Creates and registers a log channel. Returns a pointer to the newly created /// channel on success, otherwise nullptr. -static log_channel* create_and_register_log_channel(const std::string& id, sink& s) +static log_channel* create_and_register_log_channel(const std::string& id, + sink& s) { assert(!id.empty() && "Empty id string"); srslog_instance& instance = srslog_instance::get(); auto& p = instance.get_channel_repo().emplace( - std::piecewise_construct, std::forward_as_tuple(id), std::forward_as_tuple(id, s, instance.get_backend())); + std::piecewise_construct, + std::forward_as_tuple(id), + std::forward_as_tuple(id, s, instance.get_backend())); return &p; } -static log_channel* create_and_register_log_channel(const std::string& id, log_channel_config config, sink& s) +static log_channel* create_and_register_log_channel(const std::string& id, + log_channel_config config, + sink& s) { assert(!id.empty() && "Empty id string"); srslog_instance& instance = srslog_instance::get(); - auto& p = - instance.get_channel_repo().emplace(std::piecewise_construct, - std::forward_as_tuple(id), - std::forward_as_tuple(id, s, instance.get_backend(), std::move(config))); + auto& p = instance.get_channel_repo().emplace( + std::piecewise_construct, + std::forward_as_tuple(id), + std::forward_as_tuple(id, s, instance.get_backend(), std::move(config))); return &p; } @@ -255,23 +344,32 @@ log_channel* srslog::create_log_channel(const std::string& id, sink& s) sink* srslog::create_stdout_sink(const std::string& name) { - return &srslog_instance::get().get_sink_repo().get_stdout_sink(); + return srslog_instance::get().get_sink_repo().find("stdout")->get(); } sink* srslog::create_stderr_sink(const std::string& name) { - return &srslog_instance::get().get_sink_repo().get_stderr_sink(); + return srslog_instance::get().get_sink_repo().find("stderr")->get(); } sink* srslog::create_file_sink(const std::string& path, size_t max_size) { - //:TODO: GCC5 or lower versions emits an error if we use the new() expression directly, use redundant - // piecewise_construct instead. - return &srslog_instance::get().get_sink_repo().fetch_sink( - std::piecewise_construct, std::forward_as_tuple(path), std::forward_as_tuple(new file_sink(path, max_size))); + //:TODO: GCC5 or lower versions emits an error if we use the new() expression + // directly, use redundant piecewise_construct instead. + return srslog_instance::get() + .get_sink_repo() + .emplace(std::piecewise_construct, + std::forward_as_tuple(path), + std::forward_as_tuple(new file_sink( + path, + max_size, + std::unique_ptr(new text_formatter)))) + .get(); } -basic_logger* srslog::create_basic_logger(const std::string& id, sink& s, bool should_print_context) +basic_logger* srslog::create_basic_logger(const std::string& id, + sink& s, + bool should_print_context) { assert(!id.empty() && "Empty id string"); @@ -289,16 +387,24 @@ basic_logger* srslog::create_basic_logger(const std::string& id, sink& s, bool s // without any id clashes. log_channel* error = create_and_register_log_channel( - build_logger_name(id, basic_logger_chan_tags[0]), {id, basic_logger_chan_tags[0], should_print_context}, s); + build_logger_name(id, basic_logger_chan_tags[0]), + {id, basic_logger_chan_tags[0], should_print_context}, + s); assert(error && "Could not create channel"); log_channel* warning = create_and_register_log_channel( - build_logger_name(id, basic_logger_chan_tags[1]), {id, basic_logger_chan_tags[1], should_print_context}, s); + build_logger_name(id, basic_logger_chan_tags[1]), + {id, basic_logger_chan_tags[1], should_print_context}, + s); assert(warning && "Could not create channel"); log_channel* info = create_and_register_log_channel( - build_logger_name(id, basic_logger_chan_tags[2]), {id, basic_logger_chan_tags[2], should_print_context}, s); + build_logger_name(id, basic_logger_chan_tags[2]), + {id, basic_logger_chan_tags[2], should_print_context}, + s); assert(info && "Could not create channel"); log_channel* debug = create_and_register_log_channel( - build_logger_name(id, basic_logger_chan_tags[3]), {id, basic_logger_chan_tags[3], should_print_context}, s); + build_logger_name(id, basic_logger_chan_tags[3]), + {id, basic_logger_chan_tags[3], should_print_context}, + s); assert(debug && "Could not create channel"); return create_logger(id, *error, *warning, *info, *debug); diff --git a/lib/src/srslog/srslog_c.cpp b/lib/src/srslog/srslog_c.cpp index 1f58637cf..c89a1a593 100644 --- a/lib/src/srslog/srslog_c.cpp +++ b/lib/src/srslog/srslog_c.cpp @@ -12,7 +12,6 @@ #include "srslte/srslog/srslog_c.h" #include "srslte/srslog/srslog.h" -#include #include using namespace srslog; diff --git a/lib/src/srslog/srslog_instance.h b/lib/src/srslog/srslog_instance.h index 682947bb3..bdc1fac93 100644 --- a/lib/src/srslog/srslog_instance.h +++ b/lib/src/srslog/srslog_instance.h @@ -13,9 +13,10 @@ #ifndef SRSLOG_SRSLOG_INSTANCE_H #define SRSLOG_SRSLOG_INSTANCE_H +#include "formatters/text_formatter.h" #include "log_backend_impl.h" -#include "sink_repository.h" -#include "srslte/srslog/detail/support/any.h" +#include "object_repository.h" +#include "sinks/stream_sink.h" #include "srslte/srslog/log_channel.h" namespace srslog { @@ -23,7 +24,29 @@ namespace srslog { /// Singleton of the framework containing all the required classes. class srslog_instance { - srslog_instance() { default_sink = &sink_repo.get_stdout_sink(); } + srslog_instance() + { + // stdout and stderr sinks are always present. + auto& stdout_sink = sink_repo.emplace( + std::piecewise_construct, + std::forward_as_tuple("stdout"), + std::forward_as_tuple(new stream_sink( + sink_stream_type::stdout, + std::unique_ptr(new text_formatter)))); + default_sink = stdout_sink.get(); + + sink_repo.emplace(std::piecewise_construct, + std::forward_as_tuple("stderr"), + std::forward_as_tuple(new stream_sink( + sink_stream_type::stderr, + std::unique_ptr(new text_formatter)))); + + // Initialize the default formatter pointer with a text formatter. + { + detail::scoped_lock lock(formatter_mutex); + default_formatter = std::unique_ptr(new text_formatter); + } + } public: srslog_instance(const srslog_instance& other) = delete; @@ -47,8 +70,9 @@ public: const channel_repo_type& get_channel_repo() const { return channel_repo; } /// Sink repository accessor. - sink_repository& get_sink_repo() { return sink_repo; } - const sink_repository& get_sink_repo() const { return sink_repo; } + using sink_repo_type = object_repository>; + sink_repo_type& get_sink_repo() { return sink_repo; } + const sink_repo_type& get_sink_repo() const { return sink_repo; } /// Backend accessor. detail::log_backend& get_backend() { return backend; } @@ -64,16 +88,32 @@ public: void set_default_sink(sink& s) { default_sink = &s; } /// Returns the default sink. - sink& get_default_sink() { return *default_sink; } + sink& get_default_sink() const { return *default_sink; } + + /// Set the specified formatter as the default one. + void set_default_formatter(std::unique_ptr f) + { + detail::scoped_lock lock(formatter_mutex); + default_formatter = std::move(f); + } + + /// Returns the default formatter. + std::unique_ptr get_default_formatter() const + { + detail::scoped_lock lock(formatter_mutex); + return default_formatter->clone(); + } private: /// NOTE: The order of declaration of each member is important here for proper /// destruction. - sink_repository sink_repo; + sink_repo_type sink_repo; log_backend_impl backend; channel_repo_type channel_repo; logger_repo_type logger_repo; detail::shared_variable default_sink{nullptr}; + mutable detail::mutex formatter_mutex; + std::unique_ptr default_formatter; }; } // namespace srslog diff --git a/lib/test/srslog/CMakeLists.txt b/lib/test/srslog/CMakeLists.txt index 96bce2449..7209b87df 100644 --- a/lib/test/srslog/CMakeLists.txt +++ b/lib/test/srslog/CMakeLists.txt @@ -42,7 +42,17 @@ add_definitions(-DENABLE_SRSLOG_EVENT_TRACE) target_link_libraries(tracer_test srslog) add_test(tracer_test tracer_test) -add_executable(formatter_test formatter_test.cpp) -target_include_directories(formatter_test PUBLIC ../../) -target_link_libraries(formatter_test srslog) -add_test(formatter_test formatter_test) +#:TODO: re-enable test. +#add_executable(text_formatter_test text_formatter_test.cpp) +#target_include_directories(text_formatter_test PUBLIC ../../) +#target_link_libraries(text_formatter_test srslog) +#add_test(text_formatter_test text_formatter_test) + +add_executable(json_formatter_test json_formatter_test.cpp) +target_include_directories(json_formatter_test PUBLIC ../../) +target_link_libraries(json_formatter_test srslog) +add_test(json_formatter_test json_formatter_test) + +add_executable(context_test context_test.cpp) +target_link_libraries(context_test srslog) +add_test(context_test context_test) diff --git a/lib/test/srslog/event_trace_test.cpp b/lib/test/srslog/event_trace_test.cpp index b952b8f33..a6c3fbe2e 100644 --- a/lib/test/srslog/event_trace_test.cpp +++ b/lib/test/srslog/event_trace_test.cpp @@ -12,25 +12,13 @@ #include "srslte/srslog/event_trace.h" #include "srslte/srslog/log_channel.h" -#include "srslte/srslog/sink.h" +#include "test_dummies.h" #include "testing_helpers.h" using namespace srslog; namespace { -/// A Dummy implementation of a sink. -class sink_dummy : public sink -{ -public: - detail::error_string write(detail::memory_buffer buffer) override - { - return {}; - } - - detail::error_string flush() override { return {}; } -}; - /// A Spy implementation of a log backend. Tests can query if the push method /// has been invoked. class backend_spy : public detail::log_backend @@ -38,11 +26,7 @@ class backend_spy : public detail::log_backend public: void start() override {} - void push(detail::log_entry&& entry) override - { - std::string result = fmt::vsprintf(entry.fmtstring, std::move(entry.store)); - ++count; - } + void push(detail::log_entry&& entry) override { ++count; } bool is_running() const override { return true; } @@ -81,7 +65,7 @@ when_tracing_with_complete_event_then_one_event_is_generated(backend_spy& spy) int main() { - sink_dummy s; + test_dummies::sink_dummy s; backend_spy backend; log_channel c("test", s, backend); diff --git a/lib/test/srslog/file_sink_test.cpp b/lib/test/srslog/file_sink_test.cpp index ba7f12c41..f17b2a6fa 100644 --- a/lib/test/srslog/file_sink_test.cpp +++ b/lib/test/srslog/file_sink_test.cpp @@ -12,6 +12,7 @@ #include "file_test_utils.h" #include "src/srslog/sinks/file_sink.h" +#include "test_dummies.h" #include "testing_helpers.h" using namespace srslog; @@ -21,7 +22,10 @@ static constexpr char log_filename[] = "file_sink_test.log"; static bool when_data_is_written_to_file_then_contents_are_valid() { file_test_utils::scoped_file_deleter deleter(log_filename); - file_sink file(log_filename, 0); + file_sink file( + log_filename, + 0, + std::unique_ptr(new test_dummies::log_formatter_dummy)); std::vector entries; for (unsigned i = 0; i != 10; ++i) { @@ -45,7 +49,10 @@ class file_sink_subclass : public file_sink { public: file_sink_subclass(std::string name, size_t max_size) : - file_sink(std::move(name), max_size) + file_sink( + std::move(name), + max_size, + std::unique_ptr(new test_dummies::log_formatter_dummy)) {} uint32_t get_num_of_files() const { return get_file_index(); } diff --git a/lib/test/srslog/formatter_test.cpp b/lib/test/srslog/formatter_test.cpp deleted file mode 100644 index 3e553947f..000000000 --- a/lib/test/srslog/formatter_test.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/** - * - * \section COPYRIGHT - * - * Copyright 2013-2020 Software Radio Systems Limited - * - * By using this file, you agree to the terms and conditions set - * forth in the LICENSE file which can be found at the top level of - * the distribution. - * - */ - -#include "src/srslog/formatter.h" -#include "testing_helpers.h" -#include - -using namespace srslog; - -/// Helper to build a log entry. -static detail::log_entry build_log_entry() -{ - // Create a time point 50000us from epoch. - using tp_ty = std::chrono::time_point; - tp_ty tp(std::chrono::microseconds(50000)); - - fmt::dynamic_format_arg_store store; - store.push_back(88); - - return {nullptr, tp, {10, true}, "Text %d", std::move(store), "ABC", 'Z'}; -} - -static bool when_fully_filled_log_entry_then_result_everything_is_formatted() -{ - std::string result = format_log_entry_to_text(build_log_entry()); - std::string expected = "00:00:00.050000 [ABC ] [Z] [ 10] Text 88\n"; - - ASSERT_EQ(result, expected); - - return true; -} - -static bool when_log_entry_without_name_is_passed_then_name_is_not_formatted() -{ - auto entry = build_log_entry(); - entry.log_name = ""; - - std::string result = format_log_entry_to_text(std::move(entry)); - std::string expected = "00:00:00.050000 [Z] [ 10] Text 88\n"; - - ASSERT_EQ(result, expected); - - return true; -} - -static bool when_log_entry_without_tag_is_passed_then_tag_is_not_formatted() -{ - auto entry = build_log_entry(); - entry.log_tag = '\0'; - - std::string result = format_log_entry_to_text(std::move(entry)); - std::string expected = "00:00:00.050000 [ABC ] [ 10] Text 88\n"; - - ASSERT_EQ(result, expected); - - return true; -} - -static bool -when_log_entry_without_context_is_passed_then_context_is_not_formatted() -{ - auto entry = build_log_entry(); - entry.context.enabled = false; - - std::string result = format_log_entry_to_text(std::move(entry)); - std::string expected = "00:00:00.050000 [ABC ] [Z] Text 88\n"; - - ASSERT_EQ(result, expected); - - return true; -} - -static bool when_log_entry_with_hex_dump_is_passed_then_hex_dump_is_formatted() -{ - auto entry = build_log_entry(); - entry.hex_dump.resize(20); - std::iota(entry.hex_dump.begin(), entry.hex_dump.end(), 0); - - std::string result = format_log_entry_to_text(std::move(entry)); - std::string expected = - "00:00:00.050000 [ABC ] [Z] [ 10] Text 88\n" - " 0000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f\n" - " 0010: 10 11 12 13\n"; - - ASSERT_EQ(result, expected); - - return true; -} - -int main() -{ - TEST_FUNCTION( - when_fully_filled_log_entry_then_result_everything_is_formatted); - TEST_FUNCTION( - when_log_entry_without_name_is_passed_then_name_is_not_formatted); - TEST_FUNCTION(when_log_entry_without_tag_is_passed_then_tag_is_not_formatted); - TEST_FUNCTION( - when_log_entry_without_context_is_passed_then_context_is_not_formatted); - TEST_FUNCTION( - when_log_entry_with_hex_dump_is_passed_then_hex_dump_is_formatted); - - return 0; -} diff --git a/lib/test/srslog/log_backend_test.cpp b/lib/test/srslog/log_backend_test.cpp index d13ad06d1..28a81714d 100644 --- a/lib/test/srslog/log_backend_test.cpp +++ b/lib/test/srslog/log_backend_test.cpp @@ -11,7 +11,7 @@ */ #include "src/srslog/log_backend_impl.h" -#include "srslte/srslog/sink.h" +#include "test_dummies.h" #include "testing_helpers.h" using namespace srslog; @@ -46,6 +46,10 @@ namespace { class sink_spy : public sink { public: + sink_spy() : + sink(std::unique_ptr(new test_dummies::log_formatter_dummy)) + {} + detail::error_string write(detail::memory_buffer buffer) override { ++count; @@ -88,7 +92,10 @@ static detail::log_entry build_log_entry(sink* s) fmt::dynamic_format_arg_store store; store.push_back(88); - return {s, tp, {0, false}, "Text %d", std::move(store), "", '\0'}; + return { + s, + [](detail::log_entry_metadata&& metadata, fmt::memory_buffer& buffer) {}, + {tp, {0, false}, "Text %d", std::move(store), "", '\0'}}; } static bool when_backend_is_started_then_pushed_log_entries_are_sent_to_sink() @@ -104,7 +111,27 @@ static bool when_backend_is_started_then_pushed_log_entries_are_sent_to_sink() backend.stop(); ASSERT_EQ(spy.write_invocation_count(), 1); - ASSERT_NE(spy.received_buffer().find("Text 88"), std::string::npos); + + return true; +} + +static bool when_backend_is_started_then_backend_invokes_format_func() +{ + test_dummies::sink_dummy s; + + log_backend_impl backend; + backend.start(); + + auto entry = build_log_entry(&s); + unsigned counter = 0; + entry.format_func = [&counter](detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) { ++counter; }; + backend.push(std::move(entry)); + + // Stop the backend to ensure the entry has been processed. + backend.stop(); + + ASSERT_EQ(counter, 1); return true; } @@ -117,7 +144,10 @@ namespace { class sink_error_stub : public sink { public: - explicit sink_error_stub(std::string err) : err(std::move(err)) {} + explicit sink_error_stub(std::string err) : + sink(std::unique_ptr(new test_dummies::log_formatter_dummy)), + err(std::move(err)) + {} detail::error_string write(detail::memory_buffer buffer) override { @@ -211,6 +241,7 @@ int main() when_backend_is_not_started_then_pushed_log_entries_are_ignored); TEST_FUNCTION( when_backend_is_started_then_pushed_log_entries_are_sent_to_sink); + TEST_FUNCTION(when_backend_is_started_then_backend_invokes_format_func); TEST_FUNCTION(when_sink_write_fails_then_error_handler_is_invoked); TEST_FUNCTION(when_handler_is_set_after_start_then_handler_is_not_used); TEST_FUNCTION(when_empty_handler_is_used_then_backend_does_not_crash); diff --git a/lib/test/srslog/log_channel_test.cpp b/lib/test/srslog/log_channel_test.cpp index 081101bcc..377d4836b 100644 --- a/lib/test/srslog/log_channel_test.cpp +++ b/lib/test/srslog/log_channel_test.cpp @@ -11,42 +11,15 @@ */ #include "srslte/srslog/log_channel.h" -#include "srslte/srslog/sink.h" +#include "test_dummies.h" #include "testing_helpers.h" using namespace srslog; -namespace { - -/// A Dummy implementation of a sink. -class sink_dummy : public sink -{ -public: - detail::error_string write(detail::memory_buffer buffer) override - { - return {}; - } - - detail::error_string flush() override { return {}; } -}; - -/// A Dummy implementation of the log backend. -class backend_dummy : public detail::log_backend -{ -public: - void start() override {} - - void push(detail::log_entry&& entry) override {} - - bool is_running() const override { return true; } -}; - -} // namespace - static bool when_log_channel_is_created_then_id_matches_expected_value() { - backend_dummy backend; - sink_dummy s; + test_dummies::backend_dummy backend; + test_dummies::sink_dummy s; log_channel log("id", s, backend); ASSERT_EQ(log.id(), "id"); @@ -56,8 +29,8 @@ static bool when_log_channel_is_created_then_id_matches_expected_value() static bool when_log_channel_is_disabled_then_enabled_returns_false() { - backend_dummy backend; - sink_dummy s; + test_dummies::backend_dummy backend; + test_dummies::sink_dummy s; log_channel log("id", s, backend); log.set_enabled(false); @@ -69,8 +42,8 @@ static bool when_log_channel_is_disabled_then_enabled_returns_false() static bool when_log_channel_is_enabled_then_enabled_returns_true() { - backend_dummy backend; - sink_dummy s; + test_dummies::backend_dummy backend; + test_dummies::sink_dummy s; log_channel log("id", s, backend); log.set_enabled(true); @@ -112,7 +85,7 @@ static bool when_logging_in_log_channel_then_log_entry_is_pushed_into_the_backend() { backend_spy backend; - sink_dummy s; + test_dummies::sink_dummy s; log_channel log("id", s, backend); std::string fmtstring = "test"; @@ -126,7 +99,7 @@ when_logging_in_log_channel_then_log_entry_is_pushed_into_the_backend() static bool when_logging_in_disabled_log_channel_then_log_entry_is_ignored() { backend_spy backend; - sink_dummy s; + test_dummies::sink_dummy s; log_channel log("id", s, backend); log.set_enabled(false); @@ -141,7 +114,7 @@ static bool when_logging_in_disabled_log_channel_then_log_entry_is_ignored() static bool when_logging_then_filled_in_log_entry_is_pushed_into_the_backend() { backend_spy backend; - sink_dummy s; + test_dummies::sink_dummy s; std::string name = "name"; char tag = 'A'; @@ -157,12 +130,15 @@ static bool when_logging_then_filled_in_log_entry_is_pushed_into_the_backend() ASSERT_EQ(backend.push_invocation_count(), 1); const detail::log_entry& entry = backend.last_entry(); - ASSERT_NE(entry.tp.time_since_epoch().count(), 0); - ASSERT_EQ(entry.context.value, ctx); - ASSERT_EQ(entry.context.enabled, true); - ASSERT_EQ(entry.fmtstring, fmtstring); - ASSERT_EQ(entry.log_name, name); - ASSERT_EQ(entry.log_tag, tag); + ASSERT_EQ(&s, entry.s); + ASSERT_NE(entry.format_func, nullptr); + ASSERT_NE(entry.metadata.tp.time_since_epoch().count(), 0); + ASSERT_EQ(entry.metadata.context.value, ctx); + ASSERT_EQ(entry.metadata.context.enabled, true); + ASSERT_EQ(entry.metadata.fmtstring, fmtstring); + ASSERT_EQ(entry.metadata.log_name, name); + ASSERT_EQ(entry.metadata.log_tag, tag); + ASSERT_EQ(entry.metadata.hex_dump.empty(), true); return true; } @@ -171,7 +147,7 @@ static bool when_logging_with_hex_dump_then_filled_in_log_entry_is_pushed_into_the_backend() { backend_spy backend; - sink_dummy s; + test_dummies::sink_dummy s; std::string name = "name"; char tag = 'A'; @@ -189,16 +165,19 @@ when_logging_with_hex_dump_then_filled_in_log_entry_is_pushed_into_the_backend() ASSERT_EQ(backend.push_invocation_count(), 1); const detail::log_entry& entry = backend.last_entry(); - ASSERT_NE(entry.tp.time_since_epoch().count(), 0); - ASSERT_EQ(entry.context.value, ctx); - ASSERT_EQ(entry.context.enabled, true); - ASSERT_EQ(entry.fmtstring, fmtstring); - ASSERT_EQ(entry.log_name, name); - ASSERT_EQ(entry.log_tag, tag); - ASSERT_EQ(entry.hex_dump.size(), 4); - ASSERT_EQ( - std::equal(entry.hex_dump.begin(), entry.hex_dump.end(), std::begin(hex)), - true); + ASSERT_EQ(&s, entry.s); + ASSERT_NE(entry.format_func, nullptr); + ASSERT_NE(entry.metadata.tp.time_since_epoch().count(), 0); + ASSERT_EQ(entry.metadata.context.value, ctx); + ASSERT_EQ(entry.metadata.context.enabled, true); + ASSERT_EQ(entry.metadata.fmtstring, fmtstring); + ASSERT_EQ(entry.metadata.log_name, name); + ASSERT_EQ(entry.metadata.log_tag, tag); + ASSERT_EQ(entry.metadata.hex_dump.size(), 4); + ASSERT_EQ(std::equal(entry.metadata.hex_dump.begin(), + entry.metadata.hex_dump.end(), + std::begin(hex)), + true); return true; } @@ -207,10 +186,9 @@ static bool when_hex_array_length_is_less_than_hex_log_max_size_then_array_length_is_used() { backend_spy backend; - sink_dummy s; + test_dummies::sink_dummy s; std::string name = "name"; - char tag = 'A'; log_channel log("id", s, backend); @@ -223,10 +201,85 @@ when_hex_array_length_is_less_than_hex_log_max_size_then_array_length_is_used() ASSERT_EQ(backend.push_invocation_count(), 1); const detail::log_entry& entry = backend.last_entry(); - ASSERT_EQ(entry.hex_dump.size(), 3); - ASSERT_EQ( - std::equal(entry.hex_dump.begin(), entry.hex_dump.end(), std::begin(hex)), - true); + ASSERT_EQ(entry.metadata.hex_dump.size(), 3); + ASSERT_EQ(std::equal(entry.metadata.hex_dump.begin(), + entry.metadata.hex_dump.end(), + std::begin(hex)), + true); + + return true; +} + +namespace { + +DECLARE_METRIC("SNR", snr_t, int, "dB"); +DECLARE_METRIC_SET("myset", my_set, snr_t); +using my_ctx = srslog::build_context_type; + +} // namespace + +static bool +when_logging_with_context_then_filled_in_log_entry_is_pushed_into_the_backend() +{ + backend_spy backend; + test_dummies::sink_dummy s; + + std::string name = "name"; + char tag = 'A'; + + log_channel log("id", s, backend, {name, tag, true}); + + uint32_t ctx_value = 4; + log.set_context(ctx_value); + + my_ctx ctx("myctx"); + log(ctx); + + ASSERT_EQ(backend.push_invocation_count(), 1); + + const detail::log_entry& entry = backend.last_entry(); + ASSERT_EQ(&s, entry.s); + ASSERT_NE(entry.format_func, nullptr); + ASSERT_NE(entry.metadata.tp.time_since_epoch().count(), 0); + ASSERT_EQ(entry.metadata.context.value, ctx_value); + ASSERT_EQ(entry.metadata.context.enabled, true); + ASSERT_EQ(entry.metadata.log_name, name); + ASSERT_EQ(entry.metadata.log_tag, tag); + ASSERT_EQ(entry.metadata.hex_dump.empty(), true); + + return true; +} + +static bool +when_logging_with_context_and_message_then_filled_in_log_entry_is_pushed_into_the_backend() +{ + backend_spy backend; + test_dummies::sink_dummy s; + + std::string name = "name"; + char tag = 'A'; + + log_channel log("id", s, backend, {name, tag, true}); + + uint32_t ctx_value = 4; + log.set_context(ctx_value); + std::string fmtstring = "test"; + + my_ctx ctx("myctx"); + log(ctx, fmtstring, 10, 3.3); + + ASSERT_EQ(backend.push_invocation_count(), 1); + + const detail::log_entry& entry = backend.last_entry(); + ASSERT_EQ(&s, entry.s); + ASSERT_NE(entry.format_func, nullptr); + ASSERT_NE(entry.metadata.tp.time_since_epoch().count(), 0); + ASSERT_EQ(entry.metadata.context.value, ctx_value); + ASSERT_EQ(entry.metadata.context.enabled, true); + ASSERT_EQ(entry.metadata.fmtstring, fmtstring); + ASSERT_EQ(entry.metadata.log_name, name); + ASSERT_EQ(entry.metadata.log_tag, tag); + ASSERT_EQ(entry.metadata.hex_dump.empty(), true); return true; } @@ -245,6 +298,10 @@ int main() when_logging_with_hex_dump_then_filled_in_log_entry_is_pushed_into_the_backend); TEST_FUNCTION( when_hex_array_length_is_less_than_hex_log_max_size_then_array_length_is_used); + TEST_FUNCTION( + when_logging_with_context_then_filled_in_log_entry_is_pushed_into_the_backend); + TEST_FUNCTION( + when_logging_with_context_and_message_then_filled_in_log_entry_is_pushed_into_the_backend); return 0; } diff --git a/lib/test/srslog/logger_test.cpp b/lib/test/srslog/logger_test.cpp index ba9c48de7..9b46da9e5 100644 --- a/lib/test/srslog/logger_test.cpp +++ b/lib/test/srslog/logger_test.cpp @@ -11,7 +11,7 @@ */ #include "srslte/srslog/logger.h" -#include "srslte/srslog/sink.h" +#include "test_dummies.h" #include "testing_helpers.h" using namespace srslog; @@ -20,29 +20,6 @@ static constexpr char logger_id[] = "TestLogger"; namespace { -/// A Dummy implementation of a sink. -class sink_dummy : public sink -{ -public: - detail::error_string write(detail::memory_buffer buffer) override - { - return {}; - } - - detail::error_string flush() override { return {}; } -}; - -/// A Dummy implementation of the log backend. -class backend_dummy : public detail::log_backend -{ -public: - void start() override {} - - void push(detail::log_entry&& entry) override {} - - bool is_running() const override { return true; } -}; - /// Definition of a three level logger enum class test_logger_levels { error, warning, info, LAST }; struct test_logger_channels { @@ -56,8 +33,8 @@ using test_logger = build_logger_type; static bool when_logger_is_created_then_id_matches_expected_value() { - backend_dummy backend; - sink_dummy s; + test_dummies::backend_dummy backend; + test_dummies::sink_dummy s; log_channel error("err", s, backend); log_channel warning("warning", s, backend); log_channel info("info", s, backend); @@ -71,8 +48,8 @@ static bool when_logger_is_created_then_id_matches_expected_value() static bool when_level_is_set_to_error_then_info_and_warning_is_disabled() { - backend_dummy backend; - sink_dummy s; + test_dummies::backend_dummy backend; + test_dummies::sink_dummy s; log_channel error("err", s, backend); log_channel warning("warning", s, backend); log_channel info("info", s, backend); @@ -89,8 +66,8 @@ static bool when_level_is_set_to_error_then_info_and_warning_is_disabled() static bool when_level_is_set_to_warning_then_info_is_disabled() { - backend_dummy backend; - sink_dummy s; + test_dummies::backend_dummy backend; + test_dummies::sink_dummy s; log_channel error("err", s, backend); log_channel warning("warning", s, backend); log_channel info("info", s, backend); @@ -107,8 +84,8 @@ static bool when_level_is_set_to_warning_then_info_is_disabled() static bool when_level_is_set_to_info_then_all_are_enabled() { - backend_dummy backend; - sink_dummy s; + test_dummies::backend_dummy backend; + test_dummies::sink_dummy s; log_channel error("err", s, backend); log_channel warning("warning", s, backend); log_channel info("info", s, backend); diff --git a/lib/test/srslog/srslog_test.cpp b/lib/test/srslog/srslog_test.cpp index 69d502597..74b12f3da 100644 --- a/lib/test/srslog/srslog_test.cpp +++ b/lib/test/srslog/srslog_test.cpp @@ -10,8 +10,8 @@ * */ -#include "srslte/srslog/sink.h" #include "srslte/srslog/srslog.h" +#include "test_dummies.h" #include "testing_helpers.h" using namespace srslog; @@ -26,6 +26,30 @@ static_assert(std::is_trivially_copyable::value, "Expected to be trivially copyable"); #endif +static bool when_srslog_is_created_then_stdout_and_stderr_sinks_exist() +{ + ASSERT_NE(find_sink("stdout"), nullptr); + ASSERT_NE(find_sink("stderr"), nullptr); + + return true; +} + +static bool when_no_installed_default_formatter_then_a_formatter_is_returned() +{ + ASSERT_NE(get_default_log_formatter(), nullptr); + + return true; +} + +static bool when_no_installed_default_sink_then_stdout_sink_is_used() +{ + sink& default_sink = get_default_sink(); + + ASSERT_EQ(&default_sink, find_sink("stdout")); + + return true; +} + static bool when_fetching_channel_then_channel_instance_is_returned() { log_channel& channel1 = fetch_log_channel(test_id1); @@ -70,6 +94,17 @@ when_id_with_sharps_is_passed_then_channel_is_fetched_with_clean_id() return true; } +static bool when_channel_already_exists_then_fetch_returns_channel() +{ + log_channel& channel1 = fetch_log_channel("b1"); + log_channel& channel2 = fetch_log_channel("b2", fetch_stdout_sink(), {}); + + ASSERT_EQ(&channel1, &fetch_log_channel("b1")); + ASSERT_EQ(&channel2, &fetch_log_channel("b2")); + + return true; +} + static constexpr char logger_id[] = "TestLogger"; static constexpr char basic_logger_id1[] = "BasicTestLogger"; static constexpr char basic_logger_id2[] = "BasicTestLogger2"; @@ -92,7 +127,8 @@ static bool when_fetching_logger_then_logger_instance_is_returned() static bool when_fetching_basic_logger_then_basic_logger_instance_is_returned() { basic_logger& logger1 = fetch_basic_logger(basic_logger_id1); - basic_logger& logger2 = fetch_basic_logger(basic_logger_id2, fetch_stdout_sink()); + basic_logger& logger2 = + fetch_basic_logger(basic_logger_id2, fetch_stdout_sink()); ASSERT_EQ(logger1.id(), basic_logger_id1); ASSERT_EQ(logger2.id(), basic_logger_id2); @@ -110,6 +146,17 @@ static bool when_valid_id_and_type_is_passed_then_logger_is_found() return true; } +static bool when_basic_logger_already_exists_then_fetch_returns_logger() +{ + basic_logger& logger1 = fetch_basic_logger("b1"); + basic_logger& logger2 = fetch_basic_logger("b2", fetch_stdout_sink()); + + ASSERT_EQ(&logger1, &fetch_basic_logger("b1")); + ASSERT_EQ(&logger2, &fetch_basic_logger("b2")); + + return true; +} + static bool when_invalid_id_with_valid_type_is_passed_then_no_logger_is_found() { ASSERT_EQ(find_logger("invalid"), nullptr); @@ -142,10 +189,11 @@ static constexpr char file_name[] = "file_fetch_test.txt"; static bool when_file_sink_is_fetched_then_sink_instance_is_returned() { - fetch_file_sink(file_name); - sink* s = find_sink(file_name); + sink& s1 = fetch_file_sink(file_name); + sink* s2 = find_sink(file_name); - ASSERT_NE(s, nullptr); + ASSERT_EQ(&s1, s2); + ASSERT_NE(s2, nullptr); return true; } @@ -157,37 +205,93 @@ static bool when_invalid_id_is_passed_then_no_sink_is_found() return true; } -static bool when_no_installed_default_sink_then_stdout_sink_is_used() +static bool +when_setting_stderr_as_default_then_get_default_returns_stderr_sink() { + set_default_sink(fetch_stderr_sink()); sink& default_sink = get_default_sink(); - ASSERT_EQ(&default_sink, &fetch_stdout_sink()); + ASSERT_EQ(&default_sink, &fetch_stderr_sink()); return true; } static bool -when_setting_stderr_as_default_then_get_default_returns_stderr_sink() +when_creating_non_default_stdout_and_stderr_sinks_then_they_are_created() { - set_default_sink(fetch_stderr_sink()); - sink& default_sink = get_default_sink(); + auto& out1 = fetch_stdout_sink("stdout1"); + auto& err1 = fetch_stderr_sink("stderr1"); - ASSERT_EQ(&default_sink, &fetch_stderr_sink()); + ASSERT_EQ(&out1, find_sink("stdout1")); + ASSERT_EQ(&err1, find_sink("stderr1")); + + return true; +} + +static constexpr char custom_sink_name[] = "custom_sink"; + +static bool when_setting_custom_sink_first_time_then_insertion_succeeds() +{ + std::unique_ptr custom(new test_dummies::sink_dummy); + sink* s = custom.get(); + + bool ret = install_custom_sink(custom_sink_name, std::move(custom)); + ASSERT_EQ(ret, true); + + sink* found_sink = find_sink(custom_sink_name); + ASSERT_NE(found_sink, nullptr); + ASSERT_EQ(found_sink, s); + + return true; +} + +static bool when_setting_custom_sink_twice_then_insertion_fails() +{ + std::unique_ptr custom(new test_dummies::sink_dummy); + sink* s = custom.get(); + + bool ret = install_custom_sink(custom_sink_name, std::move(custom)); + ASSERT_EQ(ret, false); + + sink* found_sink = find_sink(custom_sink_name); + ASSERT_NE(found_sink, nullptr); + ASSERT_NE(found_sink, s); + + return true; +} + +static bool +when_default_formatter_is_installed_then_getter_returns_same_formatter() +{ + auto f = + std::unique_ptr(new test_dummies::log_formatter_dummy); + set_default_log_formatter(std::move(f)); + + // Dummy formatter does not implement the clone method, thus the unique + // pointer will be nullptr. + auto f2 = get_default_log_formatter(); + ASSERT_EQ(f2.get(), nullptr); return true; } int main() { + TEST_FUNCTION(when_srslog_is_created_then_stdout_and_stderr_sinks_exist); + TEST_FUNCTION( + when_no_installed_default_formatter_then_a_formatter_is_returned); + TEST_FUNCTION(when_no_installed_default_sink_then_stdout_sink_is_used); TEST_FUNCTION(when_fetching_channel_then_channel_instance_is_returned); TEST_FUNCTION(when_valid_id_is_passed_then_channel_is_found); TEST_FUNCTION(when_non_existent_id_is_passed_then_nothing_is_found); TEST_FUNCTION( when_id_with_sharps_is_passed_then_channel_is_fetched_with_clean_id); + TEST_FUNCTION(when_channel_already_exists_then_fetch_returns_channel); TEST_FUNCTION(when_fetching_logger_then_logger_instance_is_returned); TEST_FUNCTION( when_fetching_basic_logger_then_basic_logger_instance_is_returned); TEST_FUNCTION(when_valid_id_and_type_is_passed_then_logger_is_found); + TEST_FUNCTION(when_basic_logger_already_exists_then_fetch_returns_logger); TEST_FUNCTION( when_invalid_id_with_valid_type_is_passed_then_no_logger_is_found); TEST_FUNCTION(when_invalid_id_and_type_is_passed_then_no_logger_is_found); @@ -195,9 +299,14 @@ int main() when_valid_id_with_invalid_type_is_passed_then_no_logger_is_found); TEST_FUNCTION(when_file_sink_is_fetched_then_sink_instance_is_returned); TEST_FUNCTION(when_invalid_id_is_passed_then_no_sink_is_found); - TEST_FUNCTION(when_no_installed_default_sink_then_stdout_sink_is_used); TEST_FUNCTION( when_setting_stderr_as_default_then_get_default_returns_stderr_sink); + TEST_FUNCTION( + when_creating_non_default_stdout_and_stderr_sinks_then_they_are_created); + TEST_FUNCTION(when_setting_custom_sink_first_time_then_insertion_succeeds); + TEST_FUNCTION(when_setting_custom_sink_twice_then_insertion_fails); + TEST_FUNCTION( + when_default_formatter_is_installed_then_getter_returns_same_formatter); return 0; } From f23fdf0639eacaeaa90656435e34d0112b405d39 Mon Sep 17 00:00:00 2001 From: faluco Date: Thu, 10 Dec 2020 18:13:06 +0100 Subject: [PATCH 10/59] Include missing files. --- lib/include/srslte/srslog/context.h | 250 +++++++++++++++ .../srslte/srslog/detail/log_entry_metadata.h | 47 +++ .../srslte/srslog/detail/support/tmp_utils.h | 70 +++++ lib/include/srslte/srslog/formatter.h | 185 +++++++++++ lib/src/srslog/formatters/CMakeLists.txt | 13 + lib/src/srslog/formatters/json_formatter.cpp | 149 +++++++++ lib/src/srslog/formatters/json_formatter.h | 137 ++++++++ lib/src/srslog/formatters/text_formatter.cpp | 160 ++++++++++ lib/src/srslog/formatters/text_formatter.h | 79 +++++ lib/test/srslog/context_test.cpp | 120 +++++++ lib/test/srslog/json_formatter_test.cpp | 295 ++++++++++++++++++ lib/test/srslog/test_dummies.h | 98 ++++++ lib/test/srslog/text_formatter_test.cpp | 195 ++++++++++++ 13 files changed, 1798 insertions(+) create mode 100644 lib/include/srslte/srslog/context.h create mode 100644 lib/include/srslte/srslog/detail/log_entry_metadata.h create mode 100644 lib/include/srslte/srslog/detail/support/tmp_utils.h create mode 100644 lib/include/srslte/srslog/formatter.h create mode 100644 lib/src/srslog/formatters/CMakeLists.txt create mode 100644 lib/src/srslog/formatters/json_formatter.cpp create mode 100644 lib/src/srslog/formatters/json_formatter.h create mode 100644 lib/src/srslog/formatters/text_formatter.cpp create mode 100644 lib/src/srslog/formatters/text_formatter.h create mode 100644 lib/test/srslog/context_test.cpp create mode 100644 lib/test/srslog/json_formatter_test.cpp create mode 100644 lib/test/srslog/test_dummies.h create mode 100644 lib/test/srslog/text_formatter_test.cpp diff --git a/lib/include/srslte/srslog/context.h b/lib/include/srslte/srslog/context.h new file mode 100644 index 000000000..02df5d49a --- /dev/null +++ b/lib/include/srslte/srslog/context.h @@ -0,0 +1,250 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef SRSLOG_CONTEXT_H +#define SRSLOG_CONTEXT_H + +#include "srslte/srslog/detail/support/tmp_utils.h" +#include +#include + +namespace srslog { + +/// Metric formatting kinds for textual conversion. +enum class metric_kind { + numeric, /// Metric represents a numeric value. + string /// Metric represents a string. +}; + +namespace detail { + +/// This metrics container class is a wrapper to simplify access to the elements +/// of the underlying tuple that stores metrics and metric sets. +template +struct metrics_container { + /// Writes the arg value to metric T. + template + void write(Arg&& arg) + { + constexpr std::size_t index = detail::get_type_index_in_tuple(); + std::get(metrics).value = std::forward(arg); + } + + /// Returns the value of metric T. + template + auto read() const -> const decltype(T::value)& + { + constexpr std::size_t index = detail::get_type_index_in_tuple(); + return std::get(metrics).value; + } + + /// Returns the element of type T. + template + T& get() + { + constexpr std::size_t index = detail::get_type_index_in_tuple(); + return std::get(metrics); + } + + /// Returns the element of type T. + template + const T& get() const + { + constexpr std::size_t index = detail::get_type_index_in_tuple(); + return std::get(metrics); + } + + /// Returns the element in the specified index of list T. + /// NOTE: T must have implemented the T operator. + template + auto at(std::size_t i) -> typename T::value_type& + { + constexpr std::size_t index = detail::get_type_index_in_tuple(); + auto& elem = std::get(metrics); + assert(i < elem.size() && "Invalid index"); + return elem[i]; + } + + /// Returns the element in the specified index of list T. + /// NOTE: T must have implemented the T operator. + template + auto at(std::size_t i) const -> const typename T::value_type& + { + constexpr std::size_t index = detail::get_type_index_in_tuple(); + const auto& elem = std::get(metrics); + assert(i < elem.size() && "Invalid index"); + return elem[i]; + } + + /// Returns the raw contents of the metric set as a tuple. + const std::tuple& contents() const { return metrics; } + +private: + std::tuple metrics; +}; + +} // namespace detail + +/// A generic list to store metric sets of the same type. +template +struct metric_list : public T { + /// Returns the name of the list. + static const char* name() { return Name::name(); } +}; + +/// Template specializations of this struct allow configuring what formatting +/// kind should be used for a concrete metric. +/// By default treat all metrics as strings. +template +struct metric_kind_selector { + static const metric_kind kind = metric_kind::string; +}; + +/// A metric is the most basic object that composes a context. It is generally +/// used to represent any kind of state of a program. +/// It stores a value of type T associated with a name and the units. +template +struct metric { + /// Value of the metric. + Ty value{}; + + /// Returns the name of the metric. + static const char* name() { return Name::name(); } + + /// Returns the units of the metric. + static const char* units() { return Units::units(); } + + /// Returns the formatting kind of the metric. + static metric_kind kind() + { + return metric_kind_selector>::kind; + } +}; + +/// Template specialization that tags metrics with arithmetic values (integers +/// and floating point) as numeric. +template +struct metric_kind_selector< + metric, + typename std::enable_if::value>::type> { + static const metric_kind kind = metric_kind::numeric; +}; + +/// A metric set is a group of metrics that share a logical relation. Allows +/// storing and mixing other metric sets and metrics for building complex +/// structures. +template +struct metric_set : public detail::metrics_container { + /// Name of the metric set. + static const char* name() { return Name::name(); } +}; + +/// A context captures the state of different parts of a program grouping metric +/// sets. It is the root element of the metrics structure and allows mixing and +/// storing other metric sets and metrics. +template +struct context : public detail::metrics_container { + explicit context(std::string n) : name_str(std::move(n)) {} + + /// Name of the context. + const std::string& name() const { return name_str; } + +private: + const std::string name_str; +}; + +namespace detail { + +/// Builds a metric set type using a list of metric, metric sets or list types. +/// eg: using my_metric_t = srslog::build_metric_set_type; +/// NOTE: Adding duplicated types into the list is not allowed. +template +using build_metric_set_type = + metric_set::type...>; + +} // namespace detail + +/// Builds a context type using a list of metric set types. +/// eg: using my_context_t = srslog::build_context_type; +/// NOTE: Adding duplicated types into the list is not allowed. +template +using build_context_type = context::type...>; + +/// This macro defines a new metric type using the following attributes: +/// a) name: encoded as a string. +/// b) Metric type: type identifier to create objects for this metric. +/// c) Value type: type of the underlying metric value. +/// d) Units: encoded as a string, leave as empty string for no units. +/// +/// The following example declares a metric with the following attributes: +/// a) metric type: my_metric_t +/// b) metric value type: float +/// c) units: MB/s +/// d) name: Throughput +/// DECLARE_METRIC("Throughput", my_metric_t, float, "MB/s"); +#define DECLARE_METRIC(_name_rep, _type, _value_type, _units) \ + namespace metric_info { \ + struct _type##__units { \ + static const char* units() { return _units; } \ + }; \ + struct _type##__name_rep { \ + static const char* name() { return _name_rep; } \ + }; \ + } \ + using _type = srslog::metric::type, \ + metric_info::_type##__name_rep, \ + metric_info::_type##__units> + +/// This macro defines a new metric set type using the following attributes: +/// a) name: encoded as a string. +/// b) Metric set type: type identifier to create objects for this metric set. +/// c) Type list: list of types this set will hold (other sets, metrics, +/// lists). +/// +/// The following example declares a metric set of three elements (two metrics +/// and one set) with the following attributes: +/// a) metric type: my_set_t +/// b) name: my_set +/// b) type list: metric1_t, metric2_t, set2_t +/// DECLARE_METRIC_SET("my_set", my_set_t, metric1_t, metric2_t, set2_t); +#define DECLARE_METRIC_SET(_name_rep, _type, ...) \ + namespace metric_set_info { \ + struct _type##__name_rep { \ + static const char* name() { return _name_rep; } \ + }; \ + } \ + using _type = srslog::detail:: \ + build_metric_set_type + +/// This macro defines a list of metric sets of the same type: +/// a) name: encoded as a string. +/// b) List type: type identifier to create objects for this list. +/// c) Underlying type: type of the underlying list (vector, array, ...). +/// +/// The following example declares a list of metrics sets of type set1_t with +/// the following attributes: +/// a) list type: my_list_t +/// b) name: my_list +/// b) underlying type: std::vector +/// DECLARE_METRIC_LIST("my_list", my_list_t, std::vector); +#define DECLARE_METRIC_LIST(_name_rep, _type, _list_type) \ + namespace list_info { \ + struct _type##__name_rep { \ + static const char* name() { return _name_rep; } \ + }; \ + } \ + using _type = srslog::metric_list::type> + +} // namespace srslog + +#endif // SRSLOG_CONTEXT_H diff --git a/lib/include/srslte/srslog/detail/log_entry_metadata.h b/lib/include/srslte/srslog/detail/log_entry_metadata.h new file mode 100644 index 000000000..be40fa791 --- /dev/null +++ b/lib/include/srslte/srslog/detail/log_entry_metadata.h @@ -0,0 +1,47 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef SRSLOG_DETAIL_LOG_ENTRY_METADATA_H +#define SRSLOG_DETAIL_LOG_ENTRY_METADATA_H + +#include "srslte/srslog/bundled/fmt/printf.h" +#include + +namespace srslog { + +namespace detail { + +/// This structure gives the user a way to log generic information as a context. +//:TODO: legacy struct, will get replaced by the new context framework. +struct log_context { + /// Generic context value. + uint32_t value; + /// When true, the context value will be printed in the log entry. + bool enabled; +}; + +/// Metadata fields carried for each log entry. +struct log_entry_metadata { + std::chrono::high_resolution_clock::time_point tp; + log_context context; + std::string fmtstring; + fmt::dynamic_format_arg_store store; + std::string log_name; + char log_tag; + std::vector hex_dump; +}; + +} // namespace detail + +} // namespace srslog + +#endif // SRSLOG_DETAIL_LOG_ENTRY_METADATA_H diff --git a/lib/include/srslte/srslog/detail/support/tmp_utils.h b/lib/include/srslte/srslog/detail/support/tmp_utils.h new file mode 100644 index 000000000..c21518942 --- /dev/null +++ b/lib/include/srslte/srslog/detail/support/tmp_utils.h @@ -0,0 +1,70 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H +#define SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H + +#include +#include + +namespace srslog { + +namespace detail { + +/// +/// Implementation of the std::index_sequence C++14 library utility. +/// + +template +struct index_sequence {}; + +template +struct index_sequence_helper + : public index_sequence_helper {}; + +template +struct index_sequence_helper<0U, Next...> { + using type = index_sequence; +}; + +template +using make_index_sequence = typename index_sequence_helper::type; + +/// +/// Implementation of the std::get C++14 library utility. +/// + +template +struct tuple_index; + +template +struct tuple_index> { + static constexpr std::size_t value = 0; +}; + +template +struct tuple_index> { + static constexpr std::size_t value = + 1 + tuple_index>::value; +}; + +template +constexpr std::size_t get_type_index_in_tuple() +{ + return tuple_index>::value; +} + +} // namespace detail + +} // namespace srslog + +#endif // SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H diff --git a/lib/include/srslte/srslog/formatter.h b/lib/include/srslte/srslog/formatter.h new file mode 100644 index 000000000..551f6f426 --- /dev/null +++ b/lib/include/srslte/srslog/formatter.h @@ -0,0 +1,185 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef SRSLOG_FORMATTER_H +#define SRSLOG_FORMATTER_H + +#include "srslte/srslog/bundled/fmt/format.h" +#include "srslte/srslog/context.h" + +namespace srslog { + +namespace detail { +struct log_entry_metadata; +} + +/// The generic metric value formatter. +template +struct metric_value_formatter { + metric_value_formatter() = delete; + /// All specializations should implement the following method with signature: + /// template + /// void format(const T& v, fmt::memory_buffer& buffer) +}; + +/// Default metric value formatter. Users that want to override this behaviour +/// should add an specialization of the metric they want to customize. +template +struct metric_value_formatter> { + template + void format(const T& v, fmt::memory_buffer& buffer) + { + fmt::format_to(buffer, "{}", v); + } +}; + +/// This is the base class that provides a common framework to format log +/// entries to different kinds of formats. User should implement two different +/// kinds of formats: +/// a) Basic log entry formatting. +/// b) Generic context formatting. +/// +/// For context formatting, callbacks are provided so that derived classes +/// handle specific formatting rules. +class log_formatter +{ +public: + virtual ~log_formatter() = default; + + /// Returns a copy of the formatter. + virtual std::unique_ptr clone() const = 0; + + /// Formats the log entry into the input buffer. + virtual void format(detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) = 0; + + /// Formats the context and log entry into the input buffer. + template + void format_ctx(const srslog::context& ctx, + detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) + { + format_context_begin(metadata, ctx.name(), sizeof...(Ts), buffer); + iterate_tuple(ctx.contents(), + 1, + buffer, + detail::make_index_sequence{}); + format_context_end(metadata, ctx.name(), buffer); + } + +private: + /// Processes all elements in a tuple. + template + void iterate_tuple(const std::tuple& t, + unsigned level, + fmt::memory_buffer& buffer, + detail::index_sequence) + { + (void)std::initializer_list{ + (process_element(std::get(t), level, buffer), 0)...}; + } + + /// Processes the input metric set. + template + void process_element(const metric_set& ms, + unsigned level, + fmt::memory_buffer& buffer) + { + format_metric_set_begin(ms.name(), sizeof...(Ts), level, buffer); + iterate_tuple(ms.contents(), + level + 1, + buffer, + detail::make_index_sequence{}); + format_metric_set_end(ms.name(), level, buffer); + } + + /// Processes the input metric list. + template + void process_element(const metric_list& list, + unsigned level, + fmt::memory_buffer& buffer) + { + format_list_begin(list.name(), list.size(), level, buffer); + for (const auto& elem : list) { + process_element(elem, level + 1, buffer); + } + format_list_end(list.name(), level, buffer); + } + + /// Processes the input metric. + template + void process_element(const metric& t, + unsigned level, + fmt::memory_buffer& buffer) + { + fmt::memory_buffer value; + metric_value_formatter::type>{}.format( + t.value, value); + + format_metric( + t.name(), fmt::to_string(value), t.units(), t.kind(), level, buffer); + } + +private: + /// Derived classes should implement the following callbacks to format metric + /// objects. Each callback is invoked at a different place of the formatting + /// algorithm. + + /// This callback gets called at the beginning of the context formatting + /// algorithm. + virtual void format_context_begin(const detail::log_entry_metadata& md, + const std::string& ctx_name, + unsigned size, + fmt::memory_buffer& buffer) = 0; + + /// This callback gets called at the end of the context formatting algorithm. + virtual void format_context_end(const detail::log_entry_metadata& md, + const std::string& ctx_name, + fmt::memory_buffer& buffer) = 0; + + /// This callback gets called at the beginning of a metric set formatting + /// procedure. + virtual void format_metric_set_begin(const std::string& set_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) = 0; + + /// This callback gets called at the beginning of a metric set formatting end. + virtual void format_metric_set_end(const std::string& set_name, + unsigned level, + fmt::memory_buffer& buffer) = 0; + + /// This callback gets called at the beginning of a metric list formatting + /// procedure. + virtual void format_list_begin(const std::string& list_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) = 0; + + /// This callback gets called at the end of a metric list formatting + /// procedure. + virtual void format_list_end(const std::string& list_name, + unsigned level, + fmt::memory_buffer& buffer) = 0; + + /// This callback gets called for each metric. + virtual void format_metric(const std::string& metric_name, + const std::string& metric_value, + const std::string& metric_units, + metric_kind kind, + unsigned level, + fmt::memory_buffer& buffer) = 0; +}; + +} // namespace srslog + +#endif // SRSLOG_FORMATTER_H diff --git a/lib/src/srslog/formatters/CMakeLists.txt b/lib/src/srslog/formatters/CMakeLists.txt new file mode 100644 index 000000000..20bc911e0 --- /dev/null +++ b/lib/src/srslog/formatters/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright 2013-2020 Software Radio Systems Limited +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the distribution. +# + +set(SOURCES + json_formatter.cpp + text_formatter.cpp) + +add_library(formatters STATIC ${SOURCES}) diff --git a/lib/src/srslog/formatters/json_formatter.cpp b/lib/src/srslog/formatters/json_formatter.cpp new file mode 100644 index 000000000..f5eb16bd6 --- /dev/null +++ b/lib/src/srslog/formatters/json_formatter.cpp @@ -0,0 +1,149 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "json_formatter.h" +#include "srslte/srslog/detail/log_entry_metadata.h" + +using namespace srslog; + +std::unique_ptr json_formatter::clone() const +{ + return std::unique_ptr(new json_formatter); +} + +void json_formatter::format(detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) +{ + fmt::format_to(buffer, + "{{\n" + " \"log_entry\": \"{}\"", + fmt::vsprintf(metadata.fmtstring, std::move(metadata.store))); + + if (!metadata.hex_dump.empty()) { + fmt::format_to( + buffer, + ",\n \"hex_dump\": \"{:02x}\"", + fmt::join(metadata.hex_dump.cbegin(), metadata.hex_dump.cend(), " ")); + } + + fmt::format_to(buffer, "\n}}\n"); +} + +void json_formatter::format_context_begin(const detail::log_entry_metadata& md, + const std::string& ctx_name, + unsigned size, + fmt::memory_buffer& buffer) +{ + assert(scope_stack.empty() && "Stack should be empty"); + assert(nest_level == 0 && "Nesting level should be 0"); + + fmt::format_to(buffer, "{{\n"); + push_scope(size); + + if (!md.fmtstring.empty()) { + fmt::format_to(buffer, + " \"log_entry\": \"{}\",\n", + fmt::vsprintf(md.fmtstring, std::move(md.store))); + } +} + +void json_formatter::format_context_end(const detail::log_entry_metadata& md, + const std::string& ctx_name, + fmt::memory_buffer& buffer) +{ + pop_scope(); + fmt::format_to(buffer, "}}\n"); + + assert(scope_stack.empty() && "Stack should be empty"); + assert(nest_level == 0 && "Nesting level should be 0"); +} + +void json_formatter::format_metric_set_begin(const std::string& set_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) +{ + // Arrays in JSON require an additional nesting level before inserting the + // object. + // array: [ + // { + // "obj: {} + // } + // ] + if (in_list_scope()) { + fmt::format_to(buffer, "{: <{}}{{\n", ' ', indents(level)); + increment_nest_level(); + } + + consume_element(); + + fmt::format_to(buffer, "{: <{}}\"{}\": {{\n", ' ', indents(level), set_name); + push_scope(size); +} + +void json_formatter::format_metric_set_end(const std::string& set_name, + unsigned level, + fmt::memory_buffer& buffer) +{ + pop_scope(); + fmt::format_to(buffer, + "{: <{}}}}{}\n", + ' ', + indents(level), + needs_comma() && !in_list_scope() ? "," : ""); + + if (in_list_scope()) { + decrement_nest_level(); + fmt::format_to( + buffer, "{: <{}}}}{}\n", ' ', indents(level), needs_comma() ? "," : ""); + } +} + +void json_formatter::format_metric(const std::string& metric_name, + const std::string& metric_value, + const std::string& metric_units, + metric_kind kind, + unsigned level, + fmt::memory_buffer& buffer) +{ + consume_element(); + + fmt::format_to(buffer, + "{: <{}}\"{}\": {}{}{}{}\n", + ' ', + indents(level), + metric_name, + kind == metric_kind::string ? "\"" : "", + metric_value, + kind == metric_kind::string ? "\"" : "", + needs_comma() ? "," : ""); +} + +void json_formatter::format_list_begin(const std::string& list_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) +{ + consume_element(); + + fmt::format_to(buffer, "{: <{}}\"{}\": [\n", ' ', indents(level), list_name); + push_list_scope(size); +} + +void json_formatter::format_list_end(const std::string& list_name, + unsigned level, + fmt::memory_buffer& buffer) +{ + pop_scope(); + fmt::format_to( + buffer, "{: <{}}]{}\n", ' ', indents(level), needs_comma() ? "," : ""); +} diff --git a/lib/src/srslog/formatters/json_formatter.h b/lib/src/srslog/formatters/json_formatter.h new file mode 100644 index 000000000..d7c886999 --- /dev/null +++ b/lib/src/srslog/formatters/json_formatter.h @@ -0,0 +1,137 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef SRSLOG_JSON_FORMATTER_H +#define SRSLOG_JSON_FORMATTER_H + +#include "srslte/srslog/formatter.h" + +namespace srslog { + +/// JSON formatter class implementation. +/// Formats each log entry and context into its own JSON object making the +/// formatter stateless so that new entries do not depend on the state of +/// previous ones. The output is ready for JSON streaming following the +/// "Concatenated JSON" style. +class json_formatter : public log_formatter +{ +public: + json_formatter() { scope_stack.reserve(16); } + + std::unique_ptr clone() const override; + + void format(detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) override; + +private: + void format_context_begin(const detail::log_entry_metadata& md, + const std::string& ctx_name, + unsigned size, + fmt::memory_buffer& buffer) override; + + void format_context_end(const detail::log_entry_metadata& md, + const std::string& ctx_name, + fmt::memory_buffer& buffer) override; + + void format_metric_set_begin(const std::string& set_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) override; + + void format_metric_set_end(const std::string& set_name, + unsigned level, + fmt::memory_buffer& buffer) override; + + void format_list_begin(const std::string& list_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) override; + + void format_list_end(const std::string& list_name, + unsigned level, + fmt::memory_buffer& buffer) override; + + void format_metric(const std::string& metric_name, + const std::string& metric_value, + const std::string& metric_units, + metric_kind kind, + unsigned level, + fmt::memory_buffer& buffer) override; + + /// Pushes a new entry in the scope stack. + void push_scope(unsigned size) { scope_stack.emplace_back(size, false); } + + /// Pushes a new list entry in the scope stack. + void push_list_scope(unsigned size) { scope_stack.emplace_back(size, true); } + + /// Pops the topmost entry in the scope stack. + void pop_scope() + { + assert(!scope_stack.empty() && "Popping scope in empty stack"); + scope_stack.pop_back(); + } + + /// Consumes an element in the current scope. + void consume_element() + { + assert(!scope_stack.empty() && "Consuming element in void scope"); + assert(scope_stack.back().size && "No more elements to consume"); + --scope_stack.back().size; + } + + /// Returns true if the current element needs a comma. + bool needs_comma() const + { + assert(!scope_stack.empty() && "No scope exists"); + return scope_stack.back().size; + } + + /// Returns true if the current scope is a list. + bool in_list_scope() const + { + assert(!scope_stack.empty() && "No scope exists"); + return scope_stack.back().inside_list; + } + + /// Increments the nesting level by one. + void increment_nest_level() { ++nest_level; } + + /// Decrements the nesting level by one. + void decrement_nest_level() + { + assert(nest_level && "Expected the nesting level to greater than 0"); + --nest_level; + } + + /// Return the number of space chars to indent the specified level. + unsigned indents(unsigned level) const { return (nest_level + level) * 2; } + +private: + /// Keeps track of some information about a JSON scope. + struct scope { + scope(unsigned size, bool inside_list) : + size(size), inside_list(inside_list) + {} + /// Number of elements this scope holds. + unsigned size; + /// If true, indicates this scope belongs to a list. + const bool inside_list; + }; + +private: + unsigned nest_level = 0; + std::vector scope_stack; +}; + +} // namespace srslog + +#endif // SRSLOG_JSON_FORMATTER_H diff --git a/lib/src/srslog/formatters/text_formatter.cpp b/lib/src/srslog/formatters/text_formatter.cpp new file mode 100644 index 000000000..79ed995b4 --- /dev/null +++ b/lib/src/srslog/formatters/text_formatter.cpp @@ -0,0 +1,160 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "text_formatter.h" +#include "srslte/srslog/bundled/fmt/chrono.h" +#include "srslte/srslog/detail/log_entry_metadata.h" + +using namespace srslog; + +std::unique_ptr text_formatter::clone() const +{ + return std::unique_ptr(new text_formatter(*this)); +} + +/// Formats into a hex dump a range of elements, storing the result in the input +/// buffer. +static void format_hex_dump(const std::vector& v, + fmt::memory_buffer& buffer) +{ + if (v.empty()) { + return; + } + + const size_t elements_per_line = 16; + + for (auto i = v.cbegin(), e = v.cend(); i != e;) { + auto num_elements = + std::min(elements_per_line, std::distance(i, e)); + + fmt::format_to(buffer, + " {:04x}: {:02x}\n", + std::distance(v.cbegin(), i), + fmt::join(i, i + num_elements, " ")); + + std::advance(i, num_elements); + } +} + +/// Format the log metadata into the input buffer. +static void format_metadata(const detail::log_entry_metadata& metadata, + fmt::memory_buffer& buffer) +{ + // Time stamp data preparation. + std::tm current_time = + fmt::gmtime(std::chrono::high_resolution_clock::to_time_t(metadata.tp)); + auto us_fraction = std::chrono::duration_cast( + metadata.tp.time_since_epoch()) + .count() % + 1000000u; + fmt::format_to(buffer, "{:%H:%M:%S}.{:06} ", current_time, us_fraction); + + // Format optional fields if present. + if (!metadata.log_name.empty()) { + fmt::format_to(buffer, "[{: <4.4}] ", metadata.log_name); + } + if (metadata.log_tag != '\0') { + fmt::format_to(buffer, "[{}] ", metadata.log_tag); + } + if (metadata.context.enabled) { + fmt::format_to(buffer, "[{:5}] ", metadata.context.value); + } +} + +void text_formatter::format(detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) +{ + // Prefix first. + format_metadata(metadata, buffer); + + // Message formatting. + fmt::format_to(buffer, + "{}\n", + fmt::vsprintf(metadata.fmtstring, std::move(metadata.store))); + + // Optional hex dump formatting. + format_hex_dump(metadata.hex_dump, buffer); +} + +void text_formatter::format_context_begin(const detail::log_entry_metadata& md, + const std::string& ctx_name, + unsigned size, + fmt::memory_buffer& buffer) +{ + do_one_line_ctx_format = !md.fmtstring.empty(); + + format_metadata(md, buffer); + if (do_one_line_ctx_format) { + fmt::format_to(buffer, "["); + return; + } + fmt::format_to(buffer, "Context dump for \"{}\"\n", ctx_name); +} + +void text_formatter::format_context_end(const detail::log_entry_metadata& md, + const std::string& ctx_name, + fmt::memory_buffer& buffer) +{ + if (do_one_line_ctx_format) { + fmt::format_to(buffer, "]: {}\n", fmt::vsprintf(md.fmtstring, md.store)); + return; + } +} + +void text_formatter::format_metric_set_begin(const std::string& set_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) +{ + /*if (do_one_line_ctx_format) { + fmt::format_to(buffer, "{}", is_first ? "[" : " ["); + return; + } + fmt::format_to(buffer, " {}\n", set_name);*/ +} + +void text_formatter::format_metric_set_end(const std::string& set_name, + unsigned level, + fmt::memory_buffer& buffer) +{ + if (do_one_line_ctx_format) { + fmt::format_to(buffer, "]"); + return; + } +} + +void text_formatter::format_metric(const std::string& metric_name, + const std::string& metric_value, + const std::string& metric_units, + metric_kind kind, + unsigned level, + fmt::memory_buffer& buffer) +{ + //:TODO: re-enable + /*if (do_one_line_ctx_format) { + fmt::format_to(buffer, + "{}{}_{}: {}{}{}", + ctx.is_first_metric ? "" : ", ", + ctx.set_name, + ctx.metric_name, + ctx.metric_value, + ctx.metric_units.empty() ? "" : " ", + ctx.metric_units); + return; + } + fmt::format_to(buffer, + " {}: {}{}{}\n", + ctx.metric_name, + ctx.metric_value, + ctx.metric_units.empty() ? "" : " ", + ctx.metric_units);*/ +} diff --git a/lib/src/srslog/formatters/text_formatter.h b/lib/src/srslog/formatters/text_formatter.h new file mode 100644 index 000000000..b8dcf32cd --- /dev/null +++ b/lib/src/srslog/formatters/text_formatter.h @@ -0,0 +1,79 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef SRSLOG_TEXT_FORMATTER_H +#define SRSLOG_TEXT_FORMATTER_H + +#include "srslte/srslog/formatter.h" + +namespace srslog { + +/// Plain text formatter implementation class. +//:TODO: this class needs refactoring to be compatible with multiple nesting of +// metrics. +class text_formatter : public log_formatter +{ +public: + std::unique_ptr clone() const override; + + void format(detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) override; + +private: + void format_context_begin(const detail::log_entry_metadata& md, + const std::string& ctx_name, + unsigned size, + fmt::memory_buffer& buffer) override; + + void format_context_end(const detail::log_entry_metadata& md, + const std::string& ctx_name, + fmt::memory_buffer& buffer) override; + + void format_metric_set_begin(const std::string& set_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) override; + + void format_metric_set_end(const std::string& set_name, + unsigned level, + fmt::memory_buffer& buffer) override; + + void format_list_begin(const std::string& list_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) override + { + //:TODO: implement me + } + + void format_list_end(const std::string& list_name, + unsigned level, + fmt::memory_buffer& buffer) override + { + //:TODO: implement me + } + + void format_metric(const std::string& metric_name, + const std::string& metric_value, + const std::string& metric_units, + metric_kind kind, + unsigned level, + fmt::memory_buffer& buffer) override; + +private: + /// Flags that the formatting should take place into a single line. + bool do_one_line_ctx_format = false; +}; + +} // namespace srslog + +#endif // SRSLOG_TEXT_FORMATTER_H diff --git a/lib/test/srslog/context_test.cpp b/lib/test/srslog/context_test.cpp new file mode 100644 index 000000000..096c5f1fd --- /dev/null +++ b/lib/test/srslog/context_test.cpp @@ -0,0 +1,120 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "srslte/srslog/context.h" +#include "testing_helpers.h" +#include + +using namespace srslog; + +namespace { +DECLARE_METRIC("SNR", snr_t, float, "dB"); +DECLARE_METRIC("PWR", pwr_t, int, "dBm"); +DECLARE_METRIC("CenterFreq", cfreq_t, unsigned, "MHz"); +DECLARE_METRIC_SET("RF", myset1, snr_t, pwr_t, cfreq_t); + +DECLARE_METRIC("Throughput", thr_t, float, "MB/s"); +DECLARE_METRIC("Address", ip_addr_t, std::string, ""); +DECLARE_METRIC_SET("Network", myset2, thr_t, ip_addr_t); + +using ctx_t = srslog::build_context_type; +} // namespace + +/// Builds a context for testing. +static ctx_t build_context() +{ + ctx_t ctx("Ctx"); + return ctx; +} + +static bool when_context_is_built_then_context_name_is_valid() +{ + ctx_t ctx = build_context(); + + ASSERT_EQ(ctx.name(), "Ctx"); + + return true; +} + +static bool when_context_is_built_then_metric_sets_names_are_valid() +{ + ctx_t ctx = build_context(); + + ASSERT_EQ(ctx.get().name(), std::string("RF")); + ASSERT_EQ(ctx.get().name(), std::string("Network")); + + return true; +} + +static bool when_context_is_built_then_metric_names_are_valid() +{ + ctx_t ctx = build_context(); + + ASSERT_EQ(ctx.get().get().name(), std::string("SNR")); + ASSERT_EQ(ctx.get().get().name(), std::string("PWR")); + + return true; +} + +static bool when_context_is_built_then_metric_units_are_valid() +{ + ctx_t ctx = build_context(); + + ASSERT_EQ(ctx.get().get().units(), std::string("dB")); + ASSERT_EQ(ctx.get().get().units(), std::string("dBm")); + + return true; +} + +static bool when_metric_is_set_through_context_then_value_is_stored() +{ + ctx_t ctx = build_context(); + float value = 10; + + ctx.get().write(value); + + ASSERT_EQ(ctx.get().read(), value); + + return true; +} + +namespace { +DECLARE_METRIC("metric1", m1_t, float, ""); +DECLARE_METRIC_SET("test_set_t", test_set_t, m1_t); +DECLARE_METRIC_LIST("vector", vector_metrics, std::vector); +using ctx2_t = srslog::build_context_type; +} // namespace + +static bool when_context_with_list_is_set_value_is_retrieved_correctly() +{ + ctx2_t ctx("test"); + float val = 2; + + ctx.get().emplace_back(); + ctx.at(0).write(val); + + ASSERT_EQ(ctx.at(0).read(), val); + + return true; +} + +int main() +{ + TEST_FUNCTION(when_context_is_built_then_context_name_is_valid); + TEST_FUNCTION(when_context_is_built_then_metric_sets_names_are_valid); + TEST_FUNCTION(when_context_is_built_then_metric_names_are_valid); + TEST_FUNCTION(when_context_is_built_then_metric_units_are_valid); + TEST_FUNCTION(when_metric_is_set_through_context_then_value_is_stored); + TEST_FUNCTION(when_context_with_list_is_set_value_is_retrieved_correctly); + + return 0; +} diff --git a/lib/test/srslog/json_formatter_test.cpp b/lib/test/srslog/json_formatter_test.cpp new file mode 100644 index 000000000..33bbd84dc --- /dev/null +++ b/lib/test/srslog/json_formatter_test.cpp @@ -0,0 +1,295 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "src/srslog/formatters/json_formatter.h" +#include "srslte/srslog/detail/log_entry_metadata.h" +#include "testing_helpers.h" +#include + +using namespace srslog; + +/// Helper to build a log entry. +static detail::log_entry_metadata build_log_entry_metadata() +{ + // Create a time point 50000us from epoch. + using tp_ty = std::chrono::time_point; + tp_ty tp(std::chrono::microseconds(50000)); + + fmt::dynamic_format_arg_store store; + store.push_back(88); + + return {tp, {10, true}, "Text %d", std::move(store), "ABC", 'Z'}; +} + +static bool when_fully_filled_log_entry_then_everything_is_formatted() +{ + fmt::memory_buffer buffer; + json_formatter{}.format(build_log_entry_metadata(), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "{\n" + " \"log_entry\": \"Text 88\"\n" + "}\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +static bool +when_fully_filled_log_entry_with_hex_dump_then_everything_is_formatted() +{ + auto entry = build_log_entry_metadata(); + entry.hex_dump.resize(12); + std::iota(entry.hex_dump.begin(), entry.hex_dump.end(), 0); + + fmt::memory_buffer buffer; + json_formatter{}.format(std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = + "{\n" + " \"log_entry\": \"Text 88\",\n" + " \"hex_dump\": \"00 01 02 03 04 05 06 07 08 09 0a 0b\"\n" + "}\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +namespace { +DECLARE_METRIC("SNR", snr_t, float, "dB"); +DECLARE_METRIC("PWR", pwr_t, int, "dBm"); +DECLARE_METRIC("CenterFreq", cfreq_t, unsigned, "MHz"); +DECLARE_METRIC_SET("RF", myset1, snr_t, pwr_t, cfreq_t); + +DECLARE_METRIC("Throughput", thr_t, float, "MB/s"); +DECLARE_METRIC("Address", ip_addr_t, std::string, ""); +DECLARE_METRIC_SET("Network", myset2, thr_t, ip_addr_t); + +using basic_ctx_t = srslog::build_context_type; +} // namespace + +static bool +when_log_entry_with_only_basic_context_is_passed_then_context_is_formatted() +{ + auto entry = build_log_entry_metadata(); + entry.fmtstring = ""; + basic_ctx_t ctx("UL Context"); + + ctx.get().write(-55.1); + ctx.get().write(-10); + ctx.get().write(1500); + ctx.get().write(150.01); + ctx.get().write("192.168.1.0"); + + fmt::memory_buffer buffer; + json_formatter{}.format_ctx(ctx, std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "{\n" + " \"RF\": {\n" + " \"SNR\": -55.1,\n" + " \"PWR\": -10,\n" + " \"CenterFreq\": 1500\n" + " },\n" + " \"Network\": {\n" + " \"Throughput\": 150.01,\n" + " \"Address\": \"192.168.1.0\"\n" + " }\n" + "}\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +static bool +when_log_entry_with_message_and_basic_context_is_passed_then_context_is_formatted() +{ + auto entry = build_log_entry_metadata(); + basic_ctx_t ctx("UL Context"); + + ctx.get().write(-55.1); + ctx.get().write(-10); + ctx.get().write(1500); + ctx.get().write(150.01); + ctx.get().write("192.168.1.0"); + + fmt::memory_buffer buffer; + json_formatter{}.format_ctx(ctx, std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "{\n" + " \"log_entry\": \"Text 88\",\n" + " \"RF\": {\n" + " \"SNR\": -55.1,\n" + " \"PWR\": -10,\n" + " \"CenterFreq\": 1500\n" + " },\n" + " \"Network\": {\n" + " \"Throughput\": 150.01,\n" + " \"Address\": \"192.168.1.0\"\n" + " }\n" + "}\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +namespace { +DECLARE_METRIC("bearer_id", bearer_id_t, unsigned, ""); +DECLARE_METRIC("qci", qci_t, unsigned, ""); +DECLARE_METRIC_SET("bearer_container", bearer_set, bearer_id_t, qci_t); + +DECLARE_METRIC("ue_rnti", ue_rnti_t, unsigned, ""); +DECLARE_METRIC("dl_cqi", dl_cqi_t, unsigned, ""); +DECLARE_METRIC_LIST("bearer_list", bearer_list_t, std::vector); +DECLARE_METRIC_SET("ue_container", ue_set, ue_rnti_t, dl_cqi_t, bearer_list_t); + +DECLARE_METRIC("type", entry_type_t, std::string, ""); +DECLARE_METRIC("sector_id", sector_id_t, unsigned, ""); +DECLARE_METRIC_LIST("ue_list", ue_list_t, std::vector); +DECLARE_METRIC_SET("sector_metrics", + sector_set, + entry_type_t, + sector_id_t, + ue_list_t); + +DECLARE_METRIC_LIST("sector_list", sector_list_t, std::vector); + +using complex_ctx_t = srslog::build_context_type; +} // namespace + +static bool +when_log_entry_with_only_complex_context_is_passed_then_context_is_formatted() +{ + complex_ctx_t ctx("UL Context"); + auto entry = build_log_entry_metadata(); + entry.fmtstring = ""; + + ctx.get().emplace_back(); + ctx.at(0).get().emplace_back(); + ctx.at(0).get().emplace_back(); + + ctx.at(0).at(0).get().emplace_back(); + ctx.at(0).at(0).get().emplace_back(); + + ctx.at(0).at(1).get().emplace_back(); + ctx.at(0).at(1).get().emplace_back(); + + fmt::memory_buffer buffer; + json_formatter{}.format_ctx(ctx, std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "{\n" + " \"sector_list\": [\n" + " {\n" + " \"sector_metrics\": {\n" + " \"type\": \"\",\n" + " \"sector_id\": 0,\n" + " \"ue_list\": [\n" + " {\n" + " \"ue_container\": {\n" + " \"ue_rnti\": 0,\n" + " \"dl_cqi\": 0,\n" + " \"bearer_list\": [\n" + " {\n" + " \"bearer_container\": {\n" + " \"bearer_id\": 0,\n" + " \"qci\": 0\n" + " }\n" + " },\n" + " {\n" + " \"bearer_container\": {\n" + " \"bearer_id\": 0,\n" + " \"qci\": 0\n" + " }\n" + " }\n" + " ]\n" + " }\n" + " },\n" + " {\n" + " \"ue_container\": {\n" + " \"ue_rnti\": 0,\n" + " \"dl_cqi\": 0,\n" + " \"bearer_list\": [\n" + " {\n" + " \"bearer_container\": {\n" + " \"bearer_id\": 0,\n" + " \"qci\": 0\n" + " }\n" + " },\n" + " {\n" + " \"bearer_container\": {\n" + " \"bearer_id\": 0,\n" + " \"qci\": 0\n" + " }\n" + " }\n" + " ]\n" + " }\n" + " }\n" + " ]\n" + " }\n" + " }\n" + " ]\n" + "}\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +namespace { +DECLARE_METRIC("list_metric2", list_metric2, unsigned, ""); +DECLARE_METRIC_SET("metric_list_set", metric_list_set, list_metric2); +DECLARE_METRIC_LIST("metrics_list", metrics_list, std::vector); +DECLARE_METRIC("list_metric3", list_metric3, unsigned, ""); +DECLARE_METRIC("list_metric4", list_metric4, unsigned, ""); +using list_ctx_t = + srslog::build_context_type; +}; // namespace + +static bool when_context_with_empty_list_is_passed_then_list_object_is_empty() +{ + list_ctx_t ctx("UL Context"); + auto entry = build_log_entry_metadata(); + entry.fmtstring = ""; + + fmt::memory_buffer buffer; + json_formatter{}.format_ctx(ctx, std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "{\n" + " \"list_metric3\": 0,\n" + " \"list_metric4\": 0,\n" + " \"metrics_list\": [\n" + " ]\n" + "}\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +int main() +{ + TEST_FUNCTION(when_fully_filled_log_entry_then_everything_is_formatted); + TEST_FUNCTION( + when_fully_filled_log_entry_with_hex_dump_then_everything_is_formatted); + TEST_FUNCTION( + when_log_entry_with_only_basic_context_is_passed_then_context_is_formatted); + TEST_FUNCTION( + when_log_entry_with_message_and_basic_context_is_passed_then_context_is_formatted); + TEST_FUNCTION( + when_log_entry_with_only_complex_context_is_passed_then_context_is_formatted); + TEST_FUNCTION( + when_context_with_empty_list_is_passed_then_list_object_is_empty); + + return 0; +} diff --git a/lib/test/srslog/test_dummies.h b/lib/test/srslog/test_dummies.h new file mode 100644 index 000000000..16474e3b2 --- /dev/null +++ b/lib/test/srslog/test_dummies.h @@ -0,0 +1,98 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef TEST_DUMMIES +#define TEST_DUMMIES + +#include "srslte/srslog/detail/log_backend.h" +#include "srslte/srslog/sink.h" + +namespace test_dummies { + +/// A Dummy implementation of a formatter. +class log_formatter_dummy : public srslog::log_formatter +{ +public: + void format(srslog::detail::log_entry_metadata&& metadata, + fmt::memory_buffer& buffer) override + {} + + std::unique_ptr clone() const override { return nullptr; } + +private: + void format_context_begin(const srslog::detail::log_entry_metadata& md, + const std::string& ctx_name, + unsigned size, + fmt::memory_buffer& buffer) override + {} + void format_context_end(const srslog::detail::log_entry_metadata& md, + const std::string& ctx_name, + fmt::memory_buffer& buffer) override + {} + void format_metric_set_begin(const std::string& set_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) override + {} + void format_metric_set_end(const std::string& set_name, + unsigned level, + fmt::memory_buffer& buffer) override + {} + void format_list_begin(const std::string& list_name, + unsigned size, + unsigned level, + fmt::memory_buffer& buffer) override + {} + void format_list_end(const std::string& list_name, + unsigned level, + fmt::memory_buffer& buffer) override + {} + void format_metric(const std::string& metric_name, + const std::string& metric_value, + const std::string& metric_units, + srslog::metric_kind kind, + unsigned level, + fmt::memory_buffer& buffer) override + {} +}; + +/// A Dummy implementation of a sink. +class sink_dummy : public srslog::sink +{ +public: + sink_dummy() : + sink(std::unique_ptr(new log_formatter_dummy)) + {} + + srslog::detail::error_string + write(srslog::detail::memory_buffer buffer) override + { + return {}; + } + + srslog::detail::error_string flush() override { return {}; } +}; + +/// A Dummy implementation of the log backend. +class backend_dummy : public srslog::detail::log_backend +{ +public: + void start() override {} + + void push(srslog::detail::log_entry&& entry) override {} + + bool is_running() const override { return true; } +}; + +} // namespace test_dummies + +#endif // TEST_DUMMIES diff --git a/lib/test/srslog/text_formatter_test.cpp b/lib/test/srslog/text_formatter_test.cpp new file mode 100644 index 000000000..fa20f56e1 --- /dev/null +++ b/lib/test/srslog/text_formatter_test.cpp @@ -0,0 +1,195 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "src/srslog/formatters/text_formatter.h" +#include "srslte/srslog/detail/log_entry_metadata.h" +#include "testing_helpers.h" +#include + +using namespace srslog; + +/// Helper to build a log entry. +static detail::log_entry_metadata build_log_entry_metadata() +{ + // Create a time point 50000us from epoch. + using tp_ty = std::chrono::time_point; + tp_ty tp(std::chrono::microseconds(50000)); + + fmt::dynamic_format_arg_store store; + store.push_back(88); + + return {tp, {10, true}, "Text %d", std::move(store), "ABC", 'Z'}; +} + +static bool when_fully_filled_log_entry_then_everything_is_formatted() +{ + fmt::memory_buffer buffer; + text_formatter{}.format(build_log_entry_metadata(), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "00:00:00.050000 [ABC ] [Z] [ 10] Text 88\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +static bool when_log_entry_without_name_is_passed_then_name_is_not_formatted() +{ + auto entry = build_log_entry_metadata(); + entry.log_name = ""; + + fmt::memory_buffer buffer; + text_formatter{}.format(std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "00:00:00.050000 [Z] [ 10] Text 88\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +static bool when_log_entry_without_tag_is_passed_then_tag_is_not_formatted() +{ + auto entry = build_log_entry_metadata(); + entry.log_tag = '\0'; + + fmt::memory_buffer buffer; + text_formatter{}.format(std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "00:00:00.050000 [ABC ] [ 10] Text 88\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +static bool +when_log_entry_without_context_is_passed_then_context_is_not_formatted() +{ + auto entry = build_log_entry_metadata(); + entry.context.enabled = false; + + fmt::memory_buffer buffer; + text_formatter{}.format(std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = "00:00:00.050000 [ABC ] [Z] Text 88\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +static bool when_log_entry_with_hex_dump_is_passed_then_hex_dump_is_formatted() +{ + auto entry = build_log_entry_metadata(); + entry.hex_dump.resize(20); + std::iota(entry.hex_dump.begin(), entry.hex_dump.end(), 0); + + fmt::memory_buffer buffer; + text_formatter{}.format(std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = + "00:00:00.050000 [ABC ] [Z] [ 10] Text 88\n" + " 0000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f\n" + " 0010: 10 11 12 13\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +namespace { +DECLARE_METRIC("SNR", snr_t, float, "dB"); +DECLARE_METRIC("PWR", pwr_t, int, "dBm"); +DECLARE_METRIC("CenterFreq", cfreq_t, unsigned, "MHz"); +DECLARE_METRIC_SET("RF", myset1, snr_t, pwr_t, cfreq_t); + +DECLARE_METRIC("Throughput", thr_t, float, "MB/s"); +DECLARE_METRIC("Address", ip_addr_t, std::string, ""); +DECLARE_METRIC_SET("Network", myset2, thr_t, ip_addr_t); + +using ctx_t = srslog::build_context_type; +} // namespace + +static bool +when_log_entry_with_only_context_is_passed_then_context_is_formatted() +{ + auto entry = build_log_entry_metadata(); + entry.fmtstring = ""; + ctx_t ctx("UL Context"); + + ctx.get().write(-55.1); + ctx.get().write(-10); + ctx.get().write(1500); + ctx.get().write(150.01); + ctx.get().write("192.168.1.0"); + + fmt::memory_buffer buffer; + text_formatter{}.format_ctx(ctx, std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = + "00:00:00.050000 [ABC ] [Z] [ 10] Context dump for \"UL Context\"\n" + " RF\n" + " SNR: -55.1 dB\n" + " PWR: -10 dBm\n" + " CenterFreq: 1500 MHz\n" + " Network\n" + " Throughput: 150.01 MB/s\n" + " Address: 192.168.1.0\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +static bool +when_log_entry_with_context_and_message_is_passed_then_context_is_formatted() +{ + auto entry = build_log_entry_metadata(); + ctx_t ctx("UL Context"); + + ctx.get().write(-55.1); + ctx.get().write(-10); + ctx.get().write(1500); + ctx.get().write(150.01); + ctx.get().write("192.168.1.0"); + + fmt::memory_buffer buffer; + text_formatter{}.format_ctx(ctx, std::move(entry), buffer); + std::string result = fmt::to_string(buffer); + std::string expected = + "00:00:00.050000 [ABC ] [Z] [ 10] [[RF_SNR: -55.1 dB, RF_PWR: -10 dBm, " + "RF_CenterFreq: 1500 MHz] [Network_Throughput: 150.01 MB/s, " + "Network_Address: 192.168.1.0]]: Text 88\n"; + + ASSERT_EQ(result, expected); + + return true; +} + +int main() +{ + TEST_FUNCTION(when_fully_filled_log_entry_then_everything_is_formatted); + TEST_FUNCTION( + when_log_entry_without_name_is_passed_then_name_is_not_formatted); + TEST_FUNCTION(when_log_entry_without_tag_is_passed_then_tag_is_not_formatted); + TEST_FUNCTION( + when_log_entry_without_context_is_passed_then_context_is_not_formatted); + TEST_FUNCTION( + when_log_entry_with_hex_dump_is_passed_then_hex_dump_is_formatted); + TEST_FUNCTION( + when_log_entry_with_only_context_is_passed_then_context_is_formatted); + TEST_FUNCTION( + when_log_entry_with_context_and_message_is_passed_then_context_is_formatted); + + return 0; +} From e2654e69eccc64e12bad63255f0f36ddf7b9dbaa Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 11 Dec 2020 15:05:03 +0000 Subject: [PATCH 11/59] Enable pdu stack latency measurements in the eNB. --- lib/include/srslte/common/common.h | 6 +++--- lib/include/srslte/upper/rlc_am_lte.h | 4 ++++ lib/include/srslte/upper/rlc_um_lte.h | 4 ++++ lib/src/upper/rlc_am_lte.cc | 14 ++++++++++++-- lib/src/upper/rlc_um_lte.cc | 25 +++++++++++++++---------- srsenb/src/stack/upper/gtpu.cc | 1 + 6 files changed, 39 insertions(+), 15 deletions(-) diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index b1a195c98..c10ba0c01 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -82,7 +82,7 @@ namespace srslte { -//#define ENABLE_TIMESTAMP +#define ENABLE_TIMESTAMP /****************************************************************************** * Byte and Bit buffers @@ -152,7 +152,7 @@ public: return 0; gettimeofday(×tamp[2], NULL); get_time_interval(timestamp); - return timestamp[0].tv_usec; + return timestamp[0].tv_usec + timestamp[0].tv_sec * 1000000; #else return 0; #endif @@ -263,7 +263,7 @@ typedef std::unique_ptr unique_byte_buffer_t /// Utilities to create a span out of a byte_buffer. /// -using byte_span = span; +using byte_span = span; using const_byte_span = span; inline byte_span make_span(byte_buffer_t& b) diff --git a/lib/include/srslte/upper/rlc_am_lte.h b/lib/include/srslte/upper/rlc_am_lte.h index 74527d1a8..3bf70a27b 100644 --- a/lib/include/srslte/upper/rlc_am_lte.h +++ b/lib/include/srslte/upper/rlc_am_lte.h @@ -13,6 +13,7 @@ #ifndef SRSLTE_RLC_AM_LTE_H #define SRSLTE_RLC_AM_LTE_H +#include "srslte/adt/accumulators.h" #include "srslte/common/buffer_pool.h" #include "srslte/common/common.h" #include "srslte/common/log.h" @@ -182,6 +183,9 @@ private: // Mutexes pthread_mutex_t mutex; + + // Metrics + srslte::rolling_average mean_pdu_latency_us; }; // Receiver sub-class diff --git a/lib/include/srslte/upper/rlc_um_lte.h b/lib/include/srslte/upper/rlc_um_lte.h index 7cb8d4e61..2e9e540e0 100644 --- a/lib/include/srslte/upper/rlc_um_lte.h +++ b/lib/include/srslte/upper/rlc_um_lte.h @@ -13,6 +13,7 @@ #ifndef SRSLTE_RLC_UM_LTE_H #define SRSLTE_RLC_UM_LTE_H +#include "srslte/adt/accumulators.h" #include "srslte/common/buffer_pool.h" #include "srslte/common/common.h" #include "srslte/common/log.h" @@ -63,6 +64,9 @@ private: ***************************************************************************/ uint32_t vt_us = 0; // Send state. SN to be assigned for next PDU. + // Metrics + srslte::rolling_average mean_pdu_latency_us; + void debug_state(); }; diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index a04491cf9..7430f29cf 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -837,7 +837,12 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { - log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", RB_NAME, tx_sdu->get_latency_us()); + long latency_us = tx_sdu->get_latency_us(); + mean_pdu_latency_us.push(latency_us); + log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", + RB_NAME, + latency_us, + (long)mean_pdu_latency_us.value()); tx_sdu.reset(); } if (pdu_space > to_move) { @@ -876,7 +881,12 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { - log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", RB_NAME, tx_sdu->get_latency_us()); + long latency_us = tx_sdu->get_latency_us(); + mean_pdu_latency_us.push(latency_us); + log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", + RB_NAME, + latency_us, + (long)mean_pdu_latency_us.value()); tx_sdu.reset(); } if (pdu_space > to_move) { diff --git a/lib/src/upper/rlc_um_lte.cc b/lib/src/upper/rlc_um_lte.cc index 52262d75b..4ef03b350 100644 --- a/lib/src/upper/rlc_um_lte.cc +++ b/lib/src/upper/rlc_um_lte.cc @@ -23,8 +23,7 @@ rlc_um_lte::rlc_um_lte(srslte::log_ref log_, srsue::rrc_interface_rlc* rrc_, srslte::timer_handler* timers_) : rlc_um_base(log_, lcid_, pdcp_, rrc_, timers_) -{ -} +{} // Warning: must call stop() to properly deallocate all buffers rlc_um_lte::~rlc_um_lte() @@ -146,8 +145,12 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { - log->debug( - "%s Complete SDU scheduled for tx. Stack latency: %ld us\n", rb_name.c_str(), tx_sdu->get_latency_us()); + long latency_us = tx_sdu->get_latency_us(); + mean_pdu_latency_us.push(latency_us); + log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", + rb_name.c_str(), + latency_us, + (long)mean_pdu_latency_us.value()); tx_sdu.reset(); } @@ -178,8 +181,12 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { - log->debug( - "%s Complete SDU scheduled for tx. Stack latency: %ld us\n", rb_name.c_str(), tx_sdu->get_latency_us()); + long latency_us = tx_sdu->get_latency_us(); + mean_pdu_latency_us.push(latency_us); + log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", + rb_name.c_str(), + latency_us, + (long)mean_pdu_latency_us.value()); tx_sdu.reset(); } @@ -220,10 +227,8 @@ void rlc_um_lte::rlc_um_lte_tx::reset() ***************************************************************************/ rlc_um_lte::rlc_um_lte_rx::rlc_um_lte_rx(rlc_um_base* parent_) : - rlc_um_base_rx(parent_), - reordering_timer(timers->get_unique_timer()) -{ -} + rlc_um_base_rx(parent_), reordering_timer(timers->get_unique_timer()) +{} rlc_um_lte::rlc_um_lte_rx::~rlc_um_lte_rx() {} diff --git a/srsenb/src/stack/upper/gtpu.cc b/srsenb/src/stack/upper/gtpu.cc index 7a561874f..f803fb18e 100644 --- a/srsenb/src/stack/upper/gtpu.cc +++ b/srsenb/src/stack/upper/gtpu.cc @@ -227,6 +227,7 @@ void gtpu::rem_user(uint16_t rnti) void gtpu::handle_gtpu_s1u_rx_packet(srslte::unique_byte_buffer_t pdu, const sockaddr_in& addr) { gtpu_log->debug("Received %d bytes from S1-U interface\n", pdu->N_bytes); + pdu->set_timestamp(); gtpu_header_t header; if (not gtpu_read_header(pdu.get(), &header, gtpu_log)) { From 92bc98e2f0b171d268ac4b47561f6177ea60d7dd Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 11 Dec 2020 15:39:37 +0000 Subject: [PATCH 12/59] add byte tx counter to the set of metrics being measured in RLC --- lib/include/srslte/upper/rlc_am_lte.h | 3 ++- lib/include/srslte/upper/rlc_um_lte.h | 3 ++- lib/src/upper/rlc_am_lte.cc | 2 ++ lib/src/upper/rlc_um_lte.cc | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/include/srslte/upper/rlc_am_lte.h b/lib/include/srslte/upper/rlc_am_lte.h index 3bf70a27b..ab351de0f 100644 --- a/lib/include/srslte/upper/rlc_am_lte.h +++ b/lib/include/srslte/upper/rlc_am_lte.h @@ -185,7 +185,8 @@ private: pthread_mutex_t mutex; // Metrics - srslte::rolling_average mean_pdu_latency_us; + uint64_t tx_byte_count = 0; + srslte::rolling_average mean_pdu_latency_us; }; // Receiver sub-class diff --git a/lib/include/srslte/upper/rlc_um_lte.h b/lib/include/srslte/upper/rlc_um_lte.h index 2e9e540e0..24e2851b1 100644 --- a/lib/include/srslte/upper/rlc_um_lte.h +++ b/lib/include/srslte/upper/rlc_um_lte.h @@ -65,7 +65,8 @@ private: uint32_t vt_us = 0; // Send state. SN to be assigned for next PDU. // Metrics - srslte::rolling_average mean_pdu_latency_us; + uint64_t tx_byte_count = 0; + srslte::rolling_average mean_pdu_latency_us; void debug_state(); }; diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index 7430f29cf..471f090fc 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -946,6 +946,8 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt log->info_hex(payload, total_len, "%s Tx PDU SN=%d (%d B)\n", RB_NAME, header.sn, total_len); log->debug("%s\n", rlc_amd_pdu_header_to_string(header).c_str()); debug_state(); + + tx_byte_count += buffer_ptr->N_bytes; return total_len; } diff --git a/lib/src/upper/rlc_um_lte.cc b/lib/src/upper/rlc_um_lte.cc index 4ef03b350..737b66532 100644 --- a/lib/src/upper/rlc_um_lte.cc +++ b/lib/src/upper/rlc_um_lte.cc @@ -208,6 +208,7 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* log->info_hex(payload, pdu->N_bytes, "%s Tx PDU SN=%d (%d B)\n", rb_name.c_str(), header.sn, pdu->N_bytes); debug_state(); + tx_byte_count += pdu->N_bytes; return pdu->N_bytes; } From 951912d18a7813ad41db5b312bd112c7cfa8f1b7 Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 11 Dec 2020 16:28:54 +0000 Subject: [PATCH 13/59] disable RLC latency measure when ENABLE_TIMESTAMP flag is disabled --- lib/include/srslte/upper/rlc_am_lte.h | 4 +++- lib/include/srslte/upper/rlc_um_lte.h | 5 +++-- lib/src/upper/rlc_am_lte.cc | 4 ++++ lib/src/upper/rlc_um_lte.cc | 6 ++++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/include/srslte/upper/rlc_am_lte.h b/lib/include/srslte/upper/rlc_am_lte.h index ab351de0f..b89036f15 100644 --- a/lib/include/srslte/upper/rlc_am_lte.h +++ b/lib/include/srslte/upper/rlc_am_lte.h @@ -185,8 +185,10 @@ private: pthread_mutex_t mutex; // Metrics - uint64_t tx_byte_count = 0; + uint64_t tx_byte_count = 0; +#ifdef ENABLE_TIMESTAMP srslte::rolling_average mean_pdu_latency_us; +#endif }; // Receiver sub-class diff --git a/lib/include/srslte/upper/rlc_um_lte.h b/lib/include/srslte/upper/rlc_um_lte.h index 24e2851b1..f5f08da9d 100644 --- a/lib/include/srslte/upper/rlc_um_lte.h +++ b/lib/include/srslte/upper/rlc_um_lte.h @@ -65,9 +65,10 @@ private: uint32_t vt_us = 0; // Send state. SN to be assigned for next PDU. // Metrics - uint64_t tx_byte_count = 0; + uint64_t tx_byte_count = 0; +#ifdef ENABLE_TIMESTAMP srslte::rolling_average mean_pdu_latency_us; - +#endif void debug_state(); }; diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index 471f090fc..529047c88 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -837,12 +837,14 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { +#ifdef ENABLE_TIMESTAMP long latency_us = tx_sdu->get_latency_us(); mean_pdu_latency_us.push(latency_us); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", RB_NAME, latency_us, (long)mean_pdu_latency_us.value()); +#endif tx_sdu.reset(); } if (pdu_space > to_move) { @@ -881,12 +883,14 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { +#ifdef ENABLE_TIMESTAMP long latency_us = tx_sdu->get_latency_us(); mean_pdu_latency_us.push(latency_us); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", RB_NAME, latency_us, (long)mean_pdu_latency_us.value()); +#endif tx_sdu.reset(); } if (pdu_space > to_move) { diff --git a/lib/src/upper/rlc_um_lte.cc b/lib/src/upper/rlc_um_lte.cc index 737b66532..c74aad2fc 100644 --- a/lib/src/upper/rlc_um_lte.cc +++ b/lib/src/upper/rlc_um_lte.cc @@ -145,13 +145,14 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { +#ifdef ENABLE_TIMESTAMP long latency_us = tx_sdu->get_latency_us(); mean_pdu_latency_us.push(latency_us); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", rb_name.c_str(), latency_us, (long)mean_pdu_latency_us.value()); - +#endif tx_sdu.reset(); } pdu_space -= SRSLTE_MIN(to_move, pdu->get_tailroom()); @@ -181,13 +182,14 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { +#ifdef ENABLE_TIMESTAMP long latency_us = tx_sdu->get_latency_us(); mean_pdu_latency_us.push(latency_us); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", rb_name.c_str(), latency_us, (long)mean_pdu_latency_us.value()); - +#endif tx_sdu.reset(); } pdu_space -= to_move; From 7ffc236a1adf8ccb112bffb997e7f105ca067a39 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 14 Dec 2020 10:55:18 +0000 Subject: [PATCH 14/59] enable log line when rlc tx pdu last segment is sent but the latency log is disabled --- lib/include/srslte/upper/rlc_am_lte.h | 1 - lib/include/srslte/upper/rlc_um_lte.h | 1 - lib/src/upper/rlc_am_lte.cc | 5 ++++- lib/src/upper/rlc_um_lte.cc | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/include/srslte/upper/rlc_am_lte.h b/lib/include/srslte/upper/rlc_am_lte.h index b89036f15..f2d3774ab 100644 --- a/lib/include/srslte/upper/rlc_am_lte.h +++ b/lib/include/srslte/upper/rlc_am_lte.h @@ -185,7 +185,6 @@ private: pthread_mutex_t mutex; // Metrics - uint64_t tx_byte_count = 0; #ifdef ENABLE_TIMESTAMP srslte::rolling_average mean_pdu_latency_us; #endif diff --git a/lib/include/srslte/upper/rlc_um_lte.h b/lib/include/srslte/upper/rlc_um_lte.h index f5f08da9d..205bda235 100644 --- a/lib/include/srslte/upper/rlc_um_lte.h +++ b/lib/include/srslte/upper/rlc_um_lte.h @@ -65,7 +65,6 @@ private: uint32_t vt_us = 0; // Send state. SN to be assigned for next PDU. // Metrics - uint64_t tx_byte_count = 0; #ifdef ENABLE_TIMESTAMP srslte::rolling_average mean_pdu_latency_us; #endif diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index 529047c88..1270288ed 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -844,6 +844,8 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt RB_NAME, latency_us, (long)mean_pdu_latency_us.value()); +#else + log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif tx_sdu.reset(); } @@ -890,6 +892,8 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt RB_NAME, latency_us, (long)mean_pdu_latency_us.value()); +#else + log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif tx_sdu.reset(); } @@ -951,7 +955,6 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt log->debug("%s\n", rlc_amd_pdu_header_to_string(header).c_str()); debug_state(); - tx_byte_count += buffer_ptr->N_bytes; return total_len; } diff --git a/lib/src/upper/rlc_um_lte.cc b/lib/src/upper/rlc_um_lte.cc index c74aad2fc..e3c77054d 100644 --- a/lib/src/upper/rlc_um_lte.cc +++ b/lib/src/upper/rlc_um_lte.cc @@ -152,6 +152,8 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* rb_name.c_str(), latency_us, (long)mean_pdu_latency_us.value()); +#else + log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif tx_sdu.reset(); } @@ -189,6 +191,8 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* rb_name.c_str(), latency_us, (long)mean_pdu_latency_us.value()); +#else + log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif tx_sdu.reset(); } @@ -210,7 +214,6 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* log->info_hex(payload, pdu->N_bytes, "%s Tx PDU SN=%d (%d B)\n", rb_name.c_str(), header.sn, pdu->N_bytes); debug_state(); - tx_byte_count += pdu->N_bytes; return pdu->N_bytes; } From 0f693b36b2631771785a91a4cf3b5b4469bcec5c Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 14 Dec 2020 11:28:11 +0000 Subject: [PATCH 15/59] changed pdu latency calculation to std chrono --- lib/include/srslte/common/common.h | 25 +++++++++++-------------- lib/src/upper/rlc_am_lte.cc | 4 ++-- lib/src/upper/rlc_tm.cc | 2 +- lib/src/upper/rlc_um_lte.cc | 4 ++-- lib/src/upper/rlc_um_nr.cc | 10 ++++++---- srsue/src/stack/upper/gw.cc | 9 ++++++--- 6 files changed, 28 insertions(+), 26 deletions(-) diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index c10ba0c01..f9ea6e333 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -18,6 +18,7 @@ *******************************************************************************/ #include "srslte/adt/span.h" +#include #include #include #include @@ -104,9 +105,6 @@ public: byte_buffer_t() : N_bytes(0) { bzero(buffer, SRSLTE_MAX_BUFFER_SIZE_BYTES); -#ifdef ENABLE_TIMESTAMP - timestamp_is_set = false; -#endif msg = &buffer[SRSLTE_BUFFER_HEADER_OFFSET]; next = NULL; #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED @@ -144,24 +142,23 @@ public: } uint32_t get_headroom() { return msg - buffer; } // Returns the remaining space from what is reported to be the length of msg - uint32_t get_tailroom() { return (sizeof(buffer) - (msg - buffer) - N_bytes); } - long get_latency_us() + uint32_t get_tailroom() { return (sizeof(buffer) - (msg - buffer) - N_bytes); } + std::chrono::microseconds get_latency_us() { #ifdef ENABLE_TIMESTAMP - if (!timestamp_is_set) - return 0; - gettimeofday(×tamp[2], NULL); - get_time_interval(timestamp); - return timestamp[0].tv_usec + timestamp[0].tv_sec * 1000000; + if (!timestamp_is_set) { + return std::chrono::microseconds{0}; + } + return std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - tp); #else - return 0; + return std::chrono::microseconds{0}; #endif } void set_timestamp() { #ifdef ENABLE_TIMESTAMP - gettimeofday(×tamp[1], NULL); + tp = std::chrono::high_resolution_clock::now(); timestamp_is_set = true; #endif } @@ -174,8 +171,8 @@ public: private: #ifdef ENABLE_TIMESTAMP - struct timeval timestamp[3]; - bool timestamp_is_set; + std::chrono::high_resolution_clock::time_point tp; + bool timestamp_is_set = false; #endif byte_buffer_t* next; }; diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index 1270288ed..a07c84777 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -838,7 +838,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { #ifdef ENABLE_TIMESTAMP - long latency_us = tx_sdu->get_latency_us(); + long latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", RB_NAME, @@ -886,7 +886,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { #ifdef ENABLE_TIMESTAMP - long latency_us = tx_sdu->get_latency_us(); + long latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", RB_NAME, diff --git a/lib/src/upper/rlc_tm.cc b/lib/src/upper/rlc_tm.cc index ef38f0b56..1f63c6bab 100644 --- a/lib/src/upper/rlc_tm.cc +++ b/lib/src/upper/rlc_tm.cc @@ -142,7 +142,7 @@ int rlc_tm::read_pdu(uint8_t* payload, uint32_t nof_bytes) memcpy(payload, buf->msg, buf->N_bytes); log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", rrc->get_rb_name(lcid).c_str(), - buf->get_latency_us()); + buf->get_latency_us().count()); log->info_hex(payload, pdu_size, "TX %s, %s PDU, queue size=%d, bytes=%d", diff --git a/lib/src/upper/rlc_um_lte.cc b/lib/src/upper/rlc_um_lte.cc index e3c77054d..0211df507 100644 --- a/lib/src/upper/rlc_um_lte.cc +++ b/lib/src/upper/rlc_um_lte.cc @@ -146,7 +146,7 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { #ifdef ENABLE_TIMESTAMP - long latency_us = tx_sdu->get_latency_us(); + auto latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", rb_name.c_str(), @@ -185,7 +185,7 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { #ifdef ENABLE_TIMESTAMP - long latency_us = tx_sdu->get_latency_us(); + auto latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", rb_name.c_str(), diff --git a/lib/src/upper/rlc_um_nr.cc b/lib/src/upper/rlc_um_nr.cc index 135cd3275..d5406b7b0 100644 --- a/lib/src/upper/rlc_um_nr.cc +++ b/lib/src/upper/rlc_um_nr.cc @@ -139,8 +139,9 @@ int rlc_um_nr::rlc_um_nr_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* p tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { - log->debug( - "%s Complete SDU scheduled for tx. Stack latency: %ld us\n", rb_name.c_str(), tx_sdu->get_latency_us()); + log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", + rb_name.c_str(), + tx_sdu->get_latency_us().count()); tx_sdu.reset(); header.si = rlc_nr_si_field_t::last_segment; } else { @@ -163,8 +164,9 @@ int rlc_um_nr::rlc_um_nr_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* p tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { - log->debug( - "%s Complete SDU scheduled for tx. Stack latency: %ld us\n", rb_name.c_str(), tx_sdu->get_latency_us()); + log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", + rb_name.c_str(), + tx_sdu->get_latency_us().count()); tx_sdu.reset(); header.si = rlc_nr_si_field_t::full_sdu; } else { diff --git a/srsue/src/stack/upper/gw.cc b/srsue/src/stack/upper/gw.cc index fe306d809..314132c9a 100644 --- a/srsue/src/stack/upper/gw.cc +++ b/srsue/src/stack/upper/gw.cc @@ -113,7 +113,7 @@ void gw::get_metrics(gw_metrics_t& m, const uint32_t nof_tti) *******************************************************************************/ void gw::write_pdu(uint32_t lcid, srslte::unique_byte_buffer_t pdu) { - log.info_hex(pdu->msg, pdu->N_bytes, "RX PDU. Stack latency: %ld us\n", pdu->get_latency_us()); + log.info_hex(pdu->msg, pdu->N_bytes, "RX PDU. Stack latency: %ld us\n", pdu->get_latency_us().count()); dl_tput_bytes += pdu->N_bytes; if (!if_up) { log.warning("TUN/TAP not up - dropping gw RX message\n"); @@ -137,8 +137,11 @@ void gw::write_pdu(uint32_t lcid, srslte::unique_byte_buffer_t pdu) void gw::write_pdu_mch(uint32_t lcid, srslte::unique_byte_buffer_t pdu) { if (pdu->N_bytes > 2) { - log.info_hex( - pdu->msg, pdu->N_bytes, "RX MCH PDU (%d B). Stack latency: %ld us\n", pdu->N_bytes, pdu->get_latency_us()); + log.info_hex(pdu->msg, + pdu->N_bytes, + "RX MCH PDU (%d B). Stack latency: %ld us\n", + pdu->N_bytes, + pdu->get_latency_us().count()); dl_tput_bytes += pdu->N_bytes; // Hack to drop initial 2 bytes From 82eb31f70fd68a3bef5d236cc8c8856f7f12b203 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 14 Dec 2020 14:04:30 +0000 Subject: [PATCH 16/59] add rlc metrics to enb --- lib/include/srslte/interfaces/enb_metrics_interface.h | 5 +++++ lib/include/srslte/upper/rlc_metrics.h | 3 ++- lib/src/upper/rlc_am_lte.cc | 6 ++++-- srsenb/hdr/stack/upper/rlc.h | 2 ++ srsenb/src/stack/enb_stack_lte.cc | 3 +++ srsenb/src/stack/upper/rlc.cc | 10 ++++++++++ 6 files changed, 26 insertions(+), 3 deletions(-) diff --git a/lib/include/srslte/interfaces/enb_metrics_interface.h b/lib/include/srslte/interfaces/enb_metrics_interface.h index ca3c25c0f..02168e874 100644 --- a/lib/include/srslte/interfaces/enb_metrics_interface.h +++ b/lib/include/srslte/interfaces/enb_metrics_interface.h @@ -27,9 +27,14 @@ namespace srsenb { +struct rlc_metrics_t { + std::vector ues; +}; + struct stack_metrics_t { mac_metrics_t mac; rrc_metrics_t rrc; + rlc_metrics_t rlc; s1ap_metrics_t s1ap; }; diff --git a/lib/include/srslte/upper/rlc_metrics.h b/lib/include/srslte/upper/rlc_metrics.h index e3f3dc5a3..599bb81b6 100644 --- a/lib/include/srslte/upper/rlc_metrics.h +++ b/lib/include/srslte/upper/rlc_metrics.h @@ -25,13 +25,14 @@ typedef struct { uint64_t num_tx_sdu_bytes; uint64_t num_rx_sdu_bytes; uint32_t num_lost_sdus; //< Count dropped SDUs at Tx due to bearer inactivity or empty buffer + uint64_t sdu_tx_latency_us; // PDU metrics uint32_t num_tx_pdus; uint32_t num_rx_pdus; uint64_t num_tx_pdu_bytes; uint64_t num_rx_pdu_bytes; - uint32_t num_lost_pdus; //< Lost PDUs registered at Rx + uint32_t num_lost_pdus; //< Lost PDUs registered at Rx } rlc_bearer_metrics_t; typedef struct { diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index a07c84777..96d0307a1 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -840,10 +840,11 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt #ifdef ENABLE_TIMESTAMP long latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); + parent->metrics.sdu_tx_latency_us = mean_pdu_latency_us.value(); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", RB_NAME, latency_us, - (long)mean_pdu_latency_us.value()); + (long)parent->metrics.sdu_tx_latency_us); #else log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif @@ -888,10 +889,11 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt #ifdef ENABLE_TIMESTAMP long latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); + parent->metrics.sdu_tx_latency_us = mean_pdu_latency_us.value(); log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", RB_NAME, latency_us, - (long)mean_pdu_latency_us.value()); + (long)parent->metrics.sdu_tx_latency_us); #else log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif diff --git a/srsenb/hdr/stack/upper/rlc.h b/srsenb/hdr/stack/upper/rlc.h index 341697477..aea174b10 100644 --- a/srsenb/hdr/stack/upper/rlc.h +++ b/srsenb/hdr/stack/upper/rlc.h @@ -11,6 +11,7 @@ */ #include "srslte/interfaces/enb_interfaces.h" +#include "srslte/interfaces/enb_metrics_interface.h" #include "srslte/interfaces/ue_interfaces.h" #include "srslte/upper/rlc.h" #include @@ -36,6 +37,7 @@ public: srslte::timer_handler* timers_, srslte::log_ref log_h); void stop(); + void get_metrics(rlc_metrics_t& m, const uint32_t nof_tti); // rlc_interface_rrc void clear_buffer(uint16_t rnti); diff --git a/srsenb/src/stack/enb_stack_lte.cc b/srsenb/src/stack/enb_stack_lte.cc index d076981ed..06fe640be 100644 --- a/srsenb/src/stack/enb_stack_lte.cc +++ b/srsenb/src/stack/enb_stack_lte.cc @@ -172,6 +172,9 @@ bool enb_stack_lte::get_metrics(stack_metrics_t* metrics) auto ret = enb_task_queue.try_push([this]() { stack_metrics_t metrics{}; mac.get_metrics(metrics.mac); + if (not metrics.mac.ues.empty()) { + rlc.get_metrics(metrics.rlc, metrics.mac.ues[0].nof_tti); + } rrc.get_metrics(metrics.rrc); s1ap.get_metrics(metrics.s1ap); pending_stack_metrics.push(metrics); diff --git a/srsenb/src/stack/upper/rlc.cc b/srsenb/src/stack/upper/rlc.cc index 9faca0c3e..632a5147b 100644 --- a/srsenb/src/stack/upper/rlc.cc +++ b/srsenb/src/stack/upper/rlc.cc @@ -43,6 +43,16 @@ void rlc::stop() pthread_rwlock_destroy(&rwlock); } +void rlc::get_metrics(rlc_metrics_t& m, const uint32_t nof_tti) +{ + m.ues.resize(users.size()); + size_t count = 0; + for (auto& user : users) { + user.second.rlc->get_metrics(m.ues[count], nof_tti); + count++; + } +} + void rlc::add_user(uint16_t rnti) { pthread_rwlock_rdlock(&rwlock); From 53116a99fc006e6104092654f14d69832096290c Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 14 Dec 2020 14:46:03 +0000 Subject: [PATCH 17/59] add rlc metrics to rlc_um --- lib/include/srslte/upper/rlc_um_base.h | 7 +++++++ lib/include/srslte/upper/rlc_um_lte.h | 4 ---- lib/src/upper/rlc_um_base.cc | 17 +++++++++-------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/include/srslte/upper/rlc_um_base.h b/lib/include/srslte/upper/rlc_um_base.h index 5d35b00e7..fd5f64371 100644 --- a/lib/include/srslte/upper/rlc_um_base.h +++ b/lib/include/srslte/upper/rlc_um_base.h @@ -13,6 +13,7 @@ #ifndef SRSLTE_RLC_UM_BASE_H #define SRSLTE_RLC_UM_BASE_H +#include "srslte/adt/accumulators.h" #include "srslte/common/buffer_pool.h" #include "srslte/common/common.h" #include "srslte/common/log.h" @@ -84,6 +85,7 @@ protected: byte_buffer_pool* pool = nullptr; srslte::log_ref log; std::string rb_name; + rlc_um_base* parent = nullptr; rlc_config_t cfg = {}; @@ -94,6 +96,11 @@ protected: // Mutexes std::mutex mutex; + // Metrics +#ifdef ENABLE_TIMESTAMP + srslte::rolling_average mean_pdu_latency_us; +#endif + virtual int build_data_pdu(unique_byte_buffer_t pdu, uint8_t* payload, uint32_t nof_bytes) = 0; // helper functions diff --git a/lib/include/srslte/upper/rlc_um_lte.h b/lib/include/srslte/upper/rlc_um_lte.h index 205bda235..7016e163d 100644 --- a/lib/include/srslte/upper/rlc_um_lte.h +++ b/lib/include/srslte/upper/rlc_um_lte.h @@ -13,7 +13,6 @@ #ifndef SRSLTE_RLC_UM_LTE_H #define SRSLTE_RLC_UM_LTE_H -#include "srslte/adt/accumulators.h" #include "srslte/common/buffer_pool.h" #include "srslte/common/common.h" #include "srslte/common/log.h" @@ -65,9 +64,6 @@ private: uint32_t vt_us = 0; // Send state. SN to be assigned for next PDU. // Metrics -#ifdef ENABLE_TIMESTAMP - srslte::rolling_average mean_pdu_latency_us; -#endif void debug_state(); }; diff --git a/lib/src/upper/rlc_um_base.cc b/lib/src/upper/rlc_um_base.cc index 5f85fa5a3..02b14e38c 100644 --- a/lib/src/upper/rlc_um_base.cc +++ b/lib/src/upper/rlc_um_base.cc @@ -20,12 +20,7 @@ rlc_um_base::rlc_um_base(srslte::log_ref log_, srsue::pdcp_interface_rlc* pdcp_, srsue::rrc_interface_rlc* rrc_, srslte::timer_handler* timers_) : - log(log_), - lcid(lcid_), - pdcp(pdcp_), - rrc(rrc_), - timers(timers_), - pool(byte_buffer_pool::get_instance()) + log(log_), lcid(lcid_), pdcp(pdcp_), rrc(rrc_), timers(timers_), pool(byte_buffer_pool::get_instance()) {} rlc_um_base::~rlc_um_base() {} @@ -202,7 +197,9 @@ rlc_um_base::rlc_um_base_rx::~rlc_um_base_rx() {} * Tx subclass implementation (base) ***************************************************************************/ -rlc_um_base::rlc_um_base_tx::rlc_um_base_tx(rlc_um_base* parent_) : log(parent_->log), pool(parent_->pool) {} +rlc_um_base::rlc_um_base_tx::rlc_um_base_tx(rlc_um_base* parent_) : + log(parent_->log), pool(parent_->pool), parent(parent_) +{} rlc_um_base::rlc_um_base_tx::~rlc_um_base_tx() {} @@ -303,7 +300,11 @@ int rlc_um_base::rlc_um_base_tx::build_data_pdu(uint8_t* payload, uint32_t nof_b return 0; } } - return build_data_pdu(std::move(pdu), payload, nof_bytes); + int len = build_data_pdu(std::move(pdu), payload, nof_bytes); + if (len > 0) { + parent->metrics.sdu_tx_latency_us = mean_pdu_latency_us.value(); + } + return len; } } // namespace srslte From 442843e276982c95131ed790c9ed95e48bbbb1e4 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 14 Dec 2020 12:16:54 +0000 Subject: [PATCH 18/59] enb metric bound check. Fix of heap-buffer overflow issue --- srsenb/src/metrics_stdout.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/srsenb/src/metrics_stdout.cc b/srsenb/src/metrics_stdout.cc index db05d0bf7..75d1be9d2 100644 --- a/srsenb/src/metrics_stdout.cc +++ b/srsenb/src/metrics_stdout.cc @@ -89,8 +89,7 @@ void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t pe for (size_t i = 0; i < metrics.stack.rrc.ues.size(); i++) { // make sure we have stats for MAC and PHY layer too - if (metrics.stack.mac.ues.size() == 0 || metrics.phy.size() == 0 || i > metrics.stack.mac.ues.size() || - i > metrics.phy.size()) { + if (i >= metrics.stack.mac.ues.size() || i >= metrics.phy.size()) { break; } if (metrics.stack.mac.ues[i].tx_errors > metrics.stack.mac.ues[i].tx_pkts) { From 7869c66fb714d78133f1f8db52278c1e324db69c Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 14 Dec 2020 22:54:53 +0000 Subject: [PATCH 19/59] avoid overwriting phy config ul64qam config for scell --- srsenb/src/stack/rrc/rrc_ue.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index 8926f5a65..2b9c82044 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -1051,13 +1051,12 @@ void rrc::ue::apply_reconf_phy_config(const rrc_conn_recfg_r8_ies_s& reconfig_r8 // Get corresponding eNB CC index scell_phy_rrc_ded.enb_cc_idx = ue_cc->cell_common->enb_cc_idx; + // Append to PHY RRC config dedicated which will be applied further down + phy_rrc_dedicated_list[scell.scell_idx_r10] = scell_phy_rrc_ded; srslte::set_phy_cfg_t_enable_64qam( &phy_rrc_dedicated_list[scell.scell_idx_r10].phy_cfg, ue_capabilities.support_ul_64qam and parent->cfg.sibs[1].sib2().rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.enable64_qam); - - // Append to PHY RRC config dedicated which will be applied further down - phy_rrc_dedicated_list[scell.scell_idx_r10] = scell_phy_rrc_ded; } } } From 9133135e12668ed25573728d9ad6844e7638943d Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 14 Dec 2020 11:43:46 +0100 Subject: [PATCH 20/59] rlc_tm: remove error from log when RLC TM PDU can't be sent RLC TM can't be segmented so it may happen that a PDU cannot be sent because the grant is too small. That is not an error and should only be logged in info. --- lib/src/upper/rlc_tm.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/upper/rlc_tm.cc b/lib/src/upper/rlc_tm.cc index 1f63c6bab..5b5de2976 100644 --- a/lib/src/upper/rlc_tm.cc +++ b/lib/src/upper/rlc_tm.cc @@ -132,8 +132,8 @@ int rlc_tm::read_pdu(uint8_t* payload, uint32_t nof_bytes) { uint32_t pdu_size = ul_queue.size_tail_bytes(); if (pdu_size > nof_bytes) { - log->error( - "TX %s PDU size larger than MAC opportunity (%d > %d)\n", rrc->get_rb_name(lcid).c_str(), pdu_size, nof_bytes); + log->info( + "%s Tx PDU size larger than MAC opportunity (%d > %d)\n", rrc->get_rb_name(lcid).c_str(), pdu_size, nof_bytes); return -1; } unique_byte_buffer_t buf; @@ -145,7 +145,7 @@ int rlc_tm::read_pdu(uint8_t* payload, uint32_t nof_bytes) buf->get_latency_us().count()); log->info_hex(payload, pdu_size, - "TX %s, %s PDU, queue size=%d, bytes=%d", + "%s Tx %s PDU, queue size=%d, bytes=%d", rrc->get_rb_name(lcid).c_str(), srslte::to_string(rlc_mode_t::tm).c_str(), ul_queue.size(), From 1304746bce46cfbef1b486ac727daaf4292d445d Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Tue, 15 Dec 2020 11:31:10 +0000 Subject: [PATCH 21/59] use of fmt lib in asn1 utils --- lib/include/srslte/asn1/asn1_utils.h | 11 +++++----- lib/src/asn1/asn1_utils.cc | 31 ++++++++++++++-------------- srsenb/hdr/parser.h | 1 + 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/lib/include/srslte/asn1/asn1_utils.h b/lib/include/srslte/asn1/asn1_utils.h index 67c5ae166..c4757f416 100644 --- a/lib/include/srslte/asn1/asn1_utils.h +++ b/lib/include/srslte/asn1/asn1_utils.h @@ -13,14 +13,13 @@ #ifndef SRSASN_COMMON_UTILS_H #define SRSASN_COMMON_UTILS_H +#include "srslte/srslog/bundled/fmt/format.h" #include #include #include #include #include #include -#include -#include /* va_list, va_start, va_arg, va_end */ #include #include #include @@ -1301,6 +1300,8 @@ private: JsonWriter *******************/ +using json_buffer = fmt::basic_memory_buffer; + class json_writer { public: @@ -1321,9 +1322,9 @@ public: std::string to_string() const; private: - std::stringstream ss; - std::string ident; - enum separator_t { COMMA, NEWLINE, NONE }; + json_buffer buffer; + std::string ident; + enum separator_t { COMMA = 0, NEWLINE, NONE }; separator_t sep; }; diff --git a/lib/src/asn1/asn1_utils.cc b/lib/src/asn1/asn1_utils.cc index b08ade621..92b61a46e 100644 --- a/lib/src/asn1/asn1_utils.cc +++ b/lib/src/asn1/asn1_utils.cc @@ -12,7 +12,9 @@ #include "srslte/asn1/asn1_utils.h" #include "srslte/common/logmap.h" +#include "srslte/srslog/bundled/fmt/core.h" #include +#include /* va_list, va_start, va_arg, va_end */ #include namespace asn1 { @@ -1513,13 +1515,11 @@ json_writer::json_writer() : ident(""), sep(NONE) {} void json_writer::write_fieldname(const std::string& fieldname) { - if (sep == COMMA) { - ss << ",\n" << ident; - } else if (sep == NEWLINE) { - ss << "\n" << ident; - } + constexpr static const char* septable[] = {",\n", "\n", ""}; + + fmt::format_to(buffer, "{}{}", septable[sep], sep != NONE ? ident : ""); if (not fieldname.empty()) { - ss << "\"" << fieldname << "\": "; + fmt::format_to(buffer, "\"{}\": ", fieldname); } sep = NONE; } @@ -1527,7 +1527,7 @@ void json_writer::write_fieldname(const std::string& fieldname) void json_writer::write_str(const std::string& fieldname, const std::string& value) { write_fieldname(fieldname); - ss << "\"" << value << "\""; + fmt::format_to(buffer, "\"{}\"", value); sep = COMMA; } void json_writer::write_str(const std::string& value) @@ -1538,7 +1538,7 @@ void json_writer::write_str(const std::string& value) void json_writer::write_int(const std::string& fieldname, int64_t value) { write_fieldname(fieldname); - ss << value; + fmt::format_to(buffer, "{}", value); sep = COMMA; } void json_writer::write_int(int64_t value) @@ -1549,7 +1549,7 @@ void json_writer::write_int(int64_t value) void json_writer::write_bool(const std::string& fieldname, bool value) { write_fieldname(fieldname); - ss << (value ? "true" : "false"); + fmt::format_to(buffer, "{}", value ? "true" : "false"); sep = COMMA; } void json_writer::write_bool(bool value) @@ -1560,7 +1560,7 @@ void json_writer::write_bool(bool value) void json_writer::write_null(const std::string& fieldname) { write_fieldname(fieldname); - ss << "null"; + fmt::format_to(buffer, "null"); sep = COMMA; } void json_writer::write_null() @@ -1571,33 +1571,34 @@ void json_writer::write_null() void json_writer::start_obj(const std::string& fieldname) { write_fieldname(fieldname); - ss << "{"; + fmt::format_to(buffer, "{{"); ident += " "; sep = NEWLINE; } void json_writer::end_obj() { ident.erase(ident.size() - 2, 2); - ss << "\n" << ident << "}"; + fmt::format_to(buffer, "\n{}}}", ident); sep = COMMA; } + void json_writer::start_array(const std::string& fieldname) { write_fieldname(fieldname); - ss << "["; + fmt::format_to(buffer, "["); ident += " "; sep = NEWLINE; } void json_writer::end_array() { ident.erase(ident.size() - 2, 2); - ss << "\n" << ident << "]"; + fmt::format_to(buffer, "\n{}]", ident); sep = COMMA; } std::string json_writer::to_string() const { - return ss.str(); + return std::string(buffer.data(), buffer.size()); } } // namespace asn1 diff --git a/srsenb/hdr/parser.h b/srsenb/hdr/parser.h index c75c0dc67..cb9e43563 100644 --- a/srsenb/hdr/parser.h +++ b/srsenb/hdr/parser.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include From d198e8fb310902d0c09a517b685b3586f8d24b98 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Tue, 15 Dec 2020 16:24:10 +0000 Subject: [PATCH 22/59] fix asn1 length determinant packing for upper bounds above 64K --- lib/src/asn1/asn1_utils.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/src/asn1/asn1_utils.cc b/lib/src/asn1/asn1_utils.cc index 92b61a46e..7ca2cc076 100644 --- a/lib/src/asn1/asn1_utils.cc +++ b/lib/src/asn1/asn1_utils.cc @@ -735,6 +735,10 @@ template SRSASN_CODE unpack_unconstrained_whole_number(uint64_t& n, cb template SRSASN_CODE pack_length(bit_ref& bref, IntType n, IntType lb, IntType ub, bool aligned) { + if (ub >= ASN_64K) { + IntType len = n - lb; + return pack_length(bref, len, aligned); + } return pack_constrained_whole_number(bref, n, lb, ub, aligned); } template SRSASN_CODE pack_length(bit_ref& bref, uint8_t n, uint8_t lb, uint8_t ub, bool aligned); @@ -749,6 +753,12 @@ template SRSASN_CODE pack_length(bit_ref& bref, int64_t n, int64_t lb, template SRSASN_CODE unpack_length(IntType& n, cbit_ref& bref, IntType lb, IntType ub, bool aligned) { + if (ub >= ASN_64K) { + uint32_t len; + SRSASN_CODE ret = unpack_length(len, bref, aligned); + n = len + lb; + return ret; + } return unpack_constrained_whole_number(n, bref, lb, ub, aligned); } template SRSASN_CODE unpack_length(uint8_t& n, cbit_ref& bref, uint8_t lb, uint8_t ub, bool aligned); From ea36e46635611fd27f148499be2d4491a243b8b8 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Tue, 15 Dec 2020 18:54:01 +0000 Subject: [PATCH 23/59] fix asn1 length determinant packing/unpacking. avoid subtracting len by zero before the packing --- lib/src/asn1/asn1_utils.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/asn1/asn1_utils.cc b/lib/src/asn1/asn1_utils.cc index 7ca2cc076..55af5c2ce 100644 --- a/lib/src/asn1/asn1_utils.cc +++ b/lib/src/asn1/asn1_utils.cc @@ -736,8 +736,7 @@ template SRSASN_CODE pack_length(bit_ref& bref, IntType n, IntType lb, IntType ub, bool aligned) { if (ub >= ASN_64K) { - IntType len = n - lb; - return pack_length(bref, len, aligned); + return pack_length(bref, n, aligned); } return pack_constrained_whole_number(bref, n, lb, ub, aligned); } @@ -756,7 +755,7 @@ SRSASN_CODE unpack_length(IntType& n, cbit_ref& bref, IntType lb, IntType ub, bo if (ub >= ASN_64K) { uint32_t len; SRSASN_CODE ret = unpack_length(len, bref, aligned); - n = len + lb; + n = len; return ret; } return unpack_constrained_whole_number(n, bref, lb, ub, aligned); From 0498439d4122483075352e7d1001e3b70013bdcd Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 16 Dec 2020 13:48:48 +0100 Subject: [PATCH 24/59] Backport some changes from FAPI branch (#2124) * Reorder DCI FORMAT enum * Fix endianness issue * Fix return codes in phy_ue_db * Log members should be destructed after the layers. * Add JSON metrics and Events. Add Alarm log channel. Simplify MAC metrics struct. * Restore metrics_stdout change --- lib/include/srslte/common/enb_events.h | 70 +++++++++ lib/include/srslte/phy/common/phy_common.h | 2 +- lib/src/common/CMakeLists.txt | 1 + lib/src/common/enb_events.cc | 150 +++++++++++++++++++ lib/src/mac/pdu.cc | 8 +- srsenb/enb.conf.example | 4 + srsenb/hdr/enb.h | 16 +- srsenb/hdr/metrics_json.h | 42 ++++++ srsenb/hdr/phy/phy_ue_db.h | 26 ++-- srsenb/src/CMakeLists.txt | 2 +- srsenb/src/enb.cc | 17 ++- srsenb/src/main.cc | 28 ++++ srsenb/src/metrics_json.cc | 166 +++++++++++++++++++++ srsenb/src/phy/phy_ue_db.cc | 36 +++-- srsenb/src/stack/rrc/rrc_ue.cc | 7 + srsenb/src/stack/upper/s1ap.cc | 7 + srsenb/test/phy/enb_phy_test.cc | 2 +- 17 files changed, 546 insertions(+), 38 deletions(-) create mode 100644 lib/include/srslte/common/enb_events.h create mode 100644 lib/src/common/enb_events.cc create mode 100644 srsenb/hdr/metrics_json.h create mode 100644 srsenb/src/metrics_json.cc diff --git a/lib/include/srslte/common/enb_events.h b/lib/include/srslte/common/enb_events.h new file mode 100644 index 000000000..296ab3297 --- /dev/null +++ b/lib/include/srslte/common/enb_events.h @@ -0,0 +1,70 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef SRSENB_ENB_EVENTS_H +#define SRSENB_ENB_EVENTS_H + +#include +#include + +namespace srslog { +class log_channel; +} + +namespace srsenb { + +/// This interface logs different kinds of events to the configured channel. By default, if no log channel is configured +/// logging will be disabled. +class event_logger_interface +{ +public: + virtual ~event_logger_interface() = default; + + /// Logs into the underlying log channel the RRC connected event. + virtual void log_rrc_connected(unsigned cause) = 0; + + /// Logs into the underlying log channel the RRC disconnected event. + virtual void log_rrc_disconnect(unsigned reason) = 0; + + /// Logs into the underlying log channel the S1 context create event. + virtual void log_s1_ctx_create(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) = 0; + + /// Logs into the underlying log channel the S1 context delete event. + virtual void log_s1_ctx_delete(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) = 0; + + /// Logs into the underlying log channel the when a sector has been started. + virtual void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) = 0; + + /// Logs into the underlying log channel the when a sector has been stopped. + virtual void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) = 0; +}; + +/// Singleton class to provide global access to the event_logger_interface interface. +class event_logger +{ + event_logger() = default; + +public: + /// Returns the instance of the event logger. + static event_logger_interface& get(); + + /// Uses the specified log channel for event logging. + /// NOTE: This method is not thread safe. + static void configure(srslog::log_channel& c); + +private: + static std::unique_ptr pimpl; +}; + +} // namespace srsenb + +#endif // SRSENB_ENB_EVENTS_H diff --git a/lib/include/srslte/phy/common/phy_common.h b/lib/include/srslte/phy/common/phy_common.h index 7640beabe..79abeabac 100644 --- a/lib/include/srslte/phy/common/phy_common.h +++ b/lib/include/srslte/phy/common/phy_common.h @@ -284,8 +284,8 @@ typedef enum { SRSLTE_DCI_FORMAT0 = 0, SRSLTE_DCI_FORMAT1, SRSLTE_DCI_FORMAT1A, - SRSLTE_DCI_FORMAT1C, SRSLTE_DCI_FORMAT1B, + SRSLTE_DCI_FORMAT1C, SRSLTE_DCI_FORMAT1D, SRSLTE_DCI_FORMAT2, SRSLTE_DCI_FORMAT2A, diff --git a/lib/src/common/CMakeLists.txt b/lib/src/common/CMakeLists.txt index 38aaf3d10..9ae4a2f91 100644 --- a/lib/src/common/CMakeLists.txt +++ b/lib/src/common/CMakeLists.txt @@ -8,6 +8,7 @@ set(SOURCES arch_select.cc + enb_events.cc backtrace.c buffer_pool.cc crash_handler.c diff --git a/lib/src/common/enb_events.cc b/lib/src/common/enb_events.cc new file mode 100644 index 000000000..d4398123b --- /dev/null +++ b/lib/src/common/enb_events.cc @@ -0,0 +1,150 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "srslte/common/enb_events.h" +#include "srslte/srslog/context.h" +#include "srslte/srslog/log_channel.h" + +using namespace srsenb; + +namespace { + +/// Null object implementation that is used when no log channel is configured. +class null_event_logger : public event_logger_interface +{ +public: + void log_rrc_connected(unsigned cause) override {} + void log_rrc_disconnect(unsigned reason) override {} + void log_s1_ctx_create(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override {} + void log_s1_ctx_delete(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override {} + void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override {} + void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override {} +}; + +} // namespace + +namespace { + +/// Common metrics to all events. +DECLARE_METRIC("type", metric_type_tag, std::string, ""); +DECLARE_METRIC("event_name", metric_event_name, std::string, ""); + +/// Context for sector start/stop. +DECLARE_METRIC("pci", metric_pci, uint32_t, ""); +DECLARE_METRIC("cell_identity", metric_cell_identity, uint32_t, ""); +DECLARE_METRIC("sector_id", metric_sector_id, uint32_t, ""); +DECLARE_METRIC_SET("event_data", mset_sector_event, metric_pci, metric_cell_identity, metric_sector_id); +using sector_event_t = srslog::build_context_type; + +/// Context for RRC connect/disconnect. +DECLARE_METRIC("cause", metric_cause, uint32_t, ""); +DECLARE_METRIC_SET("event_data", mset_rrc_event, metric_cause); +using rrc_event_t = srslog::build_context_type; + +/// Context for S1 context create/delete. +DECLARE_METRIC("mme_ue_s1ap_id", metric_ue_mme_id, uint32_t, ""); +DECLARE_METRIC("enb_ue_s1ap_id", metric_ue_enb_id, uint32_t, ""); +DECLARE_METRIC("rnti", metric_rnti, uint16_t, ""); +DECLARE_METRIC_SET("event_data", mset_s1apctx_event, metric_ue_mme_id, metric_ue_enb_id, metric_rnti); +using s1apctx_event_t = srslog::build_context_type; + +/// Logs events into the configured log channel. +class logging_event_logger : public event_logger_interface +{ +public: + explicit logging_event_logger(srslog::log_channel& c) : event_channel(c) {} + + void log_rrc_connected(unsigned cause) override + { + rrc_event_t ctx(""); + + ctx.write("event"); + ctx.write("rrc_connect"); + ctx.get().write(cause); + event_channel(ctx); + } + + void log_rrc_disconnect(unsigned reason) override + { + rrc_event_t ctx(""); + + ctx.write("event"); + ctx.write("rrc_disconnect"); + ctx.get().write(reason); + event_channel(ctx); + } + + void log_s1_ctx_create(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override + { + s1apctx_event_t ctx(""); + + ctx.write("event"); + ctx.write("s1_context_create"); + ctx.get().write(mme_id); + ctx.get().write(enb_id); + ctx.get().write(rnti); + event_channel(ctx); + } + + void log_s1_ctx_delete(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override + { + s1apctx_event_t ctx(""); + + ctx.write("event"); + ctx.write("s1_context_delete"); + ctx.get().write(mme_id); + ctx.get().write(enb_id); + ctx.get().write(rnti); + event_channel(ctx); + } + + void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override + { + sector_event_t ctx(""); + + ctx.write("event"); + ctx.write("sector_start"); + ctx.get().write(pci); + ctx.get().write(cell_id); + ctx.get().write(cc_idx); + event_channel(ctx); + } + + void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override + { + sector_event_t ctx(""); + + ctx.write("event"); + ctx.write("sector_stop"); + ctx.get().write(pci); + ctx.get().write(cell_id); + ctx.get().write(cc_idx); + event_channel(ctx); + } + +private: + srslog::log_channel& event_channel; +}; + +} // namespace + +std::unique_ptr event_logger::pimpl = std::unique_ptr(new null_event_logger); + +event_logger_interface& event_logger::get() +{ + return *pimpl; +} + +void event_logger::configure(srslog::log_channel& c) +{ + pimpl = std::unique_ptr(new logging_event_logger(c)); +} diff --git a/lib/src/mac/pdu.cc b/lib/src/mac/pdu.cc index 5d23aa988..b31e5ac0e 100644 --- a/lib/src/mac/pdu.cc +++ b/lib/src/mac/pdu.cc @@ -565,13 +565,13 @@ bool sch_subh::is_var_len_ce() uint16_t sch_subh::get_c_rnti() { - return (uint16_t)payload[0] << 8 | payload[1]; + return le16toh((uint16_t)payload[0] << 8 | payload[1]); } uint64_t sch_subh::get_con_res_id() { - return ((uint64_t)payload[5]) | (((uint64_t)payload[4]) << 8) | (((uint64_t)payload[3]) << 16) | - (((uint64_t)payload[2]) << 24) | (((uint64_t)payload[1]) << 32) | (((uint64_t)payload[0]) << 40); + return le64toh(((uint64_t)payload[5]) | (((uint64_t)payload[4]) << 8) | (((uint64_t)payload[3]) << 16) | + (((uint64_t)payload[2]) << 24) | (((uint64_t)payload[1]) << 32) | (((uint64_t)payload[0]) << 40)); } float sch_subh::get_phr() @@ -711,6 +711,7 @@ bool sch_subh::set_bsr(uint32_t buff_size[4], ul_sch_lcid format) bool sch_subh::set_c_rnti(uint16_t crnti) { + crnti = htole32(crnti); if (((sch_pdu*)parent)->has_space_ce(2)) { w_payload_ce[0] = (uint8_t)((crnti & 0xff00) >> 8); w_payload_ce[1] = (uint8_t)((crnti & 0x00ff)); @@ -724,6 +725,7 @@ bool sch_subh::set_c_rnti(uint16_t crnti) } bool sch_subh::set_con_res_id(uint64_t con_res_id) { + con_res_id = htole64(con_res_id); if (((sch_pdu*)parent)->has_space_ce(6)) { w_payload_ce[0] = (uint8_t)((con_res_id & 0xff0000000000) >> 40); w_payload_ce[1] = (uint8_t)((con_res_id & 0x00ff00000000) >> 32); diff --git a/srsenb/enb.conf.example b/srsenb/enb.conf.example index e767568a6..c6098856e 100644 --- a/srsenb/enb.conf.example +++ b/srsenb/enb.conf.example @@ -294,6 +294,10 @@ enable = false #metrics_period_secs = 1 #metrics_csv_enable = false #metrics_csv_filename = /tmp/enb_metrics.csv +#report_json_enable = true +#report_json_filename = /tmp/enb_report.json +#alarms_log_enable = true +#alarms_filename = /tmp/enb_alarms.log #pregenerate_signals = false #tx_amplitude = 0.6 #rrc_inactivity_timer = 30000 diff --git a/srsenb/hdr/enb.h b/srsenb/hdr/enb.h index abc8e0978..ec530171a 100644 --- a/srsenb/hdr/enb.h +++ b/srsenb/hdr/enb.h @@ -29,6 +29,7 @@ #include "srsenb/hdr/phy/enb_phy_base.h" #include "srsenb/hdr/stack/enb_stack_base.h" +#include "srsenb/hdr/stack/rrc/rrc_config.h" #include "srslte/common/bcd_helpers.h" #include "srslte/common/buffer_pool.h" @@ -81,6 +82,10 @@ struct general_args_t { float metrics_period_secs; bool metrics_csv_enable; std::string metrics_csv_filename; + bool report_json_enable; + std::string report_json_filename; + bool alarms_log_enable; + std::string alarms_filename; bool print_buffer_state; std::string eia_pref_list; std::string eea_pref_list; @@ -129,11 +134,6 @@ private: int parse_args(const all_args_t& args_, rrc_cfg_t& rrc_cfg); - // eNB components - std::unique_ptr stack; - std::unique_ptr radio; - std::unique_ptr phy; - srslte::logger* logger = nullptr; srslte::log_ref log; // Own logger for eNB @@ -145,6 +145,12 @@ private: bool started = false; phy_cfg_t phy_cfg = {}; + rrc_cfg_t rrc_cfg = {}; + + // eNB components + std::unique_ptr stack = nullptr; + std::unique_ptr radio = nullptr; + std::unique_ptr phy = nullptr; srslte::LOG_LEVEL_ENUM level(std::string l); diff --git a/srsenb/hdr/metrics_json.h b/srsenb/hdr/metrics_json.h new file mode 100644 index 000000000..20efe6d7f --- /dev/null +++ b/srsenb/hdr/metrics_json.h @@ -0,0 +1,42 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +/****************************************************************************** + * File: metrics_json.h + * Description: Metrics class printing to a json file. + *****************************************************************************/ + +#ifndef SRSENB_METRICS_JSON_H +#define SRSENB_METRICS_JSON_H + +#include "srslte/interfaces/enb_metrics_interface.h" +#include "srslte/srslog/log_channel.h" + +namespace srsenb { + +class metrics_json : public srslte::metrics_listener +{ +public: + metrics_json(srslog::log_channel& c) : log_c(c) {} + + void set_metrics(const enb_metrics_t& m, const uint32_t period_usec) override; + void set_handle(enb_metrics_interface* enb_); + void stop() override {} + +private: + srslog::log_channel& log_c; + enb_metrics_interface* enb; +}; + +} // namespace srsenb + +#endif // SRSENB_METRICS_JSON_H diff --git a/srsenb/hdr/phy/phy_ue_db.h b/srsenb/hdr/phy/phy_ue_db.h index 33753919b..02ee79a43 100644 --- a/srsenb/hdr/phy/phy_ue_db.h +++ b/srsenb/hdr/phy/phy_ue_db.h @@ -283,6 +283,14 @@ public: */ bool is_pcell(uint16_t rnti, uint32_t enb_cc_idx) const; + /** + * Asserts a given eNb cell is part of the given RNTI + * @param rnti identifier of the UE + * @param enb_cc_idx eNb cell/carrier index + * @return It returns true if the cell is part of the UE, othwerwise it returns false + */ + bool ue_has_cell(uint16_t rnti, uint32_t enb_cc_idx) const; + /** * Get the current down-link physical layer configuration for an RNTI and an eNb cell/carrier * @@ -330,7 +338,7 @@ public: * @param dci carries the Transport Block and required scheduling information * */ - void set_ack_pending(uint32_t tti, uint32_t enb_cc_idx, const srslte_dci_dl_t& dci); + bool set_ack_pending(uint32_t tti, uint32_t enb_cc_idx, const srslte_dci_dl_t& dci); /** * Fills the Uplink Control Information (UCI) configuration and returns true/false idicating if UCI bits are required. @@ -339,14 +347,14 @@ public: * @param rnti is the UE identifier * @param aperiodic_cqi_request indicates if aperiodic CQI was requested * @param uci_cfg brings the UCI configuration - * @return true if UCI decoding is required and false otherwise - */ - bool fill_uci_cfg(uint32_t tti, - uint32_t enb_cc_idx, - uint16_t rnti, - bool aperiodic_cqi_request, - bool is_pusch_available, - srslte_uci_cfg_t& uci_cfg); + * @return 1 if UCI decoding is required, 0 if not, -1 if error + */ + int fill_uci_cfg(uint32_t tti, + uint32_t enb_cc_idx, + uint16_t rnti, + bool aperiodic_cqi_request, + bool is_pusch_available, + srslte_uci_cfg_t& uci_cfg); /** * Sends the decoded Uplink Control Information by PUCCH or PUSCH to MAC diff --git a/srsenb/src/CMakeLists.txt b/srsenb/src/CMakeLists.txt index 71883c76b..955067692 100644 --- a/srsenb/src/CMakeLists.txt +++ b/srsenb/src/CMakeLists.txt @@ -23,7 +23,7 @@ endif (RPATH) add_library(enb_cfg_parser STATIC parser.cc enb_cfg_parser.cc) target_link_libraries(enb_cfg_parser ${LIBCONFIGPP_LIBRARIES}) -add_executable(srsenb main.cc enb.cc metrics_stdout.cc metrics_csv.cc) +add_executable(srsenb main.cc enb.cc metrics_stdout.cc metrics_csv.cc metrics_json.cc) set(SRSENB_SOURCES srsenb_phy srsenb_stack srsenb_upper srsenb_mac srsenb_rrc srslog) set(SRSLTE_SOURCES srslte_common srslte_mac srslte_phy srslte_upper srslte_radio rrc_asn1 s1ap_asn1 enb_cfg_parser srslog) diff --git a/srsenb/src/enb.cc b/srsenb/src/enb.cc index 54523c8d8..23ecca411 100644 --- a/srsenb/src/enb.cc +++ b/srsenb/src/enb.cc @@ -14,6 +14,7 @@ #include "srsenb/hdr/stack/enb_stack_lte.h" #include "srsenb/src/enb_cfg_parser.h" #include "srslte/build_info.h" +#include "srslte/common/enb_events.h" #include "srslte/radio/radio_null.h" #ifdef HAVE_5GNR #include "srsenb/hdr/phy/vnf_phy_nr.h" @@ -46,7 +47,6 @@ int enb::init(const all_args_t& args_, srslte::logger* logger_) log->info("%s", get_build_string().c_str()); // Validate arguments - rrc_cfg_t rrc_cfg = {}; if (parse_args(args_, rrc_cfg)) { srslte::console("Error processing arguments.\n"); return SRSLTE_ERROR; @@ -145,6 +145,11 @@ int enb::init(const all_args_t& args_, srslte::logger* logger_) started = true; // set to true in any case to allow stopping the eNB if an error happened + // Now that everything is setup, log sector start events. + for (unsigned i = 0, e = rrc_cfg.cell_list.size(); i != e; ++i) { + event_logger::get().log_sector_start(i, rrc_cfg.cell_list[i].pci, rrc_cfg.cell_list[i].cell_id); + } + if (ret == SRSLTE_SUCCESS) { srslte::console("\n==== eNodeB started ===\n"); srslte::console("Type to view trace\n"); @@ -152,6 +157,7 @@ int enb::init(const all_args_t& args_, srslte::logger* logger_) // if any of the layers failed to start, make sure the rest is stopped in a controlled manner stop(); } + return ret; } @@ -171,15 +177,20 @@ void enb::stop() radio->stop(); } + // Now that everything is teared down, log sector stop events. + for (unsigned i = 0, e = rrc_cfg.cell_list.size(); i != e; ++i) { + event_logger::get().log_sector_stop(i, rrc_cfg.cell_list[i].pci, rrc_cfg.cell_list[i].cell_id); + } + started = false; } } -int enb::parse_args(const all_args_t& args_, rrc_cfg_t& rrc_cfg) +int enb::parse_args(const all_args_t& args_, rrc_cfg_t& _rrc_cfg) { // set member variable args = args_; - return enb_conf_sections::parse_cfg_files(&args, &rrc_cfg, &phy_cfg); + return enb_conf_sections::parse_cfg_files(&args, &_rrc_cfg, &phy_cfg); } void enb::start_plot() diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index ddc491863..e0f48b236 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -32,7 +32,9 @@ #include "srsenb/hdr/enb.h" #include "srsenb/hdr/metrics_csv.h" +#include "srsenb/hdr/metrics_json.h" #include "srsenb/hdr/metrics_stdout.h" +#include "srslte/common/enb_events.h" using namespace std; using namespace srsenb; @@ -191,6 +193,10 @@ void parse_args(all_args_t* args, int argc, char* argv[]) ("expert.equalizer_mode", bpo::value(&args->phy.equalizer_mode)->default_value("mmse"), "Equalizer mode") ("expert.estimator_fil_w", bpo::value(&args->phy.estimator_fil_w)->default_value(0.1), "Chooses the coefficients for the 3-tap channel estimator centered filter.") ("expert.lte_sample_rates", bpo::value(&use_standard_lte_rates)->default_value(false), "Whether to use default LTE sample rates instead of shorter variants.") + ("expert.report_json_enable", bpo::value(&args->general.report_json_enable)->default_value(true), "Write eNB report to JSON file") + ("expert.report_json_filename", bpo::value(&args->general.report_json_filename)->default_value("/tmp/enb_report.json"), "Report JSON filename") + ("expert.alarms_log_enable", bpo::value(&args->general.alarms_log_enable)->default_value(true), "Log alarms") + ("expert.alarms_filename", bpo::value(&args->general.alarms_filename)->default_value("/tmp/enb_alarms.log"), "Alarms filename") ("expert.rrc_inactivity_timer", bpo::value(&args->general.rrc_inactivity_timer)->default_value(30000), "Inactivity timer in ms.") ("expert.print_buffer_state", bpo::value(&args->general.print_buffer_state)->default_value(false), "Prints on the console the buffer state every 10 seconds") ("expert.eea_pref_list", bpo::value(&args->general.eea_pref_list)->default_value("EEA0, EEA2, EEA1"), "Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1).") @@ -478,6 +484,11 @@ int main(int argc, char* argv[]) } srslte::srslog_wrapper log_wrapper(*chan); + // Alarms log channel creation. + srslog::sink& alarm_sink = srslog::fetch_file_sink(args.general.alarms_filename); + srslog::log_channel& alarms_channel = srslog::fetch_log_channel("alarms", alarm_sink, {"ALRM", '\0', false}); + alarms_channel.set_enabled(args.general.alarms_log_enable); + // Start the log backend. srslog::init(); @@ -487,6 +498,17 @@ int main(int argc, char* argv[]) srslte::check_scaling_governor(args.rf.device_name); + // Set up the JSON log channel used by metrics and events. + srslog::sink& json_sink = + srslog::fetch_file_sink(args.general.report_json_filename, 0, srslog::create_json_formatter()); + srslog::log_channel& json_channel = srslog::fetch_log_channel("JSON_channel", json_sink, {}); + json_channel.set_enabled(args.general.report_json_enable); + + // Configure the event logger just before starting the eNB class. + if (args.general.report_json_enable) { + event_logger::configure(json_channel); + } + // Create eNB unique_ptr enb{new srsenb::enb}; if (enb->init(args, &log_wrapper) != SRSLTE_SUCCESS) { @@ -505,6 +527,12 @@ int main(int argc, char* argv[]) metrics_file.set_handle(enb.get()); } + srsenb::metrics_json json_metrics(json_channel); + if (args.general.report_json_enable) { + metricshub.add_listener(&json_metrics); + json_metrics.set_handle(enb.get()); + } + // create input thread std::thread input(&input_loop, &metrics_screen, (enb_command_interface*)enb.get()); diff --git a/srsenb/src/metrics_json.cc b/srsenb/src/metrics_json.cc new file mode 100644 index 000000000..94cc09515 --- /dev/null +++ b/srsenb/src/metrics_json.cc @@ -0,0 +1,166 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "srsenb/hdr/metrics_json.h" +#include "srslte/srslog/context.h" + +using namespace srsenb; + +void metrics_json::set_handle(enb_metrics_interface* enb_) +{ + enb = enb_; +} + +namespace { + +/// Bearer container metrics. +DECLARE_METRIC("bearer_id", metric_bearer_id, uint32_t, ""); +DECLARE_METRIC("qci", metric_qci, uint32_t, ""); +DECLARE_METRIC_SET("bearer_container", mset_bearer_container, metric_bearer_id, metric_qci); + +/// UE container metrics. +DECLARE_METRIC("ue_rnti", metric_ue_rnti, uint32_t, ""); +DECLARE_METRIC("dl_cqi", metric_dl_cqi, float, ""); +DECLARE_METRIC("dl_mcs", metric_dl_mcs, float, ""); +DECLARE_METRIC("dl_bitrate", metric_dl_bitrate, float, ""); +DECLARE_METRIC("dl_bler", metric_dl_bler, float, ""); +DECLARE_METRIC("ul_snr", metric_ul_snr, float, ""); +DECLARE_METRIC("ul_mcs", metric_ul_mcs, float, ""); +DECLARE_METRIC("ul_bitrate", metric_ul_bitrate, float, ""); +DECLARE_METRIC("ul_bler", metric_ul_bler, float, ""); +DECLARE_METRIC("ul_phr", metric_ul_phr, float, ""); +DECLARE_METRIC("bsr", metric_bsr, int, ""); +DECLARE_METRIC_LIST("bearer_list", mlist_bearers, std::vector); +DECLARE_METRIC_SET("ue_container", + mset_ue_container, + metric_ue_rnti, + metric_dl_cqi, + metric_dl_mcs, + metric_dl_bitrate, + metric_dl_bler, + metric_ul_snr, + metric_ul_mcs, + metric_ul_bitrate, + metric_ul_bler, + metric_ul_phr, + metric_bsr, + mlist_bearers); + +/// Sector container metrics. +DECLARE_METRIC("sector_id", metric_sector_id, uint32_t, ""); +DECLARE_METRIC("sector_rach", metric_sector_rach, uint32_t, ""); +DECLARE_METRIC_LIST("ue_list", mlist_ues, std::vector); +DECLARE_METRIC_SET("sector_container", mset_sector_container, metric_sector_id, metric_sector_rach, mlist_ues); + +/// Metrics root object. +DECLARE_METRIC("type", metric_type_tag, std::string, ""); +DECLARE_METRIC_LIST("sector_list", mlist_sector, std::vector); + +/// Metrics context. +using metric_context_t = srslog::build_context_type; + +} // namespace + +/// Fill the metrics for the i'th UE in the enb metrics struct. +static void fill_ue_metrics(mset_ue_container& ue, const enb_metrics_t& m, unsigned i) +{ + ue.write(m.stack.mac.ues[i].rnti); + ue.write(std::max(0.1f, m.stack.mac.ues[i].dl_cqi)); + if (!std::isnan(m.phy[i].dl.mcs)) { + ue.write(std::max(0.1f, m.phy[i].dl.mcs)); + } + if (m.stack.mac.ues[i].tx_brate > 0) { + ue.write( + std::max(0.1f, (float)m.stack.mac.ues[i].tx_brate / (m.stack.mac.ues[i].nof_tti * 0.001f))); + } + if (m.stack.mac.ues[i].tx_pkts > 0 && m.stack.mac.ues[i].tx_errors > 0) { + ue.write(std::max(0.1f, (float)100 * m.stack.mac.ues[i].tx_errors / m.stack.mac.ues[i].tx_pkts)); + } + if (!std::isnan(m.phy[i].ul.sinr)) { + ue.write(std::max(0.1f, m.phy[i].ul.sinr)); + } + if (!std::isnan(m.phy[i].ul.mcs)) { + ue.write(std::max(0.1f, m.phy[i].ul.mcs)); + } + if (m.stack.mac.ues[i].rx_brate > 0) { + ue.write( + std::max(0.1f, (float)m.stack.mac.ues[i].rx_brate / (m.stack.mac.ues[i].nof_tti * 0.001f))); + } + if (m.stack.mac.ues[i].rx_pkts > 0 && m.stack.mac.ues[i].rx_errors > 0) { + ue.write(std::max(0.1f, (float)100 * m.stack.mac.ues[i].rx_errors / m.stack.mac.ues[i].rx_pkts)); + } + ue.write(m.stack.mac.ues[i].phr); + ue.write(m.stack.mac.ues[i].ul_buffer); + + // For each data bearer of this UE... + auto& bearer_list = ue.get(); + for (const auto& drb : m.stack.rrc.ues[i].drb_qci_map) { + bearer_list.emplace_back(); + auto& bearer_container = bearer_list.back(); + bearer_container.write(drb.first); + bearer_container.write(drb.second); + } +} + +/// Returns false if the input index is out of bounds in the metrics struct. +static bool has_valid_metric_ranges(const enb_metrics_t& m, unsigned index) +{ + if (index >= m.phy.size()) { + return false; + } + if (index >= m.stack.mac.ues.size()) { + return false; + } + + return true; +} + +void metrics_json::set_metrics(const enb_metrics_t& m, const uint32_t period_usec) +{ + if (!enb) { + return; + } + if (m.stack.mac.cc_rach_counter.empty()) { + return; + } + + metric_context_t ctx("JSON Metrics"); + + // Fill root object. + ctx.write("metrics"); + auto& sector_list = ctx.get(); + sector_list.resize(m.stack.mac.cc_rach_counter.size()); + + // For each sector... + for (unsigned cc_idx = 0, e = sector_list.size(); cc_idx != e; ++cc_idx) { + auto& sector = sector_list[cc_idx]; + sector.write(cc_idx); + sector.write(m.stack.mac.cc_rach_counter[cc_idx]); + + // For each UE in this sector... + for (unsigned i = 0; i != m.stack.rrc.ues.size(); ++i) { + if (!has_valid_metric_ranges(m, i)) { + continue; + } + + // Only record UEs that belong to this sector. + if (m.stack.mac.ues[i].cc_idx != cc_idx) { + continue; + } + sector.get().emplace_back(); + fill_ue_metrics(sector.get().back(), m, i); + } + } + + // Log the context. + log_c(ctx); +} diff --git a/srsenb/src/phy/phy_ue_db.cc b/srsenb/src/phy/phy_ue_db.cc index 166f6fd31..5f472c989 100644 --- a/srsenb/src/phy/phy_ue_db.cc +++ b/srsenb/src/phy/phy_ue_db.cc @@ -390,6 +390,11 @@ void phy_ue_db::activate_deactivate_scell(uint16_t rnti, uint32_t ue_cc_idx, boo cell_info.state = (activate) ? cell_state_secondary_active : cell_state_secondary_inactive; } +bool phy_ue_db::ue_has_cell(uint16_t rnti, uint32_t enb_cc_idx) const +{ + return _assert_enb_cc(rnti, enb_cc_idx) == SRSLTE_SUCCESS; +} + bool phy_ue_db::is_pcell(uint16_t rnti, uint32_t enb_cc_idx) const { std::lock_guard lock(mutex); @@ -440,16 +445,16 @@ srslte_dci_cfg_t phy_ue_db::get_dci_ul_config(uint16_t rnti, uint32_t enb_cc_idx return _get_rnti_config(rnti, enb_cc_idx).dl_cfg.dci; } -void phy_ue_db::set_ack_pending(uint32_t tti, uint32_t enb_cc_idx, const srslte_dci_dl_t& dci) +bool phy_ue_db::set_ack_pending(uint32_t tti, uint32_t enb_cc_idx, const srslte_dci_dl_t& dci) { std::lock_guard lock(mutex); // Assert rnti and cell exits and it is active if (_assert_active_enb_cc(dci.rnti, enb_cc_idx) != SRSLTE_SUCCESS) { - return; + return false; } - common_ue& ue = ue_db[dci.rnti]; + common_ue& ue = ue_db.at(dci.rnti); uint32_t ue_cc_idx = _get_ue_cc_idx(dci.rnti, enb_cc_idx); srslte_pdsch_ack_cc_t& pdsch_ack_cc = ue.pdsch_ack[tti].cc[ue_cc_idx]; @@ -473,14 +478,15 @@ void phy_ue_db::set_ack_pending(uint32_t tti, uint32_t enb_cc_idx, const srslte_ pdsch_ack_m.value[tb_idx] = 2; } } + return true; } -bool phy_ue_db::fill_uci_cfg(uint32_t tti, - uint32_t enb_cc_idx, - uint16_t rnti, - bool aperiodic_cqi_request, - bool is_pusch_available, - srslte_uci_cfg_t& uci_cfg) +int phy_ue_db::fill_uci_cfg(uint32_t tti, + uint32_t enb_cc_idx, + uint16_t rnti, + bool aperiodic_cqi_request, + bool is_pusch_available, + srslte_uci_cfg_t& uci_cfg) { std::lock_guard lock(mutex); @@ -489,12 +495,12 @@ bool phy_ue_db::fill_uci_cfg(uint32_t tti, // Assert Cell List configuration if (_assert_cell_list_cfg() != SRSLTE_SUCCESS) { - return false; + return -1; } // Assert eNb Cell/Carrier for the given RNTI if (_assert_active_enb_cc(rnti, enb_cc_idx) != SRSLTE_SUCCESS) { - return false; + return -1; } // Get the eNb cell/carrier index with lowest serving cell index (ue_cc_idx) that has an available grant. @@ -503,17 +509,17 @@ bool phy_ue_db::fill_uci_cfg(uint32_t tti, // There is a PUSCH grant available for the provided RNTI in at least one serving cell and this call is for PUCCH if (pusch_grant_available and not is_pusch_available) { - return false; + return 0; } // There is a PUSCH grant and enb_cc_idx with lowest ue_cc_idx with a grant if (pusch_grant_available and uci_enb_cc_id != enb_cc_idx) { - return false; + return 0; } // No PUSCH grant for this TTI and cell and no enb_cc_idx is not the PCell if (not pusch_grant_available and _get_ue_cc_idx(rnti, enb_cc_idx) != 0) { - return false; + return 0; } common_ue& ue = ue_db.at(rnti); @@ -564,7 +570,7 @@ bool phy_ue_db::fill_uci_cfg(uint32_t tti, uci_required |= (srslte_uci_cfg_total_ack(&uci_cfg) > 0); // Return whether UCI needs to be decoded - return uci_required; + return uci_required ? 1 : 0; } void phy_ue_db::send_uci_data(uint32_t tti, diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index 2b9c82044..b95f3c3c7 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -15,6 +15,7 @@ #include "srsenb/hdr/stack/rrc/rrc_mobility.h" #include "srsenb/hdr/stack/rrc/ue_rr_cfg.h" #include "srslte/asn1/rrc_utils.h" +#include "srslte/common/enb_events.h" #include "srslte/common/int_helpers.h" using namespace asn1::rrc; @@ -305,6 +306,9 @@ void rrc::ue::handle_rrc_con_setup_complete(rrc_conn_setup_complete_s* msg, srsl parent->s1ap->initial_ue(rnti, s1ap_cause, std::move(pdu)); } state = RRC_STATE_WAIT_FOR_CON_RECONF_COMPLETE; + + // Log event. + event_logger::get().log_rrc_connected(static_cast(s1ap_cause.value)); } void rrc::ue::send_connection_reject() @@ -642,6 +646,9 @@ void rrc::ue::send_connection_release() } send_dl_dcch(&dl_dcch_msg); + + // Log rrc release event. + event_logger::get().log_rrc_disconnect(static_cast(rel_ies.release_cause)); } /* diff --git a/srsenb/src/stack/upper/s1ap.cc b/srsenb/src/stack/upper/s1ap.cc index eb655e338..1ee11e5ae 100644 --- a/srsenb/src/stack/upper/s1ap.cc +++ b/srsenb/src/stack/upper/s1ap.cc @@ -14,6 +14,7 @@ #include "srsenb/hdr/stack/upper/common_enb.h" #include "srslte/adt/scope_exit.h" #include "srslte/common/bcd_helpers.h" +#include "srslte/common/enb_events.h" #include "srslte/common/int_helpers.h" #include "srslte/common/logmap.h" @@ -1115,6 +1116,9 @@ bool s1ap::ue::send_uectxtreleasecomplete() container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id; + // Log event. + event_logger::get().log_s1_ctx_delete(ctxt.mme_ue_s1ap_id, ctxt.enb_ue_s1ap_id, ctxt.rnti); + return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseComplete"); } @@ -1146,6 +1150,9 @@ bool s1ap::ue::send_initial_ctxt_setup_response(const asn1::s1ap::init_context_s } } + // Log event. + event_logger::get().log_s1_ctx_create(ctxt.mme_ue_s1ap_id, ctxt.enb_ue_s1ap_id, ctxt.rnti); + return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "InitialContextSetupResponse"); } diff --git a/srsenb/test/phy/enb_phy_test.cc b/srsenb/test/phy/enb_phy_test.cc index 621b040d0..402102c9c 100644 --- a/srsenb/test/phy/enb_phy_test.cc +++ b/srsenb/test/phy/enb_phy_test.cc @@ -1288,7 +1288,7 @@ public: radio = unique_dummy_radio_t( new dummy_radio(args.nof_enb_cells * args.cell.nof_ports, args.cell.nof_prb, args.log_level)); - /// Create Dummy Stack isntance + /// Create Dummy Stack instance stack = unique_dummy_stack_t(new dummy_stack(phy_cfg, phy_rrc_cfg, args.log_level, args.rnti)); stack->set_active_cell_list(args.ue_cell_list); From f9a02299f9dcc7a8a8ab9db4f879c3a6691c25fc Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 15 Dec 2020 16:19:12 +0100 Subject: [PATCH 25/59] Use MAC PDU pointer instead of tti_rx and rnti as a key to associate buffers. Decouple crc_info() and push_pdu() functions. This allows for different timing architectures in the PHY --- .../srslte/interfaces/enb_interfaces.h | 15 ++++++ lib/include/srslte/mac/pdu_queue.h | 4 +- lib/src/mac/pdu_queue.cc | 4 +- srsenb/hdr/stack/enb_stack_lte.h | 4 ++ srsenb/hdr/stack/mac/mac.h | 1 + srsenb/hdr/stack/mac/ue.h | 9 ++-- srsenb/src/phy/lte/cc_worker.cc | 3 +- srsenb/src/stack/mac/mac.cc | 25 +++++----- srsenb/src/stack/mac/ue.cc | 47 +++++-------------- srsenb/test/phy/enb_phy_test.cc | 8 ++++ 10 files changed, 62 insertions(+), 58 deletions(-) diff --git a/lib/include/srslte/interfaces/enb_interfaces.h b/lib/include/srslte/interfaces/enb_interfaces.h index 84d96cf01..1b614713b 100644 --- a/lib/include/srslte/interfaces/enb_interfaces.h +++ b/lib/include/srslte/interfaces/enb_interfaces.h @@ -160,6 +160,9 @@ public: /** * Informs MAC about a received PUSCH transmission for given RNTI, TTI and eNb Cell/carrier. * + * This function does not deallocate the uplink buffer. The function push_pdu() must be called after this + * to inform the MAC that the uplink buffer can be discarded or pushed to the stack + * * @param tti the given TTI * @param rnti the UE identifier in the eNb * @param cc_idx the eNb Cell/Carrier identifier @@ -169,6 +172,18 @@ public: */ virtual int crc_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t nof_bytes, bool crc_res) = 0; + /** + * Pushes an uplink PDU through the stack if crc_res==true or discards it if crc_res==false + * + * @param tti the given TTI + * @param rnti the UE identifier in the eNb + * @param pdu_ptr pointer to the uplink buffer + * @param nof_bytes the number of grants carrierd by the PUSCH message + * @param crc_res the CRC check, set to true if the message was decoded succesfully + * @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs + */ + virtual int push_pdu(uint32_t tti_rx, uint16_t rnti, const uint8_t* pdu_ptr, uint32_t nof_bytes, bool crc_res) = 0; + virtual int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) = 0; virtual int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) = 0; virtual int get_ul_sched(uint32_t tti, ul_sched_list_t& ul_sched_res) = 0; diff --git a/lib/include/srslte/mac/pdu_queue.h b/lib/include/srslte/mac/pdu_queue.h index 89c9bfa39..0bf94f9ae 100644 --- a/lib/include/srslte/mac/pdu_queue.h +++ b/lib/include/srslte/mac/pdu_queue.h @@ -37,8 +37,8 @@ public: void init(process_callback* callback, log_ref log_h_); uint8_t* request(uint32_t len); - void deallocate(uint8_t* pdu); - void push(uint8_t* ptr, uint32_t len, channel_t channel = DCH); + void deallocate(const uint8_t* pdu); + void push(const uint8_t* ptr, uint32_t len, channel_t channel = DCH); bool process_pdus(); diff --git a/lib/src/mac/pdu_queue.cc b/lib/src/mac/pdu_queue.cc index 6d90ceed7..bd8628b0e 100644 --- a/lib/src/mac/pdu_queue.cc +++ b/lib/src/mac/pdu_queue.cc @@ -42,7 +42,7 @@ uint8_t* pdu_queue::request(uint32_t len) return pdu->ptr; } -void pdu_queue::deallocate(uint8_t* pdu) +void pdu_queue::deallocate(const uint8_t* pdu) { if (!pool.deallocate((pdu_t*)pdu)) { log_h->warning("Error deallocating from buffer pool in deallocate(): buffer not created in this pool.\n"); @@ -53,7 +53,7 @@ void pdu_queue::deallocate(uint8_t* pdu) * This function enqueues the packet and returns quicly because ACK * deadline is important here. */ -void pdu_queue::push(uint8_t* ptr, uint32_t len, channel_t channel) +void pdu_queue::push(const uint8_t* ptr, uint32_t len, channel_t channel) { if (ptr) { pdu_t* pdu = (pdu_t*)ptr; diff --git a/srsenb/hdr/stack/enb_stack_lte.h b/srsenb/hdr/stack/enb_stack_lte.h index 719b835b7..cd0c88cf6 100644 --- a/srsenb/hdr/stack/enb_stack_lte.h +++ b/srsenb/hdr/stack/enb_stack_lte.h @@ -81,6 +81,10 @@ public: { return mac.crc_info(tti, rnti, enb_cc_idx, nof_bytes, crc_res); } + int push_pdu(uint32_t tti, uint16_t rnti, const uint8_t* pdu_ptr, uint32_t nof_bytes, bool crc_res) final + { + return mac.push_pdu(tti, rnti, pdu_ptr, nof_bytes, crc_res); + } int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) final { return mac.get_dl_sched(tti, dl_sched_res); } int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) final { diff --git a/srsenb/hdr/stack/mac/mac.h b/srsenb/hdr/stack/mac/mac.h index e3e4beaf1..06b4b4619 100644 --- a/srsenb/hdr/stack/mac/mac.h +++ b/srsenb/hdr/stack/mac/mac.h @@ -56,6 +56,7 @@ public: int ta_info(uint32_t tti, uint16_t rnti, float ta_us) override; int ack_info(uint32_t tti, uint16_t rnti, uint32_t enb_cc_idx, uint32_t tb_idx, bool ack) override; int crc_info(uint32_t tti, uint16_t rnti, uint32_t enb_cc_idx, uint32_t nof_bytes, bool crc_res) override; + int push_pdu(uint32_t tti, uint16_t rnti, const uint8_t* pdu_ptr, uint32_t nof_bytes, bool crc_res) override; int get_dl_sched(uint32_t tti_tx_dl, dl_sched_list_t& dl_sched_res) override; int get_ul_sched(uint32_t tti_tx_ul, ul_sched_list_t& ul_sched_res) override; diff --git a/srsenb/hdr/stack/mac/ue.h b/srsenb/hdr/stack/mac/ue.h index 7127c088b..f8e9b7b9f 100644 --- a/srsenb/hdr/stack/mac/ue.h +++ b/srsenb/hdr/stack/mac/ue.h @@ -71,10 +71,10 @@ public: srslte_softbuffer_rx_t* get_rx_softbuffer(const uint32_t ue_cc_idx, const uint32_t tti); bool process_pdus(); - uint8_t* request_buffer(const uint32_t ue_cc_idx, const uint32_t tti, const uint32_t len); + uint8_t* request_buffer(const uint32_t len); void process_pdu(uint8_t* pdu, uint32_t nof_bytes, srslte::pdu_queue::channel_t channel) override; - void push_pdu(const uint32_t ue_cc_idx, const uint32_t tti, uint32_t len); - void deallocate_pdu(const uint32_t ue_cc_idx, const uint32_t tti); + void push_pdu(const uint8_t* pdu_ptr, uint32_t len); + void deallocate_pdu(const uint8_t* pdu_ptr); void metrics_read(mac_ue_metrics_t* metrics_); void metrics_rx(bool crc, uint32_t tbs); @@ -118,9 +118,6 @@ private: cc_softbuffer_rx_list_t; ///< List of Rx softbuffers for all HARQ processes of one carrier std::vector softbuffer_rx; ///< List of softbuffer lists for Rx - typedef std::vector cc_buffer_ptr_t; ///< List of buffer pointers for RX HARQ processes of one carrier - std::vector pending_buffers; ///< List of buffer pointer list for Rx - // One buffer per TB per HARQ process and per carrier is needed for each UE. std::vector, SRSLTE_FDD_NOF_HARQ> > tx_payload_buffer; diff --git a/srsenb/src/phy/lte/cc_worker.cc b/srsenb/src/phy/lte/cc_worker.cc index b72197248..0c568d39b 100644 --- a/srsenb/src/phy/lte/cc_worker.cc +++ b/srsenb/src/phy/lte/cc_worker.cc @@ -373,7 +373,8 @@ void cc_worker::decode_pusch(stack_interface_phy_lte::ul_sched_grant_t* grants, if (ul_grant.data != nullptr) { // Inform MAC about the CRC result phy->stack->crc_info(tti_rx, rnti, cc_idx, ul_cfg.pusch.grant.tb.tbs / 8, pusch_res.crc); - + // Push PDU buffer + phy->stack->push_pdu(tti_rx, rnti, grants[i].data, ul_cfg.pusch.grant.tb.tbs / 8, pusch_res.crc); // Logging if (log_h->get_level() >= srslte::LOG_LEVEL_INFO) { char str[512]; diff --git a/srsenb/src/stack/mac/mac.cc b/srsenb/src/stack/mac/mac.cc index 0d6d9fb98..d7ce68e09 100644 --- a/srsenb/src/stack/mac/mac.cc +++ b/srsenb/src/stack/mac/mac.cc @@ -320,24 +320,28 @@ int mac::crc_info(uint32_t tti_rx, uint16_t rnti, uint32_t enb_cc_idx, uint32_t ue_db[rnti]->set_tti(tti_rx); ue_db[rnti]->metrics_rx(crc, nof_bytes); - std::array enb_ue_cc_map = scheduler.get_enb_ue_cc_map(rnti); - if (enb_ue_cc_map[enb_cc_idx] < 0) { - Error("User rnti=0x%x is not activated for carrier %d\n", rnti, enb_cc_idx); + // Scheduler uses eNB's CC mapping + return scheduler.ul_crc_info(tti_rx, rnti, enb_cc_idx, crc); +} + +int mac::push_pdu(uint32_t tti_rx, uint16_t rnti, const uint8_t* pdu_ptr, uint32_t nof_bytes, bool crc) +{ + srslte::rwlock_read_guard lock(rwlock); + + if (not check_ue_exists(rnti)) { return SRSLTE_ERROR; } - uint32_t ue_cc_idx = enb_ue_cc_map[enb_cc_idx]; // push the pdu through the queue if received correctly if (crc) { Info("Pushing PDU rnti=0x%x, tti_rx=%d, nof_bytes=%d\n", rnti, tti_rx, nof_bytes); - ue_db[rnti]->push_pdu(ue_cc_idx, tti_rx, nof_bytes); + ue_db[rnti]->push_pdu(pdu_ptr, nof_bytes); stack_task_queue.push([this]() { process_pdus(); }); } else { - ue_db[rnti]->deallocate_pdu(ue_cc_idx, tti_rx); + Debug("Discarting PDU rnti=0x%x, tti_rx=%d, nof_bytes=%d\n", rnti, tti_rx, nof_bytes); + ue_db[rnti]->deallocate_pdu(pdu_ptr); } - - // Scheduler uses eNB's CC mapping - return scheduler.ul_crc_info(tti_rx, rnti, enb_cc_idx, crc); + return SRSLTE_SUCCESS; } int mac::ri_info(uint32_t tti, uint16_t rnti, uint32_t enb_cc_idx, uint32_t ri_value) @@ -894,8 +898,7 @@ int mac::get_ul_sched(uint32_t tti_tx_ul, ul_sched_list_t& ul_sched_res_list) if (sched_result.pusch[n].current_tx_nb == 0) { srslte_softbuffer_rx_reset_tbs(phy_ul_sched_res->pusch[n].softbuffer_rx, sched_result.pusch[i].tbs * 8); } - phy_ul_sched_res->pusch[n].data = - ue_db[rnti]->request_buffer(sched_result.pusch[i].dci.ue_cc_idx, tti_tx_ul, sched_result.pusch[i].tbs); + phy_ul_sched_res->pusch[n].data = ue_db[rnti]->request_buffer(sched_result.pusch[i].tbs); phy_ul_sched_res->nof_grants++; n++; } else { diff --git a/srsenb/src/stack/mac/ue.cc b/srsenb/src/stack/mac/ue.cc index 44ae26200..d0e99c2a9 100644 --- a/srsenb/src/stack/mac/ue.cc +++ b/srsenb/src/stack/mac/ue.cc @@ -94,15 +94,6 @@ void ue::reset() srslte_softbuffer_tx_reset(&buffer); } } - - for (auto& cc_buffers : pending_buffers) { - for (auto& harq_buffer : cc_buffers) { - if (harq_buffer) { - pdus.deallocate(harq_buffer); - harq_buffer = nullptr; - } - } - } } /** @@ -123,12 +114,6 @@ uint32_t ue::allocate_cc_buffers(const uint32_t num_cc) srslte_softbuffer_rx_init(&buffer, nof_prb); } - pending_buffers.emplace_back(); - pending_buffers.back().resize(nof_rx_harq_proc); - for (auto& buffer : pending_buffers.back()) { - buffer = nullptr; - } - // Create and init Tx buffers for Pcell softbuffer_tx.emplace_back(); softbuffer_tx.back().resize(nof_tx_harq_proc); @@ -176,20 +161,14 @@ ue::get_tx_softbuffer(const uint32_t ue_cc_idx, const uint32_t harq_process, con return &softbuffer_tx.at(ue_cc_idx).at((harq_process * SRSLTE_MAX_TB + tb_idx) % nof_tx_harq_proc); } -uint8_t* ue::request_buffer(const uint32_t ue_cc_idx, const uint32_t tti, const uint32_t len) +uint8_t* ue::request_buffer(const uint32_t len) { - uint8_t* ret = nullptr; if (len > 0) { - if (!pending_buffers.at(ue_cc_idx).at(tti % nof_rx_harq_proc)) { - ret = pdus.request(len); - pending_buffers.at(ue_cc_idx).at(tti % nof_rx_harq_proc) = ret; - } else { - log_h->error("Requesting buffer for pid %d, not pushed yet\n", tti % nof_rx_harq_proc); - } + return pdus.request(len); } else { log_h->warning("Requesting buffer for zero bytes\n"); + return nullptr; } - return ret; } bool ue::process_pdus() @@ -314,25 +293,21 @@ void ue::process_pdu(uint8_t* pdu, uint32_t nof_bytes, srslte::pdu_queue::channe Debug("MAC PDU processed\n"); } -void ue::deallocate_pdu(const uint32_t ue_cc_idx, const uint32_t tti) +void ue::deallocate_pdu(const uint8_t* pdu_ptr) { - if (pending_buffers.at(ue_cc_idx).at(tti % nof_rx_harq_proc)) { - pdus.deallocate(pending_buffers.at(ue_cc_idx).at(tti % nof_rx_harq_proc)); - pending_buffers.at(ue_cc_idx).at(tti % nof_rx_harq_proc) = nullptr; + if (pdu_ptr) { + pdus.deallocate(pdu_ptr); } else { - srslte::console( - "Error deallocating buffer for ue_cc_idx=%d, pid=%d. Not requested\n", ue_cc_idx, tti % nof_rx_harq_proc); + Error("Error deallocating PDU: null ptr\n"); } } -void ue::push_pdu(const uint32_t ue_cc_idx, const uint32_t tti, uint32_t len) +void ue::push_pdu(const uint8_t* pdu_ptr, uint32_t len) { - if (pending_buffers.at(ue_cc_idx).at(tti % nof_rx_harq_proc)) { - pdus.push(pending_buffers.at(ue_cc_idx).at(tti % nof_rx_harq_proc), len); - pending_buffers.at(ue_cc_idx).at(tti % nof_rx_harq_proc) = nullptr; + if (pdu_ptr && len > 0) { + pdus.push(pdu_ptr, len); } else { - srslte::console( - "Error pushing buffer for ue_cc_idx=%d, pid=%d. Not requested\n", ue_cc_idx, tti % nof_rx_harq_proc); + Error("Error pushing PDU: ptr=%p, len=%d\n", pdu_ptr, len); } } diff --git a/srsenb/test/phy/enb_phy_test.cc b/srsenb/test/phy/enb_phy_test.cc index 402102c9c..eee341fe8 100644 --- a/srsenb/test/phy/enb_phy_test.cc +++ b/srsenb/test/phy/enb_phy_test.cc @@ -289,6 +289,7 @@ private: CALLBACK(ta_info); CALLBACK(ack_info); CALLBACK(crc_info); + CALLBACK(push_pdu); CALLBACK(get_dl_sched); CALLBACK(get_mch_sched); CALLBACK(get_ul_sched); @@ -492,6 +493,13 @@ public: return 0; } + int push_pdu(uint32_t tti, uint16_t rnti, const uint8_t* pdu_ptr, uint32_t nof_bytes, bool crc_res) override + { + log_h.info("Received push_pdu tti=%d; rnti=0x%x; ack=%d;\n", tti, rnti, crc_res); + notify_push_pdu(); + + return 0; + } int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) override { // Notify test engine From 62b558fccf80004360543c60d894042bff5d6698 Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Wed, 2 Dec 2020 12:45:20 +0100 Subject: [PATCH 26/59] Move rat type to common header Removed phy measurement from rrc interface phy Updated rrc interface for handling measurements --- lib/include/srslte/common/common.h | 19 +++++++++++ .../srslte/interfaces/rlc_interface_types.h | 7 ---- .../srslte/interfaces/rrc_interface_types.h | 13 +------ lib/include/srslte/interfaces/ue_interfaces.h | 34 ++++++++++++++----- srsue/hdr/phy/lte/cc_worker.h | 3 +- srsue/hdr/phy/phy_common.h | 14 ++++---- srsue/hdr/phy/scell/intra_measure.h | 4 +-- srsue/hdr/phy/sync.h | 2 +- srsue/hdr/stack/rrc/rrc.h | 8 +++++ srsue/hdr/stack/rrc/rrc_cell.h | 1 - srsue/hdr/stack/rrc/rrc_metrics.h | 4 +-- srsue/src/phy/lte/cc_worker.cc | 3 +- srsue/src/phy/lte/sf_worker.cc | 2 +- srsue/src/phy/phy_common.cc | 14 ++++---- srsue/src/phy/scell/intra_measure.cc | 14 ++++---- srsue/src/phy/sync.cc | 2 +- srsue/src/stack/rrc/rrc.cc | 25 +++++++++++++- srsue/src/stack/rrc/rrc_cell.cc | 2 +- srsue/test/metrics_test.cc | 2 +- srsue/test/phy/scell_search_test.cc | 2 +- srsue/test/phy/ue_phy_test.cc | 3 +- srsue/test/ttcn3/src/lte_ttcn3_phy.cc | 4 +-- srsue/test/upper/rrc_cell_test.cc | 2 +- srsue/test/upper/rrc_meas_test.cc | 14 ++++---- 24 files changed, 122 insertions(+), 76 deletions(-) diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index f9ea6e333..cc1dabfa6 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -283,6 +283,25 @@ inline const_byte_span make_span(const unique_byte_buffer_t& b) return const_byte_span{b->msg, b->N_bytes}; } +// helper functions +inline const char* enum_to_text(const char* const array[], uint32_t nof_types, uint32_t enum_val) +{ + return enum_val >= nof_types ? "" : array[enum_val]; +} + +template +ItemType enum_to_number(ItemType* array, uint32_t nof_types, uint32_t enum_val) +{ + return enum_val >= nof_types ? -1 : array[enum_val]; +} + +enum class srslte_rat_t { lte, nr, nulltype }; +inline std::string to_string(const srslte_rat_t& type) +{ + constexpr static const char* options[] = {"LTE", "NR"}; + return enum_to_text(options, (uint32_t)srslte_rat_t::nulltype, (uint32_t)type); +} + } // namespace srslte #endif // SRSLTE_COMMON_H diff --git a/lib/include/srslte/interfaces/rlc_interface_types.h b/lib/include/srslte/interfaces/rlc_interface_types.h index ad5f8c744..cc2e0b2e7 100644 --- a/lib/include/srslte/interfaces/rlc_interface_types.h +++ b/lib/include/srslte/interfaces/rlc_interface_types.h @@ -117,13 +117,6 @@ struct rlc_um_nr_config_t { #define RLC_TX_QUEUE_LEN (256) -enum class srslte_rat_t { lte, nr, nulltype }; -inline std::string to_string(const srslte_rat_t& type) -{ - constexpr static const char* options[] = {"LTE", "NR"}; - return enum_to_text(options, (uint32_t)srslte_rat_t::nulltype, (uint32_t)type); -} - class rlc_config_t { public: diff --git a/lib/include/srslte/interfaces/rrc_interface_types.h b/lib/include/srslte/interfaces/rrc_interface_types.h index 71fb59c47..1b0baf6ee 100644 --- a/lib/include/srslte/interfaces/rrc_interface_types.h +++ b/lib/include/srslte/interfaces/rrc_interface_types.h @@ -13,6 +13,7 @@ #ifndef SRSLTE_RRC_INTERFACE_TYPES_H #define SRSLTE_RRC_INTERFACE_TYPES_H +#include "srslte/common/common.h" #include "srslte/common/bcd_helpers.h" #include "srslte/config.h" #include "srslte/srslte.h" @@ -20,18 +21,6 @@ namespace srslte { -// helper functions -inline const char* enum_to_text(const char* const array[], uint32_t nof_types, uint32_t enum_val) -{ - return enum_val >= nof_types ? "" : array[enum_val]; -} - -template -ItemType enum_to_number(ItemType* array, uint32_t nof_types, uint32_t enum_val) -{ - return enum_val >= nof_types ? -1 : array[enum_val]; -} - /*************************** * PLMN ID **************************/ diff --git a/lib/include/srslte/interfaces/ue_interfaces.h b/lib/include/srslte/interfaces/ue_interfaces.h index 6e1bf4190..545df8810 100644 --- a/lib/include/srslte/interfaces/ue_interfaces.h +++ b/lib/include/srslte/interfaces/ue_interfaces.h @@ -132,19 +132,35 @@ struct phy_cell_t { float cfo_hz; }; +// Measurement object from phy +typedef struct { + float rsrp; + float rsrq; + float cfo_hz; + uint32_t earfcn; + uint32_t pci; +} phy_meas_t; + +typedef struct { + float rsrp; + float rsrq; + float sinr; + float cfo_hz; + uint32_t arfcn_nr; + uint32_t pci_nr; +} phy_meas_nr_t; + +// RRC interface for RRC NR +class rrc_interface_rrc_nr +{ +public: + virtual void new_cell_meas_nr(const std::vector& meas) = 0; +}; + // RRC interface for PHY class rrc_interface_phy_lte { public: - // Measurement object from phy - typedef struct { - float rsrp; - float rsrq; - float cfo_hz; - uint32_t earfcn; - uint32_t pci; - } phy_meas_t; - virtual void in_sync() = 0; virtual void out_of_sync() = 0; virtual void new_cell_meas(const std::vector& meas) = 0; diff --git a/srsue/hdr/phy/lte/cc_worker.h b/srsue/hdr/phy/lte/cc_worker.h index 6853af9b7..ccefbc3c8 100644 --- a/srsue/hdr/phy/lte/cc_worker.h +++ b/srsue/hdr/phy/lte/cc_worker.h @@ -54,8 +54,7 @@ public: int read_ce_abs(float* ce_abs, uint32_t tx_antenna, uint32_t rx_antenna); int read_pdsch_d(cf_t* pdsch_d); - void update_measurements(std::vector& serving_cells, - cf_t* rssi_power_buffer = nullptr); + void update_measurements(std::vector& serving_cells, cf_t* rssi_power_buffer = nullptr); private: void reset(); diff --git a/srsue/hdr/phy/phy_common.h b/srsue/hdr/phy/phy_common.h index 3a8602a3d..afe3ec09e 100644 --- a/srsue/hdr/phy/phy_common.h +++ b/srsue/hdr/phy/phy_common.h @@ -162,12 +162,12 @@ public: */ uint32_t get_ul_earfcn(uint32_t dl_earfcn); - void update_measurements(uint32_t cc_idx, - srslte_chest_dl_res_t chest_res, - srslte_dl_sf_cfg_t sf_cfg_dl, - float tx_crs_power, - std::vector& serving_cells, - cf_t* rssi_power_buffer = nullptr); + void update_measurements(uint32_t cc_idx, + srslte_chest_dl_res_t chest_res, + srslte_dl_sf_cfg_t sf_cfg_dl, + float tx_crs_power, + std::vector& serving_cells, + cf_t* rssi_power_buffer = nullptr); void update_cfo_measurement(uint32_t cc_idx, float cfo_hz); @@ -197,7 +197,7 @@ public: void neighbour_cells_reset(uint32_t cc_idx) { avg_rsrp_neigh[cc_idx] = NAN; } - void set_neighbour_cells(uint32_t cc_idx, const std::vector& meas) + void set_neighbour_cells(uint32_t cc_idx, const std::vector& meas) { // Add RSRP in the linear domain and average float total_rsrp = 0; diff --git a/srsue/hdr/phy/scell/intra_measure.h b/srsue/hdr/phy/scell/intra_measure.h index 5db4b3c58..0e1de9b75 100644 --- a/srsue/hdr/phy/scell/intra_measure.h +++ b/srsue/hdr/phy/scell/intra_measure.h @@ -51,8 +51,8 @@ public: class meas_itf { public: - virtual void cell_meas_reset(uint32_t cc_idx) = 0; - virtual void new_cell_meas(uint32_t cc_idx, const std::vector& meas) = 0; + virtual void cell_meas_reset(uint32_t cc_idx) = 0; + virtual void new_cell_meas(uint32_t cc_idx, const std::vector& meas) = 0; }; /** diff --git a/srsue/hdr/phy/sync.h b/srsue/hdr/phy/sync.h index ed27bab4f..2d973f236 100644 --- a/srsue/hdr/phy/sync.h +++ b/srsue/hdr/phy/sync.h @@ -114,7 +114,7 @@ public: // Interface from scell::intra_measure for providing neighbour cell measurements void cell_meas_reset(uint32_t cc_idx) override; - void new_cell_meas(uint32_t cc_idx, const std::vector& meas) override; + void new_cell_meas(uint32_t cc_idx, const std::vector& meas) override; private: void reset(); diff --git a/srsue/hdr/stack/rrc/rrc.h b/srsue/hdr/stack/rrc/rrc.h index f00452338..e6ff2e24c 100644 --- a/srsue/hdr/stack/rrc/rrc.h +++ b/srsue/hdr/stack/rrc/rrc.h @@ -62,6 +62,7 @@ class rrc : public rrc_interface_nas, public rrc_interface_phy_lte, public rrc_interface_mac, public rrc_interface_pdcp, + public rrc_interface_rrc_nr, public rrc_interface_rlc, public srslte::timer_callback { @@ -108,6 +109,9 @@ public: void set_ue_identity(srslte::s_tmsi_t s_tmsi); void paging_completed(bool outcome) final; + // NR interface + void new_cell_meas_nr(const std::vector& meas); + // PHY interface void in_sync() final; void out_of_sync() final; @@ -255,6 +259,10 @@ private: void process_new_cell_meas(const std::vector& meas); srslte::block_queue > cell_meas_q; + void process_cell_meas_nr(); + void process_new_cell_meas_nr(const std::vector& meas); + srslte::block_queue > cell_meas_nr_q; + // Cell selection/reselection functions/variables typedef struct { float Qrxlevmin; diff --git a/srsue/hdr/stack/rrc/rrc_cell.h b/srsue/hdr/stack/rrc/rrc_cell.h index df6921313..0ba38c918 100644 --- a/srsue/hdr/stack/rrc/rrc_cell.h +++ b/srsue/hdr/stack/rrc/rrc_cell.h @@ -158,7 +158,6 @@ bool is_same_cell(const T& lhs, const U& rhs) class meas_cell_list { - using phy_meas_t = rrc_interface_phy_lte::phy_meas_t; public: const static int NEIGHBOUR_TIMEOUT = 5; diff --git a/srsue/hdr/stack/rrc/rrc_metrics.h b/srsue/hdr/stack/rrc/rrc_metrics.h index 23d1c7c3d..ad2e453d2 100644 --- a/srsue/hdr/stack/rrc/rrc_metrics.h +++ b/srsue/hdr/stack/rrc/rrc_metrics.h @@ -19,8 +19,8 @@ namespace srsue { struct rrc_metrics_t { - rrc_state_t state; - std::vector neighbour_cells; + rrc_state_t state; + std::vector neighbour_cells; }; } // namespace srsue diff --git a/srsue/src/phy/lte/cc_worker.cc b/srsue/src/phy/lte/cc_worker.cc index 9b9f8aa6d..3a1d66c8b 100644 --- a/srsue/src/phy/lte/cc_worker.cc +++ b/srsue/src/phy/lte/cc_worker.cc @@ -556,8 +556,7 @@ void cc_worker::decode_phich() } } -void cc_worker::update_measurements(std::vector& serving_cells, - cf_t* rssi_power_buffer) +void cc_worker::update_measurements(std::vector& serving_cells, cf_t* rssi_power_buffer) { phy->update_measurements( cc_idx, ue_dl.chest_res, sf_cfg_dl, ue_dl_cfg.cfg.pdsch.rs_power, serving_cells, rssi_power_buffer); diff --git a/srsue/src/phy/lte/sf_worker.cc b/srsue/src/phy/lte/sf_worker.cc index 53c08b923..44ba1a9d2 100644 --- a/srsue/src/phy/lte/sf_worker.cc +++ b/srsue/src/phy/lte/sf_worker.cc @@ -268,7 +268,7 @@ void sf_worker::reset_uci(srslte_uci_data_t* uci_data) void sf_worker::update_measurements() { - std::vector serving_cells = {}; + std::vector serving_cells = {}; for (uint32_t cc_idx = 0; cc_idx < cc_workers.size(); cc_idx++) { cf_t* rssi_power_buffer = nullptr; // Setting rssi_power_buffer to nullptr disables RSSI update. Do it only by worker 0 diff --git a/srsue/src/phy/phy_common.cc b/srsue/src/phy/phy_common.cc index 2582e7d3c..f37311175 100644 --- a/srsue/src/phy/phy_common.cc +++ b/srsue/src/phy/phy_common.cc @@ -600,12 +600,12 @@ void phy_common::update_cfo_measurement(uint32_t cc_idx, float cfo_hz) avg_cfo_hz[cc_idx] = SRSLTE_VEC_EMA(cfo_hz, avg_cfo_hz[cc_idx], args->snr_ema_coeff); } -void phy_common::update_measurements(uint32_t cc_idx, - srslte_chest_dl_res_t chest_res, - srslte_dl_sf_cfg_t sf_cfg_dl, - float tx_crs_power, - std::vector& serving_cells, - cf_t* rssi_power_buffer) +void phy_common::update_measurements(uint32_t cc_idx, + srslte_chest_dl_res_t chest_res, + srslte_dl_sf_cfg_t sf_cfg_dl, + float tx_crs_power, + std::vector& serving_cells, + cf_t* rssi_power_buffer) { bool insync = true; { @@ -731,7 +731,7 @@ void phy_common::update_measurements(uint32_t // Prepare measurements for serving cells bool active = cell_state.is_configured(cc_idx); if (active && ((sf_cfg_dl.tti % pcell_report_period) == pcell_report_period - 1)) { - rrc_interface_phy_lte::phy_meas_t meas = {}; + phy_meas_t meas = {}; meas.rsrp = avg_rsrp_dbm[cc_idx]; meas.rsrq = avg_rsrq_db[cc_idx]; meas.cfo_hz = avg_cfo_hz[cc_idx]; diff --git a/srsue/src/phy/scell/intra_measure.cc b/srsue/src/phy/scell/intra_measure.cc index d8043a2d0..e37f2bbd4 100644 --- a/srsue/src/phy/scell/intra_measure.cc +++ b/srsue/src/phy/scell/intra_measure.cc @@ -169,7 +169,7 @@ void intra_measure::measure_proc() } // Initialise empty neighbour cell list - std::vector neighbour_cells = {}; + std::vector neighbour_cells = {}; new_cell_itf->cell_meas_reset(cc_idx); @@ -186,12 +186,12 @@ void intra_measure::measure_proc() srslte_refsignal_dl_sync_run(&refsignal_dl_sync, search_buffer, intra_freq_meas_len_ms * current_sflen); if (refsignal_dl_sync.found) { - rrc_interface_phy_lte::phy_meas_t m = {}; - m.pci = cell.id; - m.earfcn = current_earfcn; - m.rsrp = refsignal_dl_sync.rsrp_dBfs - rx_gain_offset_db; - m.rsrq = refsignal_dl_sync.rsrq_dB; - m.cfo_hz = refsignal_dl_sync.cfo_Hz; + phy_meas_t m = {}; + m.pci = cell.id; + m.earfcn = current_earfcn; + m.rsrp = refsignal_dl_sync.rsrp_dBfs - rx_gain_offset_db; + m.rsrq = refsignal_dl_sync.rsrq_dB; + m.cfo_hz = refsignal_dl_sync.cfo_Hz; neighbour_cells.push_back(m); Info("INTRA: Found neighbour cell: EARFCN=%d, PCI=%03d, RSRP=%5.1f dBm, RSRQ=%5.1f, peak_idx=%5d, " diff --git a/srsue/src/phy/sync.cc b/srsue/src/phy/sync.cc index 017336a1b..08ba706d1 100644 --- a/srsue/src/phy/sync.cc +++ b/srsue/src/phy/sync.cc @@ -1059,7 +1059,7 @@ void sync::cell_meas_reset(uint32_t cc_idx) worker_com->neighbour_cells_reset(cc_idx); } -void sync::new_cell_meas(uint32_t cc_idx, const std::vector& meas) +void sync::new_cell_meas(uint32_t cc_idx, const std::vector& meas) { // Pass measurements to phy_common for SINR estimation worker_com->set_neighbour_cells(cc_idx, meas); diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index d05198511..565d5525b 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -170,7 +170,7 @@ void rrc::get_metrics(rrc_metrics_t& m) m.state = state; // Save strongest cells metrics for (auto& c : meas_cells) { - rrc_interface_phy_lte::phy_meas_t meas = {}; + phy_meas_t meas = {}; meas.cfo_hz = c->get_cfo_hz(); meas.earfcn = c->get_earfcn(); meas.rsrq = c->get_rsrq(); @@ -364,6 +364,29 @@ void rrc::set_config_complete(bool status) void rrc::set_scell_complete(bool status) {} +/* This function is called from a NR PHY worker thus must return very quickly. + * Queue the values of the measurements and process them from the RRC thread + */ +void rrc::new_cell_meas_nr(const std::vector& meas) +{ + cell_meas_nr_q.push(meas); +} + +/* Processes all pending PHY measurements in queue. + */ +void rrc::process_cell_meas_nr() +{ + std::vector m; + while (cell_meas_nr_q.try_pop(&m)) { + if (cell_meas_nr_q.size() > 0) { + rrc_log->debug("MEAS: Processing measurement. %zd measurements in queue\n", cell_meas_q.size()); + } + process_new_cell_meas_nr(m); + } +} + +void rrc::process_new_cell_meas_nr(const std::vector& meas) {} + /* This function is called from a PHY worker thus must return very quickly. * Queue the values of the measurements and process them from the RRC thread */ diff --git a/srsue/src/stack/rrc/rrc_cell.cc b/srsue/src/stack/rrc/rrc_cell.cc index 9770960c3..36574dd6b 100644 --- a/srsue/src/stack/rrc/rrc_cell.cc +++ b/srsue/src/stack/rrc/rrc_cell.cc @@ -174,7 +174,7 @@ const meas_cell* meas_cell_list::get_neighbour_cell_handle(uint32_t earfcn, uint } // If only neighbour PCI is provided, copy full cell from serving cell -bool meas_cell_list::add_meas_cell(const rrc_interface_phy_lte::phy_meas_t& meas) +bool meas_cell_list::add_meas_cell(const phy_meas_t& meas) { phy_cell_t phy_cell = {}; phy_cell.earfcn = meas.earfcn; diff --git a/srsue/test/metrics_test.cc b/srsue/test/metrics_test.cc index bff35c660..a53a7c744 100644 --- a/srsue/test/metrics_test.cc +++ b/srsue/test/metrics_test.cc @@ -52,7 +52,7 @@ public: // random neighbour cells if (rand() % 2 == 0) { - rrc_interface_phy_lte::phy_meas_t neighbor = {}; + phy_meas_t neighbor = {}; neighbor.pci = 8; neighbor.rsrp = -33; m->stack.rrc.neighbour_cells.push_back(neighbor); diff --git a/srsue/test/phy/scell_search_test.cc b/srsue/test/phy/scell_search_test.cc index f9c1e0e57..4354e872c 100644 --- a/srsue/test/phy/scell_search_test.cc +++ b/srsue/test/phy/scell_search_test.cc @@ -234,7 +234,7 @@ public: std::map cells; void cell_meas_reset(uint32_t cc_idx) override {} - void new_cell_meas(uint32_t cc_idx, const std::vector& meas) override + void new_cell_meas(uint32_t cc_idx, const std::vector& meas) override { for (auto& m : meas) { uint32_t pci = m.pci; diff --git a/srsue/test/phy/ue_phy_test.cc b/srsue/test/phy/ue_phy_test.cc index 1f09871a7..973c170ce 100644 --- a/srsue/test/phy/ue_phy_test.cc +++ b/srsue/test/phy/ue_phy_test.cc @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -83,7 +84,7 @@ private: void in_sync() override { notify_in_sync(); } void out_of_sync() override { notify_out_of_sync(); } - void new_cell_meas(const std::vector& meas) override + void new_cell_meas(const std::vector& meas) override { for (auto& m : meas) { notify_new_phy_meas(); diff --git a/srsue/test/ttcn3/src/lte_ttcn3_phy.cc b/srsue/test/ttcn3/src/lte_ttcn3_phy.cc index 9a129a2f6..23f21d9a2 100644 --- a/srsue/test/ttcn3/src/lte_ttcn3_phy.cc +++ b/srsue/test/ttcn3/src/lte_ttcn3_phy.cc @@ -339,10 +339,10 @@ void lte_ttcn3_phy::radio_failure() void lte_ttcn3_phy::run_tti() { // send report for all cells stronger than non-suitable cell RS - std::vector phy_meas; + std::vector phy_meas; for (auto& cell : cells) { if (cell.power >= NON_SUITABLE_CELL_RS_EPRE) { - rrc_interface_phy_lte::phy_meas_t m = {}; + phy_meas_t m = {}; m.pci = cell.info.id; m.earfcn = cell.earfcn; m.rsrp = cell.power; diff --git a/srsue/test/upper/rrc_cell_test.cc b/srsue/test/upper/rrc_cell_test.cc index ba6628c14..95a4203f3 100644 --- a/srsue/test/upper/rrc_cell_test.cc +++ b/srsue/test/upper/rrc_cell_test.cc @@ -56,7 +56,7 @@ int test_add_neighbours() TESTASSERT(not list.serving_cell().is_valid()); TESTASSERT(list.get_neighbour_cell_handle(0, 0) == nullptr); - rrc_interface_phy_lte::phy_meas_t pmeas; + phy_meas_t pmeas; pmeas.cfo_hz = 4; pmeas.rsrp = -20; pmeas.pci = 1; diff --git a/srsue/test/upper/rrc_meas_test.cc b/srsue/test/upper/rrc_meas_test.cc index c854fa035..19dce4120 100644 --- a/srsue/test/upper/rrc_meas_test.cc +++ b/srsue/test/upper/rrc_meas_test.cc @@ -307,11 +307,11 @@ public: void add_neighbour_cell(uint32_t pci, uint32_t earfcn, float rsrp = 0) { - std::vector phy_meas = {}; - rrc_interface_phy_lte::phy_meas_t meas = {}; - meas.pci = pci; - meas.earfcn = earfcn; - meas.rsrp = rsrp; + std::vector phy_meas = {}; + phy_meas_t meas = {}; + meas.pci = pci; + meas.earfcn = earfcn; + meas.rsrp = rsrp; phy_meas.push_back(meas); // neighbour cell new_cell_meas(phy_meas); run_tti(1); @@ -637,7 +637,7 @@ int meas_obj_test() TESTASSERT(rrctest.phytest.meas_cell_started(2, 24)); // was added log1->info("Test7: PHY finds new neighbours in frequency 1 and 2, check RRC instructs to search them\n"); - std::vector phy_meas = {}; + std::vector phy_meas = {}; phy_meas.push_back({0, 0, 0.0f, 1, 31}); phy_meas.push_back({-1, 0, 0.0f, 1, 32}); phy_meas.push_back({-2, 0, 0.0f, 1, 33}); @@ -760,7 +760,7 @@ void send_report(rrc_test& rrctest, const std::vector earfcn, const std::vector pci) { - std::vector phy_meas = {}; + std::vector phy_meas = {}; for (uint32_t i = 0; i < pci.size(); i++) { float r = rsrp[0]; if (rsrp.size() == pci.size()) { From 826dd32c8917cb87abfb91cade3fd11d754bce2c Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Wed, 2 Dec 2020 17:57:15 +0100 Subject: [PATCH 27/59] Rename meas_cell to meas_cell_eutra Added meas_cell_nr class Make meas_cell list as template class Inheritance rrc_cell to meas_cell_nr Added process_new_cell_meas_nr function --- lib/test/asn1/CMakeLists.txt | 4 + srsue/hdr/stack/rrc/rrc.h | 18 ++- srsue/hdr/stack/rrc/rrc_cell.h | 176 ++++++++++++++++++-------- srsue/hdr/stack/rrc/rrc_meas.h | 7 +- srsue/hdr/stack/rrc/rrc_procedures.h | 6 +- srsue/src/stack/rrc/rrc.cc | 42 +++++- srsue/src/stack/rrc/rrc_cell.cc | 112 +++++++++------- srsue/src/stack/rrc/rrc_meas.cc | 10 +- srsue/src/stack/rrc/rrc_procedures.cc | 8 +- srsue/test/ttcn3/src/CMakeLists.txt | 36 ++++-- srsue/test/upper/CMakeLists.txt | 12 +- srsue/test/upper/rrc_cell_test.cc | 14 +- 12 files changed, 299 insertions(+), 146 deletions(-) diff --git a/lib/test/asn1/CMakeLists.txt b/lib/test/asn1/CMakeLists.txt index 9456a08c7..a0d30ca64 100644 --- a/lib/test/asn1/CMakeLists.txt +++ b/lib/test/asn1/CMakeLists.txt @@ -15,7 +15,11 @@ target_link_libraries(srslte_asn1_rrc_mcch_test rrc_asn1 srslte_common) add_test(srslte_asn1_rrc_mcch_test srslte_asn1_rrc_mcch_test) add_executable(srslte_asn1_rrc_meas_test srslte_asn1_rrc_meas_test.cc) +if (ENABLE_5GNR) +target_link_libraries(srslte_asn1_rrc_meas_test rrc_asn1 rrc_nr_asn1 srslte_common) +else() target_link_libraries(srslte_asn1_rrc_meas_test rrc_asn1 srslte_common) +endif(ENABLE_5GNR) add_test(srslte_asn1_rrc_meas_test srslte_asn1_rrc_meas_test) add_executable(srslte_asn1_rrc_ul_dcch_test srslte_asn1_rrc_ul_dcch_test.cc) diff --git a/srsue/hdr/stack/rrc/rrc.h b/srsue/hdr/stack/rrc/rrc.h index e6ff2e24c..1ec94334d 100644 --- a/srsue/hdr/stack/rrc/rrc.h +++ b/srsue/hdr/stack/rrc/rrc.h @@ -62,7 +62,9 @@ class rrc : public rrc_interface_nas, public rrc_interface_phy_lte, public rrc_interface_mac, public rrc_interface_pdcp, +#ifdef HAVE_5GNR public rrc_interface_rrc_nr, +#endif public rrc_interface_rlc, public srslte::timer_callback { @@ -108,10 +110,10 @@ public: bool connection_request(srslte::establishment_cause_t cause, srslte::unique_byte_buffer_t dedicated_info_nas); void set_ue_identity(srslte::s_tmsi_t s_tmsi); void paging_completed(bool outcome) final; - +#ifdef HAVE_5GNR // NR interface void new_cell_meas_nr(const std::vector& meas); - +#endif // PHY interface void in_sync() final; void out_of_sync() final; @@ -238,8 +240,12 @@ private: std::unique_ptr measurements; // List of strongest neighbour cell - using unique_cell_t = std::unique_ptr; - meas_cell_list meas_cells; + using unique_cell_t = std::unique_ptr; + meas_cell_list meas_cells; + +#ifdef HAVE_5GNR + meas_cell_list meas_cells_nr; +#endif bool initiated = false; asn1::rrc::reest_cause_e m_reest_cause = asn1::rrc::reest_cause_e::nulltype; @@ -253,15 +259,17 @@ private: std::set get_cells(const uint32_t earfcn); float get_cell_rsrp(const uint32_t earfcn, const uint32_t pci); float get_cell_rsrq(const uint32_t earfcn, const uint32_t pci); - meas_cell* get_serving_cell(); + meas_cell_eutra* get_serving_cell(); void process_cell_meas(); void process_new_cell_meas(const std::vector& meas); srslte::block_queue > cell_meas_q; +#ifdef HAVE_5GNR void process_cell_meas_nr(); void process_new_cell_meas_nr(const std::vector& meas); srslte::block_queue > cell_meas_nr_q; +#endif // Cell selection/reselection functions/variables typedef struct { diff --git a/srsue/hdr/stack/rrc/rrc_cell.h b/srsue/hdr/stack/rrc/rrc_cell.h index 0ba38c918..0070e4f4b 100644 --- a/srsue/hdr/stack/rrc/rrc_cell.h +++ b/srsue/hdr/stack/rrc/rrc_cell.h @@ -15,6 +15,10 @@ #include "srslte/asn1/rrc.h" #include "srslte/asn1/rrc_utils.h" +#if HAVE_5GNR +#include "srslte/asn1/rrc_nr.h" +#include "srslte/asn1/rrc_nr_utils.h" +#endif #include "srslte/interfaces/ue_interfaces.h" namespace srsue { @@ -43,14 +47,6 @@ public: bool greater(const meas_cell* x) const { return rsrp > x->rsrp || std::isnan(rsrp); } bool greater(const meas_cell& x) const { return rsrp > x.rsrp || std::isnan(rsrp); } - bool has_plmn_id(asn1::rrc::plmn_id_s plmn_id) const; - uint32_t nof_plmns() const { return has_sib1() ? sib1.cell_access_related_info.plmn_id_list.size() : 0; } - srslte::plmn_id_t get_plmn(uint32_t idx) const; - - uint16_t get_tac() const { return has_sib1() ? (uint16_t)sib1.cell_access_related_info.tac.to_number() : 0; } - uint32_t get_earfcn() const { return phy_cell.earfcn; } - uint32_t get_pci() const { return phy_cell.pci; } - void set_rsrp(float rsrp_) { if (!std::isnan(rsrp_)) { @@ -71,10 +67,90 @@ public: } } + bool has_sib1() const { return has_valid_sib1; } + bool has_sib2() const { return has_valid_sib2; } + bool has_sib3() const { return has_valid_sib3; } + bool has_sib13() const { return has_valid_sib13; } + bool has_sib(uint32_t index) const; + bool has_sibs(srslte::span indexes) const; + + bool is_sib_scheduled(uint32_t sib_index) const; + + void reset_sibs() + { + has_valid_sib1 = false; + has_valid_sib2 = false; + has_valid_sib3 = false; + has_valid_sib13 = false; + } + + uint32_t get_earfcn() const { return phy_cell.earfcn; } + uint32_t get_pci() const { return phy_cell.pci; } + float get_rsrp() const { return rsrp; } float get_rsrq() const { return rsrq; } float get_cfo_hz() const { return phy_cell.cfo_hz; } + phy_cell_t phy_cell = {0, 0, 0}; + srslte::unique_timer timer; + +protected: + float rsrp = NAN; + float rsrq = NAN; + + bool has_valid_sib1 = false; + bool has_valid_sib2 = false; + bool has_valid_sib3 = false; + bool has_valid_sib13 = false; + std::map sib_info_map; ///< map of sib_index to index of schedInfoList in SIB1 +}; + +#ifdef HAVE_5GNR +class meas_cell_nr : public meas_cell +{ +public: + explicit meas_cell_nr(srslte::unique_timer timer) : meas_cell(std::move(timer)){}; + meas_cell_nr(const phy_cell_t& phy_cell_, srslte::unique_timer timer) : meas_cell(phy_cell_, std::move(timer)){}; + + bool has_plmn_id(asn1::rrc_nr::plmn_id_s plmn_id) const; + uint32_t nof_plmns() const { return has_sib1() ? sib1.cell_access_related_info.plmn_id_list.size() : 0; } + srslte::plmn_id_t get_plmn(uint32_t idx) const; + + void set_sib1(const asn1::rrc_nr::sib1_s& sib1_); + void set_sib2(const asn1::rrc_nr::sib2_s& sib2_); + void set_sib3(const asn1::rrc_nr::sib3_s& sib3_); + + const asn1::rrc_nr::sib1_s* sib1ptr() const { return has_sib1() ? &sib1 : nullptr; } + const asn1::rrc_nr::sib2_s* sib2ptr() const { return has_sib2() ? &sib2 : nullptr; } + const asn1::rrc_nr::sib3_s* sib3ptr() const { return has_sib3() ? &sib3 : nullptr; } + + uint32_t get_cell_id() const { return (uint32_t)0xFFFF; } // TODO find the correct sib + + uint16_t get_mcc() const; + uint16_t get_mnc() const; + + std::string to_string() const; + + bool has_mcch = false; + asn1::rrc_nr::sib1_s sib1 = {}; + asn1::rrc_nr::sib2_s sib2 = {}; + asn1::rrc_nr::sib3_s sib3 = {}; + asn1::rrc::mcch_msg_s mcch = {}; +}; +#endif + +class meas_cell_eutra : public meas_cell +{ +public: + explicit meas_cell_eutra(srslte::unique_timer timer) : meas_cell(std::move(timer)){}; + meas_cell_eutra(const phy_cell_t& phy_cell_, srslte::unique_timer timer) : meas_cell(phy_cell_, std::move(timer)){}; + + bool has_plmn_id(asn1::rrc::plmn_id_s plmn_id) const; + uint32_t nof_plmns() const { return has_sib1() ? sib1.cell_access_related_info.plmn_id_list.size() : 0; } + srslte::plmn_id_t get_plmn(uint32_t idx) const; + + uint16_t get_tac() const { return has_sib1() ? (uint16_t)sib1.cell_access_related_info.tac.to_number() : 0; } + void set_sib1(const asn1::rrc::sib_type1_s& sib1_); void set_sib2(const asn1::rrc::sib_type2_s& sib2_); void set_sib3(const asn1::rrc::sib_type3_s& sib3_); @@ -87,46 +163,22 @@ public: uint32_t get_cell_id() const { return (uint32_t)sib1.cell_access_related_info.cell_id.to_number(); } - bool has_sibs(srslte::span indexes) const; - bool has_sib(uint32_t index) const; - bool has_sib1() const { return has_valid_sib1; } - bool has_sib2() const { return has_valid_sib2; } - bool has_sib3() const { return has_valid_sib3; } bool has_sib13() const { return has_valid_sib13; } - void reset_sibs() - { - has_valid_sib1 = false; - has_valid_sib2 = false; - has_valid_sib3 = false; - has_valid_sib13 = false; - } - uint16_t get_mcc() const; uint16_t get_mnc() const; std::string to_string() const; - bool is_sib_scheduled(uint32_t sib_index) const; - - phy_cell_t phy_cell = {0, 0, 0}; bool has_mcch = false; asn1::rrc::sib_type1_s sib1 = {}; asn1::rrc::sib_type2_s sib2 = {}; asn1::rrc::sib_type3_s sib3 = {}; asn1::rrc::sib_type13_r9_s sib13 = {}; asn1::rrc::mcch_msg_s mcch = {}; - srslte::unique_timer timer; private: - float rsrp = NAN; - float rsrq = NAN; - - bool has_valid_sib1 = false; - bool has_valid_sib2 = false; - bool has_valid_sib3 = false; bool has_valid_sib13 = false; - std::map sib_info_map; ///< map of sib_index to index of schedInfoList in SIB1 }; //! Universal methods to extract pci/earfcn and compare the two values @@ -136,33 +188,47 @@ uint32_t get_pci(const T& t) return t.pci; } template <> -inline uint32_t get_pci(const meas_cell& t) +inline uint32_t get_pci(const meas_cell_eutra& t) +{ + return t.get_pci(); +} +#ifdef HAVE_5GNR +template <> +inline uint32_t get_pci(const meas_cell_nr& t) { return t.get_pci(); } +#endif template uint32_t get_earfcn(const T& t) { return t.earfcn; } template <> -inline uint32_t get_earfcn(const meas_cell& t) +inline uint32_t get_earfcn(const meas_cell_eutra& t) { return t.get_earfcn(); } +#ifdef HAVE_5GNR +template <> +inline uint32_t get_earfcn(const meas_cell_nr& t) +{ + return t.get_earfcn(); +} +#endif template bool is_same_cell(const T& lhs, const U& rhs) { return get_pci(lhs) == get_pci(rhs) and get_earfcn(lhs) == get_earfcn(rhs); } - +template class meas_cell_list { public: - const static int NEIGHBOUR_TIMEOUT = 5; - const static int MAX_NEIGHBOUR_CELLS = 8; - typedef std::unique_ptr unique_meas_cell; + const static int NEIGHBOUR_TIMEOUT = 5; + const static int MAX_NEIGHBOUR_CELLS = 8; + typedef std::unique_ptr unique_meas_cell; explicit meas_cell_list(srslte::task_sched_handle task_sched_); @@ -173,28 +239,28 @@ public: void clean_neighbours(); void sort_neighbour_cells(); - bool process_new_cell_meas(const std::vector& meas, - const std::function& filter_meas); - - meas_cell* get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci); - const meas_cell* get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci) const; - void log_neighbour_cells() const; - std::string print_neighbour_cells() const; - std::set get_neighbour_pcis(uint32_t earfcn) const; - bool has_neighbour_cell(uint32_t earfcn, uint32_t pci) const; - size_t nof_neighbours() const { return neighbour_cells.size(); } - meas_cell& operator[](size_t idx) { return *neighbour_cells[idx]; } - const meas_cell& operator[](size_t idx) const { return *neighbour_cells[idx]; } - meas_cell& at(size_t idx) { return *neighbour_cells.at(idx); } - meas_cell* find_cell(uint32_t earfcn, uint32_t pci); + bool process_new_cell_meas(const std::vector& meas, + const std::function& filter_meas); + + T* get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci); + const T* get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci) const; + void log_neighbour_cells() const; + std::string print_neighbour_cells() const; + std::set get_neighbour_pcis(uint32_t earfcn) const; + bool has_neighbour_cell(uint32_t earfcn, uint32_t pci) const; + size_t nof_neighbours() const { return neighbour_cells.size(); } + T& operator[](size_t idx) { return *neighbour_cells[idx]; } + const T& operator[](size_t idx) const { return *neighbour_cells[idx]; } + T& at(size_t idx) { return *neighbour_cells.at(idx); } + T* find_cell(uint32_t earfcn, uint32_t pci); // serving cell handling int set_serving_cell(phy_cell_t phy_cell, bool discard_serving); - meas_cell& serving_cell() { return *serv_cell; } - const meas_cell& serving_cell() const { return *serv_cell; } + T& serving_cell() { return *serv_cell; } + const T& serving_cell() const { return *serv_cell; } - using iterator = std::vector::iterator; + using iterator = typename std::vector::iterator; iterator begin() { return neighbour_cells.begin(); } iterator end() { return neighbour_cells.end(); } diff --git a/srsue/hdr/stack/rrc/rrc_meas.h b/srsue/hdr/stack/rrc/rrc_meas.h index 95343ce6b..f81730ead 100644 --- a/srsue/hdr/stack/rrc/rrc_meas.h +++ b/srsue/hdr/stack/rrc/rrc_meas.h @@ -99,7 +99,12 @@ private: void ho_reest_finish(const uint32_t src_earfcn, const uint32_t dst_earfcn); bool parse_meas_config(const meas_cfg_s* meas_config, bool is_ho_reest, uint32_t src_earfcn); void eval_triggers(); - void eval_triggers_eutra(uint32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj, meas_cell* serv_cell, float Ofs, float Ocs); + void eval_triggers_eutra(uint32_t meas_id, + report_cfg_eutra_s& report_cfg, + meas_obj_eutra_s& meas_obj, + meas_cell_eutra* serv_cell, + float Ofs, + float Ocs); void report_triggers(); void report_triggers_eutra(uint32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj); diff --git a/srsue/hdr/stack/rrc/rrc_procedures.h b/srsue/hdr/stack/rrc/rrc_procedures.h index 443f9b109..d23bd66f7 100644 --- a/srsue/hdr/stack/rrc/rrc_procedures.h +++ b/srsue/hdr/stack/rrc/rrc_procedures.h @@ -128,12 +128,12 @@ private: bool is_serv_cell_suitable() const; bool is_sib_acq_required() const; srslte::proc_outcome_t set_proc_complete(); - srslte::proc_outcome_t start_phy_cell_selection(const meas_cell& cell); + srslte::proc_outcome_t start_phy_cell_selection(const meas_cell_eutra& cell); srslte::proc_outcome_t start_sib_acquisition(); // consts - rrc* rrc_ptr; - meas_cell_list* meas_cells; + rrc* rrc_ptr; + meas_cell_list* meas_cells; // state variables enum class search_state_t { cell_selection, serv_cell_camp, cell_config, cell_search }; diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index 565d5525b..7104a28dc 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -61,6 +61,9 @@ rrc::rrc(stack_interface_rrc* stack_, srslte::task_sched_handle task_sched_) : connection_reest(this), ho_handler(this), conn_recfg_proc(this), +#ifdef HAVE_5GNR + meas_cells_nr(task_sched_), +#endif meas_cells(task_sched_) {} @@ -111,7 +114,7 @@ void rrc::init(phy_interface_rrc_lte* phy_, auto on_every_cell_selection = [this](uint32_t earfcn, uint32_t pci, bool csel_result) { if (not csel_result) { - meas_cell* c = meas_cells.find_cell(earfcn, pci); + meas_cell_eutra* c = meas_cells.find_cell(earfcn, pci); if (c != nullptr) { c->set_rsrp(-INFINITY); } @@ -364,6 +367,7 @@ void rrc::set_config_complete(bool status) void rrc::set_scell_complete(bool status) {} +#ifdef HAVE_5GNR /* This function is called from a NR PHY worker thus must return very quickly. * Queue the values of the measurements and process them from the RRC thread */ @@ -385,7 +389,31 @@ void rrc::process_cell_meas_nr() } } -void rrc::process_new_cell_meas_nr(const std::vector& meas) {} +void rrc::process_new_cell_meas_nr(const std::vector& meas) +{ + + // Convert vector + std::vector meas_lte; + for (const auto& m : meas) { + phy_meas_t tmp_meas = {}; + tmp_meas.cfo_hz = m.cfo_hz; + tmp_meas.earfcn = m.arfcn_nr; + tmp_meas.rsrp = m.rsrp; + tmp_meas.rsrq = m.rsrp; + tmp_meas.pci = m.pci_nr; + meas_lte.push_back(tmp_meas); + } + const std::function filter = [this](meas_cell_nr& c, const phy_meas_t& m) { + c.set_rsrp(measurements->rsrp_filter(m.rsrp, c.get_rsrp())); + c.set_rsrq(measurements->rsrq_filter(m.rsrq, c.get_rsrq())); + c.set_cfo(m.cfo_hz); + }; + + rrc_log->debug("MEAS: Processing measurement of %zd cells\n", meas.size()); + + bool neighbour_added = meas_cells_nr.process_new_cell_meas(meas_lte, filter); +} +#endif /* This function is called from a PHY worker thus must return very quickly. * Queue the values of the measurements and process them from the RRC thread @@ -394,7 +422,6 @@ void rrc::new_cell_meas(const std::vector& meas) { cell_meas_q.push(meas); } - /* Processes all pending PHY measurements in queue. */ void rrc::process_cell_meas() @@ -410,7 +437,8 @@ void rrc::process_cell_meas() void rrc::process_new_cell_meas(const std::vector& meas) { - const std::function filter = [this](meas_cell& c, const phy_meas_t& m) { + const std::function filter = [this](meas_cell_eutra& c, + const phy_meas_t& m) { c.set_rsrp(measurements->rsrp_filter(m.rsrp, c.get_rsrp())); c.set_rsrq(measurements->rsrq_filter(m.rsrq, c.get_rsrq())); c.set_cfo(m.cfo_hz); @@ -1080,17 +1108,17 @@ std::set rrc::get_cells(const uint32_t earfcn) float rrc::get_cell_rsrp(const uint32_t earfcn, const uint32_t pci) { - meas_cell* c = meas_cells.get_neighbour_cell_handle(earfcn, pci); + meas_cell_eutra* c = meas_cells.get_neighbour_cell_handle(earfcn, pci); return (c != nullptr) ? c->get_rsrp() : NAN; } float rrc::get_cell_rsrq(const uint32_t earfcn, const uint32_t pci) { - meas_cell* c = meas_cells.get_neighbour_cell_handle(earfcn, pci); + meas_cell_eutra* c = meas_cells.get_neighbour_cell_handle(earfcn, pci); return (c != nullptr) ? c->get_rsrq() : NAN; } -meas_cell* rrc::get_serving_cell() +meas_cell_eutra* rrc::get_serving_cell() { return &meas_cells.serving_cell(); } diff --git a/srsue/src/stack/rrc/rrc_cell.cc b/srsue/src/stack/rrc/rrc_cell.cc index 36574dd6b..4e5651b76 100644 --- a/srsue/src/stack/rrc/rrc_cell.cc +++ b/srsue/src/stack/rrc/rrc_cell.cc @@ -24,7 +24,7 @@ meas_cell::meas_cell(const phy_cell_t& phy_cell_, srslte::unique_timer timer) : phy_cell = phy_cell_; } -srslte::plmn_id_t meas_cell::get_plmn(uint32_t idx) const +srslte::plmn_id_t meas_cell_eutra::get_plmn(uint32_t idx) const { if (idx < sib1.cell_access_related_info.plmn_id_list.size() && has_valid_sib1) { return srslte::make_plmn_id_t(sib1.cell_access_related_info.plmn_id_list[idx].plmn_id); @@ -33,7 +33,7 @@ srslte::plmn_id_t meas_cell::get_plmn(uint32_t idx) const } } -void meas_cell::set_sib1(const asn1::rrc::sib_type1_s& sib1_) +void meas_cell_eutra::set_sib1(const asn1::rrc::sib_type1_s& sib1_) { sib1 = sib1_; has_valid_sib1 = true; @@ -46,17 +46,17 @@ void meas_cell::set_sib1(const asn1::rrc::sib_type1_s& sib1_) } } -void meas_cell::set_sib2(const asn1::rrc::sib_type2_s& sib2_) +void meas_cell_eutra::set_sib2(const asn1::rrc::sib_type2_s& sib2_) { sib2 = sib2_; has_valid_sib2 = true; } -void meas_cell::set_sib3(const asn1::rrc::sib_type3_s& sib3_) +void meas_cell_eutra::set_sib3(const asn1::rrc::sib_type3_s& sib3_) { sib3 = sib3_; has_valid_sib3 = true; } -void meas_cell::set_sib13(const asn1::rrc::sib_type13_r9_s& sib13_) +void meas_cell_eutra::set_sib13(const asn1::rrc::sib_type13_r9_s& sib13_) { sib13 = sib13_; has_valid_sib13 = true; @@ -94,7 +94,23 @@ bool meas_cell::has_sib(uint32_t index) const return false; } -std::string meas_cell::to_string() const +#ifdef HAVE_5GNR +std::string meas_cell_nr::to_string() const +{ + char buf[256]; + snprintf(buf, + 256, + "{cell_id: 0x%x, pci: %d, dl_arfcn_nr: %d, rsrp=%+.1f, cfo=%+.1f}", + get_cell_id(), + get_pci(), + get_earfcn(), + get_rsrp(), + get_cfo_hz()); + return std::string{buf}; +} +#endif + +std::string meas_cell_eutra::to_string() const { char buf[256]; snprintf(buf, @@ -108,7 +124,7 @@ std::string meas_cell::to_string() const return std::string{buf}; } -bool meas_cell::has_plmn_id(asn1::rrc::plmn_id_s plmn_id) const +bool meas_cell_eutra::has_plmn_id(asn1::rrc::plmn_id_s plmn_id) const { if (has_valid_sib1) { for (const auto& e : sib1.cell_access_related_info.plmn_id_list) { @@ -120,7 +136,7 @@ bool meas_cell::has_plmn_id(asn1::rrc::plmn_id_s plmn_id) const return false; } -uint16_t meas_cell::get_mcc() const +uint16_t meas_cell_eutra::get_mcc() const { uint16_t mcc; if (has_valid_sib1) { @@ -133,7 +149,7 @@ uint16_t meas_cell::get_mcc() const return 0; } -uint16_t meas_cell::get_mnc() const +uint16_t meas_cell_eutra::get_mnc() const { uint16_t mnc; if (has_valid_sib1) { @@ -151,21 +167,22 @@ uint16_t meas_cell::get_mnc() const /********************************************* * Neighbour Cell List ********************************************/ - -meas_cell_list::meas_cell_list(srslte::task_sched_handle task_sched_) : - serv_cell(new meas_cell(task_sched_.get_unique_timer())), +template +meas_cell_list::meas_cell_list(srslte::task_sched_handle task_sched_) : + serv_cell(new T(task_sched_.get_unique_timer())), task_sched(task_sched_) {} -meas_cell* meas_cell_list::get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci) +template +T* meas_cell_list::get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci) { auto it = find_if(neighbour_cells.begin(), neighbour_cells.end(), [&](const unique_meas_cell& cell) { return cell->equals(earfcn, pci); }); return it != neighbour_cells.end() ? it->get() : nullptr; } - -const meas_cell* meas_cell_list::get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci) const +template +const T* meas_cell_list::get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci) const { auto it = find_if(neighbour_cells.begin(), neighbour_cells.end(), [&](const unique_meas_cell& cell) { return cell->equals(earfcn, pci); @@ -174,19 +191,20 @@ const meas_cell* meas_cell_list::get_neighbour_cell_handle(uint32_t earfcn, uint } // If only neighbour PCI is provided, copy full cell from serving cell -bool meas_cell_list::add_meas_cell(const phy_meas_t& meas) +template +bool meas_cell_list::add_meas_cell(const phy_meas_t& meas) { phy_cell_t phy_cell = {}; phy_cell.earfcn = meas.earfcn; phy_cell.pci = meas.pci; - unique_meas_cell c = unique_meas_cell(new meas_cell(phy_cell, task_sched.get_unique_timer())); + unique_meas_cell c = unique_meas_cell(new T(phy_cell, task_sched.get_unique_timer())); c.get()->set_rsrp(meas.rsrp); c.get()->set_rsrq(meas.rsrq); c.get()->set_cfo(meas.cfo_hz); return add_meas_cell(std::move(c)); } - -bool meas_cell_list::add_meas_cell(unique_meas_cell cell) +template +bool meas_cell_list::add_meas_cell(unique_meas_cell cell) { bool ret = add_neighbour_cell_unsorted(std::move(cell)); if (ret) { @@ -194,8 +212,8 @@ bool meas_cell_list::add_meas_cell(unique_meas_cell cell) } return ret; } - -bool meas_cell_list::add_neighbour_cell_unsorted(unique_meas_cell new_cell) +template +bool meas_cell_list::add_neighbour_cell_unsorted(unique_meas_cell new_cell) { // Make sure cell is valid if (!new_cell->is_valid()) { @@ -210,7 +228,7 @@ bool meas_cell_list::add_neighbour_cell_unsorted(unique_meas_cell new_cell) } // If cell exists, update RSRP value - meas_cell* existing_cell = get_neighbour_cell_handle(new_cell->get_earfcn(), new_cell->get_pci()); + T* existing_cell = get_neighbour_cell_handle(new_cell->get_earfcn(), new_cell->get_pci()); if (existing_cell != nullptr) { if (std::isnormal(new_cell.get()->get_rsrp())) { existing_cell->set_rsrp(new_cell.get()->get_rsrp()); @@ -234,8 +252,8 @@ bool meas_cell_list::add_neighbour_cell_unsorted(unique_meas_cell new_cell) neighbour_cells.push_back(std::move(new_cell)); return true; } - -void meas_cell_list::rem_last_neighbour() +template +void meas_cell_list::rem_last_neighbour() { if (not neighbour_cells.empty()) { unique_meas_cell& c = neighbour_cells.back(); @@ -243,8 +261,8 @@ void meas_cell_list::rem_last_neighbour() neighbour_cells.pop_back(); } } - -meas_cell_list::unique_meas_cell meas_cell_list::remove_neighbour_cell(uint32_t earfcn, uint32_t pci) +template +typename meas_cell_list::unique_meas_cell meas_cell_list::remove_neighbour_cell(uint32_t earfcn, uint32_t pci) { auto it = find_if(neighbour_cells.begin(), neighbour_cells.end(), [&](const unique_meas_cell& cell) { return cell->equals(earfcn, pci); @@ -258,7 +276,8 @@ meas_cell_list::unique_meas_cell meas_cell_list::remove_neighbour_cell(uint32_t } // Sort neighbour cells by decreasing order of RSRP -void meas_cell_list::sort_neighbour_cells() +template +void meas_cell_list::sort_neighbour_cells() { std::sort(std::begin(neighbour_cells), std::end(neighbour_cells), @@ -266,8 +285,8 @@ void meas_cell_list::sort_neighbour_cells() log_neighbour_cells(); } - -void meas_cell_list::log_neighbour_cells() const +template +void meas_cell_list::log_neighbour_cells() const { if (not neighbour_cells.empty()) { const int32_t MAX_STR_LEN = 512; @@ -289,7 +308,8 @@ void meas_cell_list::log_neighbour_cells() const } //! Called by main RRC thread to remove neighbours from which measurements have not been received in a while -void meas_cell_list::clean_neighbours() +template +void meas_cell_list::clean_neighbours() { for (auto it = neighbour_cells.begin(); it != neighbour_cells.end();) { if (it->get()->timer.is_expired()) { @@ -300,8 +320,8 @@ void meas_cell_list::clean_neighbours() } } } - -std::string meas_cell_list::print_neighbour_cells() const +template +std::string meas_cell_list::print_neighbour_cells() const { if (neighbour_cells.empty()) { return ""; @@ -314,8 +334,8 @@ std::string meas_cell_list::print_neighbour_cells() const s += neighbour_cells.back()->to_string(); return s; } - -std::set meas_cell_list::get_neighbour_pcis(uint32_t earfcn) const +template +std::set meas_cell_list::get_neighbour_pcis(uint32_t earfcn) const { std::set pcis = {}; for (const unique_meas_cell& cell : neighbour_cells) { @@ -325,21 +345,21 @@ std::set meas_cell_list::get_neighbour_pcis(uint32_t earfcn) const } return pcis; } - -bool meas_cell_list::has_neighbour_cell(uint32_t earfcn, uint32_t pci) const +template +bool meas_cell_list::has_neighbour_cell(uint32_t earfcn, uint32_t pci) const { return get_neighbour_cell_handle(earfcn, pci) != nullptr; } - -meas_cell* meas_cell_list::find_cell(uint32_t earfcn, uint32_t pci) +template +T* meas_cell_list::find_cell(uint32_t earfcn, uint32_t pci) { if (serving_cell().phy_cell.pci == pci and serving_cell().phy_cell.earfcn == earfcn) { return &serving_cell(); } return get_neighbour_cell_handle(earfcn, pci); } - -int meas_cell_list::set_serving_cell(phy_cell_t phy_cell, bool discard_serving) +template +int meas_cell_list::set_serving_cell(phy_cell_t phy_cell, bool discard_serving) { // don't update neighbor cell list unless serving cell changes if (phy_cell.pci == serving_cell().get_pci() && phy_cell.earfcn == serving_cell().get_earfcn()) { @@ -367,12 +387,13 @@ int meas_cell_list::set_serving_cell(phy_cell_t phy_cell, bool discard_serving) return SRSLTE_SUCCESS; } -bool meas_cell_list::process_new_cell_meas(const std::vector& meas, - const std::function& filter_meas) +template +bool meas_cell_list::process_new_cell_meas(const std::vector& meas, + const std::function& filter_meas) { bool neighbour_added = false; for (const auto& m : meas) { - meas_cell* c = nullptr; + T* c = nullptr; // Get serving_cell handle if it's the serving cell bool is_serving_cell = m.earfcn == 0 or is_same_cell(m, serving_cell()); @@ -405,4 +426,9 @@ bool meas_cell_list::process_new_cell_meas(const std::vector& return neighbour_added; } +template class meas_cell_list; +#ifdef HAVE_5GNR +template class meas_cell_list; +#endif + } // namespace srsue diff --git a/srsue/src/stack/rrc/rrc_meas.cc b/srsue/src/stack/rrc/rrc_meas.cc index ced9413ac..72bf45fa0 100644 --- a/srsue/src/stack/rrc/rrc_meas.cc +++ b/srsue/src/stack/rrc/rrc_meas.cc @@ -197,7 +197,7 @@ void rrc::rrc_meas::var_meas_report_list::init(rrc* rrc_ptr_) /* Generate report procedure 5.5.5 */ void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) { - meas_cell* serv_cell = rrc_ptr->get_serving_cell(); + meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); if (serv_cell == nullptr) { log_h->warning("MEAS: Serving cell not set when evaluating triggers\n"); return; @@ -435,7 +435,7 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra(uint32_t meas } } { - meas_cell* serv_cell = rrc_ptr->get_serving_cell(); + meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); if (serv_cell == nullptr) { log_h->warning("MEAS: Serving cell not set when reporting triggers\n"); return; @@ -499,7 +499,7 @@ bool rrc::rrc_meas::var_meas_cfg::is_rsrp(report_cfg_eutra_s::trigger_quant_opts void rrc::rrc_meas::var_meas_cfg::eval_triggers_eutra(uint32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj, - meas_cell* serv_cell, + meas_cell_eutra* serv_cell, float Ofs, float Ocs) { @@ -627,7 +627,7 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers_eutra(uint32_t meas_i /* Evaluate event trigger conditions for each cell 5.5.4 */ void rrc::rrc_meas::var_meas_cfg::eval_triggers() { - meas_cell* serv_cell = rrc_ptr->get_serving_cell(); + meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); if (serv_cell == nullptr) { log_h->warning("MEAS: Serving cell not set when evaluating triggers\n"); @@ -1226,7 +1226,7 @@ bool rrc::rrc_meas::var_meas_cfg::parse_meas_config(const meas_cfg_s* cfg, bool // According to 5.5.6.1, if the new configuration after a HO/Reest does not configure the target frequency, we need to // swap frequencies with source if (is_ho_reest) { - meas_cell* serv_cell = rrc_ptr->get_serving_cell(); + meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); if (serv_cell) { // Check if the target frequency is configured uint32_t target_earfcn = serv_cell->get_earfcn(); diff --git a/srsue/src/stack/rrc/rrc_procedures.cc b/srsue/src/stack/rrc/rrc_procedures.cc index e5320d8e1..f8996ead8 100644 --- a/srsue/src/stack/rrc/rrc_procedures.cc +++ b/srsue/src/stack/rrc/rrc_procedures.cc @@ -82,7 +82,7 @@ proc_outcome_t rrc::cell_search_proc::handle_cell_found(const phy_cell_t& new_ce // Create a cell with NaN RSRP. Will be updated by new_phy_meas() during SIB search. if (not rrc_ptr->meas_cells.add_meas_cell( - unique_cell_t(new meas_cell(new_cell, rrc_ptr->task_sched.get_unique_timer())))) { + unique_cell_t(new meas_cell_eutra(new_cell, rrc_ptr->task_sched.get_unique_timer())))) { Error("Could not add new found cell\n"); return proc_outcome_t::error; } @@ -552,7 +552,7 @@ proc_outcome_t rrc::cell_selection_proc::start_next_cell_selection() // If serving is not available, use the stored information (known neighbours) to find the strongest // cell that meets the selection criteria. for (; neigh_index < meas_cells->nof_neighbours(); ++neigh_index) { - const meas_cell& neigh_cell = meas_cells->at(neigh_index); + const meas_cell_eutra& neigh_cell = meas_cells->at(neigh_index); /*TODO: CHECK that PLMN matches. Currently we don't receive SIB1 of neighbour cells * meas_cells[i]->plmn_equals(selected_plmn_id) && */ @@ -598,7 +598,7 @@ proc_outcome_t rrc::cell_selection_proc::react(const bool& cell_selection_result return start_next_cell_selection(); } -srslte::proc_outcome_t rrc::cell_selection_proc::start_phy_cell_selection(const meas_cell& cell) +srslte::proc_outcome_t rrc::cell_selection_proc::start_phy_cell_selection(const meas_cell_eutra& cell) { if (not is_same_cell(cell, meas_cells->serving_cell())) { rrc_ptr->set_serving_cell(cell.phy_cell, discard_serving); @@ -1547,7 +1547,7 @@ srslte::proc_outcome_t rrc::ho_proc::init(const asn1::rrc::rrc_conn_recfg_s& rrc : rrc_ptr->meas_cells.serving_cell().get_earfcn(); // Target cell shall be either serving cell (intra-cell HO) or neighbour cell - meas_cell* cell_to_ho = rrc_ptr->meas_cells.find_cell(target_earfcn, mob_ctrl_info->target_pci); + meas_cell_eutra* cell_to_ho = rrc_ptr->meas_cells.find_cell(target_earfcn, mob_ctrl_info->target_pci); if (cell_to_ho != nullptr) { target_cell = cell_to_ho->phy_cell; } else { diff --git a/srsue/test/ttcn3/src/CMakeLists.txt b/srsue/test/ttcn3/src/CMakeLists.txt index 00b3f49ed..1a4d0303c 100644 --- a/srsue/test/ttcn3/src/CMakeLists.txt +++ b/srsue/test/ttcn3/src/CMakeLists.txt @@ -8,18 +8,26 @@ set(SOURCES ttcn3_ue.cc ttcn3_syssim.cc) add_executable(ttcn3_dut ttcn3_dut.cc lte_ttcn3_phy.cc ${SOURCES}) -target_link_libraries(ttcn3_dut srsue_stack - srsue_upper - srsue_rrc - srslte_upper - srslte_common - srslte_mac - srslte_phy - srslte_radio - srslte_upper - srsue_phy - srsue_mac - rrc_asn1 - sctp - ${Boost_LIBRARIES}) + +set(LINK_LIBRARIES srsue_stack + srsue_upper + srsue_rrc + srslte_upper + srslte_common + srslte_mac + srslte_phy + srslte_radio + srslte_upper + srsue_phy + srsue_mac + rrc_asn1 + sctp +${Boost_LIBRARIES}) + +if (ENABLE_5GNR) + set(LINK_LIBRARIES ${LINK_LIBRARIES} rrc_nr_asn1) +endif (ENABLE_5GNR) + +target_link_libraries(ttcn3_dut ${LINK_LIBRARIES}) + include_directories(${PROJECT_SOURCE_DIR}/srsue/test/ttcn3/hdr) diff --git a/srsue/test/upper/CMakeLists.txt b/srsue/test/upper/CMakeLists.txt index f8c452430..aba74d0fa 100644 --- a/srsue/test/upper/CMakeLists.txt +++ b/srsue/test/upper/CMakeLists.txt @@ -20,7 +20,11 @@ target_link_libraries(rrc_reconfig_test srsue_upper srslte_upper srslte_phy rrc_ add_test(rrc_reconfig_test rrc_reconfig_test) add_executable(rrc_meas_test rrc_meas_test.cc) -target_link_libraries(rrc_meas_test srsue_rrc srsue_upper srslte_upper srslte_phy rrc_asn1) +if (ENABLE_5GNR) + target_link_libraries(rrc_meas_test srsue_rrc srsue_upper srslte_upper srslte_phy rrc_asn1 rrc_nr_asn1) +else (ENABLE_5GNR) + target_link_libraries(rrc_meas_test srsue_rrc srsue_upper srslte_upper srslte_phy rrc_asn1) +endif(ENABLE_5GNR) add_test(rrc_meas_test rrc_meas_test) add_executable(nas_test nas_test.cc) @@ -36,7 +40,11 @@ target_link_libraries(rrc_phy_ctrl_test srslte_common srsue_rrc) add_test(rrc_phy_ctrl_test rrc_phy_ctrl_test) add_executable(rrc_cell_test rrc_cell_test.cc) -target_link_libraries(rrc_cell_test srsue_rrc srsue_upper srslte_upper srslte_phy rrc_asn1) +if (ENABLE_5GNR) + target_link_libraries(rrc_cell_test srsue_rrc srsue_upper srslte_upper srslte_phy rrc_asn1 rrc_nr_asn1) +else (ENABLE_5GNR) + target_link_libraries(rrc_cell_test srsue_rrc srsue_upper srslte_upper srslte_phy rrc_asn1) +endif(ENABLE_5GNR) add_test(rrc_cell_test rrc_cell_test) ######################################################################## diff --git a/srsue/test/upper/rrc_cell_test.cc b/srsue/test/upper/rrc_cell_test.cc index 95a4203f3..55de8181b 100644 --- a/srsue/test/upper/rrc_cell_test.cc +++ b/srsue/test/upper/rrc_cell_test.cc @@ -18,7 +18,7 @@ using namespace srsue; int test_meas_cell() { srslte::task_scheduler task_sched; - meas_cell invalid_cell{task_sched.get_unique_timer()}, cell{phy_cell_t{1, 3400}, task_sched.get_unique_timer()}; + meas_cell_eutra invalid_cell{task_sched.get_unique_timer()}, cell{phy_cell_t{1, 3400}, task_sched.get_unique_timer()}; TESTASSERT(not invalid_cell.is_valid()); TESTASSERT(cell.is_valid()); @@ -33,13 +33,13 @@ int test_meas_cell() TESTASSERT(cell.get_rsrp() == -50); // Test meas timer expiry - for (size_t i = 0; i < meas_cell::neighbour_timeout_ms; ++i) { + for (size_t i = 0; i < meas_cell_eutra::neighbour_timeout_ms; ++i) { TESTASSERT(not cell.timer.is_expired()); task_sched.tic(); } TESTASSERT(cell.timer.is_expired()); cell.set_rsrp(-20); - for (size_t i = 0; i < meas_cell::neighbour_timeout_ms; ++i) { + for (size_t i = 0; i < meas_cell_eutra::neighbour_timeout_ms; ++i) { TESTASSERT(not cell.timer.is_expired()); task_sched.tic(); } @@ -50,8 +50,8 @@ int test_meas_cell() int test_add_neighbours() { - srslte::task_scheduler task_sched; - meas_cell_list list{&task_sched}; + srslte::task_scheduler task_sched; + meas_cell_list list{&task_sched}; TESTASSERT(list.nof_neighbours() == 0); TESTASSERT(not list.serving_cell().is_valid()); TESTASSERT(list.get_neighbour_cell_handle(0, 0) == nullptr); @@ -65,7 +65,7 @@ int test_add_neighbours() TESTASSERT(list.add_meas_cell(pmeas)); TESTASSERT(not list.serving_cell().is_valid()); TESTASSERT(list.nof_neighbours() == 1); - meas_cell* c = list.get_neighbour_cell_handle(3400, 1); + meas_cell_eutra* c = list.get_neighbour_cell_handle(3400, 1); TESTASSERT(c != nullptr and c->is_valid() and c->equals(3400, 1)); TESTASSERT(c->get_rsrp() == pmeas.rsrp and c->get_rsrq() == pmeas.rsrq); @@ -91,7 +91,7 @@ int test_add_neighbours() task_sched.tic(); task_sched.tic(); list.get_neighbour_cell_handle(3400, 1)->set_rsrp(-20); - for (size_t i = 0; i < meas_cell::neighbour_timeout_ms; ++i) { + for (size_t i = 0; i < meas_cell_eutra::neighbour_timeout_ms; ++i) { TESTASSERT(list.nof_neighbours() == 1); list.clean_neighbours(); task_sched.tic(); From ce4526a93528950580485c17467e6b63e0ce05f5 Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Thu, 3 Dec 2020 15:14:02 +0100 Subject: [PATCH 28/59] Extended measurements interrat nr r15 testcase with measurements --- srsue/hdr/stack/rrc/rrc_meas.h | 19 +++++++++-------- srsue/src/stack/rrc/rrc_meas.cc | 34 +++++++++++++++++++++++++++---- srsue/test/upper/rrc_meas_test.cc | 30 +++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 12 deletions(-) diff --git a/srsue/hdr/stack/rrc/rrc_meas.h b/srsue/hdr/stack/rrc/rrc_meas.h index f81730ead..935d3747d 100644 --- a/srsue/hdr/stack/rrc/rrc_meas.h +++ b/srsue/hdr/stack/rrc/rrc_meas.h @@ -99,15 +99,7 @@ private: void ho_reest_finish(const uint32_t src_earfcn, const uint32_t dst_earfcn); bool parse_meas_config(const meas_cfg_s* meas_config, bool is_ho_reest, uint32_t src_earfcn); void eval_triggers(); - void eval_triggers_eutra(uint32_t meas_id, - report_cfg_eutra_s& report_cfg, - meas_obj_eutra_s& meas_obj, - meas_cell_eutra* serv_cell, - float Ofs, - float Ocs); void report_triggers(); - void report_triggers_eutra(uint32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj); - private: void remove_varmeas_report(const uint32_t meas_id); @@ -130,6 +122,17 @@ private: void reportConfig_addmod_interrat(const report_cfg_to_add_mod_s& l); bool reportConfig_addmod_to_reportConfigList(const report_cfg_to_add_mod_s& l); + void eval_triggers_eutra(uint32_t meas_id, + report_cfg_eutra_s& report_cfg, + meas_obj_eutra_s& meas_obj, + meas_cell_eutra* serv_cell, + float Ofs, + float Ocs); + void eval_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); + + void report_triggers_eutra(uint32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj); + void report_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); + class cell_trigger_state { public: diff --git a/srsue/src/stack/rrc/rrc_meas.cc b/srsue/src/stack/rrc/rrc_meas.cc index 72bf45fa0..36db6cdb0 100644 --- a/srsue/src/stack/rrc/rrc_meas.cc +++ b/srsue/src/stack/rrc/rrc_meas.cc @@ -463,6 +463,11 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra(uint32_t meas } } +void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_nr(uint32_t meas_id, + report_cfg_inter_rat_s& report_cfg, + meas_obj_nr_r15_s& meas_obj) +{} + void rrc::rrc_meas::var_meas_cfg::report_triggers() { // for each measId included in the measIdList within VarMeasConfig @@ -478,6 +483,11 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers() if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_eutra && report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_eutra) { report_triggers_eutra(m.first, report_cfg.report_cfg.report_cfg_eutra(), meas_obj.meas_obj.meas_obj_eutra()); + } else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 && + report_cfg.report_cfg.type().value == + report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat) { + report_triggers_interrat_nr( + m.first, report_cfg.report_cfg.report_cfg_inter_rat(), meas_obj.meas_obj.meas_obj_nr_r15()); } else { log_h->error("Unsupported combination of measurement object type %s and report config type %s \n", meas_obj.meas_obj.type().to_string().c_str(), @@ -624,6 +634,10 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers_eutra(uint32_t meas_i } } +void rrc::rrc_meas::var_meas_cfg::eval_triggers_interrat_nr(uint32_t meas_id, + report_cfg_inter_rat_s& report_cfg, + meas_obj_nr_r15_s& meas_obj) +{} /* Evaluate event trigger conditions for each cell 5.5.4 */ void rrc::rrc_meas::var_meas_cfg::eval_triggers() { @@ -661,10 +675,22 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers() m.second.meas_obj_id, m.second.report_cfg_id); - report_cfg_eutra_s& report_cfg = reportConfigList.at(m.second.report_cfg_id).report_cfg.report_cfg_eutra(); - meas_obj_eutra_s& meas_obj = measObjectsList.at(m.second.meas_obj_id).meas_obj.meas_obj_eutra(); - - eval_triggers_eutra(m.first, report_cfg, meas_obj, serv_cell, Ofs, Ocs); + report_cfg_to_add_mod_s& report_cfg = reportConfigList.at(m.second.report_cfg_id); + meas_obj_to_add_mod_s& meas_obj = measObjectsList.at(m.second.meas_obj_id); + if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_eutra && + report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_eutra) { + eval_triggers_eutra( + m.first, report_cfg.report_cfg.report_cfg_eutra(), meas_obj.meas_obj.meas_obj_eutra(), serv_cell, Ofs, Ocs); + } else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 && + report_cfg.report_cfg.type().value == + report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat) + eval_triggers_interrat_nr( + m.first, report_cfg.report_cfg.report_cfg_inter_rat(), meas_obj.meas_obj.meas_obj_nr_r15()); + else { + log_h->error("Unsupported combination of measurement object type %s and report config type %s \n", + meas_obj.meas_obj.type().to_string().c_str(), + report_cfg.report_cfg.type().to_string().c_str()); + } } } diff --git a/srsue/test/upper/rrc_meas_test.cc b/srsue/test/upper/rrc_meas_test.cc index 19dce4120..db002f74f 100644 --- a/srsue/test/upper/rrc_meas_test.cc +++ b/srsue/test/upper/rrc_meas_test.cc @@ -317,6 +317,20 @@ public: run_tti(1); } +#ifdef HAVE_5GNR + void add_neighbour_cell_nr(uint32_t pci, uint32_t earfcn, float rsrp = 0) + { + std::vector phy_meas = {}; + phy_meas_nr_t meas = {}; + meas.pci_nr = pci; + meas.arfcn_nr = earfcn; + meas.rsrp = rsrp; + phy_meas.push_back(meas); // neighbour cell + new_cell_meas_nr(phy_meas); + run_tti(1); + } +#endif + using rrc::has_neighbour_cell; using rrc::is_serving_cell; using rrc::start_cell_select; @@ -1171,6 +1185,8 @@ int meas_obj_inter_rat_nr_test() rep.report_cfg.report_cfg_inter_rat().trigger_type.set_event(); rep.report_cfg.report_cfg_inter_rat().trigger_type.event().event_id.set_event_b1_nr_r15(); rep.report_cfg.report_cfg_inter_rat().trigger_type.event().event_id.event_b1_nr_r15().b1_thres_nr_r15.set_nr_rsrp_r15(); + rep.report_cfg.report_cfg_inter_rat().trigger_type.event().event_id.event_b1_nr_r15().b1_thres_nr_r15.nr_rsrp_r15() = + 56; rep.report_cfg.report_cfg_inter_rat().trigger_type.event().event_id.event_b1_nr_r15().report_on_leave_r15 = true; rep.report_cfg.report_cfg_inter_rat().trigger_type.event().hysteresis = 0; rep.report_cfg.report_cfg_inter_rat().trigger_type.event().time_to_trigger = asn1::rrc::time_to_trigger_opts::options::ms100; @@ -1195,6 +1211,20 @@ int meas_obj_inter_rat_nr_test() // Just test it doesn't crash TESTASSERT(rrctest.send_meas_cfg(rrc_conn_recfg)); TESTASSERT(rrctest.phytest.meas_nof_freqs() == 0); + +#ifdef HAVE_5GNR + + rrctest.add_neighbour_cell(2, 300, 2.0); + rrctest.set_serving_cell(2, 300); + rrctest.add_neighbour_cell_nr(500, 631680, -60.0); + int ttt_iters = 100 + 1; // 100 ms + + for (int i = 0; i < ttt_iters; i++) { + log1->info("Report %d/%d enter condition is true\n", i, ttt_iters); + rrctest.add_neighbour_cell_nr(500, 631680, -60.0); + } + +#endif return SRSLTE_SUCCESS; } From 25e5b8870408482c49e1cb772857685d12f7e3a8 Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Thu, 3 Dec 2020 17:23:03 +0100 Subject: [PATCH 29/59] Added NR range_to_value function and debug logging for measurements --- srsue/hdr/stack/rrc/rrc_meas.h | 4 +- srsue/src/stack/rrc/rrc_meas.cc | 76 ++++++++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/srsue/hdr/stack/rrc/rrc_meas.h b/srsue/hdr/stack/rrc/rrc_meas.h index 935d3747d..a324e21ab 100644 --- a/srsue/hdr/stack/rrc/rrc_meas.h +++ b/srsue/hdr/stack/rrc/rrc_meas.h @@ -111,7 +111,7 @@ private: void measId_addmod(const meas_id_to_add_mod_list_l& list); void quantity_config(const quant_cfg_s& cfg); void log_debug_trigger_value_eutra(const eutra_event_s::event_id_c_& e); - + void log_debug_trigger_value_interrat(const report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_& e); static bool is_rsrp(report_cfg_eutra_s::trigger_quant_opts::options q); // Helpers @@ -171,6 +171,8 @@ private: // Static functions static uint8_t value_to_range(const report_cfg_eutra_s::trigger_quant_opts::options q, float value); static float range_to_value(const report_cfg_eutra_s::trigger_quant_opts::options q, const uint8_t range); + static uint8_t value_to_range_nr(const asn1::rrc::thres_nr_r15_c::types_opts::options type, const float value); + static float range_to_value_nr(const asn1::rrc::thres_nr_r15_c::types_opts::options type, const uint8_t range); static uint8_t offset_val(const meas_obj_eutra_s& meas_obj); static asn1::dyn_array::iterator find_pci_in_meas_obj(meas_obj_eutra_s& meas_obj, uint32_t pci); }; diff --git a/srsue/src/stack/rrc/rrc_meas.cc b/srsue/src/stack/rrc/rrc_meas.cc index 36db6cdb0..59639bd25 100644 --- a/srsue/src/stack/rrc/rrc_meas.cc +++ b/srsue/src/stack/rrc/rrc_meas.cc @@ -126,6 +126,7 @@ void rrc::rrc_meas::run_tti() meas_cfg.report_triggers(); } + uint8_t rrc::rrc_meas::value_to_range(const report_cfg_eutra_s::trigger_quant_opts::options quant, const float value) { uint8_t range = 0; @@ -170,6 +171,54 @@ float rrc::rrc_meas::range_to_value(const report_cfg_eutra_s::trigger_quant_opts return val; } +// For thresholds, the actual value is (field value – 156) dBm, except for field value 127, in which case the actual +// value is infinity. +float rrc::rrc_meas::range_to_value_nr(const asn1::rrc::thres_nr_r15_c::types_opts::options type, const uint8_t range) +{ + float val = 0; + switch (type) { + case asn1::rrc::thres_nr_r15_c::types_opts::options::nr_rsrp_r15: + if (range == 127) + val = std::numeric_limits::infinity(); + else { + val = -156 + (float)range; + } + break; + case asn1::rrc::thres_nr_r15_c::types_opts::options::nr_rsrq_r15: + val = -87 + (float)range / 2; + break; + case asn1::rrc::thres_nr_r15_c::types_opts::options::nr_sinr_r15: + val = -46 + (float)range / 2; + break; + default: + break; + } + return val; +} + +uint8_t rrc::rrc_meas::value_to_range_nr(const asn1::rrc::thres_nr_r15_c::types_opts::options type, const float value) +{ + uint8_t range = 0; + switch (type) { + case asn1::rrc::thres_nr_r15_c::types_opts::options::nr_rsrp_r15: + if (value == std::numeric_limits::infinity()) { + range = 127; + } else { + range = (uint8_t)(value + 156); + } + break; + case asn1::rrc::thres_nr_r15_c::types_opts::options::nr_rsrq_r15: + range = (uint8_t)(2 * (value + 87)); + break; + case asn1::rrc::thres_nr_r15_c::types_opts::options::nr_sinr_r15: + range = (uint8_t)(2 * (value + 46)); + break; + default: + break; + } + return range; +} + uint8_t rrc::rrc_meas::offset_val(const meas_obj_eutra_s& meas_obj) { return meas_obj.offset_freq_present ? meas_obj.offset_freq.to_number() : 0; @@ -1088,9 +1137,7 @@ void rrc::rrc_meas::var_meas_cfg::reportConfig_addmod_interrat(const report_cfg_ report_cfg.trigger_type.event().event_id.type().to_string().c_str(), report_cfg.trigger_type.event().time_to_trigger.to_number(), report_cfg.report_interv.to_number()); - if (entry_exists) { - // TODO Debug - } + log_debug_trigger_value_interrat(report_cfg.trigger_type.event().event_id); } // perform the reporting configuration addition/ modification procedure as specified in 5.5.2.7 @@ -1111,6 +1158,25 @@ void rrc::rrc_meas::var_meas_cfg::reportConfig_addmod(const report_cfg_to_add_mo } } +// Warning: Use for Test debug purposes only. Assumes thresholds in RSRP +void rrc::rrc_meas::var_meas_cfg::log_debug_trigger_value_interrat( + const report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_& e) +{ + if (log_h->get_level() == LOG_LEVEL_DEBUG) { + switch (e.type()) { + case report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::types_opts::event_b1_nr_r15: { + log_h->debug("MEAS: B1-NR-R15-threashold (%d)=%.1f dBm\n", + e.event_b1_nr_r15().b1_thres_nr_r15.nr_rsrp_r15(), + range_to_value_nr(asn1::rrc::thres_nr_r15_c::types_opts::options::nr_rsrp_r15, e.event_b1_nr_r15().b1_thres_nr_r15.nr_rsrp_r15())); + break; + } + default: + log_h->debug("MEAS: Unsupported inter rat trigger type %s\n", e.type().to_string().c_str()); + break; + } + } +} + // Warning: Use for Test debug purposes only. Assumes thresholds in RSRP void rrc::rrc_meas::var_meas_cfg::log_debug_trigger_value_eutra(const eutra_event_s::event_id_c_& e) { @@ -1249,8 +1315,8 @@ bool rrc::rrc_meas::var_meas_cfg::parse_meas_config(const meas_cfg_s* cfg, bool } } - // According to 5.5.6.1, if the new configuration after a HO/Reest does not configure the target frequency, we need to - // swap frequencies with source + // According to 5.5.6.1, if the new configuration after a HO/Reest does not configure the target frequency, we need + // to swap frequencies with source if (is_ho_reest) { meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); if (serv_cell) { From e4e67eebce1bd53bd260fda77088e88c6a9c24a3 Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Fri, 4 Dec 2020 09:53:55 +0100 Subject: [PATCH 30/59] Added infrastucture to process measurments and evaluate interrat triggers --- srsue/hdr/stack/rrc/rrc.h | 6 +++ srsue/hdr/stack/rrc/rrc_meas.h | 7 +++- srsue/src/stack/rrc/rrc.cc | 23 ++++++++++ srsue/src/stack/rrc/rrc_meas.cc | 74 +++++++++++++++++++++++++++++---- 4 files changed, 101 insertions(+), 9 deletions(-) diff --git a/srsue/hdr/stack/rrc/rrc.h b/srsue/hdr/stack/rrc/rrc.h index 1ec94334d..10cbec553 100644 --- a/srsue/hdr/stack/rrc/rrc.h +++ b/srsue/hdr/stack/rrc/rrc.h @@ -261,6 +261,12 @@ private: float get_cell_rsrq(const uint32_t earfcn, const uint32_t pci); meas_cell_eutra* get_serving_cell(); +#ifdef HAVE_5GNR + std::set get_cells_nr(const uint32_t arfcn_nr); + float get_cell_rsrp_nr(const uint32_t arfcn_nr, const uint32_t pci_nr); + float get_cell_rsrq_nr(const uint32_t arfcn_nr, const uint32_t pci_nr); +#endif + void process_cell_meas(); void process_new_cell_meas(const std::vector& meas); srslte::block_queue > cell_meas_q; diff --git a/srsue/hdr/stack/rrc/rrc_meas.h b/srsue/hdr/stack/rrc/rrc_meas.h index a324e21ab..780179ac9 100644 --- a/srsue/hdr/stack/rrc/rrc_meas.h +++ b/srsue/hdr/stack/rrc/rrc_meas.h @@ -128,8 +128,9 @@ private: meas_cell_eutra* serv_cell, float Ofs, float Ocs); +#ifdef HAVE_5GNR void eval_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); - +#endif void report_triggers_eutra(uint32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj); void report_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); @@ -157,6 +158,10 @@ private: // It is safe to use [] operator in this double-map because all members are uint32_t std::map > trigger_state; +#ifdef HAVE_5GNR + std::map > trigger_state_nr; +#endif + var_meas_report_list* meas_report = nullptr; srslte::log_ref log_h; rrc* rrc_ptr = nullptr; diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index 7104a28dc..379a36324 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -212,6 +212,10 @@ void rrc::run_tti() // Process pending PHY measurements in IDLE/CONNECTED process_cell_meas(); +#ifdef HAVE_5GNR + process_cell_meas_nr(); +#endif + // Process on-going callbacks, and clear finished callbacks callback_list.run(); @@ -1123,6 +1127,25 @@ meas_cell_eutra* rrc::get_serving_cell() return &meas_cells.serving_cell(); } +#ifdef HAVE_5GNR +std::set rrc::get_cells_nr(const uint32_t arfcn_nr) +{ + return meas_cells_nr.get_neighbour_pcis(arfcn_nr); +} + +float rrc::get_cell_rsrp_nr(const uint32_t arfcn_nr, const uint32_t pci_nr) +{ + meas_cell_nr* c = meas_cells_nr.get_neighbour_cell_handle(arfcn_nr, pci_nr); + return (c != nullptr) ? c->get_rsrp() : NAN; +} + +float rrc::get_cell_rsrq_nr(const uint32_t arfcn_nr, const uint32_t pci_nr) +{ + meas_cell_nr* c = meas_cells_nr.get_neighbour_cell_handle(arfcn_nr, pci_nr); + return (c != nullptr) ? c->get_rsrq() : NAN; +} +#endif + /******************************************************************************* * * diff --git a/srsue/src/stack/rrc/rrc_meas.cc b/srsue/src/stack/rrc/rrc_meas.cc index 59639bd25..78387a961 100644 --- a/srsue/src/stack/rrc/rrc_meas.cc +++ b/srsue/src/stack/rrc/rrc_meas.cc @@ -529,6 +529,14 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers() report_cfg_to_add_mod_s& report_cfg = reportConfigList.at(m.second.report_cfg_id); meas_obj_to_add_mod_s& meas_obj = measObjectsList.at(m.second.meas_obj_id); + + log_h->debug("MEAS: Calculating reports for MeasId=%d, ObjectId=%d (Type %s), ReportId=%d (Type %s)\n", + m.first, + m.second.meas_obj_id, + report_cfg.report_cfg.type().to_string().c_str(), + m.second.report_cfg_id, + meas_obj.meas_obj.type().to_string().c_str()); + if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_eutra && report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_eutra) { report_triggers_eutra(m.first, report_cfg.report_cfg.report_cfg_eutra(), meas_obj.meas_obj.meas_obj_eutra()); @@ -683,10 +691,54 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers_eutra(uint32_t meas_i } } +#ifdef HAVE_5GNR void rrc::rrc_meas::var_meas_cfg::eval_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj) -{} +{ + if (!(report_cfg.trigger_type.type() == report_cfg_inter_rat_s::trigger_type_c_::types::event)) { + log_h->error("Unsupported trigger type for interrat nr eval\n"); + return; + } + + report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_ event_id = report_cfg.trigger_type.event().event_id; + + double hyst = (double)report_cfg.trigger_type.event().hysteresis; + + auto cells = rrc_ptr->get_cells_nr(meas_obj.carrier_freq_r15); + + for (auto& pci : cells) { + float thresh = 0.0; + bool enter_condition = false; + bool exit_condition = false; + float Mn = 0.0; + + log_h->debug( + "MEAS: eventId=%s, pci=%d, earfcn=%d\n", event_id.type().to_string().c_str(), pci, meas_obj.carrier_freq_r15); + + if (event_id.event_b1_nr_r15().b1_thres_nr_r15.type().value == thres_nr_r15_c::types::nr_rsrp_r15) { + Mn = rrc_ptr->get_cell_rsrp_nr(meas_obj.carrier_freq_r15, pci); + thresh = range_to_value_nr(asn1::rrc::thres_nr_r15_c::types_opts::options::nr_rsrp_r15, + event_id.event_b1_nr_r15().b1_thres_nr_r15.nr_rsrp_r15()); + } else { + log_h->warning("Other threshold values are not supported yet!\n"); + } + + enter_condition = Mn - hyst > thresh; + exit_condition = Mn + hyst < thresh; + + trigger_state_nr[meas_id][pci].event_condition(enter_condition, exit_condition); + + log_h->debug("MEAS (NR): eventId=%s, Mn=%.2f, hyst=%.2f, Thresh=%.2f, enter_condition=%d, exit_condition=%d\n", + event_id.type().to_string().c_str(), + Mn, + hyst, + thresh, + enter_condition, + exit_condition); + } +} +#endif /* Evaluate event trigger conditions for each cell 5.5.4 */ void rrc::rrc_meas::var_meas_cfg::eval_triggers() { @@ -719,22 +771,28 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers() log_h->error("MEAS: Computing report triggers. MeasId=%d has invalid report or object settings\n", m.first); continue; } - log_h->debug("MEAS: Calculating trigger for MeasId=%d, ObjectId=%d, ReportId=%d\n", - m.first, - m.second.meas_obj_id, - m.second.report_cfg_id); report_cfg_to_add_mod_s& report_cfg = reportConfigList.at(m.second.report_cfg_id); meas_obj_to_add_mod_s& meas_obj = measObjectsList.at(m.second.meas_obj_id); + + log_h->debug("MEAS: Calculating trigger for MeasId=%d, ObjectId=%d (Type %s), ReportId=%d (Type %s)\n", + m.first, + m.second.meas_obj_id, + report_cfg.report_cfg.type().to_string().c_str(), + m.second.report_cfg_id, + meas_obj.meas_obj.type().to_string().c_str()); + if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_eutra && report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_eutra) { eval_triggers_eutra( m.first, report_cfg.report_cfg.report_cfg_eutra(), meas_obj.meas_obj.meas_obj_eutra(), serv_cell, Ofs, Ocs); - } else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 && - report_cfg.report_cfg.type().value == - report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat) + } +#ifdef HAVE_5GNR + else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 && + report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat) eval_triggers_interrat_nr( m.first, report_cfg.report_cfg.report_cfg_inter_rat(), meas_obj.meas_obj.meas_obj_nr_r15()); +#endif else { log_h->error("Unsupported combination of measurement object type %s and report config type %s \n", meas_obj.meas_obj.type().to_string().c_str(), From 0e4d77da7616f513dfaa42ef25338df06f8c404d Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Fri, 4 Dec 2020 16:14:38 +0100 Subject: [PATCH 31/59] Refactor eutra reporting code and add report triggers for inter rat measurements --- srsue/hdr/stack/rrc/rrc_meas.h | 23 +++- srsue/src/stack/rrc/rrc_meas.cc | 234 +++++++++++++++++++++----------- 2 files changed, 177 insertions(+), 80 deletions(-) diff --git a/srsue/hdr/stack/rrc/rrc_meas.h b/srsue/hdr/stack/rrc/rrc_meas.h index 780179ac9..8ba6de4de 100644 --- a/srsue/hdr/stack/rrc/rrc_meas.h +++ b/srsue/hdr/stack/rrc/rrc_meas.h @@ -51,6 +51,8 @@ private: float rsrq; } phy_quant_t; + typedef enum { eutra, inter_rat } report_type_t; + class var_meas_cfg; class var_meas_report_list @@ -66,6 +68,12 @@ private: const uint32_t carrier_freq, const report_cfg_eutra_s& report_cfg, const cell_triggered_t& cell_triggered_list); + + void set_measId(const uint32_t measId, + const uint32_t carrier_freq, + const report_cfg_inter_rat_s& report_cfg, + const cell_triggered_t& cell_triggered_list); + void upd_measId(const uint32_t measId, const cell_triggered_t& cell_triggered_list); cell_triggered_t get_measId_cells(const uint32_t measId); @@ -73,10 +81,12 @@ private: class var_meas_report { public: + report_type_t report_type = eutra; uint32_t carrier_freq = 0; uint8_t nof_reports_sent = 0; cell_triggered_t cell_triggered_list = {}; - report_cfg_eutra_s report_cfg = {}; + report_cfg_eutra_s report_cfg_eutra = {}; + report_cfg_inter_rat_s report_cfg_inter = {}; srslte::timer_handler::unique_timer periodic_timer = {}; }; var_meas_cfg* meas_cfg = nullptr; @@ -134,6 +144,17 @@ private: void report_triggers_eutra(uint32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj); void report_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); + void report_triggers_eutra_check_new(int32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj); + void + report_triggers_eutra_check_leaving(int32_t meas_id, report_cfg_eutra_s& report_cfg); + void report_triggers_eutra_removing_trigger(int32_t meas_id); + + void report_triggers_interrat_check_new(int32_t meas_id, + report_cfg_inter_rat_s& report_cfg, + meas_obj_nr_r15_s& meas_obj); + void report_triggers_interrat_check_leaving(int32_t meas_id, report_cfg_inter_rat_s& report_cfg); + void report_triggers_interrat_removing_trigger(int32_t meas_id); + class cell_trigger_state { public: diff --git a/srsue/src/stack/rrc/rrc_meas.cc b/srsue/src/stack/rrc/rrc_meas.cc index 78387a961..614c043ed 100644 --- a/srsue/src/stack/rrc/rrc_meas.cc +++ b/srsue/src/stack/rrc/rrc_meas.cc @@ -271,6 +271,8 @@ void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) meas_result_list_eutra_l& neigh_list = report->meas_result_neigh_cells.set_meas_result_list_eutra(); var_meas_report& var_meas = varMeasReportList.at(measId); + // Todo generate report depending on the type + // sort cells by RSRP std::sort( var_meas.cell_triggered_list.begin(), var_meas.cell_triggered_list.end(), [this](phy_cell_t a, phy_cell_t b) { @@ -290,19 +292,19 @@ void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) rrc_ptr->get_cell_rsrq(var_meas.carrier_freq, cell.pci)); continue; } - if (neigh_list.size() <= var_meas.report_cfg.max_report_cells) { + if (neigh_list.size() <= var_meas.report_cfg_eutra.max_report_cells) { float rsrp_value = rrc_ptr->get_cell_rsrp(var_meas.carrier_freq, cell.pci); float rsrq_value = rrc_ptr->get_cell_rsrq(var_meas.carrier_freq, cell.pci); meas_result_eutra_s rc = {}; // Set quantity to report - switch (var_meas.report_cfg.report_quant.value) { + switch (var_meas.report_cfg_eutra.report_quant.value) { case report_cfg_eutra_s::report_quant_opts::both: rc.meas_result.rsrp_result_present = true; rc.meas_result.rsrq_result_present = true; break; case report_cfg_eutra_s::report_quant_opts::same_as_trigger_quant: - switch (var_meas.report_cfg.trigger_quant.value) { + switch (var_meas.report_cfg_eutra.trigger_quant.value) { case report_cfg_eutra_s::trigger_quant_opts::rsrp: rc.meas_result.rsrp_result_present = true; break; @@ -340,8 +342,8 @@ void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) // if the numberOfReportsSent as defined within the VarMeasReportList for this measId is less than the // reportAmount as defined within the corresponding reportConfig for this measId (also includes case where amount is // infinity) - if (var_meas.nof_reports_sent < var_meas.report_cfg.report_amount.to_number() || - var_meas.report_cfg.report_amount.to_number() == -1) { + if (var_meas.nof_reports_sent < var_meas.report_cfg_eutra.report_amount.to_number() || + var_meas.report_cfg_eutra.report_amount.to_number() == -1) { // start the periodical reporting timer with the value of reportInterval as defined within the corresponding // reportConfig for this measId if (var_meas.periodic_timer.is_valid()) { @@ -352,7 +354,7 @@ void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) var_meas.periodic_timer.clear(); } // else if the triggerType is set to ‘periodical’: - if (var_meas.report_cfg.trigger_type.type().value == report_cfg_eutra_s::trigger_type_c_::types::periodical) { + if (var_meas.report_cfg_eutra.trigger_type.type().value == report_cfg_eutra_s::trigger_type_c_::types::periodical) { // remove the entry within the VarMeasReportList for this measId remove_varmeas_report(measId); meas_cfg->remove_measId(measId); @@ -402,7 +404,31 @@ void rrc::rrc_meas::var_meas_report_list::set_measId(const uint32_t m varMeasReportList.at(measId).periodic_timer = rrc_ptr->task_sched.get_unique_timer(); varMeasReportList.at(measId).periodic_timer.set(report_cfg.report_interv.to_number()); } - varMeasReportList.at(measId).report_cfg = std::move(report_cfg); + varMeasReportList.at(measId).report_cfg_eutra = std::move(report_cfg); + varMeasReportList.at(measId).carrier_freq = carrier_freq; + varMeasReportList.at(measId).nof_reports_sent = 0; + upd_measId(measId, cell_triggered_list); +} + +void rrc::rrc_meas::var_meas_report_list::set_measId(const uint32_t measId, + const uint32_t carrier_freq, + const report_cfg_inter_rat_s& report_cfg, + const cell_triggered_t& cell_triggered_list) +{ + // Create entry if it doesn't exist. + if (!varMeasReportList.count(measId)) { + varMeasReportList[measId].nof_reports_sent = 0; + } + + // The ReportInterval is applicable if the UE performs periodical reporting (i.e. when reportAmount exceeds 1), for + // triggerType ‘event’ as well as for triggerType ‘periodical’ + if (!varMeasReportList.at(measId).periodic_timer.is_valid() && + (report_cfg.report_amount.to_number() > 1 || report_cfg.report_amount.to_number() == -1)) { + varMeasReportList.at(measId).periodic_timer = rrc_ptr->task_sched.get_unique_timer(); + varMeasReportList.at(measId).periodic_timer.set(report_cfg.report_interv.to_number()); + } + varMeasReportList.at(measId).report_type = inter_rat; + varMeasReportList.at(measId).report_cfg_inter = std::move(report_cfg); varMeasReportList.at(measId).carrier_freq = carrier_freq; varMeasReportList.at(measId).nof_reports_sent = 0; upd_measId(measId, cell_triggered_list); @@ -424,98 +450,148 @@ cell_triggered_t rrc::rrc_meas::var_meas_report_list::get_measId_cells(const uin } } -void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra(uint32_t meas_id, - report_cfg_eutra_s& report_cfg, - meas_obj_eutra_s& meas_obj) +void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra_check_new(int32_t meas_id, + report_cfg_eutra_s& report_cfg, + meas_obj_eutra_s& meas_obj) { - if (report_cfg.trigger_type.type() == report_cfg_eutra_s::trigger_type_c_::types::event) { - // if the triggerType is set to ‘event’ and if the entry condition applicable for this event, - { - bool new_cell_trigger = false; - cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); - for (auto& cell : trigger_state[meas_id]) { - if (cell.second.is_enter_equal(report_cfg.trigger_type.event().time_to_trigger.to_number())) { - // Do not add if already exists - if (std::find_if(cells_triggered_list.begin(), cells_triggered_list.end(), [&cell](const phy_cell_t& c) { - return cell.first == c.pci; - }) == cells_triggered_list.end()) { - cells_triggered_list.push_back({cell.first, meas_obj.carrier_freq}); - new_cell_trigger = true; - } - } + bool new_cell_trigger = false; + cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); + for (auto& cell : trigger_state[meas_id]) { + if (cell.second.is_enter_equal(report_cfg.trigger_type.event().time_to_trigger.to_number())) { + // Do not add if already exists + if (std::find_if(cells_triggered_list.begin(), cells_triggered_list.end(), [&cell](const phy_cell_t& c) { + return cell.first == c.pci; + }) == cells_triggered_list.end()) { + cells_triggered_list.push_back({cell.first, meas_obj.carrier_freq}); + new_cell_trigger = true; } + } + } + + if (new_cell_trigger) { - if (new_cell_trigger) { + // include a measurement reporting entry within the VarMeasReportList for this measId (nof_reports reset + // inside) include the concerned cell(s) in the cellsTriggeredList defined within the VarMeasReportList + meas_report->set_measId(meas_id, meas_obj.carrier_freq, report_cfg, cells_triggered_list); - // include a measurement reporting entry within the VarMeasReportList for this measId (nof_reports reset - // inside) include the concerned cell(s) in the cellsTriggeredList defined within the VarMeasReportList - meas_report->set_measId(meas_id, meas_obj.carrier_freq, report_cfg, cells_triggered_list); + // initiate the measurement reporting procedure, as specified in 5.5.5; + meas_report->generate_report(meas_id); + } +} +void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra_check_leaving(int32_t meas_id, report_cfg_eutra_s& report_cfg) +{ + // if the triggerType is set to ‘event’ and if the leaving condition applicable for this event is fulfilled ... + cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); + + // remove the concerned cell(s) in the cellsTriggeredList defined within the VarMeasReportList + auto it = cells_triggered_list.begin(); + while (it != cells_triggered_list.end()) { + if (trigger_state[meas_id][it->pci].is_exit_equal(report_cfg.trigger_type.event().time_to_trigger.to_number())) { + it = cells_triggered_list.erase(it); + meas_report->upd_measId(meas_id, cells_triggered_list); + + // if reportOnLeave is set to TRUE for the corresponding reporting configuration + if (report_cfg.trigger_type.event().event_id.type() == eutra_event_s::event_id_c_::types::event_a3 && + report_cfg.trigger_type.event().event_id.event_a3().report_on_leave) { // initiate the measurement reporting procedure, as specified in 5.5.5; meas_report->generate_report(meas_id); } - } - { - // if the triggerType is set to ‘event’ and if the leaving condition applicable for this event is fulfilled ... - cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); - - // remove the concerned cell(s) in the cellsTriggeredList defined within the VarMeasReportList - auto it = cells_triggered_list.begin(); - while (it != cells_triggered_list.end()) { - if (trigger_state[meas_id][it->pci].is_exit_equal( - report_cfg.trigger_type.event().time_to_trigger.to_number())) { - it = cells_triggered_list.erase(it); - meas_report->upd_measId(meas_id, cells_triggered_list); - - // if reportOnLeave is set to TRUE for the corresponding reporting configuration - if (report_cfg.trigger_type.event().event_id.type() == eutra_event_s::event_id_c_::types::event_a3 && - report_cfg.trigger_type.event().event_id.event_a3().report_on_leave) { - // initiate the measurement reporting procedure, as specified in 5.5.5; - meas_report->generate_report(meas_id); - } - // if the cellsTriggeredList defined within the VarMeasReportList for this measId is empty: - if (cells_triggered_list.empty()) { - remove_varmeas_report(meas_id); - } - } else { - it++; - } + // if the cellsTriggeredList defined within the VarMeasReportList for this measId is empty: + if (cells_triggered_list.empty()) { + remove_varmeas_report(meas_id); } + } else { + it++; } - { - meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); - if (serv_cell == nullptr) { - log_h->warning("MEAS: Serving cell not set when reporting triggers\n"); - return; + } +} + +void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra_removing_trigger(int32_t meas_id) +{ + meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); + if (serv_cell == nullptr) { + log_h->warning("MEAS: Serving cell not set when reporting triggers\n"); + return; + } + uint32_t serving_pci = serv_cell->get_pci(); + + // remove all cells in the cellsTriggeredList that are no neighbor cells anymore + cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); + auto it = cells_triggered_list.begin(); + while (it != cells_triggered_list.end()) { + if (not rrc_ptr->has_neighbour_cell(it->earfcn, it->pci) and it->pci != serving_pci) { + log_h->debug("MEAS: Removing unknown PCI=%d from event trigger list\n", it->pci); + it = cells_triggered_list.erase(it); + meas_report->upd_measId(meas_id, cells_triggered_list); + + // if the cellsTriggeredList defined within the VarMeasReportList for this measId is empty: + if (cells_triggered_list.empty()) { + remove_varmeas_report(meas_id); } - uint32_t serving_pci = serv_cell->get_pci(); - - // remove all cells in the cellsTriggeredList that are no neighbor cells anymore - cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); - auto it = cells_triggered_list.begin(); - while (it != cells_triggered_list.end()) { - if (not rrc_ptr->has_neighbour_cell(it->earfcn, it->pci) and it->pci != serving_pci) { - log_h->debug("MEAS: Removing unknown PCI=%d from event trigger list\n", it->pci); - it = cells_triggered_list.erase(it); - meas_report->upd_measId(meas_id, cells_triggered_list); - - // if the cellsTriggeredList defined within the VarMeasReportList for this measId is empty: - if (cells_triggered_list.empty()) { - remove_varmeas_report(meas_id); - } - } else { - it++; - } + } else { + it++; + } + } +} + +void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra(uint32_t meas_id, + report_cfg_eutra_s& report_cfg, + meas_obj_eutra_s& meas_obj) +{ + if (report_cfg.trigger_type.type() == report_cfg_eutra_s::trigger_type_c_::types::event) { + // if the triggerType is set to ‘event’ and if the entry condition applicable for this event, + report_triggers_eutra_check_new(meas_id, report_cfg, meas_obj); + report_triggers_eutra_check_leaving(meas_id, report_cfg); + report_triggers_eutra_removing_trigger(meas_id); + } +} + +void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_check_new(int32_t meas_id, + report_cfg_inter_rat_s& report_cfg, + meas_obj_nr_r15_s& meas_obj) +{ + bool new_cell_trigger = false; + cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); + for (auto& cell : trigger_state[meas_id]) { + if (cell.second.is_enter_equal(report_cfg.trigger_type.event().time_to_trigger.to_number())) { + // Do not add if already exists + if (std::find_if(cells_triggered_list.begin(), cells_triggered_list.end(), [&cell](const phy_cell_t& c) { + return cell.first == c.pci; + }) == cells_triggered_list.end()) { + cells_triggered_list.push_back({cell.first, meas_obj.carrier_freq_r15}); + new_cell_trigger = true; } } } + + if (new_cell_trigger) { + // include a measurement reporting entry within the VarMeasReportList for this measId (nof_reports reset + // inside) include the concerned cell(s) in the cellsTriggeredList defined within the VarMeasReportList + meas_report->set_measId(meas_id, meas_obj.carrier_freq_r15, report_cfg, cells_triggered_list); + + // initiate the measurement reporting procedure, as specified in 5.5.5; + meas_report->generate_report(meas_id); + } + } +void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_check_leaving(int32_t meas_id, + report_cfg_inter_rat_s& report_cfg) +{} +void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_removing_trigger(int32_t meas_id) {} void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj) -{} +{ + if (report_cfg.trigger_type.type() == report_cfg_inter_rat_s::trigger_type_c_::types::event) { + // if the triggerType is set to ‘event’ and if the entry condition applicable for this event, + report_triggers_interrat_check_new(meas_id, report_cfg, meas_obj); + report_triggers_interrat_check_leaving(meas_id, report_cfg); + report_triggers_interrat_removing_trigger(meas_id); + } +} void rrc::rrc_meas::var_meas_cfg::report_triggers() { From 5df2fb1fa151476264d737167eb14745beacf244 Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Mon, 7 Dec 2020 16:46:02 +0100 Subject: [PATCH 32/59] Added rrc has nr neighbour cells --- srsue/hdr/stack/rrc/rrc.h | 4 ++++ srsue/src/stack/rrc/rrc.cc | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/srsue/hdr/stack/rrc/rrc.h b/srsue/hdr/stack/rrc/rrc.h index 10cbec553..7e71ab4f4 100644 --- a/srsue/hdr/stack/rrc/rrc.h +++ b/srsue/hdr/stack/rrc/rrc.h @@ -149,6 +149,10 @@ protected: bool is_serving_cell(uint32_t earfcn, uint32_t pci) const; int start_cell_select(); +#ifdef HAVE_5GNR + bool has_neighbour_cell_nr(uint32_t earfcn, uint32_t pci) const; +#endif + private: typedef struct { enum { PCCH, RLF, RA_COMPLETE, STOP } command; diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index 379a36324..574683ca9 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -570,6 +570,13 @@ bool rrc::has_neighbour_cell(uint32_t earfcn, uint32_t pci) const return meas_cells.has_neighbour_cell(earfcn, pci); } +#ifdef HAVE_5GNR +bool rrc::has_neighbour_cell_nr(uint32_t earfcn, uint32_t pci) const +{ + return meas_cells_nr.has_neighbour_cell(earfcn, pci); +} +#endif + bool rrc::is_serving_cell(uint32_t earfcn, uint32_t pci) const { return meas_cells.serving_cell().phy_cell.earfcn == earfcn and meas_cells.serving_cell().phy_cell.pci == pci; From 81609d48dd741bd9a70901730d4a54aeddde569f Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Mon, 7 Dec 2020 11:01:35 +0100 Subject: [PATCH 33/59] Added measurment report for interrat nr15 Added function for removing interrat triggers --- srsue/hdr/stack/rrc/rrc_meas.h | 19 +-- srsue/src/stack/rrc/rrc_meas.cc | 223 +++++++++++++++++++++++++++----- 2 files changed, 202 insertions(+), 40 deletions(-) diff --git a/srsue/hdr/stack/rrc/rrc_meas.h b/srsue/hdr/stack/rrc/rrc_meas.h index 8ba6de4de..c600958eb 100644 --- a/srsue/hdr/stack/rrc/rrc_meas.h +++ b/srsue/hdr/stack/rrc/rrc_meas.h @@ -78,6 +78,10 @@ private: cell_triggered_t get_measId_cells(const uint32_t measId); private: + void generate_report_eutra(meas_results_s* report, const uint32_t measId); +#ifdef HAVE_5GNR + void generate_report_interrat(meas_results_s* report, const uint32_t measId); +#endif class var_meas_report { public: @@ -138,22 +142,19 @@ private: meas_cell_eutra* serv_cell, float Ofs, float Ocs); -#ifdef HAVE_5GNR - void eval_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); -#endif void report_triggers_eutra(uint32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj); - void report_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); - void report_triggers_eutra_check_new(int32_t meas_id, report_cfg_eutra_s& report_cfg, meas_obj_eutra_s& meas_obj); - void - report_triggers_eutra_check_leaving(int32_t meas_id, report_cfg_eutra_s& report_cfg); + void report_triggers_eutra_check_leaving(int32_t meas_id, report_cfg_eutra_s& report_cfg); void report_triggers_eutra_removing_trigger(int32_t meas_id); - +#ifdef HAVE_5GNR + void eval_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); + void report_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); void report_triggers_interrat_check_new(int32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj); void report_triggers_interrat_check_leaving(int32_t meas_id, report_cfg_inter_rat_s& report_cfg); - void report_triggers_interrat_removing_trigger(int32_t meas_id); + void report_triggers_interrat_removing_trigger(int32_t meas_id); +#endif class cell_trigger_state { diff --git a/srsue/src/stack/rrc/rrc_meas.cc b/srsue/src/stack/rrc/rrc_meas.cc index 614c043ed..c99a688d2 100644 --- a/srsue/src/stack/rrc/rrc_meas.cc +++ b/srsue/src/stack/rrc/rrc_meas.cc @@ -126,7 +126,6 @@ void rrc::rrc_meas::run_tti() meas_cfg.report_triggers(); } - uint8_t rrc::rrc_meas::value_to_range(const report_cfg_eutra_s::trigger_quant_opts::options quant, const float value) { uint8_t range = 0; @@ -243,8 +242,7 @@ void rrc::rrc_meas::var_meas_report_list::init(rrc* rrc_ptr_) rrc_ptr = rrc_ptr_; } -/* Generate report procedure 5.5.5 */ -void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) +void rrc::rrc_meas::var_meas_report_list::generate_report_eutra(meas_results_s* report, const uint32_t measId) { meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); if (serv_cell == nullptr) { @@ -252,27 +250,9 @@ void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) return; } - ul_dcch_msg_s ul_dcch_msg; - ul_dcch_msg.msg.set_c1().set_meas_report().crit_exts.set_c1().set_meas_report_r8(); - - meas_results_s* report = &ul_dcch_msg.msg.c1().meas_report().crit_exts.c1().meas_report_r8().meas_results; - - report->meas_id = (uint8_t)measId; - report->meas_result_pcell.rsrp_result = - value_to_range(report_cfg_eutra_s::trigger_quant_opts::rsrp, serv_cell->get_rsrp()); - report->meas_result_pcell.rsrq_result = - value_to_range(report_cfg_eutra_s::trigger_quant_opts::rsrq, serv_cell->get_rsrq()); - - log_h->info("MEAS: Generate report MeasId=%d, Pcell rsrp=%f rsrq=%f\n", - report->meas_id, - serv_cell->get_rsrp(), - serv_cell->get_rsrq()); - meas_result_list_eutra_l& neigh_list = report->meas_result_neigh_cells.set_meas_result_list_eutra(); var_meas_report& var_meas = varMeasReportList.at(measId); - // Todo generate report depending on the type - // sort cells by RSRP std::sort( var_meas.cell_triggered_list.begin(), var_meas.cell_triggered_list.end(), [this](phy_cell_t a, phy_cell_t b) { @@ -360,6 +340,137 @@ void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) meas_cfg->remove_measId(measId); } } +} +#ifdef HAVE_5GNR +void rrc::rrc_meas::var_meas_report_list::generate_report_interrat(meas_results_s* report, const uint32_t measId) +{ + + meas_result_cell_list_nr_r15_l& neigh_list = report->meas_result_neigh_cells.set_meas_result_neigh_cell_list_nr_r15(); + + var_meas_report& var_meas = varMeasReportList.at(measId); + + // sort cells by RSRP + std::sort( + var_meas.cell_triggered_list.begin(), var_meas.cell_triggered_list.end(), [this](phy_cell_t a, phy_cell_t b) { + return rrc_ptr->get_cell_rsrq_nr(a.earfcn, a.pci) > rrc_ptr->get_cell_rsrq_nr(b.earfcn, b.pci); + }); + + // set the measResultNeighCells to include the best neighbouring cells up to maxReportCells in accordance with + // the following + + for (auto& cell : var_meas.cell_triggered_list) { + + if (neigh_list.size() <= var_meas.report_cfg_inter.max_report_cells) { + meas_result_cell_nr_r15_s rc = {}; + + float rsrp_value = rrc_ptr->get_cell_rsrp_nr(var_meas.carrier_freq, cell.pci); + float rsrq_value = rrc_ptr->get_cell_rsrq_nr(var_meas.carrier_freq, cell.pci); + // float sinr_value = rrc_pts->get_cell_sinr_nr(var_meas.carrier_freq, cell.pci); TODO + rc.pci_r15 = (uint16_t)cell.pci; + + // Set quantity to report + if (var_meas.report_cfg_inter.report_quant_cell_nr_r15->ss_rsrp == true) { + rc.meas_result_cell_r15.rsrp_result_r15_present = true; + rc.meas_result_cell_r15.rsrp_result_r15 = + value_to_range_nr(asn1::rrc::thres_nr_r15_c::types_opts::options::nr_rsrp_r15, rsrp_value); + } + if (var_meas.report_cfg_inter.report_quant_cell_nr_r15->ss_rsrq == true) { + rc.meas_result_cell_r15.rsrq_result_r15_present = true; + rc.meas_result_cell_r15.rsrq_result_r15 = + value_to_range_nr(asn1::rrc::thres_nr_r15_c::types_opts::options::nr_rsrq_r15, rsrq_value); + } + if (var_meas.report_cfg_inter.report_quant_cell_nr_r15->ss_sinr == true) { + rc.meas_result_cell_r15.rs_sinr_result_r15_present = true; + rc.meas_result_cell_r15.rs_sinr_result_r15 = + value_to_range_nr(asn1::rrc::thres_nr_r15_c::types_opts::options::nr_sinr_r15, 1.0); + } + + log_h->info("MEAS: Adding to report neighbour=%d, pci=%d, earfcn=%d, rsrp=%+.1f, rsrq=%+.1f\n", + neigh_list.size(), + rc.pci_r15, + var_meas.carrier_freq, + rsrp_value, + rsrq_value); + + neigh_list.push_back(rc); + } + } + report->meas_result_neigh_cells_present = neigh_list.size() > 0; + + var_meas.nof_reports_sent++; + if (var_meas.periodic_timer.is_valid()) { + var_meas.periodic_timer.stop(); + } + + // if the numberOfReportsSent as defined within the VarMeasReportList for this measId is less than the + // reportAmount as defined within the corresponding reportConfig for this measId (also includes case where amount is + // infinity) + if (var_meas.nof_reports_sent < var_meas.report_cfg_inter.report_amount.to_number() || + var_meas.report_cfg_inter.report_amount.to_number() == -1) { + // start the periodical reporting timer with the value of reportInterval as defined within the corresponding + // reportConfig for this measId + if (var_meas.periodic_timer.is_valid()) { + var_meas.periodic_timer.run(); + } + } else { + if (var_meas.periodic_timer.is_valid()) { + var_meas.periodic_timer.clear(); + } + // else if the triggerType is set to ‘periodical’: + if (var_meas.report_cfg_inter.trigger_type.type().value == + report_cfg_inter_rat_s::trigger_type_c_::types::periodical) { + // remove the entry within the VarMeasReportList for this measId + remove_varmeas_report(measId); + meas_cfg->remove_measId(measId); + } + } +} +#endif +/* Generate report procedure 5.5.5 */ +void rrc::rrc_meas::var_meas_report_list::generate_report(const uint32_t measId) +{ + meas_cell_eutra* serv_cell = rrc_ptr->get_serving_cell(); + if (serv_cell == nullptr) { + log_h->warning("MEAS: Serving cell not set when evaluating triggers\n"); + return; + } + + ul_dcch_msg_s ul_dcch_msg; + ul_dcch_msg.msg.set_c1().set_meas_report().crit_exts.set_c1().set_meas_report_r8(); + + meas_results_s* report = &ul_dcch_msg.msg.c1().meas_report().crit_exts.c1().meas_report_r8().meas_results; + + report->meas_id = (uint8_t)measId; + report->meas_result_pcell.rsrp_result = + value_to_range(report_cfg_eutra_s::trigger_quant_opts::rsrp, serv_cell->get_rsrp()); + report->meas_result_pcell.rsrq_result = + value_to_range(report_cfg_eutra_s::trigger_quant_opts::rsrq, serv_cell->get_rsrq()); + + log_h->info("MEAS: Generate report MeasId=%d, Pcell rsrp=%f rsrq=%f\n", + report->meas_id, + serv_cell->get_rsrp(), + serv_cell->get_rsrq()); + + meas_result_list_eutra_l& neigh_list = report->meas_result_neigh_cells.set_meas_result_list_eutra(); + var_meas_report& var_meas = varMeasReportList.at(measId); + + switch (var_meas.report_type) { + case eutra: { + log_h->debug("MEAS: Generate EUTRA report\n"); + generate_report_eutra(report, measId); + break; + } +#ifdef HAVE_5GNR + case inter_rat: { + log_h->debug("MEAS: Generate INTER RAT NR report\n"); + generate_report_interrat(report, measId); + break; + } +#endif + default: + log_h->debug("MEAS: Not supported\n"); + break; + } // Send to lower layers rrc_ptr->send_srb1_msg(ul_dcch_msg); @@ -548,13 +659,14 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers_eutra(uint32_t meas } } +#ifdef HAVE_5GNR void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_check_new(int32_t meas_id, report_cfg_inter_rat_s& report_cfg, meas_obj_nr_r15_s& meas_obj) { bool new_cell_trigger = false; cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); - for (auto& cell : trigger_state[meas_id]) { + for (auto& cell : trigger_state_nr[meas_id]) { if (cell.second.is_enter_equal(report_cfg.trigger_type.event().time_to_trigger.to_number())) { // Do not add if already exists if (std::find_if(cells_triggered_list.begin(), cells_triggered_list.end(), [&cell](const phy_cell_t& c) { @@ -578,8 +690,55 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_check_new(int32_t } void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_check_leaving(int32_t meas_id, report_cfg_inter_rat_s& report_cfg) -{} -void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_removing_trigger(int32_t meas_id) {} +{ + // if the triggerType is set to ‘event’ and if the leaving condition applicable for this event is fulfilled ... + cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); + + // remove the concerned cell(s) in the cellsTriggeredList defined within the VarMeasReportList + auto it = cells_triggered_list.begin(); + while (it != cells_triggered_list.end()) { + if (trigger_state_nr[meas_id][it->pci].is_exit_equal(report_cfg.trigger_type.event().time_to_trigger.to_number())) { + it = cells_triggered_list.erase(it); + meas_report->upd_measId(meas_id, cells_triggered_list); + + // if reportOnLeave is set to TRUE for the corresponding reporting configuration + if (report_cfg.trigger_type.event().event_id.type() == + report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::types_opts::options::event_b1_nr_r15 && + report_cfg.trigger_type.event().event_id.event_b1_nr_r15().report_on_leave_r15 == true) { + // initiate the measurement reporting procedure, as specified in 5.5.5; + meas_report->generate_report(meas_id); + } + + // if the cellsTriggeredList defined within the VarMeasReportList for this measId is empty: + if (cells_triggered_list.empty()) { + remove_varmeas_report(meas_id); + } + } else { + it++; + } + } +} + +void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_removing_trigger(int32_t meas_id) +{ + // remove all cells in the cellsTriggeredList that are no neighbor cells anymore + cell_triggered_t cells_triggered_list = meas_report->get_measId_cells(meas_id); + auto it = cells_triggered_list.begin(); + while (it != cells_triggered_list.end()) { + if (not rrc_ptr->has_neighbour_cell_nr(it->earfcn, it->pci)) { + log_h->debug("MEAS: Removing unknown PCI=%d from event trigger list\n", it->pci); + it = cells_triggered_list.erase(it); + meas_report->upd_measId(meas_id, cells_triggered_list); + + // if the cellsTriggeredList defined within the VarMeasReportList for this measId is empty: + if (cells_triggered_list.empty()) { + remove_varmeas_report(meas_id); + } + } else { + it++; + } + } +} void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_nr(uint32_t meas_id, report_cfg_inter_rat_s& report_cfg, @@ -592,7 +751,7 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers_interrat_nr(uint32_t report_triggers_interrat_removing_trigger(meas_id); } } - +#endif void rrc::rrc_meas::var_meas_cfg::report_triggers() { // for each measId included in the measIdList within VarMeasConfig @@ -616,12 +775,16 @@ void rrc::rrc_meas::var_meas_cfg::report_triggers() if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_eutra && report_cfg.report_cfg.type().value == report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_eutra) { report_triggers_eutra(m.first, report_cfg.report_cfg.report_cfg_eutra(), meas_obj.meas_obj.meas_obj_eutra()); - } else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 && - report_cfg.report_cfg.type().value == - report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat) { + } +#ifdef HAVE_5GNR + else if (meas_obj.meas_obj.type().value == meas_obj_to_add_mod_s::meas_obj_c_::types_opts::meas_obj_nr_r15 && + report_cfg.report_cfg.type().value == + report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_inter_rat) { report_triggers_interrat_nr( m.first, report_cfg.report_cfg.report_cfg_inter_rat(), meas_obj.meas_obj.meas_obj_nr_r15()); - } else { + } +#endif + else { log_h->error("Unsupported combination of measurement object type %s and report config type %s \n", meas_obj.meas_obj.type().to_string().c_str(), report_cfg.report_cfg.type().to_string().c_str()); @@ -1138,8 +1301,6 @@ void rrc::rrc_meas::var_meas_cfg::measObject_addmod_nr_r15(const meas_obj_to_add meas_obj_nr_r15_s cfg_obj = l.meas_obj.meas_obj_nr_r15(); measObjectsList.at(l.meas_obj_id).meas_obj_id = l.meas_obj_id; meas_obj_nr_r15_s& local_obj = measObjectsList.at(l.meas_obj_id).meas_obj.meas_obj_nr_r15(); - - // if an entry with the matching measObjectId exists in the measObjectList within the VarMeasConfig if (entry_exists) { // Update carrier frequency0 From c8801578df3ec034e37ce4d18c3b325bbecb3d4c Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 16 Dec 2020 15:31:15 +0100 Subject: [PATCH 34/59] gw: use std::chrono for metrics and fix nan display * replace gettimeofday with std::chrono * fix nan printing when nof_tti is zero (at startup) --- srsue/hdr/stack/upper/gw.h | 2 +- srsue/src/stack/upper/gw.cc | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/srsue/hdr/stack/upper/gw.h b/srsue/hdr/stack/upper/gw.h index 83d0139cd..7ab7876e0 100644 --- a/srsue/hdr/stack/upper/gw.h +++ b/srsue/hdr/stack/upper/gw.h @@ -84,7 +84,7 @@ private: uint32_t ul_tput_bytes = 0; uint32_t dl_tput_bytes = 0; - struct timeval metrics_time[3]; + std::chrono::high_resolution_clock::time_point metrics_tp; // stores time when last metrics have been taken void run_thread(); int init_if(char* err_str); diff --git a/srsue/src/stack/upper/gw.cc b/srsue/src/stack/upper/gw.cc index 314132c9a..cc7714722 100644 --- a/srsue/src/stack/upper/gw.cc +++ b/srsue/src/stack/upper/gw.cc @@ -38,7 +38,7 @@ int gw::init(const gw_args_t& args_, srslte::logger* logger_, stack_interface_gw log.set_level(args.log.gw_level); log.set_hex_limit(args.log.gw_hex_limit); - gettimeofday(&metrics_time[1], NULL); + metrics_tp = std::chrono::high_resolution_clock::now(); // MBSFN mbsfn_sock_fd = socket(AF_INET, SOCK_DGRAM, 0); @@ -86,16 +86,14 @@ void gw::stop() void gw::get_metrics(gw_metrics_t& m, const uint32_t nof_tti) { - gettimeofday(&metrics_time[2], NULL); - get_time_interval(metrics_time); + std::chrono::duration secs = std::chrono::high_resolution_clock::now() - metrics_tp; - double secs = (double)metrics_time[0].tv_sec + metrics_time[0].tv_usec * 1e-6; - double dl_tput_mbps_real_time = (dl_tput_bytes * 8 / (double)1e6) / secs; - double ul_tput_mbps_real_time = (ul_tput_bytes * 8 / (double)1e6) / secs; + double dl_tput_mbps_real_time = (dl_tput_bytes * 8 / (double)1e6) / secs.count(); + double ul_tput_mbps_real_time = (ul_tput_bytes * 8 / (double)1e6) / secs.count(); // Use the provided TTI counter to compute rate for metrics interface - m.dl_tput_mbps = (dl_tput_bytes * 8 / (double)1e6) / (nof_tti / 1000.0); - m.ul_tput_mbps = (ul_tput_bytes * 8 / (double)1e6) / (nof_tti / 1000.0); + m.dl_tput_mbps = (nof_tti > 0) ? ((dl_tput_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; + m.ul_tput_mbps = (nof_tti > 0) ? ((ul_tput_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; log.info("gw_rx_rate_mbps=%4.2f (real=%4.2f), gw_tx_rate_mbps=%4.2f (real=%4.2f)\n", m.dl_tput_mbps, @@ -103,7 +101,8 @@ void gw::get_metrics(gw_metrics_t& m, const uint32_t nof_tti) m.ul_tput_mbps, ul_tput_mbps_real_time); - memcpy(&metrics_time[1], &metrics_time[2], sizeof(struct timeval)); + // reset counters and store time + metrics_tp = std::chrono::high_resolution_clock::now(); dl_tput_bytes = 0; ul_tput_bytes = 0; } From e43eab8b5f16529e442c9c907743fb332ef84fff Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 16 Dec 2020 15:32:37 +0100 Subject: [PATCH 35/59] rlc: fix rate metrics (nan,inf values), use std::chrono similar to GW, we remove gettimeofday and use std::chrono. we also make sure to reset the metrics after reestablishment --- lib/include/srslte/upper/rlc.h | 2 +- lib/src/upper/rlc.cc | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/include/srslte/upper/rlc.h b/lib/include/srslte/upper/rlc.h index 4fb685472..ffa576965 100644 --- a/lib/include/srslte/upper/rlc.h +++ b/lib/include/srslte/upper/rlc.h @@ -102,7 +102,7 @@ private: bsr_callback_t bsr_callback = nullptr; // Timer needed for metrics calculation - struct timeval metrics_time[3] = {}; + std::chrono::high_resolution_clock::time_point metrics_tp; bool valid_lcid(uint32_t lcid); bool valid_lcid_mrb(uint32_t lcid); diff --git a/lib/src/upper/rlc.cc b/lib/src/upper/rlc.cc index 4fde13711..cf1f10156 100644 --- a/lib/src/upper/rlc.cc +++ b/lib/src/upper/rlc.cc @@ -22,7 +22,6 @@ namespace srslte { rlc::rlc(const char* logname) : rlc_log(logname) { pool = byte_buffer_pool::get_instance(); - bzero(metrics_time, sizeof(metrics_time)); pthread_rwlock_init(&rwlock, NULL); } @@ -56,7 +55,6 @@ void rlc::init(srsue::pdcp_interface_rlc* pdcp_, timers = timers_; default_lcid = lcid_; - gettimeofday(&metrics_time[1], NULL); reset_metrics(); // create default RLC_TM bearer for SRB0 @@ -82,6 +80,8 @@ void rlc::reset_metrics() for (rlc_map_t::iterator it = rlc_array_mrb.begin(); it != rlc_array_mrb.end(); ++it) { it->second->reset_metrics(); } + + metrics_tp = std::chrono::high_resolution_clock::now(); } void rlc::stop() @@ -96,20 +96,23 @@ void rlc::stop() void rlc::get_metrics(rlc_metrics_t& m, const uint32_t nof_tti) { - gettimeofday(&metrics_time[2], NULL); - get_time_interval(metrics_time); - double secs = (double)metrics_time[0].tv_sec + metrics_time[0].tv_usec * 1e-6; + std::chrono::duration secs = std::chrono::high_resolution_clock::now() - metrics_tp; for (rlc_map_t::iterator it = rlc_array.begin(); it != rlc_array.end(); ++it) { rlc_bearer_metrics_t metrics = it->second->get_metrics(); + rlc_log->info("rx_rate_mbps: lcid=%d metrics.num_rx_pdu_bytes=%ld nof_tti=%d\n", + it->first, + metrics.num_rx_pdu_bytes, + nof_tti); + // Rx/Tx rate based on real time - double rx_rate_mbps_real_time = (metrics.num_rx_pdu_bytes * 8 / (double)1e6) / secs; - double tx_rate_mbps_real_time = (metrics.num_tx_pdu_bytes * 8 / (double)1e6) / secs; + double rx_rate_mbps_real_time = (metrics.num_rx_pdu_bytes * 8 / (double)1e6) / secs.count(); + double tx_rate_mbps_real_time = (metrics.num_tx_pdu_bytes * 8 / (double)1e6) / secs.count(); // Rx/Tx rate based on number of TTIs - double rx_rate_mbps = (metrics.num_rx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0); - double tx_rate_mbps = (metrics.num_tx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0); + double rx_rate_mbps = (nof_tti > 0) ? ((metrics.num_rx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; + double tx_rate_mbps = (nof_tti > 0) ? ((metrics.num_tx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; rlc_log->info("lcid=%d, rx_rate_mbps=%4.2f (real=%4.2f), tx_rate_mbps=%4.2f (real=%4.2f)\n", it->first, @@ -125,11 +128,10 @@ void rlc::get_metrics(rlc_metrics_t& m, const uint32_t nof_tti) rlc_bearer_metrics_t metrics = it->second->get_metrics(); rlc_log->info("MCH_LCID=%d, rx_rate_mbps=%4.2f\n", it->first, - (metrics.num_rx_pdu_bytes * 8 / static_cast(1e6)) / secs); + (metrics.num_rx_pdu_bytes * 8 / static_cast(1e6)) / secs.count()); m.bearer[it->first] = metrics; } - memcpy(&metrics_time[1], &metrics_time[2], sizeof(struct timeval)); reset_metrics(); } @@ -143,6 +145,8 @@ void rlc::reestablish() for (rlc_map_t::iterator it = rlc_array_mrb.begin(); it != rlc_array_mrb.end(); ++it) { it->second->reestablish(); } + + reset_metrics(); } // Reestablish a specific RLC bearer From 6803f48cc04448e1779172716fae8ea2c7260e76 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 16 Dec 2020 18:30:09 +0000 Subject: [PATCH 36/59] cell selection and reest rrc procedures were causing a callstack reentrancy problem. This issue was circumvented with a defer_task call --- srsue/src/stack/rrc/rrc_procedures.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/srsue/src/stack/rrc/rrc_procedures.cc b/srsue/src/stack/rrc/rrc_procedures.cc index f8996ead8..4e83716e8 100644 --- a/srsue/src/stack/rrc/rrc_procedures.cc +++ b/srsue/src/stack/rrc/rrc_procedures.cc @@ -679,11 +679,13 @@ void rrc::cell_selection_proc::then(const srslte::proc_result_t& pr { Info("Completed with %s.\n", proc_result.is_success() ? "success" : "failure"); // Inform Connection Request Procedure - if (rrc_ptr->conn_req_proc.is_busy()) { - rrc_ptr->conn_req_proc.trigger(proc_result); - } else if (rrc_ptr->connection_reest.is_busy()) { - rrc_ptr->connection_reest.trigger(proc_result); - } + rrc_ptr->task_sched.defer_task([this, proc_result]() { + if (rrc_ptr->conn_req_proc.is_busy()) { + rrc_ptr->conn_req_proc.trigger(proc_result); + } else if (rrc_ptr->connection_reest.is_busy()) { + rrc_ptr->connection_reest.trigger(proc_result); + } + }); } /************************************** From 1ea635f9ae29f39c919a7c443c826c1cc08ff9d8 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 16 Dec 2020 17:47:01 +0000 Subject: [PATCH 37/59] asn1 utils fix: avoid unpacking an unconstrained integer length twice --- lib/src/asn1/asn1_utils.cc | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/src/asn1/asn1_utils.cc b/lib/src/asn1/asn1_utils.cc index 55af5c2ce..d463817ec 100644 --- a/lib/src/asn1/asn1_utils.cc +++ b/lib/src/asn1/asn1_utils.cc @@ -689,7 +689,6 @@ IntType unconstrained_whole_number_length(IntType n) template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, IntType n, bool aligned) { - // TODO: Test uint32_t len = unconstrained_whole_number_length(n); if (aligned) { HANDLE_CODE(bref.align_bytes_zero()); @@ -699,11 +698,8 @@ SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, IntType n, bool align return SRSASN_SUCCESS; } template -SRSASN_CODE unpack_unconstrained_whole_number(IntType& n, cbit_ref& bref, bool aligned) +SRSASN_CODE unpack_unconstrained_whole_number(IntType& n, cbit_ref& bref, uint32_t len, bool aligned) { - // TODO: Test - uint32_t len; - HANDLE_CODE(unpack_length(len, bref, aligned)); if (aligned) { HANDLE_CODE(bref.align_bytes()); } @@ -715,18 +711,21 @@ template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, int8 template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, int16_t n, bool aligned); template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, int32_t n, bool aligned); template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, int64_t n, bool aligned); -template SRSASN_CODE unpack_unconstrained_whole_number(int8_t& n, cbit_ref& bref, bool aligned); -template SRSASN_CODE unpack_unconstrained_whole_number(int16_t& n, cbit_ref& bref, bool aligned); -template SRSASN_CODE unpack_unconstrained_whole_number(int32_t& n, cbit_ref& bref, bool aligned); -template SRSASN_CODE unpack_unconstrained_whole_number(int64_t& n, cbit_ref& bref, bool aligned); +template SRSASN_CODE unpack_unconstrained_whole_number(int8_t& n, cbit_ref& bref, uint32_t len, bool aligned); +template SRSASN_CODE unpack_unconstrained_whole_number(int16_t& n, cbit_ref& bref, uint32_t len, bool aligned); +template SRSASN_CODE unpack_unconstrained_whole_number(int32_t& n, cbit_ref& bref, uint32_t len, bool aligned); +template SRSASN_CODE unpack_unconstrained_whole_number(int64_t& n, cbit_ref& bref, uint32_t len, bool aligned); template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, uint8_t n, bool aligned); template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, uint16_t n, bool aligned); template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, uint32_t n, bool aligned); template SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, uint64_t n, bool aligned); -template SRSASN_CODE unpack_unconstrained_whole_number(uint8_t& n, cbit_ref& bref, bool aligned); -template SRSASN_CODE unpack_unconstrained_whole_number(uint16_t& n, cbit_ref& bref, bool aligned); -template SRSASN_CODE unpack_unconstrained_whole_number(uint32_t& n, cbit_ref& bref, bool aligned); -template SRSASN_CODE unpack_unconstrained_whole_number(uint64_t& n, cbit_ref& bref, bool aligned); +template SRSASN_CODE unpack_unconstrained_whole_number(uint8_t& n, cbit_ref& bref, uint32_t len, bool aligned); +template SRSASN_CODE +unpack_unconstrained_whole_number(uint16_t& n, cbit_ref& bref, uint32_t len, bool aligned); +template SRSASN_CODE +unpack_unconstrained_whole_number(uint32_t& n, cbit_ref& bref, uint32_t len, bool aligned); +template SRSASN_CODE +unpack_unconstrained_whole_number(uint64_t& n, cbit_ref& bref, uint32_t len, bool aligned); /********************* varlength_packing @@ -882,6 +881,7 @@ SRSASN_CODE pack_integer(bit_ref& bref, IntType n, IntType lb, IntType ub, bool // } HANDLE_CODE(pack_constrained_whole_number(bref, n, (IntType)lb, (IntType)ub, aligned)); } else { + // See X.691 - 12.2.6 if (not within_bounds or (not lower_bounded and not upper_bounded)) { HANDLE_CODE(pack_length(bref, unconstrained_whole_number_length(n), aligned)); HANDLE_CODE(pack_unconstrained_whole_number(bref, n, aligned)); @@ -939,10 +939,11 @@ SRSASN_CODE unpack_integer(IntType& n, cbit_ref& bref, IntType lb, IntType ub, b // TODO: Check if we are in the indefinite length case, and pack length prefix if needed HANDLE_CODE(unpack_constrained_whole_number(n, bref, (IntType)lb, (IntType)ub, aligned)); } else { + // See X.691 - 12.2.6 if (not within_bounds or (not lower_bounded and not upper_bounded)) { uint32_t len; HANDLE_CODE(unpack_length(len, bref, aligned)); - HANDLE_CODE(unpack_unconstrained_whole_number(n, bref, aligned)); // TODO + HANDLE_CODE(unpack_unconstrained_whole_number(n, bref, len, aligned)); } else { // pack as semi-constrained // TODO From 3662210842e44555f3b92a3409c3e4163b2bf406 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 11 Dec 2020 17:59:54 +0100 Subject: [PATCH 38/59] Fix external softbuffer inclusion --- lib/include/srslte/phy/fec/softbuffer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/include/srslte/phy/fec/softbuffer.h b/lib/include/srslte/phy/fec/softbuffer.h index a16a55962..c43b90ff7 100644 --- a/lib/include/srslte/phy/fec/softbuffer.h +++ b/lib/include/srslte/phy/fec/softbuffer.h @@ -23,6 +23,7 @@ #define SRSLTE_SOFTBUFFER_H #include "srslte/config.h" +#include #ifdef __cplusplus extern "C" { From 99ca2d2f147ccddc960aec8712860b58e964d200 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 11 Dec 2020 18:02:12 +0100 Subject: [PATCH 39/59] Add polar interleaver --- .../srslte/phy/fec/polar/polar_interleaver.h | 67 ++ lib/src/phy/fec/polar/CMakeLists.txt | 1 + lib/src/phy/fec/polar/polar_interleaver.c | 50 + lib/src/phy/fec/polar/test/CMakeLists.txt | 7 +- .../fec/polar/test/polar_interleaver_gold.h | 1042 +++++++++++++++++ .../fec/polar/test/polar_interleaver_test.c | 50 + 6 files changed, 1216 insertions(+), 1 deletion(-) create mode 100644 lib/include/srslte/phy/fec/polar/polar_interleaver.h create mode 100644 lib/src/phy/fec/polar/polar_interleaver.c create mode 100644 lib/src/phy/fec/polar/test/polar_interleaver_gold.h create mode 100644 lib/src/phy/fec/polar/test/polar_interleaver_test.c diff --git a/lib/include/srslte/phy/fec/polar/polar_interleaver.h b/lib/include/srslte/phy/fec/polar/polar_interleaver.h new file mode 100644 index 000000000..9638d45a0 --- /dev/null +++ b/lib/include/srslte/phy/fec/polar/polar_interleaver.h @@ -0,0 +1,67 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#ifndef SRSLTE_POLAR_INTERLEAVER_H +#define SRSLTE_POLAR_INTERLEAVER_H + +#include "srslte/config.h" +#include +#include + +#define SRSLTE_POLAR_INTERLEAVER_K_MAX_IL 164 + +/** + * * @brief Implements generic Polar code interleaver as described in TS 38.212 V15.9.0 Section 5.3.1.1 + * + * @attention The input and output data cannot be the same. + * + * @param in Input data pointer + * @param out Output data pointer + * @param S Data element size in bytes + * @param K Number of elements + * @param dir Set to true for encoder and false for decoder + */ +SRSLTE_API void srslte_polar_interleaver_run(const void* in, void* out, uint32_t S, uint32_t K, bool dir); + +#define SRSLTE_POLAR_INTERLEAVE_GEN(NAME, TYPE) \ + static inline void srslte_polar_interleaver_run_##NAME(const TYPE* in, void* out, uint32_t K, bool dir) \ + { \ + srslte_polar_interleaver_run(in, out, (uint32_t)sizeof(TYPE), K, dir); \ + } + +/** + * @brief Implements Polar code interleaver as described in TS 38.212 V15.9.0 Section 5.3.1.1 + * + * @attention The input and output data cannot be the same. + * + * @param in unsigned 16 bit Input data + * @param out unsigned 16 bit Output data + * @param K Number of elements + * @param dir Set to true for encoder and false for decoder + */ +SRSLTE_POLAR_INTERLEAVE_GEN(u16, uint16_t) + +/** + * @brief Implements Polar code interleaver as described in TS 38.212 V15.9.0 Section 5.3.1.1 + * + * @attention The input and output data cannot be the same. + * + * @param in unsigned 8 bit Input data + * @param out unsigned 8 bit Output data + * @param K Number of elements + * @param dir Set to true for encoder and false for decoder + */ +SRSLTE_POLAR_INTERLEAVE_GEN(u8, uint8_t) + +#undef SRSLTE_POLAR_INTERLEAVE_GEN + +#endif // SRSLTE_POLAR_INTERLEAVER_H diff --git a/lib/src/phy/fec/polar/CMakeLists.txt b/lib/src/phy/fec/polar/CMakeLists.txt index d65572433..729b1df19 100644 --- a/lib/src/phy/fec/polar/CMakeLists.txt +++ b/lib/src/phy/fec/polar/CMakeLists.txt @@ -25,6 +25,7 @@ set(FEC_SOURCES ${FEC_SOURCES} ${AVX2_SOURCES} polar/polar_decoder_ssc_s.c polar/polar_decoder_ssc_c.c polar/polar_decoder_vector.c + polar/polar_interleaver.c polar/polar_rm.c PARENT_SCOPE) diff --git a/lib/src/phy/fec/polar/polar_interleaver.c b/lib/src/phy/fec/polar/polar_interleaver.c new file mode 100644 index 000000000..af6041690 --- /dev/null +++ b/lib/src/phy/fec/polar/polar_interleaver.c @@ -0,0 +1,50 @@ +/** + * + * section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "srslte/phy/fec/polar/polar_interleaver.h" +#include "srslte/phy/utils/vector.h" +#include +#include + +// Table 5.3.1.1-1: Interleaving pattern +static const uint16_t polar_interleaver_pattern[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL] = { + 0, 2, 4, 7, 9, 14, 19, 20, 24, 25, 26, 28, 31, 34, 42, 45, 49, 50, 51, 53, 54, + 56, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 72, 76, 77, 81, 82, 83, 87, 88, 89, 91, + 93, 95, 98, 101, 104, 106, 108, 110, 111, 113, 115, 118, 119, 120, 122, 123, 126, 127, 129, 132, 134, + 138, 139, 140, 1, 3, 5, 8, 10, 15, 21, 27, 29, 32, 35, 43, 46, 52, 55, 57, 60, 63, + 68, 73, 78, 84, 90, 92, 94, 96, 99, 102, 105, 107, 109, 112, 114, 116, 121, 124, 128, 130, 133, + 135, 141, 6, 11, 16, 22, 30, 33, 36, 44, 47, 64, 74, 79, 85, 97, 100, 103, 117, 125, 131, + 136, 142, 12, 17, 23, 37, 48, 75, 80, 86, 137, 143, 13, 18, 38, 144, 39, 145, 40, 146, 41, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163}; + +void srslte_polar_interleaver_run(const void* in, void* out, uint32_t S, uint32_t K, bool dir) +{ + if (in == NULL || out == NULL) { + return; + } + + const uint8_t* in_ptr = (const uint8_t*)in; + uint8_t* out_ptr = (uint8_t*)out; + + uint32_t k = 0; + for (uint32_t m = 0; m < SRSLTE_POLAR_INTERLEAVER_K_MAX_IL; m++) { + if (polar_interleaver_pattern[m] >= SRSLTE_POLAR_INTERLEAVER_K_MAX_IL - K) { + uint32_t pi_k = polar_interleaver_pattern[m] - (SRSLTE_POLAR_INTERLEAVER_K_MAX_IL - K); + if (dir) { + memcpy(out_ptr + S * k, in_ptr + S * pi_k, S); + } else { + memcpy(out_ptr + S * pi_k, in_ptr + S * k, S); + } + k++; + } + } +} \ No newline at end of file diff --git a/lib/src/phy/fec/polar/test/CMakeLists.txt b/lib/src/phy/fec/polar/test/CMakeLists.txt index c44753a20..4d1fbd276 100644 --- a/lib/src/phy/fec/polar/test/CMakeLists.txt +++ b/lib/src/phy/fec/polar/test/CMakeLists.txt @@ -85,4 +85,9 @@ polar_tests_lite(-3) # Unit tests full set(test_name POLAR-UNIT-TEST) set(test_command polar_chain_test) -polar_tests(101) \ No newline at end of file +polar_tests(101) + +# Polar inter-leaver test +add_executable(polar_interleaver_test polar_interleaver_test.c) +target_link_libraries(polar_interleaver_test srslte_phy) +add_test(polar_interleaver_test polar_interleaver_test) \ No newline at end of file diff --git a/lib/src/phy/fec/polar/test/polar_interleaver_gold.h b/lib/src/phy/fec/polar/test/polar_interleaver_gold.h new file mode 100644 index 000000000..889997ef2 --- /dev/null +++ b/lib/src/phy/fec/polar/test/polar_interleaver_gold.h @@ -0,0 +1,1042 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +typedef struct { + int K; + int indexes[164]; +} polar_interleaver_gold_t; + +static const polar_interleaver_gold_t polar_interleaver_gold[] = { + {24, + { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + }}, + {25, + { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + }}, + {26, + { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + }}, + {27, + { + 1, 2, 3, 4, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + }}, + {28, + { + 2, 3, 4, 5, 0, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + }}, + {29, + { + 3, 4, 5, 0, 6, 1, 7, 2, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + }}, + {30, + { + 0, 4, 5, 6, 1, 7, 2, 8, 3, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + }}, + {31, + { + 1, 5, 6, 7, 0, 2, 8, 3, 9, 4, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + }}, + {32, + { + 0, 2, 6, 7, 8, 1, 3, 9, 4, 10, 5, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + }}, + {33, + { + 1, 3, 7, 8, 9, 2, 4, 10, 0, 5, 11, 6, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + }}, + {34, + { + 2, 4, 8, 9, 10, 0, 3, 5, 11, 1, 6, 12, 7, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + }}, + {35, + { + 0, 3, 5, 9, 10, 11, 1, 4, 6, 12, 2, 7, 13, 8, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + }}, + {36, + { + 1, 4, 6, 10, 11, 12, 0, 2, 5, 7, 13, 3, 8, 14, 9, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + }}, + {37, + { + 0, 2, 5, 7, 11, 12, 13, 1, 3, 6, 8, 14, 4, 9, 15, 10, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + }}, + {38, + { + 0, 1, 3, 6, 8, 12, 13, 14, 2, 4, 7, 9, 15, 5, 10, 16, 11, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + }}, + {39, + { + 1, 2, 4, 7, 9, 13, 14, 15, 3, 5, 8, 10, 16, 0, 6, 11, 17, 12, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + }}, + {40, + { + 2, 3, 5, 8, 10, 14, 15, 16, 0, 4, 6, 9, 11, 17, 1, 7, 12, 18, 13, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + }}, + {41, + { + 0, 3, 4, 6, 9, 11, 15, 16, 17, 1, 5, 7, 10, 12, 18, 2, 8, 13, 19, 14, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + }}, + {42, + { + 0, 1, 4, 5, 7, 10, 12, 16, 17, 18, 2, 6, 8, 11, 13, 19, 3, 9, 14, 20, 15, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + }}, + {43, + { + 1, 2, 5, 6, 8, 11, 13, 17, 18, 19, 0, 3, 7, 9, 12, 14, 20, 4, 10, 15, 21, 16, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + }}, + {44, + { + 0, 2, 3, 6, 7, 9, 12, 14, 18, 19, 20, 1, 4, 8, 10, 13, 15, 21, 5, 11, 16, 22, + 17, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + }}, + {45, + { + 0, 1, 3, 4, 7, 8, 10, 13, 15, 19, 20, 21, 2, 5, 9, 11, 14, 16, 22, 6, 12, 17, 23, + 18, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + }}, + {46, + { + 0, 1, 2, 4, 5, 8, 9, 11, 14, 16, 20, 21, 22, 3, 6, 10, 12, 15, 17, 23, 7, 13, 18, + 24, 19, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + }}, + {47, + { + 1, 2, 3, 5, 6, 9, 10, 12, 15, 17, 21, 22, 23, 4, 7, 11, 13, 16, 18, 24, 0, 8, 14, 19, + 25, 20, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + }}, + {48, + { + 2, 3, 4, 6, 7, 10, 11, 13, 16, 18, 22, 23, 24, 0, 5, 8, 12, 14, 17, 19, 25, 1, 9, 15, + 20, 26, 21, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + }}, + {49, + { + 0, 3, 4, 5, 7, 8, 11, 12, 14, 17, 19, 23, 24, 25, 1, 6, 9, 13, 15, 18, 20, 26, 2, 10, 16, + 21, 27, 22, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + }}, + {50, + { + 1, 4, 5, 6, 8, 9, 12, 13, 15, 18, 20, 24, 25, 26, 0, 2, 7, 10, 14, 16, 19, 21, 27, 3, 11, + 17, 22, 28, 23, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + }}, + {51, + { + 0, 2, 5, 6, 7, 9, 10, 13, 14, 16, 19, 21, 25, 26, 27, 1, 3, 8, 11, 15, 17, 20, 22, 28, 4, 12, + 18, 23, 29, 24, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + }}, + {52, + { + 1, 3, 6, 7, 8, 10, 11, 14, 15, 17, 20, 22, 26, 27, 28, 0, 2, 4, 9, 12, 16, 18, 21, 23, 29, 5, + 13, 19, 24, 30, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + }}, + {53, + { + 0, 2, 4, 7, 8, 9, 11, 12, 15, 16, 18, 21, 23, 27, 28, 29, 1, 3, 5, 10, 13, 17, 19, 22, 24, 30, 6, + 14, 20, 25, 31, 26, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + }}, + {54, + { + 0, 1, 3, 5, 8, 9, 10, 12, 13, 16, 17, 19, 22, 24, 28, 29, 30, 2, 4, 6, 11, 14, 18, 20, 23, 25, 31, + 7, 15, 21, 26, 32, 27, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + }}, + {55, + { + 1, 2, 4, 6, 9, 10, 11, 13, 14, 17, 18, 20, 23, 25, 29, 30, 31, 0, 3, 5, 7, 12, 15, 19, 21, 24, 26, 32, + 8, 16, 22, 27, 33, 28, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + }}, + {56, + { + 0, 2, 3, 5, 7, 10, 11, 12, 14, 15, 18, 19, 21, 24, 26, 30, 31, 32, 1, 4, 6, 8, 13, 16, 20, 22, 25, 27, + 33, 9, 17, 23, 28, 34, 29, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + }}, + {57, + { + 1, 3, 4, 6, 8, 11, 12, 13, 15, 16, 19, 20, 22, 25, 27, 31, 32, 33, 0, + 2, 5, 7, 9, 14, 17, 21, 23, 26, 28, 34, 10, 18, 24, 29, 35, 30, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + }}, + {58, + { + 0, 2, 4, 5, 7, 9, 12, 13, 14, 16, 17, 20, 21, 23, 26, 28, 32, 33, 34, 1, + 3, 6, 8, 10, 15, 18, 22, 24, 27, 29, 35, 11, 19, 25, 30, 36, 31, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + }}, + {59, + { + 1, 3, 5, 6, 8, 10, 13, 14, 15, 17, 18, 21, 22, 24, 27, 29, 33, 34, 35, 0, + 2, 4, 7, 9, 11, 16, 19, 23, 25, 28, 30, 36, 12, 20, 26, 31, 37, 32, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + }}, + {60, + { + 0, 2, 4, 6, 7, 9, 11, 14, 15, 16, 18, 19, 22, 23, 25, 28, 30, 34, 35, 36, + 1, 3, 5, 8, 10, 12, 17, 20, 24, 26, 29, 31, 37, 13, 21, 27, 32, 38, 33, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + }}, + {61, + { + 1, 3, 5, 7, 8, 10, 12, 15, 16, 17, 19, 20, 23, 24, 26, 29, 31, 35, 36, 37, 2, + 4, 6, 9, 11, 13, 18, 21, 25, 27, 30, 32, 38, 0, 14, 22, 28, 33, 39, 34, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + }}, + {62, + { + 2, 4, 6, 8, 9, 11, 13, 16, 17, 18, 20, 21, 24, 25, 27, 30, 32, 36, 37, 38, 0, + 3, 5, 7, 10, 12, 14, 19, 22, 26, 28, 31, 33, 39, 1, 15, 23, 29, 34, 40, 35, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + }}, + {63, + { + 0, 3, 5, 7, 9, 10, 12, 14, 17, 18, 19, 21, 22, 25, 26, 28, 31, 33, 37, 38, 39, + 1, 4, 6, 8, 11, 13, 15, 20, 23, 27, 29, 32, 34, 40, 2, 16, 24, 30, 35, 41, 36, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + }}, + {64, + { + 1, 4, 6, 8, 10, 11, 13, 15, 18, 19, 20, 22, 23, 26, 27, 29, 32, 34, 38, 39, 40, 2, + 5, 7, 9, 12, 14, 16, 21, 24, 28, 30, 33, 35, 41, 0, 3, 17, 25, 31, 36, 42, 37, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + }}, + {65, + { + 2, 5, 7, 9, 11, 12, 14, 16, 19, 20, 21, 23, 24, 27, 28, 30, 33, 35, 39, 40, 41, 0, + 3, 6, 8, 10, 13, 15, 17, 22, 25, 29, 31, 34, 36, 42, 1, 4, 18, 26, 32, 37, 43, 38, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + }}, + {66, + { + 0, 3, 6, 8, 10, 12, 13, 15, 17, 20, 21, 22, 24, 25, 28, 29, 31, 34, 36, 40, 41, 42, + 1, 4, 7, 9, 11, 14, 16, 18, 23, 26, 30, 32, 35, 37, 43, 2, 5, 19, 27, 33, 38, 44, + 39, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + }}, + {67, + { + 1, 4, 7, 9, 11, 13, 14, 16, 18, 21, 22, 23, 25, 26, 29, 30, 32, 35, 37, 41, 42, 43, 2, + 5, 8, 10, 12, 15, 17, 19, 24, 27, 31, 33, 36, 38, 44, 0, 3, 6, 20, 28, 34, 39, 45, 40, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + }}, + {68, + { + 2, 5, 8, 10, 12, 14, 15, 17, 19, 22, 23, 24, 26, 27, 30, 31, 33, 36, 38, 42, 43, 44, 0, + 3, 6, 9, 11, 13, 16, 18, 20, 25, 28, 32, 34, 37, 39, 45, 1, 4, 7, 21, 29, 35, 40, 46, + 41, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + }}, + {69, + { + 0, 3, 6, 9, 11, 13, 15, 16, 18, 20, 23, 24, 25, 27, 28, 31, 32, 34, 37, 39, 43, 44, 45, + 1, 4, 7, 10, 12, 14, 17, 19, 21, 26, 29, 33, 35, 38, 40, 46, 2, 5, 8, 22, 30, 36, 41, + 47, 42, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + }}, + {70, + { + 1, 4, 7, 10, 12, 14, 16, 17, 19, 21, 24, 25, 26, 28, 29, 32, 33, 35, 38, 40, 44, 45, 46, 0, + 2, 5, 8, 11, 13, 15, 18, 20, 22, 27, 30, 34, 36, 39, 41, 47, 3, 6, 9, 23, 31, 37, 42, 48, + 43, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + }}, + {71, + { + 0, 2, 5, 8, 11, 13, 15, 17, 18, 20, 22, 25, 26, 27, 29, 30, 33, 34, 36, 39, 41, 45, 46, 47, + 1, 3, 6, 9, 12, 14, 16, 19, 21, 23, 28, 31, 35, 37, 40, 42, 48, 4, 7, 10, 24, 32, 38, 43, + 49, 44, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + }}, + {72, + { + 1, 3, 6, 9, 12, 14, 16, 18, 19, 21, 23, 26, 27, 28, 30, 31, 34, 35, 37, 40, 42, 46, 47, 48, + 0, 2, 4, 7, 10, 13, 15, 17, 20, 22, 24, 29, 32, 36, 38, 41, 43, 49, 5, 8, 11, 25, 33, 39, + 44, 50, 45, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + }}, + {73, + { + 0, 2, 4, 7, 10, 13, 15, 17, 19, 20, 22, 24, 27, 28, 29, 31, 32, 35, 36, 38, 41, 43, 47, 48, 49, + 1, 3, 5, 8, 11, 14, 16, 18, 21, 23, 25, 30, 33, 37, 39, 42, 44, 50, 6, 9, 12, 26, 34, 40, 45, + 51, 46, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + }}, + {74, + { + 1, 3, 5, 8, 11, 14, 16, 18, 20, 21, 23, 25, 28, 29, 30, 32, 33, 36, 37, 39, 42, 44, 48, 49, 50, + 0, 2, 4, 6, 9, 12, 15, 17, 19, 22, 24, 26, 31, 34, 38, 40, 43, 45, 51, 7, 10, 13, 27, 35, 41, + 46, 52, 47, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + }}, + {75, + { + 0, 2, 4, 6, 9, 12, 15, 17, 19, 21, 22, 24, 26, 29, 30, 31, 33, 34, 37, 38, 40, 43, 45, 49, 50, + 51, 1, 3, 5, 7, 10, 13, 16, 18, 20, 23, 25, 27, 32, 35, 39, 41, 44, 46, 52, 8, 11, 14, 28, 36, + 42, 47, 53, 48, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + }}, + {76, + { + 0, 1, 3, 5, 7, 10, 13, 16, 18, 20, 22, 23, 25, 27, 30, 31, 32, 34, 35, 38, 39, 41, 44, 46, 50, 51, + 52, 2, 4, 6, 8, 11, 14, 17, 19, 21, 24, 26, 28, 33, 36, 40, 42, 45, 47, 53, 9, 12, 15, 29, 37, 43, + 48, 54, 49, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + }}, + {77, + { + 0, 1, 2, 4, 6, 8, 11, 14, 17, 19, 21, 23, 24, 26, 28, 31, 32, 33, 35, 36, 39, 40, 42, 45, 47, 51, + 52, 53, 3, 5, 7, 9, 12, 15, 18, 20, 22, 25, 27, 29, 34, 37, 41, 43, 46, 48, 54, 10, 13, 16, 30, 38, + 44, 49, 55, 50, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + }}, + {78, + { + 1, 2, 3, 5, 7, 9, 12, 15, 18, 20, 22, 24, 25, 27, 29, 32, 33, 34, 36, 37, 40, 41, 43, 46, 48, 52, + 53, 54, 4, 6, 8, 10, 13, 16, 19, 21, 23, 26, 28, 30, 35, 38, 42, 44, 47, 49, 55, 11, 14, 17, 31, 39, + 45, 50, 56, 0, 51, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + }}, + {79, + { + 2, 3, 4, 6, 8, 10, 13, 16, 19, 21, 23, 25, 26, 28, 30, 33, 34, 35, 37, 38, 41, 42, 44, 47, 49, 53, 54, + 55, 5, 7, 9, 11, 14, 17, 20, 22, 24, 27, 29, 31, 36, 39, 43, 45, 48, 50, 56, 0, 12, 15, 18, 32, 40, 46, + 51, 57, 1, 52, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + }}, + {80, + { + 3, 4, 5, 7, 9, 11, 14, 17, 20, 22, 24, 26, 27, 29, 31, 34, 35, 36, 38, 39, 42, 43, 45, 48, 50, 54, 55, + 56, 0, 6, 8, 10, 12, 15, 18, 21, 23, 25, 28, 30, 32, 37, 40, 44, 46, 49, 51, 57, 1, 13, 16, 19, 33, 41, + 47, 52, 58, 2, 53, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + }}, + {81, + { + 0, 4, 5, 6, 8, 10, 12, 15, 18, 21, 23, 25, 27, 28, 30, 32, 35, 36, 37, 39, 40, 43, 44, 46, 49, 51, 55, + 56, 57, 1, 7, 9, 11, 13, 16, 19, 22, 24, 26, 29, 31, 33, 38, 41, 45, 47, 50, 52, 58, 2, 14, 17, 20, 34, + 42, 48, 53, 59, 3, 54, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + }}, + {82, + { + 0, 1, 5, 6, 7, 9, 11, 13, 16, 19, 22, 24, 26, 28, 29, 31, 33, 36, 37, 38, 40, 41, 44, 45, 47, 50, 52, 56, + 57, 58, 2, 8, 10, 12, 14, 17, 20, 23, 25, 27, 30, 32, 34, 39, 42, 46, 48, 51, 53, 59, 3, 15, 18, 21, 35, 43, + 49, 54, 60, 4, 55, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + }}, + {83, + { + 0, 1, 2, 6, 7, 8, 10, 12, 14, 17, 20, 23, 25, 27, 29, 30, 32, 34, 37, 38, 39, 41, 42, 45, 46, 48, 51, 53, + 57, 58, 59, 3, 9, 11, 13, 15, 18, 21, 24, 26, 28, 31, 33, 35, 40, 43, 47, 49, 52, 54, 60, 4, 16, 19, 22, 36, + 44, 50, 55, 61, 5, 56, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + }}, + {84, + { + 1, 2, 3, 7, 8, 9, 11, 13, 15, 18, 21, 24, 26, 28, 30, 31, 33, 35, 38, 39, 40, 42, 43, 46, 47, 49, 52, 54, + 58, 59, 60, 4, 10, 12, 14, 16, 19, 22, 25, 27, 29, 32, 34, 36, 41, 44, 48, 50, 53, 55, 61, 5, 17, 20, 23, 37, + 45, 51, 56, 62, 0, 6, 57, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + }}, + {85, + { + 2, 3, 4, 8, 9, 10, 12, 14, 16, 19, 22, 25, 27, 29, 31, 32, 34, 36, 39, 40, 41, 43, + 44, 47, 48, 50, 53, 55, 59, 60, 61, 5, 11, 13, 15, 17, 20, 23, 26, 28, 30, 33, 35, 37, + 42, 45, 49, 51, 54, 56, 62, 0, 6, 18, 21, 24, 38, 46, 52, 57, 63, 1, 7, 58, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + }}, + {86, + { + 3, 4, 5, 9, 10, 11, 13, 15, 17, 20, 23, 26, 28, 30, 32, 33, 35, 37, 40, 41, 42, 44, + 45, 48, 49, 51, 54, 56, 60, 61, 62, 0, 6, 12, 14, 16, 18, 21, 24, 27, 29, 31, 34, 36, + 38, 43, 46, 50, 52, 55, 57, 63, 1, 7, 19, 22, 25, 39, 47, 53, 58, 64, 2, 8, 59, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + }}, + {87, + { + 0, 4, 5, 6, 10, 11, 12, 14, 16, 18, 21, 24, 27, 29, 31, 33, 34, 36, 38, 41, 42, 43, + 45, 46, 49, 50, 52, 55, 57, 61, 62, 63, 1, 7, 13, 15, 17, 19, 22, 25, 28, 30, 32, 35, + 37, 39, 44, 47, 51, 53, 56, 58, 64, 2, 8, 20, 23, 26, 40, 48, 54, 59, 65, 3, 9, 60, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + }}, + {88, + { + 0, 1, 5, 6, 7, 11, 12, 13, 15, 17, 19, 22, 25, 28, 30, 32, 34, 35, 37, 39, 42, 43, + 44, 46, 47, 50, 51, 53, 56, 58, 62, 63, 64, 2, 8, 14, 16, 18, 20, 23, 26, 29, 31, 33, + 36, 38, 40, 45, 48, 52, 54, 57, 59, 65, 3, 9, 21, 24, 27, 41, 49, 55, 60, 66, 4, 10, + 61, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + }}, + {89, + { + 1, 2, 6, 7, 8, 12, 13, 14, 16, 18, 20, 23, 26, 29, 31, 33, 35, 36, 38, 40, 43, 44, 45, + 47, 48, 51, 52, 54, 57, 59, 63, 64, 65, 3, 9, 15, 17, 19, 21, 24, 27, 30, 32, 34, 37, 39, + 41, 46, 49, 53, 55, 58, 60, 66, 4, 10, 22, 25, 28, 42, 50, 56, 61, 67, 0, 5, 11, 62, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + }}, + {90, + { + 2, 3, 7, 8, 9, 13, 14, 15, 17, 19, 21, 24, 27, 30, 32, 34, 36, 37, 39, 41, 44, 45, 46, + 48, 49, 52, 53, 55, 58, 60, 64, 65, 66, 4, 10, 16, 18, 20, 22, 25, 28, 31, 33, 35, 38, 40, + 42, 47, 50, 54, 56, 59, 61, 67, 0, 5, 11, 23, 26, 29, 43, 51, 57, 62, 68, 1, 6, 12, 63, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + }}, + {91, + { + 3, 4, 8, 9, 10, 14, 15, 16, 18, 20, 22, 25, 28, 31, 33, 35, 37, 38, 40, 42, 45, 46, 47, + 49, 50, 53, 54, 56, 59, 61, 65, 66, 67, 0, 5, 11, 17, 19, 21, 23, 26, 29, 32, 34, 36, 39, + 41, 43, 48, 51, 55, 57, 60, 62, 68, 1, 6, 12, 24, 27, 30, 44, 52, 58, 63, 69, 2, 7, 13, + 64, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + }}, + {92, + { + 0, 4, 5, 9, 10, 11, 15, 16, 17, 19, 21, 23, 26, 29, 32, 34, 36, 38, 39, 41, 43, 46, 47, + 48, 50, 51, 54, 55, 57, 60, 62, 66, 67, 68, 1, 6, 12, 18, 20, 22, 24, 27, 30, 33, 35, 37, + 40, 42, 44, 49, 52, 56, 58, 61, 63, 69, 2, 7, 13, 25, 28, 31, 45, 53, 59, 64, 70, 3, 8, + 14, 65, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + }}, + {93, + { + 0, 1, 5, 6, 10, 11, 12, 16, 17, 18, 20, 22, 24, 27, 30, 33, 35, 37, 39, 40, 42, 44, 47, 48, + 49, 51, 52, 55, 56, 58, 61, 63, 67, 68, 69, 2, 7, 13, 19, 21, 23, 25, 28, 31, 34, 36, 38, 41, + 43, 45, 50, 53, 57, 59, 62, 64, 70, 3, 8, 14, 26, 29, 32, 46, 54, 60, 65, 71, 4, 9, 15, 66, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + }}, + {94, + { + 0, 1, 2, 6, 7, 11, 12, 13, 17, 18, 19, 21, 23, 25, 28, 31, 34, 36, 38, 40, 41, 43, 45, 48, + 49, 50, 52, 53, 56, 57, 59, 62, 64, 68, 69, 70, 3, 8, 14, 20, 22, 24, 26, 29, 32, 35, 37, 39, + 42, 44, 46, 51, 54, 58, 60, 63, 65, 71, 4, 9, 15, 27, 30, 33, 47, 55, 61, 66, 72, 5, 10, 16, + 67, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + }}, + {95, + { + 0, 1, 2, 3, 7, 8, 12, 13, 14, 18, 19, 20, 22, 24, 26, 29, 32, 35, 37, 39, 41, 42, 44, 46, + 49, 50, 51, 53, 54, 57, 58, 60, 63, 65, 69, 70, 71, 4, 9, 15, 21, 23, 25, 27, 30, 33, 36, 38, + 40, 43, 45, 47, 52, 55, 59, 61, 64, 66, 72, 5, 10, 16, 28, 31, 34, 48, 56, 62, 67, 73, 6, 11, + 17, 68, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + }}, + {96, + { + 1, 2, 3, 4, 8, 9, 13, 14, 15, 19, 20, 21, 23, 25, 27, 30, 33, 36, 38, 40, 42, 43, 45, 47, + 50, 51, 52, 54, 55, 58, 59, 61, 64, 66, 70, 71, 72, 0, 5, 10, 16, 22, 24, 26, 28, 31, 34, 37, + 39, 41, 44, 46, 48, 53, 56, 60, 62, 65, 67, 73, 6, 11, 17, 29, 32, 35, 49, 57, 63, 68, 74, 7, + 12, 18, 69, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + }}, + {97, + { + 0, 2, 3, 4, 5, 9, 10, 14, 15, 16, 20, 21, 22, 24, 26, 28, 31, 34, 37, 39, 41, 43, 44, 46, 48, + 51, 52, 53, 55, 56, 59, 60, 62, 65, 67, 71, 72, 73, 1, 6, 11, 17, 23, 25, 27, 29, 32, 35, 38, 40, + 42, 45, 47, 49, 54, 57, 61, 63, 66, 68, 74, 7, 12, 18, 30, 33, 36, 50, 58, 64, 69, 75, 8, 13, 19, + 70, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + }}, + {98, + { + 0, 1, 3, 4, 5, 6, 10, 11, 15, 16, 17, 21, 22, 23, 25, 27, 29, 32, 35, 38, 40, 42, 44, 45, 47, + 49, 52, 53, 54, 56, 57, 60, 61, 63, 66, 68, 72, 73, 74, 2, 7, 12, 18, 24, 26, 28, 30, 33, 36, 39, + 41, 43, 46, 48, 50, 55, 58, 62, 64, 67, 69, 75, 8, 13, 19, 31, 34, 37, 51, 59, 65, 70, 76, 9, 14, + 20, 71, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + }}, + {99, + { + 0, 1, 2, 4, 5, 6, 7, 11, 12, 16, 17, 18, 22, 23, 24, 26, 28, 30, 33, 36, 39, 41, 43, 45, 46, + 48, 50, 53, 54, 55, 57, 58, 61, 62, 64, 67, 69, 73, 74, 75, 3, 8, 13, 19, 25, 27, 29, 31, 34, 37, + 40, 42, 44, 47, 49, 51, 56, 59, 63, 65, 68, 70, 76, 9, 14, 20, 32, 35, 38, 52, 60, 66, 71, 77, 10, + 15, 21, 72, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + }}, + {100, + { + 1, 2, 3, 5, 6, 7, 8, 12, 13, 17, 18, 19, 23, 24, 25, 27, 29, 31, 34, 37, 40, 42, 44, 46, 47, + 49, 51, 54, 55, 56, 58, 59, 62, 63, 65, 68, 70, 74, 75, 76, 4, 9, 14, 20, 26, 28, 30, 32, 35, 38, + 41, 43, 45, 48, 50, 52, 57, 60, 64, 66, 69, 71, 77, 0, 10, 15, 21, 33, 36, 39, 53, 61, 67, 72, 78, + 11, 16, 22, 73, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + }}, + {101, + { + 2, 3, 4, 6, 7, 8, 9, 13, 14, 18, 19, 20, 24, 25, 26, 28, 30, 32, 35, 38, 41, 43, 45, 47, 48, 50, + 52, 55, 56, 57, 59, 60, 63, 64, 66, 69, 71, 75, 76, 77, 0, 5, 10, 15, 21, 27, 29, 31, 33, 36, 39, 42, + 44, 46, 49, 51, 53, 58, 61, 65, 67, 70, 72, 78, 1, 11, 16, 22, 34, 37, 40, 54, 62, 68, 73, 79, 12, 17, + 23, 74, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + }}, + {102, + { + 0, 3, 4, 5, 7, 8, 9, 10, 14, 15, 19, 20, 21, 25, 26, 27, 29, 31, 33, 36, 39, 42, 44, 46, 48, 49, + 51, 53, 56, 57, 58, 60, 61, 64, 65, 67, 70, 72, 76, 77, 78, 1, 6, 11, 16, 22, 28, 30, 32, 34, 37, 40, + 43, 45, 47, 50, 52, 54, 59, 62, 66, 68, 71, 73, 79, 2, 12, 17, 23, 35, 38, 41, 55, 63, 69, 74, 80, 13, + 18, 24, 75, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + }}, + {103, + { + 0, 1, 4, 5, 6, 8, 9, 10, 11, 15, 16, 20, 21, 22, 26, 27, 28, 30, 32, 34, 37, 40, 43, 45, 47, 49, + 50, 52, 54, 57, 58, 59, 61, 62, 65, 66, 68, 71, 73, 77, 78, 79, 2, 7, 12, 17, 23, 29, 31, 33, 35, 38, + 41, 44, 46, 48, 51, 53, 55, 60, 63, 67, 69, 72, 74, 80, 3, 13, 18, 24, 36, 39, 42, 56, 64, 70, 75, 81, + 14, 19, 25, 76, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + }}, + {104, + { + 1, 2, 5, 6, 7, 9, 10, 11, 12, 16, 17, 21, 22, 23, 27, 28, 29, 31, 33, 35, 38, 41, 44, 46, 48, 50, + 51, 53, 55, 58, 59, 60, 62, 63, 66, 67, 69, 72, 74, 78, 79, 80, 0, 3, 8, 13, 18, 24, 30, 32, 34, 36, + 39, 42, 45, 47, 49, 52, 54, 56, 61, 64, 68, 70, 73, 75, 81, 4, 14, 19, 25, 37, 40, 43, 57, 65, 71, 76, + 82, 15, 20, 26, 77, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + }}, + {105, + { + 0, 2, 3, 6, 7, 8, 10, 11, 12, 13, 17, 18, 22, 23, 24, 28, 29, 30, 32, 34, 36, + 39, 42, 45, 47, 49, 51, 52, 54, 56, 59, 60, 61, 63, 64, 67, 68, 70, 73, 75, 79, 80, + 81, 1, 4, 9, 14, 19, 25, 31, 33, 35, 37, 40, 43, 46, 48, 50, 53, 55, 57, 62, 65, + 69, 71, 74, 76, 82, 5, 15, 20, 26, 38, 41, 44, 58, 66, 72, 77, 83, 16, 21, 27, 78, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + }}, + {106, + { + 0, 1, 3, 4, 7, 8, 9, 11, 12, 13, 14, 18, 19, 23, 24, 25, 29, 30, 31, 33, 35, 37, + 40, 43, 46, 48, 50, 52, 53, 55, 57, 60, 61, 62, 64, 65, 68, 69, 71, 74, 76, 80, 81, 82, + 2, 5, 10, 15, 20, 26, 32, 34, 36, 38, 41, 44, 47, 49, 51, 54, 56, 58, 63, 66, 70, 72, + 75, 77, 83, 6, 16, 21, 27, 39, 42, 45, 59, 67, 73, 78, 84, 17, 22, 28, 79, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + }}, + {107, + { + 1, 2, 4, 5, 8, 9, 10, 12, 13, 14, 15, 19, 20, 24, 25, 26, 30, 31, 32, 34, 36, 38, + 41, 44, 47, 49, 51, 53, 54, 56, 58, 61, 62, 63, 65, 66, 69, 70, 72, 75, 77, 81, 82, 83, + 0, 3, 6, 11, 16, 21, 27, 33, 35, 37, 39, 42, 45, 48, 50, 52, 55, 57, 59, 64, 67, 71, + 73, 76, 78, 84, 7, 17, 22, 28, 40, 43, 46, 60, 68, 74, 79, 85, 18, 23, 29, 80, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + }}, + {108, + { + 0, 2, 3, 5, 6, 9, 10, 11, 13, 14, 15, 16, 20, 21, 25, 26, 27, 31, 32, 33, 35, 37, + 39, 42, 45, 48, 50, 52, 54, 55, 57, 59, 62, 63, 64, 66, 67, 70, 71, 73, 76, 78, 82, 83, + 84, 1, 4, 7, 12, 17, 22, 28, 34, 36, 38, 40, 43, 46, 49, 51, 53, 56, 58, 60, 65, 68, + 72, 74, 77, 79, 85, 8, 18, 23, 29, 41, 44, 47, 61, 69, 75, 80, 86, 19, 24, 30, 81, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + }}, + {109, + { + 1, 3, 4, 6, 7, 10, 11, 12, 14, 15, 16, 17, 21, 22, 26, 27, 28, 32, 33, 34, 36, 38, + 40, 43, 46, 49, 51, 53, 55, 56, 58, 60, 63, 64, 65, 67, 68, 71, 72, 74, 77, 79, 83, 84, + 85, 0, 2, 5, 8, 13, 18, 23, 29, 35, 37, 39, 41, 44, 47, 50, 52, 54, 57, 59, 61, 66, + 69, 73, 75, 78, 80, 86, 9, 19, 24, 30, 42, 45, 48, 62, 70, 76, 81, 87, 20, 25, 31, 82, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + }}, + {110, + { + 0, 2, 4, 5, 7, 8, 11, 12, 13, 15, 16, 17, 18, 22, 23, 27, 28, 29, 33, 34, 35, 37, + 39, 41, 44, 47, 50, 52, 54, 56, 57, 59, 61, 64, 65, 66, 68, 69, 72, 73, 75, 78, 80, 84, + 85, 86, 1, 3, 6, 9, 14, 19, 24, 30, 36, 38, 40, 42, 45, 48, 51, 53, 55, 58, 60, 62, + 67, 70, 74, 76, 79, 81, 87, 10, 20, 25, 31, 43, 46, 49, 63, 71, 77, 82, 88, 21, 26, 32, + 83, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + }}, + {111, + { + 0, 1, 3, 5, 6, 8, 9, 12, 13, 14, 16, 17, 18, 19, 23, 24, 28, 29, 30, 34, 35, 36, 38, + 40, 42, 45, 48, 51, 53, 55, 57, 58, 60, 62, 65, 66, 67, 69, 70, 73, 74, 76, 79, 81, 85, 86, + 87, 2, 4, 7, 10, 15, 20, 25, 31, 37, 39, 41, 43, 46, 49, 52, 54, 56, 59, 61, 63, 68, 71, + 75, 77, 80, 82, 88, 11, 21, 26, 32, 44, 47, 50, 64, 72, 78, 83, 89, 22, 27, 33, 84, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + }}, + {112, + { + 1, 2, 4, 6, 7, 9, 10, 13, 14, 15, 17, 18, 19, 20, 24, 25, 29, 30, 31, 35, 36, 37, 39, + 41, 43, 46, 49, 52, 54, 56, 58, 59, 61, 63, 66, 67, 68, 70, 71, 74, 75, 77, 80, 82, 86, 87, + 88, 0, 3, 5, 8, 11, 16, 21, 26, 32, 38, 40, 42, 44, 47, 50, 53, 55, 57, 60, 62, 64, 69, + 72, 76, 78, 81, 83, 89, 12, 22, 27, 33, 45, 48, 51, 65, 73, 79, 84, 90, 23, 28, 34, 85, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + }}, + {113, + { + 0, 2, 3, 5, 7, 8, 10, 11, 14, 15, 16, 18, 19, 20, 21, 25, 26, 30, 31, 32, 36, 37, 38, + 40, 42, 44, 47, 50, 53, 55, 57, 59, 60, 62, 64, 67, 68, 69, 71, 72, 75, 76, 78, 81, 83, 87, + 88, 89, 1, 4, 6, 9, 12, 17, 22, 27, 33, 39, 41, 43, 45, 48, 51, 54, 56, 58, 61, 63, 65, + 70, 73, 77, 79, 82, 84, 90, 13, 23, 28, 34, 46, 49, 52, 66, 74, 80, 85, 91, 24, 29, 35, 86, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + }}, + {114, + { + 0, 1, 3, 4, 6, 8, 9, 11, 12, 15, 16, 17, 19, 20, 21, 22, 26, 27, 31, 32, 33, 37, 38, + 39, 41, 43, 45, 48, 51, 54, 56, 58, 60, 61, 63, 65, 68, 69, 70, 72, 73, 76, 77, 79, 82, 84, + 88, 89, 90, 2, 5, 7, 10, 13, 18, 23, 28, 34, 40, 42, 44, 46, 49, 52, 55, 57, 59, 62, 64, + 66, 71, 74, 78, 80, 83, 85, 91, 14, 24, 29, 35, 47, 50, 53, 67, 75, 81, 86, 92, 25, 30, 36, + 87, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + }}, + {115, + { + 0, 1, 2, 4, 5, 7, 9, 10, 12, 13, 16, 17, 18, 20, 21, 22, 23, 27, 28, 32, 33, 34, 38, + 39, 40, 42, 44, 46, 49, 52, 55, 57, 59, 61, 62, 64, 66, 69, 70, 71, 73, 74, 77, 78, 80, 83, + 85, 89, 90, 91, 3, 6, 8, 11, 14, 19, 24, 29, 35, 41, 43, 45, 47, 50, 53, 56, 58, 60, 63, + 65, 67, 72, 75, 79, 81, 84, 86, 92, 15, 25, 30, 36, 48, 51, 54, 68, 76, 82, 87, 93, 26, 31, + 37, 88, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + }}, + {116, + { + 1, 2, 3, 5, 6, 8, 10, 11, 13, 14, 17, 18, 19, 21, 22, 23, 24, 28, 29, 33, 34, 35, 39, 40, + 41, 43, 45, 47, 50, 53, 56, 58, 60, 62, 63, 65, 67, 70, 71, 72, 74, 75, 78, 79, 81, 84, 86, 90, + 91, 92, 4, 7, 9, 12, 15, 20, 25, 30, 36, 42, 44, 46, 48, 51, 54, 57, 59, 61, 64, 66, 68, 73, + 76, 80, 82, 85, 87, 93, 16, 26, 31, 37, 49, 52, 55, 69, 77, 83, 88, 94, 0, 27, 32, 38, 89, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + }}, + {117, + { + 2, 3, 4, 6, 7, 9, 11, 12, 14, 15, 18, 19, 20, 22, 23, 24, 25, 29, 30, 34, + 35, 36, 40, 41, 42, 44, 46, 48, 51, 54, 57, 59, 61, 63, 64, 66, 68, 71, 72, 73, + 75, 76, 79, 80, 82, 85, 87, 91, 92, 93, 5, 8, 10, 13, 16, 21, 26, 31, 37, 43, + 45, 47, 49, 52, 55, 58, 60, 62, 65, 67, 69, 74, 77, 81, 83, 86, 88, 94, 0, 17, + 27, 32, 38, 50, 53, 56, 70, 78, 84, 89, 95, 1, 28, 33, 39, 90, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + }}, + {118, + { + 3, 4, 5, 7, 8, 10, 12, 13, 15, 16, 19, 20, 21, 23, 24, 25, 26, 30, 31, 35, + 36, 37, 41, 42, 43, 45, 47, 49, 52, 55, 58, 60, 62, 64, 65, 67, 69, 72, 73, 74, + 76, 77, 80, 81, 83, 86, 88, 92, 93, 94, 0, 6, 9, 11, 14, 17, 22, 27, 32, 38, + 44, 46, 48, 50, 53, 56, 59, 61, 63, 66, 68, 70, 75, 78, 82, 84, 87, 89, 95, 1, + 18, 28, 33, 39, 51, 54, 57, 71, 79, 85, 90, 96, 2, 29, 34, 40, 91, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + }}, + {119, + { + 0, 4, 5, 6, 8, 9, 11, 13, 14, 16, 17, 20, 21, 22, 24, 25, 26, 27, 31, 32, + 36, 37, 38, 42, 43, 44, 46, 48, 50, 53, 56, 59, 61, 63, 65, 66, 68, 70, 73, 74, + 75, 77, 78, 81, 82, 84, 87, 89, 93, 94, 95, 1, 7, 10, 12, 15, 18, 23, 28, 33, + 39, 45, 47, 49, 51, 54, 57, 60, 62, 64, 67, 69, 71, 76, 79, 83, 85, 88, 90, 96, + 2, 19, 29, 34, 40, 52, 55, 58, 72, 80, 86, 91, 97, 3, 30, 35, 41, 92, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + }}, + {120, + { + 1, 5, 6, 7, 9, 10, 12, 14, 15, 17, 18, 21, 22, 23, 25, 26, 27, 28, 32, 33, + 37, 38, 39, 43, 44, 45, 47, 49, 51, 54, 57, 60, 62, 64, 66, 67, 69, 71, 74, 75, + 76, 78, 79, 82, 83, 85, 88, 90, 94, 95, 96, 2, 8, 11, 13, 16, 19, 24, 29, 34, + 40, 46, 48, 50, 52, 55, 58, 61, 63, 65, 68, 70, 72, 77, 80, 84, 86, 89, 91, 97, + 0, 3, 20, 30, 35, 41, 53, 56, 59, 73, 81, 87, 92, 98, 4, 31, 36, 42, 93, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + }}, + {121, + { + 2, 6, 7, 8, 10, 11, 13, 15, 16, 18, 19, 22, 23, 24, 26, 27, 28, 29, 33, 34, 38, + 39, 40, 44, 45, 46, 48, 50, 52, 55, 58, 61, 63, 65, 67, 68, 70, 72, 75, 76, 77, 79, + 80, 83, 84, 86, 89, 91, 95, 96, 97, 0, 3, 9, 12, 14, 17, 20, 25, 30, 35, 41, 47, + 49, 51, 53, 56, 59, 62, 64, 66, 69, 71, 73, 78, 81, 85, 87, 90, 92, 98, 1, 4, 21, + 31, 36, 42, 54, 57, 60, 74, 82, 88, 93, 99, 5, 32, 37, 43, 94, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + }}, + {122, + { + 0, 3, 7, 8, 9, 11, 12, 14, 16, 17, 19, 20, 23, 24, 25, 27, 28, 29, 30, 34, 35, + 39, 40, 41, 45, 46, 47, 49, 51, 53, 56, 59, 62, 64, 66, 68, 69, 71, 73, 76, 77, 78, + 80, 81, 84, 85, 87, 90, 92, 96, 97, 98, 1, 4, 10, 13, 15, 18, 21, 26, 31, 36, 42, + 48, 50, 52, 54, 57, 60, 63, 65, 67, 70, 72, 74, 79, 82, 86, 88, 91, 93, 99, 2, 5, + 22, 32, 37, 43, 55, 58, 61, 75, 83, 89, 94, 100, 6, 33, 38, 44, 95, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + }}, + {123, + { + 1, 4, 8, 9, 10, 12, 13, 15, 17, 18, 20, 21, 24, 25, 26, 28, 29, 30, 31, 35, 36, + 40, 41, 42, 46, 47, 48, 50, 52, 54, 57, 60, 63, 65, 67, 69, 70, 72, 74, 77, 78, 79, + 81, 82, 85, 86, 88, 91, 93, 97, 98, 99, 2, 5, 11, 14, 16, 19, 22, 27, 32, 37, 43, + 49, 51, 53, 55, 58, 61, 64, 66, 68, 71, 73, 75, 80, 83, 87, 89, 92, 94, 100, 3, 6, + 23, 33, 38, 44, 56, 59, 62, 76, 84, 90, 95, 101, 7, 34, 39, 45, 96, 102, 103, 104, 105, + 0, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + }}, + {124, + { + 2, 5, 9, 10, 11, 13, 14, 16, 18, 19, 21, 22, 25, 26, 27, 29, 30, 31, 32, 36, 37, + 41, 42, 43, 47, 48, 49, 51, 53, 55, 58, 61, 64, 66, 68, 70, 71, 73, 75, 78, 79, 80, + 82, 83, 86, 87, 89, 92, 94, 98, 99, 100, 3, 6, 12, 15, 17, 20, 23, 28, 33, 38, 44, + 50, 52, 54, 56, 59, 62, 65, 67, 69, 72, 74, 76, 81, 84, 88, 90, 93, 95, 101, 4, 7, + 24, 34, 39, 45, 57, 60, 63, 77, 85, 91, 96, 102, 8, 35, 40, 46, 97, 103, 104, 105, 0, + 106, 1, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + }}, + {125, + { + 3, 6, 10, 11, 12, 14, 15, 17, 19, 20, 22, 23, 26, 27, 28, 30, 31, 32, 33, 37, 38, + 42, 43, 44, 48, 49, 50, 52, 54, 56, 59, 62, 65, 67, 69, 71, 72, 74, 76, 79, 80, 81, + 83, 84, 87, 88, 90, 93, 95, 99, 100, 101, 4, 7, 13, 16, 18, 21, 24, 29, 34, 39, 45, + 51, 53, 55, 57, 60, 63, 66, 68, 70, 73, 75, 77, 82, 85, 89, 91, 94, 96, 102, 5, 8, + 25, 35, 40, 46, 58, 61, 64, 78, 86, 92, 97, 103, 9, 36, 41, 47, 98, 104, 105, 0, 106, + 1, 107, 2, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + }}, + {126, + { + 4, 7, 11, 12, 13, 15, 16, 18, 20, 21, 23, 24, 27, 28, 29, 31, 32, 33, 34, 38, 39, + 43, 44, 45, 49, 50, 51, 53, 55, 57, 60, 63, 66, 68, 70, 72, 73, 75, 77, 80, 81, 82, + 84, 85, 88, 89, 91, 94, 96, 100, 101, 102, 5, 8, 14, 17, 19, 22, 25, 30, 35, 40, 46, + 52, 54, 56, 58, 61, 64, 67, 69, 71, 74, 76, 78, 83, 86, 90, 92, 95, 97, 103, 6, 9, + 26, 36, 41, 47, 59, 62, 65, 79, 87, 93, 98, 104, 10, 37, 42, 48, 99, 105, 0, 106, 1, + 107, 2, 108, 3, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + }}, + {127, + { + 5, 8, 12, 13, 14, 16, 17, 19, 21, 22, 24, 25, 28, 29, 30, 32, 33, 34, 35, 39, 40, 44, + 45, 46, 50, 51, 52, 54, 56, 58, 61, 64, 67, 69, 71, 73, 74, 76, 78, 81, 82, 83, 85, 86, + 89, 90, 92, 95, 97, 101, 102, 103, 6, 9, 15, 18, 20, 23, 26, 31, 36, 41, 47, 53, 55, 57, + 59, 62, 65, 68, 70, 72, 75, 77, 79, 84, 87, 91, 93, 96, 98, 104, 7, 10, 27, 37, 42, 48, + 60, 63, 66, 80, 88, 94, 99, 105, 0, 11, 38, 43, 49, 100, 106, 1, 107, 2, 108, 3, 109, 4, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + }}, + {128, + { + 6, 9, 13, 14, 15, 17, 18, 20, 22, 23, 25, 26, 29, 30, 31, 33, 34, 35, 36, 40, 41, 45, + 46, 47, 51, 52, 53, 55, 57, 59, 62, 65, 68, 70, 72, 74, 75, 77, 79, 82, 83, 84, 86, 87, + 90, 91, 93, 96, 98, 102, 103, 104, 7, 10, 16, 19, 21, 24, 27, 32, 37, 42, 48, 54, 56, 58, + 60, 63, 66, 69, 71, 73, 76, 78, 80, 85, 88, 92, 94, 97, 99, 105, 0, 8, 11, 28, 38, 43, + 49, 61, 64, 67, 81, 89, 95, 100, 106, 1, 12, 39, 44, 50, 101, 107, 2, 108, 3, 109, 4, 110, + 5, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + }}, + {129, + { + 7, 10, 14, 15, 16, 18, 19, 21, 23, 24, 26, 27, 30, 31, 32, 34, 35, 36, 37, 41, 42, 46, + 47, 48, 52, 53, 54, 56, 58, 60, 63, 66, 69, 71, 73, 75, 76, 78, 80, 83, 84, 85, 87, 88, + 91, 92, 94, 97, 99, 103, 104, 105, 0, 8, 11, 17, 20, 22, 25, 28, 33, 38, 43, 49, 55, 57, + 59, 61, 64, 67, 70, 72, 74, 77, 79, 81, 86, 89, 93, 95, 98, 100, 106, 1, 9, 12, 29, 39, + 44, 50, 62, 65, 68, 82, 90, 96, 101, 107, 2, 13, 40, 45, 51, 102, 108, 3, 109, 4, 110, 5, + 111, 6, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + }}, + {130, + { + 0, 8, 11, 15, 16, 17, 19, 20, 22, 24, 25, 27, 28, 31, 32, 33, 35, 36, 37, 38, 42, 43, + 47, 48, 49, 53, 54, 55, 57, 59, 61, 64, 67, 70, 72, 74, 76, 77, 79, 81, 84, 85, 86, 88, + 89, 92, 93, 95, 98, 100, 104, 105, 106, 1, 9, 12, 18, 21, 23, 26, 29, 34, 39, 44, 50, 56, + 58, 60, 62, 65, 68, 71, 73, 75, 78, 80, 82, 87, 90, 94, 96, 99, 101, 107, 2, 10, 13, 30, + 40, 45, 51, 63, 66, 69, 83, 91, 97, 102, 108, 3, 14, 41, 46, 52, 103, 109, 4, 110, 5, 111, + 6, 112, 7, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + }}, + {131, + { + 1, 9, 12, 16, 17, 18, 20, 21, 23, 25, 26, 28, 29, 32, 33, 34, 36, 37, 38, 39, 43, 44, + 48, 49, 50, 54, 55, 56, 58, 60, 62, 65, 68, 71, 73, 75, 77, 78, 80, 82, 85, 86, 87, 89, + 90, 93, 94, 96, 99, 101, 105, 106, 107, 2, 10, 13, 19, 22, 24, 27, 30, 35, 40, 45, 51, 57, + 59, 61, 63, 66, 69, 72, 74, 76, 79, 81, 83, 88, 91, 95, 97, 100, 102, 108, 0, 3, 11, 14, + 31, 41, 46, 52, 64, 67, 70, 84, 92, 98, 103, 109, 4, 15, 42, 47, 53, 104, 110, 5, 111, 6, + 112, 7, 113, 8, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + }}, + {132, + { + 2, 10, 13, 17, 18, 19, 21, 22, 24, 26, 27, 29, 30, 33, 34, 35, 37, 38, 39, 40, 44, 45, + 49, 50, 51, 55, 56, 57, 59, 61, 63, 66, 69, 72, 74, 76, 78, 79, 81, 83, 86, 87, 88, 90, + 91, 94, 95, 97, 100, 102, 106, 107, 108, 0, 3, 11, 14, 20, 23, 25, 28, 31, 36, 41, 46, 52, + 58, 60, 62, 64, 67, 70, 73, 75, 77, 80, 82, 84, 89, 92, 96, 98, 101, 103, 109, 1, 4, 12, + 15, 32, 42, 47, 53, 65, 68, 71, 85, 93, 99, 104, 110, 5, 16, 43, 48, 54, 105, 111, 6, 112, + 7, 113, 8, 114, 9, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + }}, + {133, + { + 0, 3, 11, 14, 18, 19, 20, 22, 23, 25, 27, 28, 30, 31, 34, 35, 36, 38, 39, 40, 41, 45, 46, + 50, 51, 52, 56, 57, 58, 60, 62, 64, 67, 70, 73, 75, 77, 79, 80, 82, 84, 87, 88, 89, 91, 92, + 95, 96, 98, 101, 103, 107, 108, 109, 1, 4, 12, 15, 21, 24, 26, 29, 32, 37, 42, 47, 53, 59, 61, + 63, 65, 68, 71, 74, 76, 78, 81, 83, 85, 90, 93, 97, 99, 102, 104, 110, 2, 5, 13, 16, 33, 43, + 48, 54, 66, 69, 72, 86, 94, 100, 105, 111, 6, 17, 44, 49, 55, 106, 112, 7, 113, 8, 114, 9, 115, + 10, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + }}, + {134, + { + 1, 4, 12, 15, 19, 20, 21, 23, 24, 26, 28, 29, 31, 32, 35, 36, 37, 39, 40, 41, 42, 46, 47, + 51, 52, 53, 57, 58, 59, 61, 63, 65, 68, 71, 74, 76, 78, 80, 81, 83, 85, 88, 89, 90, 92, 93, + 96, 97, 99, 102, 104, 108, 109, 110, 2, 5, 13, 16, 22, 25, 27, 30, 33, 38, 43, 48, 54, 60, 62, + 64, 66, 69, 72, 75, 77, 79, 82, 84, 86, 91, 94, 98, 100, 103, 105, 111, 0, 3, 6, 14, 17, 34, + 44, 49, 55, 67, 70, 73, 87, 95, 101, 106, 112, 7, 18, 45, 50, 56, 107, 113, 8, 114, 9, 115, 10, + 116, 11, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + }}, + {135, + { + 2, 5, 13, 16, 20, 21, 22, 24, 25, 27, 29, 30, 32, 33, 36, 37, 38, 40, 41, 42, + 43, 47, 48, 52, 53, 54, 58, 59, 60, 62, 64, 66, 69, 72, 75, 77, 79, 81, 82, 84, + 86, 89, 90, 91, 93, 94, 97, 98, 100, 103, 105, 109, 110, 111, 0, 3, 6, 14, 17, 23, + 26, 28, 31, 34, 39, 44, 49, 55, 61, 63, 65, 67, 70, 73, 76, 78, 80, 83, 85, 87, + 92, 95, 99, 101, 104, 106, 112, 1, 4, 7, 15, 18, 35, 45, 50, 56, 68, 71, 74, 88, + 96, 102, 107, 113, 8, 19, 46, 51, 57, 108, 114, 9, 115, 10, 116, 11, 117, 12, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + }}, + {136, + { + 0, 3, 6, 14, 17, 21, 22, 23, 25, 26, 28, 30, 31, 33, 34, 37, 38, 39, 41, 42, + 43, 44, 48, 49, 53, 54, 55, 59, 60, 61, 63, 65, 67, 70, 73, 76, 78, 80, 82, 83, + 85, 87, 90, 91, 92, 94, 95, 98, 99, 101, 104, 106, 110, 111, 112, 1, 4, 7, 15, 18, + 24, 27, 29, 32, 35, 40, 45, 50, 56, 62, 64, 66, 68, 71, 74, 77, 79, 81, 84, 86, + 88, 93, 96, 100, 102, 105, 107, 113, 2, 5, 8, 16, 19, 36, 46, 51, 57, 69, 72, 75, + 89, 97, 103, 108, 114, 9, 20, 47, 52, 58, 109, 115, 10, 116, 11, 117, 12, 118, 13, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + }}, + {137, + { + 1, 4, 7, 15, 18, 22, 23, 24, 26, 27, 29, 31, 32, 34, 35, 38, 39, 40, 42, 43, + 44, 45, 49, 50, 54, 55, 56, 60, 61, 62, 64, 66, 68, 71, 74, 77, 79, 81, 83, 84, + 86, 88, 91, 92, 93, 95, 96, 99, 100, 102, 105, 107, 111, 112, 113, 0, 2, 5, 8, 16, + 19, 25, 28, 30, 33, 36, 41, 46, 51, 57, 63, 65, 67, 69, 72, 75, 78, 80, 82, 85, + 87, 89, 94, 97, 101, 103, 106, 108, 114, 3, 6, 9, 17, 20, 37, 47, 52, 58, 70, 73, + 76, 90, 98, 104, 109, 115, 10, 21, 48, 53, 59, 110, 116, 11, 117, 12, 118, 13, 119, 14, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + }}, + {138, + { + 0, 2, 5, 8, 16, 19, 23, 24, 25, 27, 28, 30, 32, 33, 35, 36, 39, 40, 41, 43, + 44, 45, 46, 50, 51, 55, 56, 57, 61, 62, 63, 65, 67, 69, 72, 75, 78, 80, 82, 84, + 85, 87, 89, 92, 93, 94, 96, 97, 100, 101, 103, 106, 108, 112, 113, 114, 1, 3, 6, 9, + 17, 20, 26, 29, 31, 34, 37, 42, 47, 52, 58, 64, 66, 68, 70, 73, 76, 79, 81, 83, + 86, 88, 90, 95, 98, 102, 104, 107, 109, 115, 4, 7, 10, 18, 21, 38, 48, 53, 59, 71, + 74, 77, 91, 99, 105, 110, 116, 11, 22, 49, 54, 60, 111, 117, 12, 118, 13, 119, 14, 120, + 15, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + }}, + {139, + { + 0, 1, 3, 6, 9, 17, 20, 24, 25, 26, 28, 29, 31, 33, 34, 36, 37, 40, 41, 42, + 44, 45, 46, 47, 51, 52, 56, 57, 58, 62, 63, 64, 66, 68, 70, 73, 76, 79, 81, 83, + 85, 86, 88, 90, 93, 94, 95, 97, 98, 101, 102, 104, 107, 109, 113, 114, 115, 2, 4, 7, + 10, 18, 21, 27, 30, 32, 35, 38, 43, 48, 53, 59, 65, 67, 69, 71, 74, 77, 80, 82, + 84, 87, 89, 91, 96, 99, 103, 105, 108, 110, 116, 5, 8, 11, 19, 22, 39, 49, 54, 60, + 72, 75, 78, 92, 100, 106, 111, 117, 12, 23, 50, 55, 61, 112, 118, 13, 119, 14, 120, 15, + 121, 16, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + }}, + {140, + { + 0, 1, 2, 4, 7, 10, 18, 21, 25, 26, 27, 29, 30, 32, 34, 35, 37, 38, 41, 42, + 43, 45, 46, 47, 48, 52, 53, 57, 58, 59, 63, 64, 65, 67, 69, 71, 74, 77, 80, 82, + 84, 86, 87, 89, 91, 94, 95, 96, 98, 99, 102, 103, 105, 108, 110, 114, 115, 116, 3, 5, + 8, 11, 19, 22, 28, 31, 33, 36, 39, 44, 49, 54, 60, 66, 68, 70, 72, 75, 78, 81, + 83, 85, 88, 90, 92, 97, 100, 104, 106, 109, 111, 117, 6, 9, 12, 20, 23, 40, 50, 55, + 61, 73, 76, 79, 93, 101, 107, 112, 118, 13, 24, 51, 56, 62, 113, 119, 14, 120, 15, 121, + 16, 122, 17, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + }}, + {141, + { + 1, 2, 3, 5, 8, 11, 19, 22, 26, 27, 28, 30, 31, 33, 35, 36, 38, 39, 42, 43, 44, + 46, 47, 48, 49, 53, 54, 58, 59, 60, 64, 65, 66, 68, 70, 72, 75, 78, 81, 83, 85, 87, + 88, 90, 92, 95, 96, 97, 99, 100, 103, 104, 106, 109, 111, 115, 116, 117, 4, 6, 9, 12, 20, + 23, 29, 32, 34, 37, 40, 45, 50, 55, 61, 67, 69, 71, 73, 76, 79, 82, 84, 86, 89, 91, + 93, 98, 101, 105, 107, 110, 112, 118, 7, 10, 13, 21, 24, 41, 51, 56, 62, 74, 77, 80, 94, + 102, 108, 113, 119, 0, 14, 25, 52, 57, 63, 114, 120, 15, 121, 16, 122, 17, 123, 18, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + }}, + {142, + { + 2, 3, 4, 6, 9, 12, 20, 23, 27, 28, 29, 31, 32, 34, 36, 37, 39, 40, 43, 44, 45, + 47, 48, 49, 50, 54, 55, 59, 60, 61, 65, 66, 67, 69, 71, 73, 76, 79, 82, 84, 86, 88, + 89, 91, 93, 96, 97, 98, 100, 101, 104, 105, 107, 110, 112, 116, 117, 118, 5, 7, 10, 13, 21, + 24, 30, 33, 35, 38, 41, 46, 51, 56, 62, 68, 70, 72, 74, 77, 80, 83, 85, 87, 90, 92, + 94, 99, 102, 106, 108, 111, 113, 119, 0, 8, 11, 14, 22, 25, 42, 52, 57, 63, 75, 78, 81, + 95, 103, 109, 114, 120, 1, 15, 26, 53, 58, 64, 115, 121, 16, 122, 17, 123, 18, 124, 19, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + }}, + {143, + { + 3, 4, 5, 7, 10, 13, 21, 24, 28, 29, 30, 32, 33, 35, 37, 38, 40, 41, 44, 45, 46, + 48, 49, 50, 51, 55, 56, 60, 61, 62, 66, 67, 68, 70, 72, 74, 77, 80, 83, 85, 87, 89, + 90, 92, 94, 97, 98, 99, 101, 102, 105, 106, 108, 111, 113, 117, 118, 119, 0, 6, 8, 11, 14, + 22, 25, 31, 34, 36, 39, 42, 47, 52, 57, 63, 69, 71, 73, 75, 78, 81, 84, 86, 88, 91, + 93, 95, 100, 103, 107, 109, 112, 114, 120, 1, 9, 12, 15, 23, 26, 43, 53, 58, 64, 76, 79, + 82, 96, 104, 110, 115, 121, 2, 16, 27, 54, 59, 65, 116, 122, 17, 123, 18, 124, 19, 125, 20, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + }}, + {144, + { + 0, 4, 5, 6, 8, 11, 14, 22, 25, 29, 30, 31, 33, 34, 36, 38, 39, 41, 42, 45, 46, + 47, 49, 50, 51, 52, 56, 57, 61, 62, 63, 67, 68, 69, 71, 73, 75, 78, 81, 84, 86, 88, + 90, 91, 93, 95, 98, 99, 100, 102, 103, 106, 107, 109, 112, 114, 118, 119, 120, 1, 7, 9, 12, + 15, 23, 26, 32, 35, 37, 40, 43, 48, 53, 58, 64, 70, 72, 74, 76, 79, 82, 85, 87, 89, + 92, 94, 96, 101, 104, 108, 110, 113, 115, 121, 2, 10, 13, 16, 24, 27, 44, 54, 59, 65, 77, + 80, 83, 97, 105, 111, 116, 122, 3, 17, 28, 55, 60, 66, 117, 123, 18, 124, 19, 125, 20, 126, + 21, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + }}, + {145, + { + 0, 1, 5, 6, 7, 9, 12, 15, 23, 26, 30, 31, 32, 34, 35, 37, 39, 40, 42, 43, 46, + 47, 48, 50, 51, 52, 53, 57, 58, 62, 63, 64, 68, 69, 70, 72, 74, 76, 79, 82, 85, 87, + 89, 91, 92, 94, 96, 99, 100, 101, 103, 104, 107, 108, 110, 113, 115, 119, 120, 121, 2, 8, 10, + 13, 16, 24, 27, 33, 36, 38, 41, 44, 49, 54, 59, 65, 71, 73, 75, 77, 80, 83, 86, 88, + 90, 93, 95, 97, 102, 105, 109, 111, 114, 116, 122, 3, 11, 14, 17, 25, 28, 45, 55, 60, 66, + 78, 81, 84, 98, 106, 112, 117, 123, 4, 18, 29, 56, 61, 67, 118, 124, 19, 125, 20, 126, 21, + 127, 22, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + }}, + {146, + { + 1, 2, 6, 7, 8, 10, 13, 16, 24, 27, 31, 32, 33, 35, 36, 38, 40, 41, 43, 44, 47, + 48, 49, 51, 52, 53, 54, 58, 59, 63, 64, 65, 69, 70, 71, 73, 75, 77, 80, 83, 86, 88, + 90, 92, 93, 95, 97, 100, 101, 102, 104, 105, 108, 109, 111, 114, 116, 120, 121, 122, 3, 9, 11, + 14, 17, 25, 28, 34, 37, 39, 42, 45, 50, 55, 60, 66, 72, 74, 76, 78, 81, 84, 87, 89, + 91, 94, 96, 98, 103, 106, 110, 112, 115, 117, 123, 4, 12, 15, 18, 26, 29, 46, 56, 61, 67, + 79, 82, 85, 99, 107, 113, 118, 124, 5, 19, 30, 57, 62, 68, 119, 125, 0, 20, 126, 21, 127, + 22, 128, 23, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + }}, + {147, + { + 2, 3, 7, 8, 9, 11, 14, 17, 25, 28, 32, 33, 34, 36, 37, 39, 41, 42, 44, 45, 48, + 49, 50, 52, 53, 54, 55, 59, 60, 64, 65, 66, 70, 71, 72, 74, 76, 78, 81, 84, 87, 89, + 91, 93, 94, 96, 98, 101, 102, 103, 105, 106, 109, 110, 112, 115, 117, 121, 122, 123, 4, 10, 12, + 15, 18, 26, 29, 35, 38, 40, 43, 46, 51, 56, 61, 67, 73, 75, 77, 79, 82, 85, 88, 90, + 92, 95, 97, 99, 104, 107, 111, 113, 116, 118, 124, 5, 13, 16, 19, 27, 30, 47, 57, 62, 68, + 80, 83, 86, 100, 108, 114, 119, 125, 0, 6, 20, 31, 58, 63, 69, 120, 126, 1, 21, 127, 22, + 128, 23, 129, 24, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + }}, + {148, + { + 3, 4, 8, 9, 10, 12, 15, 18, 26, 29, 33, 34, 35, 37, 38, 40, 42, 43, 45, 46, 49, 50, + 51, 53, 54, 55, 56, 60, 61, 65, 66, 67, 71, 72, 73, 75, 77, 79, 82, 85, 88, 90, 92, 94, + 95, 97, 99, 102, 103, 104, 106, 107, 110, 111, 113, 116, 118, 122, 123, 124, 5, 11, 13, 16, 19, 27, + 30, 36, 39, 41, 44, 47, 52, 57, 62, 68, 74, 76, 78, 80, 83, 86, 89, 91, 93, 96, 98, 100, + 105, 108, 112, 114, 117, 119, 125, 0, 6, 14, 17, 20, 28, 31, 48, 58, 63, 69, 81, 84, 87, 101, + 109, 115, 120, 126, 1, 7, 21, 32, 59, 64, 70, 121, 127, 2, 22, 128, 23, 129, 24, 130, 25, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + }}, + {149, + { + 4, 5, 9, 10, 11, 13, 16, 19, 27, 30, 34, 35, 36, 38, 39, 41, 43, 44, 46, 47, 50, 51, + 52, 54, 55, 56, 57, 61, 62, 66, 67, 68, 72, 73, 74, 76, 78, 80, 83, 86, 89, 91, 93, 95, + 96, 98, 100, 103, 104, 105, 107, 108, 111, 112, 114, 117, 119, 123, 124, 125, 0, 6, 12, 14, 17, 20, + 28, 31, 37, 40, 42, 45, 48, 53, 58, 63, 69, 75, 77, 79, 81, 84, 87, 90, 92, 94, 97, 99, + 101, 106, 109, 113, 115, 118, 120, 126, 1, 7, 15, 18, 21, 29, 32, 49, 59, 64, 70, 82, 85, 88, + 102, 110, 116, 121, 127, 2, 8, 22, 33, 60, 65, 71, 122, 128, 3, 23, 129, 24, 130, 25, 131, 26, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + }}, + {150, + { + 0, 5, 6, 10, 11, 12, 14, 17, 20, 28, 31, 35, 36, 37, 39, 40, 42, 44, 45, 47, 48, 51, + 52, 53, 55, 56, 57, 58, 62, 63, 67, 68, 69, 73, 74, 75, 77, 79, 81, 84, 87, 90, 92, 94, + 96, 97, 99, 101, 104, 105, 106, 108, 109, 112, 113, 115, 118, 120, 124, 125, 126, 1, 7, 13, 15, 18, + 21, 29, 32, 38, 41, 43, 46, 49, 54, 59, 64, 70, 76, 78, 80, 82, 85, 88, 91, 93, 95, 98, + 100, 102, 107, 110, 114, 116, 119, 121, 127, 2, 8, 16, 19, 22, 30, 33, 50, 60, 65, 71, 83, 86, + 89, 103, 111, 117, 122, 128, 3, 9, 23, 34, 61, 66, 72, 123, 129, 4, 24, 130, 25, 131, 26, 132, + 27, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + }}, + {151, + { + 1, 6, 7, 11, 12, 13, 15, 18, 21, 29, 32, 36, 37, 38, 40, 41, 43, 45, 46, 48, 49, 52, + 53, 54, 56, 57, 58, 59, 63, 64, 68, 69, 70, 74, 75, 76, 78, 80, 82, 85, 88, 91, 93, 95, + 97, 98, 100, 102, 105, 106, 107, 109, 110, 113, 114, 116, 119, 121, 125, 126, 127, 2, 8, 14, 16, 19, + 22, 30, 33, 39, 42, 44, 47, 50, 55, 60, 65, 71, 77, 79, 81, 83, 86, 89, 92, 94, 96, 99, + 101, 103, 108, 111, 115, 117, 120, 122, 128, 3, 9, 17, 20, 23, 31, 34, 51, 61, 66, 72, 84, 87, + 90, 104, 112, 118, 123, 129, 4, 10, 24, 35, 62, 67, 73, 124, 130, 0, 5, 25, 131, 26, 132, 27, + 133, 28, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + }}, + {152, + { + 2, 7, 8, 12, 13, 14, 16, 19, 22, 30, 33, 37, 38, 39, 41, 42, 44, 46, 47, 49, 50, 53, + 54, 55, 57, 58, 59, 60, 64, 65, 69, 70, 71, 75, 76, 77, 79, 81, 83, 86, 89, 92, 94, 96, + 98, 99, 101, 103, 106, 107, 108, 110, 111, 114, 115, 117, 120, 122, 126, 127, 128, 3, 9, 15, 17, 20, + 23, 31, 34, 40, 43, 45, 48, 51, 56, 61, 66, 72, 78, 80, 82, 84, 87, 90, 93, 95, 97, 100, + 102, 104, 109, 112, 116, 118, 121, 123, 129, 4, 10, 18, 21, 24, 32, 35, 52, 62, 67, 73, 85, 88, + 91, 105, 113, 119, 124, 130, 0, 5, 11, 25, 36, 63, 68, 74, 125, 131, 1, 6, 26, 132, 27, 133, + 28, 134, 29, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + }}, + {153, + { + 3, 8, 9, 13, 14, 15, 17, 20, 23, 31, 34, 38, 39, 40, 42, 43, 45, 47, 48, 50, 51, 54, + 55, 56, 58, 59, 60, 61, 65, 66, 70, 71, 72, 76, 77, 78, 80, 82, 84, 87, 90, 93, 95, 97, + 99, 100, 102, 104, 107, 108, 109, 111, 112, 115, 116, 118, 121, 123, 127, 128, 129, 4, 10, 16, 18, 21, + 24, 32, 35, 41, 44, 46, 49, 52, 57, 62, 67, 73, 79, 81, 83, 85, 88, 91, 94, 96, 98, 101, + 103, 105, 110, 113, 117, 119, 122, 124, 130, 0, 5, 11, 19, 22, 25, 33, 36, 53, 63, 68, 74, 86, + 89, 92, 106, 114, 120, 125, 131, 1, 6, 12, 26, 37, 64, 69, 75, 126, 132, 2, 7, 27, 133, 28, + 134, 29, 135, 30, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + }}, + {154, + { + 4, 9, 10, 14, 15, 16, 18, 21, 24, 32, 35, 39, 40, 41, 43, 44, 46, 48, 49, 51, 52, 55, + 56, 57, 59, 60, 61, 62, 66, 67, 71, 72, 73, 77, 78, 79, 81, 83, 85, 88, 91, 94, 96, 98, + 100, 101, 103, 105, 108, 109, 110, 112, 113, 116, 117, 119, 122, 124, 128, 129, 130, 0, 5, 11, 17, 19, + 22, 25, 33, 36, 42, 45, 47, 50, 53, 58, 63, 68, 74, 80, 82, 84, 86, 89, 92, 95, 97, 99, + 102, 104, 106, 111, 114, 118, 120, 123, 125, 131, 1, 6, 12, 20, 23, 26, 34, 37, 54, 64, 69, 75, + 87, 90, 93, 107, 115, 121, 126, 132, 2, 7, 13, 27, 38, 65, 70, 76, 127, 133, 3, 8, 28, 134, + 29, 135, 30, 136, 31, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + }}, + {155, + { + 0, 5, 10, 11, 15, 16, 17, 19, 22, 25, 33, 36, 40, 41, 42, 44, 45, 47, 49, 50, + 52, 53, 56, 57, 58, 60, 61, 62, 63, 67, 68, 72, 73, 74, 78, 79, 80, 82, 84, 86, + 89, 92, 95, 97, 99, 101, 102, 104, 106, 109, 110, 111, 113, 114, 117, 118, 120, 123, 125, 129, + 130, 131, 1, 6, 12, 18, 20, 23, 26, 34, 37, 43, 46, 48, 51, 54, 59, 64, 69, 75, + 81, 83, 85, 87, 90, 93, 96, 98, 100, 103, 105, 107, 112, 115, 119, 121, 124, 126, 132, 2, + 7, 13, 21, 24, 27, 35, 38, 55, 65, 70, 76, 88, 91, 94, 108, 116, 122, 127, 133, 3, + 8, 14, 28, 39, 66, 71, 77, 128, 134, 4, 9, 29, 135, 30, 136, 31, 137, 32, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + }}, + {156, + { + 1, 6, 11, 12, 16, 17, 18, 20, 23, 26, 34, 37, 41, 42, 43, 45, 46, 48, 50, 51, + 53, 54, 57, 58, 59, 61, 62, 63, 64, 68, 69, 73, 74, 75, 79, 80, 81, 83, 85, 87, + 90, 93, 96, 98, 100, 102, 103, 105, 107, 110, 111, 112, 114, 115, 118, 119, 121, 124, 126, 130, + 131, 132, 0, 2, 7, 13, 19, 21, 24, 27, 35, 38, 44, 47, 49, 52, 55, 60, 65, 70, + 76, 82, 84, 86, 88, 91, 94, 97, 99, 101, 104, 106, 108, 113, 116, 120, 122, 125, 127, 133, + 3, 8, 14, 22, 25, 28, 36, 39, 56, 66, 71, 77, 89, 92, 95, 109, 117, 123, 128, 134, + 4, 9, 15, 29, 40, 67, 72, 78, 129, 135, 5, 10, 30, 136, 31, 137, 32, 138, 33, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + }}, + {157, + { + 0, 2, 7, 12, 13, 17, 18, 19, 21, 24, 27, 35, 38, 42, 43, 44, 46, 47, 49, 51, + 52, 54, 55, 58, 59, 60, 62, 63, 64, 65, 69, 70, 74, 75, 76, 80, 81, 82, 84, 86, + 88, 91, 94, 97, 99, 101, 103, 104, 106, 108, 111, 112, 113, 115, 116, 119, 120, 122, 125, 127, + 131, 132, 133, 1, 3, 8, 14, 20, 22, 25, 28, 36, 39, 45, 48, 50, 53, 56, 61, 66, + 71, 77, 83, 85, 87, 89, 92, 95, 98, 100, 102, 105, 107, 109, 114, 117, 121, 123, 126, 128, + 134, 4, 9, 15, 23, 26, 29, 37, 40, 57, 67, 72, 78, 90, 93, 96, 110, 118, 124, 129, + 135, 5, 10, 16, 30, 41, 68, 73, 79, 130, 136, 6, 11, 31, 137, 32, 138, 33, 139, 34, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + }}, + {158, + { + 1, 3, 8, 13, 14, 18, 19, 20, 22, 25, 28, 36, 39, 43, 44, 45, 47, 48, 50, 52, + 53, 55, 56, 59, 60, 61, 63, 64, 65, 66, 70, 71, 75, 76, 77, 81, 82, 83, 85, 87, + 89, 92, 95, 98, 100, 102, 104, 105, 107, 109, 112, 113, 114, 116, 117, 120, 121, 123, 126, 128, + 132, 133, 134, 2, 4, 9, 15, 21, 23, 26, 29, 37, 40, 46, 49, 51, 54, 57, 62, 67, + 72, 78, 84, 86, 88, 90, 93, 96, 99, 101, 103, 106, 108, 110, 115, 118, 122, 124, 127, 129, + 135, 0, 5, 10, 16, 24, 27, 30, 38, 41, 58, 68, 73, 79, 91, 94, 97, 111, 119, 125, + 130, 136, 6, 11, 17, 31, 42, 69, 74, 80, 131, 137, 7, 12, 32, 138, 33, 139, 34, 140, + 35, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + }}, + {159, + { + 2, 4, 9, 14, 15, 19, 20, 21, 23, 26, 29, 37, 40, 44, 45, 46, 48, 49, 51, 53, + 54, 56, 57, 60, 61, 62, 64, 65, 66, 67, 71, 72, 76, 77, 78, 82, 83, 84, 86, 88, + 90, 93, 96, 99, 101, 103, 105, 106, 108, 110, 113, 114, 115, 117, 118, 121, 122, 124, 127, 129, + 133, 134, 135, 0, 3, 5, 10, 16, 22, 24, 27, 30, 38, 41, 47, 50, 52, 55, 58, 63, + 68, 73, 79, 85, 87, 89, 91, 94, 97, 100, 102, 104, 107, 109, 111, 116, 119, 123, 125, 128, + 130, 136, 1, 6, 11, 17, 25, 28, 31, 39, 42, 59, 69, 74, 80, 92, 95, 98, 112, 120, + 126, 131, 137, 7, 12, 18, 32, 43, 70, 75, 81, 132, 138, 8, 13, 33, 139, 34, 140, 35, + 141, 36, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + }}, + {160, + { + 0, 3, 5, 10, 15, 16, 20, 21, 22, 24, 27, 30, 38, 41, 45, 46, 47, 49, 50, 52, + 54, 55, 57, 58, 61, 62, 63, 65, 66, 67, 68, 72, 73, 77, 78, 79, 83, 84, 85, 87, + 89, 91, 94, 97, 100, 102, 104, 106, 107, 109, 111, 114, 115, 116, 118, 119, 122, 123, 125, 128, + 130, 134, 135, 136, 1, 4, 6, 11, 17, 23, 25, 28, 31, 39, 42, 48, 51, 53, 56, 59, + 64, 69, 74, 80, 86, 88, 90, 92, 95, 98, 101, 103, 105, 108, 110, 112, 117, 120, 124, 126, + 129, 131, 137, 2, 7, 12, 18, 26, 29, 32, 40, 43, 60, 70, 75, 81, 93, 96, 99, 113, + 121, 127, 132, 138, 8, 13, 19, 33, 44, 71, 76, 82, 133, 139, 9, 14, 34, 140, 35, 141, + 36, 142, 37, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + }}, + {161, + { + 1, 4, 6, 11, 16, 17, 21, 22, 23, 25, 28, 31, 39, 42, 46, 47, 48, 50, 51, 53, 55, + 56, 58, 59, 62, 63, 64, 66, 67, 68, 69, 73, 74, 78, 79, 80, 84, 85, 86, 88, 90, 92, + 95, 98, 101, 103, 105, 107, 108, 110, 112, 115, 116, 117, 119, 120, 123, 124, 126, 129, 131, 135, 136, + 137, 0, 2, 5, 7, 12, 18, 24, 26, 29, 32, 40, 43, 49, 52, 54, 57, 60, 65, 70, 75, + 81, 87, 89, 91, 93, 96, 99, 102, 104, 106, 109, 111, 113, 118, 121, 125, 127, 130, 132, 138, 3, + 8, 13, 19, 27, 30, 33, 41, 44, 61, 71, 76, 82, 94, 97, 100, 114, 122, 128, 133, 139, 9, + 14, 20, 34, 45, 72, 77, 83, 134, 140, 10, 15, 35, 141, 36, 142, 37, 143, 38, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + }}, + {162, + { + 0, 2, 5, 7, 12, 17, 18, 22, 23, 24, 26, 29, 32, 40, 43, 47, 48, 49, 51, 52, 54, + 56, 57, 59, 60, 63, 64, 65, 67, 68, 69, 70, 74, 75, 79, 80, 81, 85, 86, 87, 89, 91, + 93, 96, 99, 102, 104, 106, 108, 109, 111, 113, 116, 117, 118, 120, 121, 124, 125, 127, 130, 132, 136, + 137, 138, 1, 3, 6, 8, 13, 19, 25, 27, 30, 33, 41, 44, 50, 53, 55, 58, 61, 66, 71, + 76, 82, 88, 90, 92, 94, 97, 100, 103, 105, 107, 110, 112, 114, 119, 122, 126, 128, 131, 133, 139, + 4, 9, 14, 20, 28, 31, 34, 42, 45, 62, 72, 77, 83, 95, 98, 101, 115, 123, 129, 134, 140, + 10, 15, 21, 35, 46, 73, 78, 84, 135, 141, 11, 16, 36, 142, 37, 143, 38, 144, 39, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + }}, + {163, + { + 1, 3, 6, 8, 13, 18, 19, 23, 24, 25, 27, 30, 33, 41, 44, 48, 49, 50, 52, 53, 55, + 57, 58, 60, 61, 64, 65, 66, 68, 69, 70, 71, 75, 76, 80, 81, 82, 86, 87, 88, 90, 92, + 94, 97, 100, 103, 105, 107, 109, 110, 112, 114, 117, 118, 119, 121, 122, 125, 126, 128, 131, 133, 137, + 138, 139, 0, 2, 4, 7, 9, 14, 20, 26, 28, 31, 34, 42, 45, 51, 54, 56, 59, 62, 67, + 72, 77, 83, 89, 91, 93, 95, 98, 101, 104, 106, 108, 111, 113, 115, 120, 123, 127, 129, 132, 134, + 140, 5, 10, 15, 21, 29, 32, 35, 43, 46, 63, 73, 78, 84, 96, 99, 102, 116, 124, 130, 135, + 141, 11, 16, 22, 36, 47, 74, 79, 85, 136, 142, 12, 17, 37, 143, 38, 144, 39, 145, 40, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + }}, + {0, {}}}; diff --git a/lib/src/phy/fec/polar/test/polar_interleaver_test.c b/lib/src/phy/fec/polar/test/polar_interleaver_test.c new file mode 100644 index 000000000..151ca85bb --- /dev/null +++ b/lib/src/phy/fec/polar/test/polar_interleaver_test.c @@ -0,0 +1,50 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "polar_interleaver_gold.h" +#include "srslte/common/test_common.h" +#include "srslte/phy/fec/polar/polar_interleaver.h" + +int main(int argc, char** argv) +{ + uint32_t idx = 0; + while (polar_interleaver_gold[idx].K) { + uint32_t K = polar_interleaver_gold[idx].K; + + // Create indexes in order + uint16_t indexes_in[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL]; + for (uint16_t i = 0; i < (uint16_t)K; i++) { + indexes_in[i] = i; + } + + // Run interleaver forward + uint16_t indexes_out[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL]; + srslte_polar_interleaver_run_u16(indexes_in, indexes_out, K, true); + + // Check indexes + for (uint32_t i = 0; i < K; i++) { + TESTASSERT(polar_interleaver_gold[idx].indexes[i] == indexes_out[i]); + } + + // Run interleaver backwards + srslte_polar_interleaver_run_u16(indexes_out, indexes_in, K, false); + + // Check indexes + for (uint16_t i = 0; i < (uint16_t)K; i++) { + TESTASSERT(indexes_in[i] == i); + } + + idx++; + } + + return SRSLTE_SUCCESS; +} \ No newline at end of file From a746e29395aa1804a351c94d1b5049f043dd04a6 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 11 Dec 2020 18:02:49 +0100 Subject: [PATCH 40/59] Removed shadow variable --- lib/src/phy/fec/polar/test/polar_chain_test.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/src/phy/fec/polar/test/polar_chain_test.c b/lib/src/phy/fec/polar/test/polar_chain_test.c index 0b6c0b1cd..27ef750a8 100644 --- a/lib/src/phy/fec/polar/test/polar_chain_test.c +++ b/lib/src/phy/fec/polar/test/polar_chain_test.c @@ -178,7 +178,6 @@ int main(int argc, char** argv) double var[SNR_POINTS + 1]; double snr_db_vec[SNR_POINTS + 1]; - int i = 0; int reportinfo = 0; @@ -317,7 +316,7 @@ int main(int argc, char** argv) if (snr_db == 100.0) { snr_points = SNR_POINTS; - for (int32_t i = 0; i < snr_points; i++) { + for (int i = 0; i < snr_points; i++) { snr_db = SNR_MIN + i * snr_inc; snr_db_vec[i] = snr_db; var[i] = srslte_convert_dB_to_amplitude(-snr_db); @@ -389,7 +388,7 @@ int main(int argc, char** argv) } #else - for (i = 0; i < BATCH_SIZE; i++) { + for (int i = 0; i < BATCH_SIZE; i++) { for (j = 0; j < K; j++) { data_tx[i * K + j] = srslte_random_uniform_int_dist(random_gen, 0, 1); } @@ -415,7 +414,7 @@ int main(int argc, char** argv) (double)(K + code.nPC) / code.N); } // subchannel_allocation block - for (i = 0; i < BATCH_SIZE; i++) { + for (int i = 0; i < BATCH_SIZE; i++) { srslte_polar_chanalloc_tx( data_tx + i * K, input_enc + i * code.N, code.N, code.K, code.nPC, code.K_set, code.PC_set); } @@ -447,7 +446,7 @@ int main(int argc, char** argv) elapsed_time_enc_avx2[i_snr] += t[0].tv_sec + 1e-6 * t[0].tv_usec; // check errors with respect the output of the pipeline encoder - for (i = 0; i < BATCH_SIZE; i++) { + for (int i = 0; i < BATCH_SIZE; i++) { if (srslte_bit_diff(output_enc + i * code.N, output_enc_avx2 + i * code.N, code.N) != 0) { printf("ERROR: Wrong avx2 encoder output. SNR= %f, Batch: %d\n", snr_db_vec[i_snr], i); exit(-1); @@ -495,7 +494,7 @@ int main(int argc, char** argv) #ifdef debug int i_error = 0; #endif - for (i = 0; i < BATCH_SIZE; i++) { + for (int i = 0; i < BATCH_SIZE; i++) { errors_symb = srslte_bit_diff(data_tx + i * K, data_rx + i * K, K); if (errors_symb != 0) { @@ -536,7 +535,7 @@ int main(int argc, char** argv) } // check errors 16-bit decoder - for (i = 0; i < BATCH_SIZE; i++) { + for (int i = 0; i < BATCH_SIZE; i++) { errors_symb_s = srslte_bit_diff(data_tx + i * K, data_rx_s + i * K, K); if (errors_symb_s != 0) { @@ -575,7 +574,7 @@ int main(int argc, char** argv) } // check errors 8-bits decoder - for (i = 0; i < BATCH_SIZE; i++) { + for (int i = 0; i < BATCH_SIZE; i++) { errors_symb_c = srslte_bit_diff(data_tx + i * K, data_rx_c + i * K, K); @@ -615,7 +614,7 @@ int main(int argc, char** argv) } // check errors 8-bits decoder - for (i = 0; i < BATCH_SIZE; i++) { + for (int i = 0; i < BATCH_SIZE; i++) { errors_symb_c_avx2 = srslte_bit_diff(data_tx + i * K, data_rx_c_avx2 + i * K, K); From 533222f2455c293b8555a780c4a8bb4b5b915f63 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 11 Dec 2020 18:05:02 +0100 Subject: [PATCH 41/59] NR PDCCH fixes --- lib/src/phy/ch_estimation/dmrs_pdcch.c | 5 ++- lib/src/phy/phch/pdcch_nr.c | 62 +++++++++++++++++--------- 2 files changed, 45 insertions(+), 22 deletions(-) diff --git a/lib/src/phy/ch_estimation/dmrs_pdcch.c b/lib/src/phy/ch_estimation/dmrs_pdcch.c index 481cd3a15..9daeea9dd 100644 --- a/lib/src/phy/ch_estimation/dmrs_pdcch.c +++ b/lib/src/phy/ch_estimation/dmrs_pdcch.c @@ -24,8 +24,9 @@ static uint32_t dmrs_pdcch_get_cinit(uint32_t slot_idx, uint32_t symbol_idx, uint32_t n_id) { - return (uint32_t)((((SRSLTE_NSYMB_PER_SLOT_NR * slot_idx + symbol_idx + 1UL) << 17UL) * (2 * n_id + 1) + 2 * n_id) & - (uint64_t)INT32_MAX); + return (uint32_t)( + ((1UL << 17UL) * (SRSLTE_NSYMB_PER_SLOT_NR * slot_idx + symbol_idx + 1UL) * (2UL * n_id + 1UL) + 2UL * n_id) % + INT32_MAX); } static void dmrs_pdcch_put_symbol_noninterleaved(const srslte_carrier_nr_t* carrier, diff --git a/lib/src/phy/phch/pdcch_nr.c b/lib/src/phy/phch/pdcch_nr.c index 0ee6900ca..943276f3f 100644 --- a/lib/src/phy/phch/pdcch_nr.c +++ b/lib/src/phy/phch/pdcch_nr.c @@ -12,6 +12,7 @@ #include "srslte/phy/phch/pdcch_nr.h" #include "srslte/phy/fec/polar/polar_chanalloc.h" +#include "srslte/phy/fec/polar/polar_interleaver.h" #include "srslte/phy/utils/debug.h" #include "srslte/phy/utils/vector.h" @@ -316,7 +317,7 @@ static uint32_t pdcch_nr_cp(const srslte_pdcch_nr_t* q, return count; } -uint32_t pdcch_nr_c_init(const srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_msg) +static uint32_t pdcch_nr_c_init(const srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_msg) { uint32_t n_id = (dci_msg->search_space == srslte_search_space_type_ue && q->coreset.dmrs_scrambling_id_present) ? q->coreset.dmrs_scrambling_id @@ -340,21 +341,26 @@ int srslte_pdcch_nr_encode(srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_ } // Calculate... - q->K = dci_msg->nof_bits + 24U; // Payload size including CRC - q->M = (1U << dci_msg->location.L) * (SRSLTE_NRE - 3U) * 6U; // Number of RE - q->E = q->M * 2; // Number of Rate-Matched bits + q->K = dci_msg->nof_bits + 24U; // Payload size including CRC + q->M = (1U << dci_msg->location.L) * (SRSLTE_NRE - 3U) * 6U; // Number of RE + q->E = q->M * 2; // Number of Rate-Matched bits + uint32_t cinit = pdcch_nr_c_init(q, dci_msg); // Pseudo-random sequence initiation // Get polar code if (srslte_polar_code_get(&q->code, q->K, q->E, 9U) < SRSLTE_SUCCESS) { return SRSLTE_ERROR; } - PDCCH_INFO_TX("K=%d; E=%d; M=%d; n=%d;\n", q->K, q->E, q->M, q->code.n); + PDCCH_INFO_TX("K=%d; E=%d; M=%d; n=%d; cinit=%08x;\n", q->K, q->E, q->M, q->code.n, cinit); + + // Set first L bits to ones, c will have an offset of 24 bits + uint8_t* c = q->c; + srslte_bit_unpack(UINT32_MAX, &c, 24U); // Copy DCI message - srslte_vec_u8_copy(q->c, dci_msg->payload, dci_msg->nof_bits); + srslte_vec_u8_copy(c, dci_msg->payload, dci_msg->nof_bits); // Append CRC - srslte_crc_attach(&q->crc24c, q->c, dci_msg->nof_bits); + srslte_crc_attach(&q->crc24c, q->c, q->K); PDCCH_INFO_TX("Append CRC %06x\n", (uint32_t)srslte_crc_checksum_get(&q->crc24c)); @@ -364,16 +370,22 @@ int srslte_pdcch_nr_encode(srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_ srslte_bit_unpack(dci_msg->rnti, &ptr, 16); // Scramble CRC with RNTI - srslte_vec_xor_bbb(unpacked_rnti, &q->c[q->K - 16], &q->c[q->K - 16], 16); + srslte_vec_xor_bbb(unpacked_rnti, &c[q->K - 16], &c[q->K - 16], 16); - // Print c + // Interleave + uint8_t c_prime[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL]; + srslte_polar_interleaver_run_u8(c, c_prime, q->K, true); + + // Print c and c_prime (after interleaving) if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) { PDCCH_INFO_TX("c="); - srslte_vec_fprint_hex(stdout, q->c, q->K); + srslte_vec_fprint_hex(stdout, c, q->K); + PDCCH_INFO_TX("c_prime="); + srslte_vec_fprint_hex(stdout, c_prime, q->K); } // Allocate channel - srslte_polar_chanalloc_tx(q->c, q->allocated, q->code.N, q->code.K, q->code.nPC, q->code.K_set, q->code.PC_set); + srslte_polar_chanalloc_tx(c_prime, q->allocated, q->code.N, q->code.K, q->code.nPC, q->code.K_set, q->code.PC_set); // Encode bits if (srslte_polar_encoder_encode(&q->encoder, q->allocated, q->d, q->code.n) < SRSLTE_SUCCESS) { @@ -383,14 +395,14 @@ int srslte_pdcch_nr_encode(srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_ // Print d if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) { PDCCH_INFO_TX("d="); - srslte_vec_fprint_byte(stdout, q->d, q->K); + srslte_vec_fprint_byte(stdout, q->d, q->code.N); } // Rate matching srslte_polar_rm_tx(&q->rm, q->d, q->f, q->code.n, q->E, q->K, PDCCH_NR_POLAR_RM_IBIL); // Scrambling - srslte_sequence_apply_bit(q->f, q->f, q->E, pdcch_nr_c_init(q, dci_msg)); + srslte_sequence_apply_bit(q->f, q->f, q->E, cinit); // Modulation srslte_mod_modulate(&q->modem_table, q->f, q->symbols, q->E); @@ -509,12 +521,22 @@ int srslte_pdcch_nr_decode(srslte_pdcch_nr_t* q, } // De-allocate channel - srslte_polar_chanalloc_rx(q->allocated, q->c, q->code.K, q->code.nPC, q->code.K_set, q->code.PC_set); + uint8_t c_prime[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL]; + srslte_polar_chanalloc_rx(q->allocated, c_prime, q->code.K, q->code.nPC, q->code.K_set, q->code.PC_set); + + // Set first L bits to ones, c will have an offset of 24 bits + uint8_t* c = q->c; + srslte_bit_unpack(UINT32_MAX, &c, 24U); + + // De-interleave + srslte_polar_interleaver_run_u8(c_prime, c, q->K, false); // Print c if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) { + PDCCH_INFO_RX("c_prime="); + srslte_vec_fprint_hex(stdout, c_prime, q->K); PDCCH_INFO_RX("c="); - srslte_vec_fprint_hex(stdout, q->c, q->K); + srslte_vec_fprint_hex(stdout, c, q->K); } // Unpack RNTI @@ -523,21 +545,21 @@ int srslte_pdcch_nr_decode(srslte_pdcch_nr_t* q, srslte_bit_unpack(dci_msg->rnti, &ptr, 16); // De-Scramble CRC with RNTI - ptr = &q->c[q->K - 24]; - srslte_vec_xor_bbb(unpacked_rnti, &q->c[q->K - 16], &q->c[q->K - 16], 16); + srslte_vec_xor_bbb(unpacked_rnti, &c[q->K - 16], &c[q->K - 16], 16); // Check CRC - uint32_t checksum1 = srslte_crc_checksum(&q->crc24c, q->c, dci_msg->nof_bits); + ptr = &c[q->K - 24]; + uint32_t checksum1 = srslte_crc_checksum(&q->crc24c, q->c, q->K); uint32_t checksum2 = srslte_bit_pack(&ptr, 24); res->crc = checksum1 == checksum2; if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) { PDCCH_INFO_RX("CRC={%06x, %06x}; msg=", checksum1, checksum2); - srslte_vec_fprint_hex(stdout, q->c, dci_msg->nof_bits); + srslte_vec_fprint_hex(stdout, c, dci_msg->nof_bits); } // Copy DCI message - srslte_vec_u8_copy(dci_msg->payload, q->c, dci_msg->nof_bits); + srslte_vec_u8_copy(dci_msg->payload, c, dci_msg->nof_bits); if (q->meas_time_en) { gettimeofday(&t[2], NULL); From 81cfce6cf01baf60b9409fbc5d7d6866d6525d4d Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 16 Dec 2020 22:00:32 +0100 Subject: [PATCH 42/59] rlc_um: remove latency calculation from RLC UM --- lib/src/upper/rlc_um_base.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/src/upper/rlc_um_base.cc b/lib/src/upper/rlc_um_base.cc index 02b14e38c..cddae09e1 100644 --- a/lib/src/upper/rlc_um_base.cc +++ b/lib/src/upper/rlc_um_base.cc @@ -300,11 +300,7 @@ int rlc_um_base::rlc_um_base_tx::build_data_pdu(uint8_t* payload, uint32_t nof_b return 0; } } - int len = build_data_pdu(std::move(pdu), payload, nof_bytes); - if (len > 0) { - parent->metrics.sdu_tx_latency_us = mean_pdu_latency_us.value(); - } - return len; + return build_data_pdu(std::move(pdu), payload, nof_bytes); } } // namespace srslte From 2e64fff1df08c4d7973b4e7de850630b2844f680 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 16 Dec 2020 22:01:28 +0100 Subject: [PATCH 43/59] common: extend timestamp interface for byte_buffer * allow setting timestamp to a specific std::chrono::time_point * add getter from raw tp --- lib/include/srslte/common/common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index cc1dabfa6..48d85cd63 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -155,6 +155,8 @@ public: #endif } + std::chrono::high_resolution_clock::time_point get_timestamp() { return tp; } + void set_timestamp() { #ifdef ENABLE_TIMESTAMP @@ -163,6 +165,12 @@ public: #endif } + void set_timestamp(std::chrono::high_resolution_clock::time_point tp_) + { + tp = tp_; + timestamp_is_set = true; + } + void append_bytes(uint8_t* buf, uint32_t size) { memcpy(&msg[N_bytes], buf, size); From d54c33258b576b02b4ba904e411ba2afb7d72853 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 16 Dec 2020 22:03:17 +0100 Subject: [PATCH 44/59] rlc_metrics: add sdu rx latency and buffered bytes --- lib/include/srslte/upper/rlc_metrics.h | 5 ++++- lib/src/upper/rlc_am_lte.cc | 24 ++---------------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/lib/include/srslte/upper/rlc_metrics.h b/lib/include/srslte/upper/rlc_metrics.h index 599bb81b6..b204974d0 100644 --- a/lib/include/srslte/upper/rlc_metrics.h +++ b/lib/include/srslte/upper/rlc_metrics.h @@ -25,7 +25,7 @@ typedef struct { uint64_t num_tx_sdu_bytes; uint64_t num_rx_sdu_bytes; uint32_t num_lost_sdus; //< Count dropped SDUs at Tx due to bearer inactivity or empty buffer - uint64_t sdu_tx_latency_us; + uint64_t rx_latency_ms; //< Average time in ms from first RLC segment to full SDU // PDU metrics uint32_t num_tx_pdus; @@ -33,6 +33,9 @@ typedef struct { uint64_t num_tx_pdu_bytes; uint64_t num_rx_pdu_bytes; uint32_t num_lost_pdus; //< Lost PDUs registered at Rx + + // misc metrics + uint32_t rx_buffered_bytes; //< sum of payload of PDUs buffered in rx_window } rlc_bearer_metrics_t; typedef struct { diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index 96d0307a1..d4c506695 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -837,17 +837,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { -#ifdef ENABLE_TIMESTAMP - long latency_us = tx_sdu->get_latency_us().count(); - mean_pdu_latency_us.push(latency_us); - parent->metrics.sdu_tx_latency_us = mean_pdu_latency_us.value(); - log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", - RB_NAME, - latency_us, - (long)parent->metrics.sdu_tx_latency_us); -#else - log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); -#endif + log->debug("%s Complete SDU scheduled for tx.\n", RB_NAME); tx_sdu.reset(); } if (pdu_space > to_move) { @@ -886,17 +876,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt tx_sdu->N_bytes -= to_move; tx_sdu->msg += to_move; if (tx_sdu->N_bytes == 0) { -#ifdef ENABLE_TIMESTAMP - long latency_us = tx_sdu->get_latency_us().count(); - mean_pdu_latency_us.push(latency_us); - parent->metrics.sdu_tx_latency_us = mean_pdu_latency_us.value(); - log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", - RB_NAME, - latency_us, - (long)parent->metrics.sdu_tx_latency_us); -#else - log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); -#endif + log->debug("%s Complete SDU scheduled for tx.\n", RB_NAME); tx_sdu.reset(); } if (pdu_space > to_move) { From bc4c9606ce3b20d050761a254353a1df7b125cb4 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 16 Dec 2020 22:07:04 +0100 Subject: [PATCH 45/59] rlc_am: add extended bearer metrics this patch adds support for measuring the: * SDU rx latency (Average time in ms from first RLC segment to full SDU) * amount of buffered bytes (sum of payload of PDUs buffered in rx_window) the implementation is using std::chrono --- lib/include/srslte/upper/rlc_am_lte.h | 10 +++---- lib/src/upper/rlc_am_lte.cc | 41 +++++++++++++++++++++++++-- lib/test/upper/rlc_am_test.cc | 4 +++ 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/lib/include/srslte/upper/rlc_am_lte.h b/lib/include/srslte/upper/rlc_am_lte.h index f2d3774ab..f3c39e735 100644 --- a/lib/include/srslte/upper/rlc_am_lte.h +++ b/lib/include/srslte/upper/rlc_am_lte.h @@ -183,11 +183,6 @@ private: // Mutexes pthread_mutex_t mutex; - - // Metrics -#ifdef ENABLE_TIMESTAMP - srslte::rolling_average mean_pdu_latency_us; -#endif }; // Receiver sub-class @@ -203,7 +198,8 @@ private: void write_pdu(uint8_t* payload, uint32_t nof_bytes); - uint32_t get_num_rx_bytes(); + uint32_t get_rx_buffered_bytes(); // returns sum of PDUs in rx_window + uint32_t get_sdu_rx_latency_ms(); // Timeout callback interface void timer_expired(uint32_t timeout_id); @@ -264,6 +260,8 @@ private: ***************************************************************************/ srslte::timer_handler::unique_timer reordering_timer; + + srslte::rolling_average sdu_rx_latency_ms; }; // Common variables needed/provided by parent class diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index d4c506695..dcbf335bd 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -99,6 +99,9 @@ uint32_t rlc_am_lte::get_bearer() rlc_bearer_metrics_t rlc_am_lte::get_metrics() { + // update values that aren't calculated on the fly + metrics.rx_latency_ms = rx.get_sdu_rx_latency_ms(); + metrics.rx_buffered_bytes = rx.get_rx_buffered_bytes(); return metrics; } @@ -1255,6 +1258,7 @@ void rlc_am_lte::rlc_am_lte_rx::handle_data_pdu(uint8_t* payload, uint32_t nof_b return; #endif } + pdu.buf->set_timestamp(); // check available space for payload if (nof_bytes > pdu.buf->get_tailroom()) { @@ -1459,7 +1463,10 @@ void rlc_am_lte::rlc_am_lte_rx::reassemble_rx_sdus() rx_sdu.reset(); goto exit; } - + // store timestamp of the first segment when starting to assemble SDUs + if (rx_sdu->N_bytes == 0) { + rx_sdu->set_timestamp(rx_window[vr_r].buf->get_timestamp()); + } memcpy(&rx_sdu->msg[rx_sdu->N_bytes], rx_window[vr_r].buf->msg, len); rx_sdu->N_bytes += len; @@ -1467,7 +1474,9 @@ void rlc_am_lte::rlc_am_lte_rx::reassemble_rx_sdus() rx_window[vr_r].buf->N_bytes -= len; log->info_hex(rx_sdu->msg, rx_sdu->N_bytes, "%s Rx SDU (%d B)", RB_NAME, rx_sdu->N_bytes); - rx_sdu->set_timestamp(); + sdu_rx_latency_ms.push(std::chrono::duration_cast( + std::chrono::high_resolution_clock::now() - rx_sdu->get_timestamp()) + .count()); parent->pdcp->write_pdu(parent->lcid, std::move(rx_sdu)); parent->metrics.num_rx_sdus++; @@ -1498,6 +1507,10 @@ void rlc_am_lte::rlc_am_lte_rx::reassemble_rx_sdus() len = rx_window[vr_r].buf->N_bytes; log->debug_hex(rx_window[vr_r].buf->msg, len, "Handling last segment of length %d B of SN=%d\n", len, vr_r); if (rx_sdu->get_tailroom() >= len) { + // store timestamp of the first segment when starting to assemble SDUs + if (rx_sdu->N_bytes == 0) { + rx_sdu->set_timestamp(rx_window[vr_r].buf->get_timestamp()); + } memcpy(&rx_sdu->msg[rx_sdu->N_bytes], rx_window[vr_r].buf->msg, len); rx_sdu->N_bytes += rx_window[vr_r].buf->N_bytes; } else { @@ -1511,7 +1524,9 @@ void rlc_am_lte::rlc_am_lte_rx::reassemble_rx_sdus() if (rlc_am_end_aligned(rx_window[vr_r].header.fi)) { log->info_hex(rx_sdu->msg, rx_sdu->N_bytes, "%s Rx SDU (%d B)", RB_NAME, rx_sdu->N_bytes); - rx_sdu->set_timestamp(); + sdu_rx_latency_ms.push(std::chrono::duration_cast( + std::chrono::high_resolution_clock::now() - rx_sdu->get_timestamp()) + .count()); parent->pdcp->write_pdu(parent->lcid, std::move(rx_sdu)); parent->metrics.num_rx_sdus++; @@ -1593,6 +1608,26 @@ void rlc_am_lte::rlc_am_lte_rx::write_pdu(uint8_t* payload, const uint32_t nof_b } } +uint32_t rlc_am_lte::rlc_am_lte_rx::get_rx_buffered_bytes() +{ + uint32_t buff_size = 0; + pthread_mutex_lock(&mutex); + for (const auto& pdu : rx_window) { + buff_size += pdu.second.buf->N_bytes; + } + pthread_mutex_unlock(&mutex); + return buff_size; +} + +uint32_t rlc_am_lte::rlc_am_lte_rx::get_sdu_rx_latency_ms() +{ + uint32_t latency = 0; + pthread_mutex_lock(&mutex); + latency = sdu_rx_latency_ms.value(); + pthread_mutex_unlock(&mutex); + return latency; +} + /** * Function called from stack thread when timer has expired * diff --git a/lib/test/upper/rlc_am_test.cc b/lib/test/upper/rlc_am_test.cc index 9ba3945b8..6ad587a9d 100644 --- a/lib/test/upper/rlc_am_test.cc +++ b/lib/test/upper/rlc_am_test.cc @@ -365,6 +365,10 @@ bool retx_test() rlc2.write_pdu(pdu_bufs[i].msg, pdu_bufs[i].N_bytes); } + // check buffered bytes at receiver, 3 PDUs with one 1 B each (SN=0 has been delivered already) + rlc_bearer_metrics_t metrics = rlc2.get_metrics(); + assert(metrics.rx_buffered_bytes == 3); + // Step timers until reordering timeout expires int cnt = 5; while (cnt--) { From e27c0869e5d64a93f7b5470682e3135541d82abe Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 17 Dec 2020 10:56:24 +0000 Subject: [PATCH 46/59] update RRC ASN1 to 2020-09 v15.11 --- lib/include/srslte/asn1/rrc.h | 142 ++ lib/include/srslte/asn1/rrc/bcch_msg.h | 134 +- lib/include/srslte/asn1/rrc/common.h | 1 + lib/include/srslte/asn1/rrc/dl_ccch_msg.h | 35 +- lib/include/srslte/asn1/rrc/dl_dcch_msg.h | 120 +- lib/include/srslte/asn1/rrc/ho_cmd.h | 37 +- lib/include/srslte/asn1/rrc/meascfg.h | 640 ++++---- lib/include/srslte/asn1/rrc/phy_ded.h | 58 +- lib/include/srslte/asn1/rrc/rr_common.h | 23 + lib/include/srslte/asn1/rrc/rr_ded.h | 70 +- lib/include/srslte/asn1/rrc/si.h | 48 +- lib/include/srslte/asn1/rrc/uecap.h | 395 ++++- lib/include/srslte/asn1/rrc/ul_ccch_msg.h | 23 +- lib/include/srslte/asn1/rrc/ul_dcch_msg.h | 81 +- lib/include/srslte/asn1/rrc_nbiot.h | 182 ++- lib/src/asn1/rrc.cc | 584 +++++-- lib/src/asn1/rrc/bcch_msg.cc | 389 ++++- lib/src/asn1/rrc/dl_ccch_msg.cc | 46 +- lib/src/asn1/rrc/dl_dcch_msg.cc | 246 ++- lib/src/asn1/rrc/ho_cmd.cc | 119 +- lib/src/asn1/rrc/meascfg.cc | 1691 ++++++++++++--------- lib/src/asn1/rrc/phy_ded.cc | 113 +- lib/src/asn1/rrc/rr_common.cc | 61 +- lib/src/asn1/rrc/rr_ded.cc | 348 +++-- lib/src/asn1/rrc/si.cc | 45 +- lib/src/asn1/rrc/uecap.cc | 1212 +++++++++++++-- lib/src/asn1/rrc/ul_ccch_msg.cc | 48 +- lib/src/asn1/rrc/ul_dcch_msg.cc | 197 +-- lib/src/asn1/rrc_nbiot.cc | 434 +++++- lib/test/asn1/rrc_test.cc | 2 +- srsue/src/stack/rrc/rrc.cc | 16 +- 31 files changed, 5664 insertions(+), 1876 deletions(-) diff --git a/lib/include/srslte/asn1/rrc.h b/lib/include/srslte/asn1/rrc.h index 954411faf..b523157c9 100644 --- a/lib/include/srslte/asn1/rrc.h +++ b/lib/include/srslte/asn1/rrc.h @@ -1724,6 +1724,148 @@ struct sc_mcch_msg_r13_s { void to_json(json_writer& j) const; }; +// FailureReportSCG-v12d0 ::= SEQUENCE +struct fail_report_scg_v12d0_s { + bool meas_result_neigh_cells_v12d0_present = false; + meas_result_list2_eutra_v9e0_l meas_result_neigh_cells_v12d0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformation-v12d0b-IEs ::= SEQUENCE +struct scg_fail_info_v12d0b_ies_s { + bool fail_report_scg_v12d0_present = false; + bool non_crit_ext_present = false; + fail_report_scg_v12d0_s fail_report_scg_v12d0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-WeightedLayersCapabilities-r13 ::= SEQUENCE +struct mimo_weighted_layers_cap_r13_s { + struct rel_weight_two_layers_r13_opts { + enum options { v1, v1dot25, v1dot5, v1dot75, v2, v2dot5, v3, v4, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated rel_weight_two_layers_r13_e_; + struct rel_weight_four_layers_r13_opts { + enum options { v1, v1dot25, v1dot5, v1dot75, v2, v2dot5, v3, v4, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated rel_weight_four_layers_r13_e_; + struct rel_weight_eight_layers_r13_opts { + enum options { v1, v1dot25, v1dot5, v1dot75, v2, v2dot5, v3, v4, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated rel_weight_eight_layers_r13_e_; + + // member variables + bool rel_weight_four_layers_r13_present = false; + bool rel_weight_eight_layers_r13_present = false; + rel_weight_two_layers_r13_e_ rel_weight_two_layers_r13; + rel_weight_four_layers_r13_e_ rel_weight_four_layers_r13; + rel_weight_eight_layers_r13_e_ rel_weight_eight_layers_r13; + uint8_t total_weighted_layers_r13 = 2; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-UE-Parameters-v13e0 ::= SEQUENCE +struct mimo_ue_params_v13e0_s { + bool mimo_weighted_layers_cap_r13_present = false; + mimo_weighted_layers_cap_r13_s mimo_weighted_layers_cap_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResult3EUTRA-r15 ::= SEQUENCE +struct meas_result3_eutra_r15_s { + bool ext = false; + bool meas_result_serving_cell_r15_present = false; + bool meas_result_neigh_cell_list_r15_present = false; + uint32_t carrier_freq_r15 = 0; + meas_result_eutra_s meas_result_serving_cell_r15; + meas_result_list_eutra_l meas_result_neigh_cell_list_r15; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultList3EUTRA-r15 ::= SEQUENCE (SIZE (1..8)) OF MeasResult3EUTRA-r15 +using meas_result_list3_eutra_r15_l = dyn_array; + +// MeasResultSCG-FailureMRDC-r15 ::= SEQUENCE +struct meas_result_scg_fail_mrdc_r15_s { + bool ext = false; + meas_result_list3_eutra_r15_l meas_result_freq_list_eutra_r15; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v13e0 ::= SEQUENCE +struct phy_layer_params_v13e0_s { + mimo_ue_params_v13e0_s mimo_ue_params_v13e0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v13e0b-IEs ::= SEQUENCE +struct ue_eutra_cap_v13e0b_ies_s { + bool non_crit_ext_present = false; + phy_layer_params_v13e0_s phy_layer_params_v13e0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-Config-v12i0b-IEs ::= SEQUENCE +struct scg_cfg_v12i0b_ies_s { + bool scg_radio_cfg_v12i0_present = false; + bool non_crit_ext_present = false; + scg_cfg_part_scg_v12f0_s scg_radio_cfg_v12i0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // CSI-RS-TriggeredList-r12 ::= SEQUENCE (SIZE (1..96)) OF INTEGER (1..96) using csi_rs_triggered_list_r12_l = dyn_array; diff --git a/lib/include/srslte/asn1/rrc/bcch_msg.h b/lib/include/srslte/asn1/rrc/bcch_msg.h index d10a35dc2..3729a522b 100644 --- a/lib/include/srslte/asn1/rrc/bcch_msg.h +++ b/lib/include/srslte/asn1/rrc/bcch_msg.h @@ -42,6 +42,35 @@ struct bcch_bch_msg_s { void to_json(json_writer& j) const; }; +// SIB-Type-v12j0 ::= ENUMERATED +struct sib_type_v12j0_opts { + enum options { + sib_type19_v1250, + sib_type20_v1310, + sib_type21_v1430, + sib_type24_v1530, + sib_type25_v1530, + sib_type26_v1530, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + // ... + nulltype + } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated sib_type_v12j0_e; + // NS-PmaxValue-v10l0 ::= SEQUENCE struct ns_pmax_value_v10l0_s { bool add_spec_emission_v10l0_present = false; @@ -53,6 +82,9 @@ struct ns_pmax_value_v10l0_s { void to_json(json_writer& j) const; }; +// SIB-MappingInfo-v12j0 ::= SEQUENCE (SIZE (1..31)) OF SIB-Type-v12j0 +using sib_map_info_v12j0_l = bounded_array; + // InterFreqCarrierFreqInfo-v1360 ::= SEQUENCE struct inter_freq_carrier_freq_info_v1360_s { bool cell_sel_info_ce1_v1360_present = false; @@ -79,6 +111,28 @@ struct ns_pmax_value_r10_s { void to_json(json_writer& j) const; }; +// SchedulingInfo-v12j0 ::= SEQUENCE +struct sched_info_v12j0_s { + bool sib_map_info_v12j0_present = false; + sib_map_info_v12j0_l sib_map_info_v12j0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingInfoExt-r12 ::= SEQUENCE +struct sched_info_ext_r12_s { + si_periodicity_r12_e si_periodicity_r12; + sib_map_info_v12j0_l sib_map_info_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // BandClassInfoCDMA2000 ::= SEQUENCE struct band_class_info_cdma2000_s { bool ext = false; @@ -124,6 +178,12 @@ using pci_list_cdma2000_l = bounded_array; // PhysCellIdListCDMA2000-v920 ::= SEQUENCE (SIZE (0..24)) OF INTEGER (0..511) using pci_list_cdma2000_v920_l = bounded_array; +// SchedulingInfoList-v12j0 ::= SEQUENCE (SIZE (1..32)) OF SchedulingInfo-v12j0 +using sched_info_list_v12j0_l = dyn_array; + +// SchedulingInfoListExt-r12 ::= SEQUENCE (SIZE (1..32)) OF SchedulingInfoExt-r12 +using sched_info_list_ext_r12_l = dyn_array; + // SystemInformationBlockType2-v13c0-IEs ::= SEQUENCE struct sib_type2_v13c0_ies_s { bool ul_pwr_ctrl_common_v13c0_present = false; @@ -166,6 +226,18 @@ struct multi_band_info_v9e0_s { // MultiBandInfoList-v10j0 ::= SEQUENCE (SIZE (1..8)) OF NS-PmaxList-r10 using multi_band_info_list_v10j0_l = dyn_array; +// NS-PmaxValueNR-r15 ::= SEQUENCE +struct ns_pmax_value_nr_r15_s { + bool add_pmax_nr_r15_present = false; + int8_t add_pmax_nr_r15 = -30; + uint8_t add_spec_emission_nr_r15 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // NeighCellCDMA2000-r11 ::= SEQUENCE struct neigh_cell_cdma2000_r11_s { using neigh_freq_info_list_r11_l_ = dyn_array; @@ -212,6 +284,20 @@ struct redist_neigh_cell_r13_s { void to_json(json_writer& j) const; }; +// SystemInformationBlockType1-v12j0-IEs ::= SEQUENCE +struct sib_type1_v12j0_ies_s { + bool sched_info_list_v12j0_present = false; + bool sched_info_list_ext_r12_present = false; + bool non_crit_ext_present = false; + sched_info_list_v12j0_l sched_info_list_v12j0; + sched_info_list_ext_r12_l sched_info_list_ext_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // SystemInformationBlockType2-v10n0-IEs ::= SEQUENCE struct sib_type2_v10n0_ies_s { bool late_non_crit_ext_present = false; @@ -332,17 +418,8 @@ struct inter_freq_neigh_cell_info_s { // MultiBandInfoList-v9e0 ::= SEQUENCE (SIZE (1..8)) OF MultiBandInfo-v9e0 using multi_band_info_list_v9e0_l = dyn_array; -// NS-PmaxValueNR-r15 ::= SEQUENCE -struct ns_pmax_value_nr_r15_s { - bool add_pmax_nr_r15_present = false; - int8_t add_pmax_nr_r15 = -30; - uint8_t add_spec_emission_nr_r15 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// NS-PmaxListNR-r15 ::= SEQUENCE (SIZE (1..8)) OF NS-PmaxValueNR-r15 +using ns_pmax_list_nr_r15_l = dyn_array; // NeighCellsPerBandclassListCDMA2000 ::= SEQUENCE (SIZE (1..16)) OF NeighCellsPerBandclassCDMA2000 using neigh_cells_per_bandclass_list_cdma2000_l = dyn_array; @@ -414,6 +491,19 @@ using redist_neigh_cell_list_r13_l = dyn_array; // SL-SyncConfigListNFreq-r13 ::= SEQUENCE (SIZE (1..16)) OF SL-SyncConfigNFreq-r13 using sl_sync_cfg_list_nfreq_r13_l = dyn_array; +// SystemInformationBlockType1-v10x0-IEs ::= SEQUENCE +struct sib_type1_v10x0_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + sib_type1_v12j0_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // SystemInformationBlockType2-v10m0-IEs ::= SEQUENCE struct sib_type2_v10m0_ies_s { struct freq_info_v10l0_s_ { @@ -559,8 +649,11 @@ using mbms_sai_list_r11_l = dyn_array; // MultiBandInfoList ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..64) using multi_band_info_list_l = bounded_array; -// NS-PmaxListNR-r15 ::= SEQUENCE (SIZE (1..8)) OF NS-PmaxValueNR-r15 -using ns_pmax_list_nr_r15_l = dyn_array; +// MultiBandNsPmaxListNR-1-v1550 ::= SEQUENCE (SIZE (1..31)) OF NS-PmaxListNR-r15 +using multi_band_ns_pmax_list_nr_minus1_v1550_l = dyn_array; + +// MultiBandNsPmaxListNR-v1550 ::= SEQUENCE (SIZE (1..32)) OF NS-PmaxListNR-r15 +using multi_band_ns_pmax_list_nr_v1550_l = dyn_array; // NeighCellCDMA2000 ::= SEQUENCE struct neigh_cell_cdma2000_s { @@ -698,6 +791,7 @@ struct sib_type1_v10l0_ies_s { bool non_crit_ext_present = false; ns_pmax_list_v10l0_l freq_band_info_v10l0; multi_band_info_list_v10l0_l multi_band_info_list_v10l0; + sib_type1_v10x0_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -794,11 +888,15 @@ struct carrier_freq_nr_r15_s { int8_t q_rx_lev_min_sul_r15 = -70; int8_t p_max_nr_r15 = -30; ns_pmax_list_nr_r15_l ns_pmax_list_nr_r15; - int8_t q_qual_min_r15 = -34; + int8_t q_qual_min_r15 = -43; bool derive_ssb_idx_from_cell_r15 = false; uint8_t max_rs_idx_cell_qual_r15 = 1; thres_list_nr_r15_s thresh_rs_idx_r15; // ... + // group 0 + copy_ptr multi_band_ns_pmax_list_nr_v1550; + copy_ptr multi_band_ns_pmax_list_nr_sul_v1550; + copy_ptr ssb_to_measure_r15; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1225,7 +1323,7 @@ struct mbsfn_area_info_r9_s { mcch_mod_period_v1430_e_ mcch_mod_period_v1430; }; struct subcarrier_spacing_mbms_r14_opts { - enum options { khz_minus7dot5, khz_minus1dot25, nulltype } value; + enum options { khz7dot5, khz1dot25, nulltype } value; typedef float number_type; std::string to_string() const; @@ -2967,14 +3065,16 @@ struct sib_type26_r15_s { bool sync_freq_list_r15_present = false; bool slss_tx_multi_freq_r15_present = false; bool v2x_freq_sel_cfg_list_r15_present = false; - bool thresh_s_rssi_cbr_r14_present = false; + bool thresh_s_rssi_cbr_r15_present = false; sl_inter_freq_info_list_v2x_r14_l v2x_inter_freq_info_list_r15; sl_cbr_pppp_tx_cfg_list_r15_l cbr_pssch_tx_cfg_list_r15; sl_v2x_packet_dupl_cfg_r15_s v2x_packet_dupl_cfg_r15; sl_v2x_sync_freq_list_r15_l sync_freq_list_r15; sl_v2x_freq_sel_cfg_list_r15_l v2x_freq_sel_cfg_list_r15; - uint8_t thresh_s_rssi_cbr_r14 = 0; + uint8_t thresh_s_rssi_cbr_r15 = 0; // ... + bool late_non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/common.h b/lib/include/srslte/asn1/rrc/common.h index fb9f90b56..41511dec6 100644 --- a/lib/include/srslte/asn1/rrc/common.h +++ b/lib/include/srslte/asn1/rrc/common.h @@ -112,6 +112,7 @@ namespace rrc { #define ASN1_RRC_MAX_MEAS_ID_R12 64 #define ASN1_RRC_MAX_MULTI_BANDS 8 #define ASN1_RRC_MAX_MULTI_BANDS_NR_R15 32 +#define ASN1_RRC_MAX_MULTI_BANDS_NR_MINUS1_R15 31 #define ASN1_RRC_MAX_NS_PMAX_R10 8 #define ASN1_RRC_MAX_NAICS_ENTRIES_R12 8 #define ASN1_RRC_MAX_NEIGH_CELL_R12 8 diff --git a/lib/include/srslte/asn1/rrc/dl_ccch_msg.h b/lib/include/srslte/asn1/rrc/dl_ccch_msg.h index 72103ad22..6bf7548ca 100644 --- a/lib/include/srslte/asn1/rrc/dl_ccch_msg.h +++ b/lib/include/srslte/asn1/rrc/dl_ccch_msg.h @@ -337,6 +337,18 @@ struct rrc_conn_setup_v8a0_ies_s { void to_json(json_writer& j) const; }; +// RRCEarlyDataComplete-v1590-IEs ::= SEQUENCE +struct rrc_early_data_complete_v1590_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RedirectedCarrierInfo-r15-IEs ::= CHOICE struct redirected_carrier_info_r15_ies_c { struct types_opts { @@ -513,17 +525,18 @@ struct rrc_conn_setup_r8_ies_s { // RRCEarlyDataComplete-r15-IEs ::= SEQUENCE struct rrc_early_data_complete_r15_ies_s { - bool ded_info_nas_r15_present = false; - bool extended_wait_time_r15_present = false; - bool idle_mode_mob_ctrl_info_r15_present = false; - bool idle_mode_mob_ctrl_info_ext_r15_present = false; - bool redirected_carrier_info_r15_present = false; - bool non_crit_ext_present = false; - dyn_octstring ded_info_nas_r15; - uint16_t extended_wait_time_r15 = 1; - idle_mode_mob_ctrl_info_s idle_mode_mob_ctrl_info_r15; - idle_mode_mob_ctrl_info_v9e0_s idle_mode_mob_ctrl_info_ext_r15; - redirected_carrier_info_r15_ies_c redirected_carrier_info_r15; + bool ded_info_nas_r15_present = false; + bool extended_wait_time_r15_present = false; + bool idle_mode_mob_ctrl_info_r15_present = false; + bool idle_mode_mob_ctrl_info_ext_r15_present = false; + bool redirected_carrier_info_r15_present = false; + bool non_crit_ext_present = false; + dyn_octstring ded_info_nas_r15; + uint16_t extended_wait_time_r15 = 1; + idle_mode_mob_ctrl_info_s idle_mode_mob_ctrl_info_r15; + idle_mode_mob_ctrl_info_v9e0_s idle_mode_mob_ctrl_info_ext_r15; + redirected_carrier_info_r15_ies_c redirected_carrier_info_r15; + rrc_early_data_complete_v1590_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/dl_dcch_msg.h b/lib/include/srslte/asn1/rrc/dl_dcch_msg.h index e4a798719..1b406feb0 100644 --- a/lib/include/srslte/asn1/rrc/dl_dcch_msg.h +++ b/lib/include/srslte/asn1/rrc/dl_dcch_msg.h @@ -283,6 +283,16 @@ struct sl_tx_pool_to_add_mod_r14_s { void to_json(json_writer& j) const; }; +// SubframeAssignment-r15 ::= ENUMERATED +struct sf_assign_r15_opts { + enum options { sa0, sa1, sa2, sa3, sa4, sa5, sa6, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated sf_assign_r15_e; + // UplinkPowerControlCommonPSCell-r12 ::= SEQUENCE struct ul_pwr_ctrl_common_ps_cell_r12_s { struct delta_f_pucch_format3_r12_opts { @@ -644,15 +654,42 @@ using sl_tx_pool_to_add_mod_list_v2x_r14_l = dyn_array; -// SubframeAssignment-r15 ::= ENUMERATED -struct sf_assign_r15_opts { - enum options { sa0, sa1, sa2, sa3, sa4, sa5, sa6, nulltype } value; - typedef uint8_t number_type; +// TDM-PatternConfig-r15 ::= CHOICE +struct tdm_pattern_cfg_r15_c { + struct setup_s_ { + sf_assign_r15_e sf_assign_r15; + uint8_t harq_offset_r15 = 0; + }; + typedef setup_e types; - std::string to_string() const; - uint8_t to_number() const; + // choice methods + tdm_pattern_cfg_r15_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; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "TDM-PatternConfig-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "TDM-PatternConfig-r15"); + return c; + } + setup_s_& set_setup() + { + set(types::setup); + return c; + } + +private: + types type_; + setup_s_ c; }; -typedef enumerated sf_assign_r15_e; // TunnelConfigLWIP-r13 ::= SEQUENCE struct tunnel_cfg_lwip_r13_s { @@ -914,41 +951,6 @@ struct rrc_conn_recfg_v1510_ies_s { return c; } - private: - types type_; - setup_s_ c; - }; - struct tdm_pattern_cfg_r15_c_ { - struct setup_s_ { - sf_assign_r15_e sf_assign_r15; - uint8_t harq_offset_r15 = 0; - }; - typedef setup_e types; - - // choice methods - tdm_pattern_cfg_r15_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; - // getters - setup_s_& setup() - { - assert_choice_type("setup", type_.to_string(), "tdm-PatternConfig-r15"); - return c; - } - const setup_s_& setup() const - { - assert_choice_type("setup", type_.to_string(), "tdm-PatternConfig-r15"); - return c; - } - setup_s_& set_setup() - { - set(types::setup); - return c; - } - private: types type_; setup_s_ c; @@ -965,7 +967,7 @@ struct rrc_conn_recfg_v1510_ies_s { uint32_t sk_counter_r15 = 0; dyn_octstring nr_radio_bearer_cfg1_r15; dyn_octstring nr_radio_bearer_cfg2_r15; - tdm_pattern_cfg_r15_c_ tdm_pattern_cfg_r15; + tdm_pattern_cfg_r15_c tdm_pattern_cfg_r15; rrc_conn_recfg_v1530_ies_s non_crit_ext; // sequence methods @@ -1519,6 +1521,17 @@ struct rrc_conn_recfg_v1430_ies_s { void to_json(json_writer& j) const; }; +// RRCConnectionRelease-v15b0-IEs ::= SEQUENCE +struct rrc_conn_release_v15b0_ies_s { + bool no_last_cell_upd_r15_present = false; + bool non_crit_ext_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RadioResourceConfigDedicated-v1370 ::= SEQUENCE struct rr_cfg_ded_v1370_s { bool phys_cfg_ded_v1370_present = false; @@ -1554,6 +1567,12 @@ struct scg_cfg_part_scg_r12_s { // group 3 copy_ptr scell_group_to_release_list_scg_r15; copy_ptr scell_group_to_add_mod_list_scg_r15; + // group 4 + copy_ptr meas_cfg_sn_r15; + copy_ptr tdm_pattern_cfg_ne_dc_r15; + // group 5 + bool p_max_eutra_r15_present = false; + int8_t p_max_eutra_r15 = -30; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1677,7 +1696,7 @@ struct rrc_inactive_cfg_r15_s { bool ran_notif_area_info_r15_present = false; bool periodic_rnau_timer_r15_present = false; bool next_hop_chaining_count_r15_present = false; - bool non_crit_ext_present = false; + bool dummy_present = false; fixed_bitstring<40> full_i_rnti_r15; fixed_bitstring<24> short_i_rnti_r15; ran_paging_cycle_r15_e_ ran_paging_cycle_r15; @@ -1729,9 +1748,10 @@ struct rrc_conn_recfg_v1370_ies_s { // RRCConnectionRelease-v1540-IEs ::= SEQUENCE struct rrc_conn_release_v1540_ies_s { - bool wait_time_present = false; - bool non_crit_ext_present = false; - uint8_t wait_time = 1; + bool wait_time_present = false; + bool non_crit_ext_present = false; + uint8_t wait_time = 1; + rrc_conn_release_v15b0_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3161,16 +3181,16 @@ struct other_cfg_r9_s { }; struct meas_cfg_app_layer_r15_c_ { struct setup_s_ { - struct service_type_opts { + struct service_type_r15_opts { enum options { qoe, qoemtsi, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value; std::string to_string() const; }; - typedef enumerated service_type_e_; + typedef enumerated service_type_r15_e_; // member variables bounded_octstring<1, 1000> meas_cfg_app_layer_container_r15; - service_type_e_ service_type; + service_type_r15_e_ service_type_r15; }; typedef setup_e types; diff --git a/lib/include/srslte/asn1/rrc/ho_cmd.h b/lib/include/srslte/asn1/rrc/ho_cmd.h index 959de5c0f..58035ef8d 100644 --- a/lib/include/srslte/asn1/rrc/ho_cmd.h +++ b/lib/include/srslte/asn1/rrc/ho_cmd.h @@ -40,8 +40,8 @@ struct scg_cfg_v13c0_ies_s { void to_json(json_writer& j) const; }; -// SCG-Config-v12x0-IEs ::= SEQUENCE -struct scg_cfg_v12x0_ies_s { +// SCG-Config-v12i0a-IEs ::= SEQUENCE +struct scg_cfg_v12i0a_ies_s { bool late_non_crit_ext_present = false; bool non_crit_ext_present = false; dyn_octstring late_non_crit_ext; @@ -58,7 +58,26 @@ struct scg_cfg_r12_ies_s { bool scg_radio_cfg_r12_present = false; bool non_crit_ext_present = false; scg_cfg_part_scg_r12_s scg_radio_cfg_r12; - scg_cfg_v12x0_ies_s non_crit_ext; + scg_cfg_v12i0a_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Config-v1550 ::= SEQUENCE +struct as_cfg_v1550_s { + struct tdm_pattern_cfg_r15_s_ { + sf_assign_r15_e sf_assign_r15; + uint8_t harq_offset_r15 = 0; + }; + + // member variables + bool tdm_pattern_cfg_r15_present = false; + bool p_max_eutra_r15_present = false; + tdm_pattern_cfg_r15_s_ tdm_pattern_cfg_r15; + int8_t p_max_eutra_r15 = -30; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -81,6 +100,14 @@ struct as_cfg_nr_r15_s { void to_json(json_writer& j) const; }; +// AS-ConfigNR-v1570 ::= SEQUENCE +struct as_cfg_nr_v1570_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // SCG-Config-r12 ::= SEQUENCE struct scg_cfg_r12_s { struct crit_exts_c_ { @@ -188,6 +215,10 @@ struct as_cfg_s { copy_ptr source_cfg_scg_r12; // group 3 copy_ptr as_cfg_nr_r15; + // group 4 + copy_ptr as_cfg_v1550; + // group 5 + copy_ptr as_cfg_nr_v1570; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/meascfg.h b/lib/include/srslte/asn1/rrc/meascfg.h index c66b4e6b0..3eb40290f 100644 --- a/lib/include/srslte/asn1/rrc/meascfg.h +++ b/lib/include/srslte/asn1/rrc/meascfg.h @@ -399,6 +399,81 @@ struct ss_rssi_meas_r15_s { bool operator!=(const ss_rssi_meas_r15_s& other) const { return not(*this == other); } }; +// SSB-ToMeasure-r15 ::= CHOICE +struct ssb_to_measure_r15_c { + struct types_opts { + enum options { short_bitmap_r15, medium_bitmap_r15, long_bitmap_r15, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + ssb_to_measure_r15_c() = default; + ssb_to_measure_r15_c(const ssb_to_measure_r15_c& other); + ssb_to_measure_r15_c& operator=(const ssb_to_measure_r15_c& other); + ~ssb_to_measure_r15_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; + bool operator==(const ssb_to_measure_r15_c& other) const; + bool operator!=(const ssb_to_measure_r15_c& other) const { return not(*this == other); } + // getters + fixed_bitstring<4>& short_bitmap_r15() + { + assert_choice_type("shortBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15"); + return c.get >(); + } + fixed_bitstring<8>& medium_bitmap_r15() + { + assert_choice_type("mediumBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15"); + return c.get >(); + } + fixed_bitstring<64>& long_bitmap_r15() + { + assert_choice_type("longBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15"); + return c.get >(); + } + const fixed_bitstring<4>& short_bitmap_r15() const + { + assert_choice_type("shortBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15"); + return c.get >(); + } + const fixed_bitstring<8>& medium_bitmap_r15() const + { + assert_choice_type("mediumBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15"); + return c.get >(); + } + const fixed_bitstring<64>& long_bitmap_r15() const + { + assert_choice_type("longBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15"); + return c.get >(); + } + fixed_bitstring<4>& set_short_bitmap_r15() + { + set(types::short_bitmap_r15); + return c.get >(); + } + fixed_bitstring<8>& set_medium_bitmap_r15() + { + set(types::medium_bitmap_r15); + return c.get >(); + } + fixed_bitstring<64>& set_long_bitmap_r15() + { + set(types::long_bitmap_r15); + return c.get >(); + } + +private: + types type_; + choice_buffer_t > c; + + void destroy_(); +}; + // ThresholdListNR-r15 ::= SEQUENCE struct thres_list_nr_r15_s { bool nr_rsrp_r15_present = false; @@ -460,108 +535,6 @@ struct carrier_freq_cdma2000_s { bool operator!=(const carrier_freq_cdma2000_s& other) const { return not(*this == other); } }; -// WLAN-Id-List-r13 ::= SEQUENCE (SIZE (1..32)) OF WLAN-Identifiers-r12 -using wlan_id_list_r13_l = dyn_array; - -// RACH-ConfigDedicated ::= SEQUENCE -struct rach_cfg_ded_s { - uint8_t ra_preamb_idx = 0; - uint8_t ra_prach_mask_idx = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RACH-Skip-r14 ::= SEQUENCE -struct rach_skip_r14_s { - struct target_ta_r14_c_ { - struct types_opts { - enum options { ta0_r14, mcg_ptag_r14, scg_ptag_r14, mcg_stag_r14, scg_stag_r14, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - target_ta_r14_c_() = default; - target_ta_r14_c_(const target_ta_r14_c_& other); - target_ta_r14_c_& operator=(const target_ta_r14_c_& other); - ~target_ta_r14_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 - uint8_t& mcg_stag_r14() - { - assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14"); - return c.get(); - } - uint8_t& scg_stag_r14() - { - assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14"); - return c.get(); - } - const uint8_t& mcg_stag_r14() const - { - assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14"); - return c.get(); - } - const uint8_t& scg_stag_r14() const - { - assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14"); - return c.get(); - } - uint8_t& set_mcg_stag_r14() - { - set(types::mcg_stag_r14); - return c.get(); - } - uint8_t& set_scg_stag_r14() - { - set(types::scg_stag_r14); - return c.get(); - } - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct ul_cfg_info_r14_s_ { - struct ul_sched_interv_r14_opts { - enum options { sf2, sf5, sf10, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated ul_sched_interv_r14_e_; - - // member variables - uint8_t nof_conf_ul_processes_r14 = 1; - ul_sched_interv_r14_e_ ul_sched_interv_r14; - uint8_t ul_start_sf_r14 = 0; - fixed_bitstring<16> ul_grant_r14; - }; - - // member variables - bool ul_cfg_info_r14_present = false; - target_ta_r14_c_ target_ta_r14; - ul_cfg_info_r14_s_ ul_cfg_info_r14; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // MeasCSI-RS-Config-r12 ::= SEQUENCE struct meas_csi_rs_cfg_r12_s { bool ext = false; @@ -785,17 +758,6 @@ struct csg_allowed_report_cells_r9_s { bool operator!=(const csg_allowed_report_cells_r9_s& other) const { return not(*this == other); } }; -// CarrierFreqGERAN ::= SEQUENCE -struct carrier_freq_geran_s { - uint16_t arfcn = 0; - band_ind_geran_e band_ind; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // CellIndexList ::= SEQUENCE (SIZE (1..32)) OF INTEGER (1..32) using cell_idx_list_l = bounded_array; @@ -1469,17 +1431,6 @@ private: setup_s_ c; }; -// MobilityControlInfo-v10l0 ::= SEQUENCE -struct mob_ctrl_info_v10l0_s { - bool add_spec_emission_v10l0_present = false; - uint16_t add_spec_emission_v10l0 = 33; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // PhysCellIdGERAN ::= SEQUENCE struct pci_geran_s { fixed_bitstring<3> network_colour_code; @@ -1581,12 +1532,47 @@ struct rs_cfg_ssb_nr_r15_s { uint8_t to_number() const; }; typedef enumerated subcarrier_spacing_ssb_r15_e_; + struct ssb_to_measure_r15_c_ { + typedef setup_e types; + + // choice methods + ssb_to_measure_r15_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; + bool operator==(const ssb_to_measure_r15_c_& other) const; + bool operator!=(const ssb_to_measure_r15_c_& other) const { return not(*this == other); } + // getters + ssb_to_measure_r15_c& setup() + { + assert_choice_type("setup", type_.to_string(), "ssb-ToMeasure-r15"); + return c; + } + const ssb_to_measure_r15_c& setup() const + { + assert_choice_type("setup", type_.to_string(), "ssb-ToMeasure-r15"); + return c; + } + ssb_to_measure_r15_c& set_setup() + { + set(types::setup); + return c; + } + + private: + types type_; + ssb_to_measure_r15_c c; + }; // member variables bool ext = false; mtc_ssb_nr_r15_s meas_timing_cfg_r15; subcarrier_spacing_ssb_r15_e_ subcarrier_spacing_ssb_r15; // ... + // group 0 + copy_ptr ssb_to_measure_r15; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2014,6 +2000,9 @@ struct wlan_carrier_info_r13_s { bool operator!=(const wlan_carrier_info_r13_s& other) const { return not(*this == other); } }; +// WLAN-Id-List-r13 ::= SEQUENCE (SIZE (1..32)) OF WLAN-Identifiers-r12 +using wlan_id_list_r13_l = dyn_array; + // WLAN-NameListConfig-r15 ::= CHOICE struct wlan_name_list_cfg_r15_c { typedef setup_e types; @@ -2052,20 +2041,6 @@ private: // WhiteCellsToAddModList-r13 ::= SEQUENCE (SIZE (1..32)) OF WhiteCellsToAddMod-r13 using white_cells_to_add_mod_list_r13_l = dyn_array; -// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE -struct logged_meas_cfg_v1530_ies_s { - bool bt_name_list_r15_present = false; - bool wlan_name_list_r15_present = false; - bool non_crit_ext_present = false; - bt_name_list_r15_l bt_name_list_r15; - wlan_name_list_r15_l wlan_name_list_r15; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // MeasGapConfigPerCC-r14 ::= SEQUENCE struct meas_gap_cfg_per_cc_r14_s { uint8_t serv_cell_id_r14 = 0; @@ -2581,12 +2556,12 @@ struct eutra_event_s { uint8_t v2_thres_r14 = 0; }; struct event_h1_r15_s_ { - uint16_t h1_thres_offset_r15 = 0; - uint8_t h1_hysteresis_minus15 = 1; + uint16_t h1_thres_offset_r15 = 0; + uint8_t h1_hysteresis_r15 = 1; }; struct event_h2_r15_s_ { - uint16_t h2_thres_offset_r15 = 0; - uint8_t h2_hysteresis_minus15 = 1; + uint16_t h2_thres_offset_r15 = 0; + uint8_t h2_hysteresis_r15 = 1; }; struct types_opts { enum options { @@ -3572,17 +3547,6 @@ struct report_cfg_inter_rat_s { bool operator!=(const report_cfg_inter_rat_s& other) const { return not(*this == other); } }; -// CellGlobalIdEUTRA ::= SEQUENCE -struct cell_global_id_eutra_s { - plmn_id_s plmn_id; - fixed_bitstring<28> cell_id; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // MeasGapConfigToAddModList-r14 ::= SEQUENCE (SIZE (1..32)) OF MeasGapConfigPerCC-r14 using meas_gap_cfg_to_add_mod_list_r14_l = dyn_array; @@ -4133,96 +4097,6 @@ struct report_cfg_to_add_mod_s { bool operator!=(const report_cfg_to_add_mod_s& other) const { return not(*this == other); } }; -// CarrierBandwidthEUTRA ::= SEQUENCE -struct carrier_bw_eutra_s { - struct dl_bw_opts { - enum options { - n6, - n15, - n25, - n50, - n75, - n100, - spare10, - spare9, - spare8, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated dl_bw_e_; - struct ul_bw_opts { - enum options { - n6, - n15, - n25, - n50, - n75, - n100, - spare10, - spare9, - spare8, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated ul_bw_e_; - - // member variables - bool ul_bw_present = false; - dl_bw_e_ dl_bw; - ul_bw_e_ ul_bw; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CarrierFreqEUTRA ::= SEQUENCE -struct carrier_freq_eutra_s { - bool ul_carrier_freq_present = false; - uint32_t dl_carrier_freq = 0; - uint32_t ul_carrier_freq = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CarrierFreqEUTRA-v9e0 ::= SEQUENCE -struct carrier_freq_eutra_v9e0_s { - bool ul_carrier_freq_v9e0_present = false; - uint32_t dl_carrier_freq_v9e0 = 0; - uint32_t ul_carrier_freq_v9e0 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // MeasGapConfigDensePRS-r15 ::= CHOICE struct meas_gap_cfg_dense_prs_r15_c { struct setup_s_ { @@ -4757,23 +4631,6 @@ struct meas_scale_factor_r12_opts { }; typedef enumerated meas_scale_factor_r12_e; -// MobilityControlInfoV2X-r14 ::= SEQUENCE -struct mob_ctrl_info_v2x_r14_s { - bool v2x_comm_tx_pool_exceptional_r14_present = false; - bool v2x_comm_rx_pool_r14_present = false; - bool v2x_comm_sync_cfg_r14_present = false; - bool cbr_mob_tx_cfg_list_r14_present = false; - sl_comm_res_pool_v2x_r14_s v2x_comm_tx_pool_exceptional_r14; - sl_comm_rx_pool_list_v2x_r14_l v2x_comm_rx_pool_r14; - sl_sync_cfg_list_v2x_r14_l v2x_comm_sync_cfg_r14; - sl_cbr_common_tx_cfg_list_r14_s cbr_mob_tx_cfg_list_r14; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // QuantityConfig ::= SEQUENCE struct quant_cfg_s { bool ext = false; @@ -4804,6 +4661,105 @@ struct quant_cfg_s { bool operator!=(const quant_cfg_s& other) const { return not(*this == other); } }; +// RACH-ConfigDedicated ::= SEQUENCE +struct rach_cfg_ded_s { + uint8_t ra_preamb_idx = 0; + uint8_t ra_prach_mask_idx = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-Skip-r14 ::= SEQUENCE +struct rach_skip_r14_s { + struct target_ta_r14_c_ { + struct types_opts { + enum options { ta0_r14, mcg_ptag_r14, scg_ptag_r14, mcg_stag_r14, scg_stag_r14, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + target_ta_r14_c_() = default; + target_ta_r14_c_(const target_ta_r14_c_& other); + target_ta_r14_c_& operator=(const target_ta_r14_c_& other); + ~target_ta_r14_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 + uint8_t& mcg_stag_r14() + { + assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14"); + return c.get(); + } + uint8_t& scg_stag_r14() + { + assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14"); + return c.get(); + } + const uint8_t& mcg_stag_r14() const + { + assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14"); + return c.get(); + } + const uint8_t& scg_stag_r14() const + { + assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14"); + return c.get(); + } + uint8_t& set_mcg_stag_r14() + { + set(types::mcg_stag_r14); + return c.get(); + } + uint8_t& set_scg_stag_r14() + { + set(types::scg_stag_r14); + return c.get(); + } + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct ul_cfg_info_r14_s_ { + struct ul_sched_interv_r14_opts { + enum options { sf2, sf5, sf10, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated ul_sched_interv_r14_e_; + + // member variables + uint8_t nof_conf_ul_processes_r14 = 1; + ul_sched_interv_r14_e_ ul_sched_interv_r14; + uint8_t ul_start_sf_r14 = 0; + fixed_bitstring<16> ul_grant_r14; + }; + + // member variables + bool ul_cfg_info_r14_present = false; + target_ta_r14_c_ target_ta_r14; + ul_cfg_info_r14_s_ ul_cfg_info_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // ReportConfigToAddModList ::= SEQUENCE (SIZE (1..32)) OF ReportConfigToAddMod using report_cfg_to_add_mod_list_l = dyn_array; @@ -4969,6 +4925,160 @@ struct meas_cfg_s { void to_json(json_writer& j) const; }; +// CarrierFreqGERAN ::= SEQUENCE +struct carrier_freq_geran_s { + uint16_t arfcn = 0; + band_ind_geran_e band_ind; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityControlInfo-v10l0 ::= SEQUENCE +struct mob_ctrl_info_v10l0_s { + bool add_spec_emission_v10l0_present = false; + uint16_t add_spec_emission_v10l0 = 33; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE +struct logged_meas_cfg_v1530_ies_s { + bool bt_name_list_r15_present = false; + bool wlan_name_list_r15_present = false; + bool non_crit_ext_present = false; + bt_name_list_r15_l bt_name_list_r15; + wlan_name_list_r15_l wlan_name_list_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellGlobalIdEUTRA ::= SEQUENCE +struct cell_global_id_eutra_s { + plmn_id_s plmn_id; + fixed_bitstring<28> cell_id; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierBandwidthEUTRA ::= SEQUENCE +struct carrier_bw_eutra_s { + struct dl_bw_opts { + enum options { + n6, + n15, + n25, + n50, + n75, + n100, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated dl_bw_e_; + struct ul_bw_opts { + enum options { + n6, + n15, + n25, + n50, + n75, + n100, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated ul_bw_e_; + + // member variables + bool ul_bw_present = false; + dl_bw_e_ dl_bw; + ul_bw_e_ ul_bw; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqEUTRA ::= SEQUENCE +struct carrier_freq_eutra_s { + bool ul_carrier_freq_present = false; + uint32_t dl_carrier_freq = 0; + uint32_t ul_carrier_freq = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqEUTRA-v9e0 ::= SEQUENCE +struct carrier_freq_eutra_v9e0_s { + bool ul_carrier_freq_v9e0_present = false; + uint32_t dl_carrier_freq_v9e0 = 0; + uint32_t ul_carrier_freq_v9e0 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityControlInfoV2X-r14 ::= SEQUENCE +struct mob_ctrl_info_v2x_r14_s { + bool v2x_comm_tx_pool_exceptional_r14_present = false; + bool v2x_comm_rx_pool_r14_present = false; + bool v2x_comm_sync_cfg_r14_present = false; + bool cbr_mob_tx_cfg_list_r14_present = false; + sl_comm_res_pool_v2x_r14_s v2x_comm_tx_pool_exceptional_r14; + sl_comm_rx_pool_list_v2x_r14_l v2x_comm_rx_pool_r14; + sl_sync_cfg_list_v2x_r14_l v2x_comm_sync_cfg_r14; + sl_cbr_common_tx_cfg_list_r14_s cbr_mob_tx_cfg_list_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // MobilityControlInfo ::= SEQUENCE struct mob_ctrl_info_s { struct t304_opts { @@ -5820,12 +5930,12 @@ struct cgi_info_nr_r15_s { }; // member variables - bool ext = false; - bool plmn_id_info_list_r15_present = false; - bool freq_band_list_minus15_present = false; - bool no_sib1_r15_present = false; + bool ext = false; + bool plmn_id_info_list_r15_present = false; + bool freq_band_list_r15_present = false; + bool no_sib1_r15_present = false; plmn_id_info_list_nr_r15_l plmn_id_info_list_r15; - multi_freq_band_list_nr_r15_l freq_band_list_minus15; + multi_freq_band_list_nr_r15_l freq_band_list_r15; no_sib1_r15_s_ no_sib1_r15; // ... diff --git a/lib/include/srslte/asn1/rrc/phy_ded.h b/lib/include/srslte/asn1/rrc/phy_ded.h index 5d781a2d3..f1c6fce41 100644 --- a/lib/include/srslte/asn1/rrc/phy_ded.h +++ b/lib/include/srslte/asn1/rrc/phy_ded.h @@ -4419,7 +4419,7 @@ private: // SPUCCH-Config-r15 ::= CHOICE struct spucch_cfg_r15_c { struct setup_s_ { - struct two_ant_port_activ_spucch_format3_r15_s_ { + struct dummy_s_ { using n3_spucch_an_list_r15_l_ = bounded_array; // member variables @@ -4427,10 +4427,10 @@ struct spucch_cfg_r15_c { }; // member variables - bool spucch_set_r15_present = false; - bool two_ant_port_activ_spucch_format1a1b_r15_present = false; - spucch_set_r15_l spucch_set_r15; - two_ant_port_activ_spucch_format3_r15_s_ two_ant_port_activ_spucch_format3_r15; + bool spucch_set_r15_present = false; + bool two_ant_port_activ_spucch_format1a1b_r15_present = false; + spucch_set_r15_l spucch_set_r15; + dummy_s_ dummy; }; typedef setup_e types; @@ -7170,6 +7170,52 @@ private: setup_s_ c; }; +// SPUCCH-Config-v1550 ::= CHOICE +struct spucch_cfg_v1550_c { + struct setup_s_ { + struct two_ant_port_activ_spucch_format3_v1550_s_ { + using n3_spucch_an_list_v1550_l_ = bounded_array; + + // member variables + n3_spucch_an_list_v1550_l_ n3_spucch_an_list_v1550; + }; + + // member variables + two_ant_port_activ_spucch_format3_v1550_s_ two_ant_port_activ_spucch_format3_v1550; + }; + typedef setup_e types; + + // choice methods + spucch_cfg_v1550_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; + bool operator==(const spucch_cfg_v1550_c& other) const; + bool operator!=(const spucch_cfg_v1550_c& other) const { return not(*this == other); } + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPUCCH-Config-v1550"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPUCCH-Config-v1550"); + return c; + } + setup_s_& set_setup() + { + set(types::setup); + return c; + } + +private: + types type_; + setup_s_ c; +}; + // SRS-TPC-PDCCH-Config-r14 ::= CHOICE struct srs_tpc_pdcch_cfg_r14_c { struct setup_s_ { @@ -8423,6 +8469,8 @@ struct phys_cfg_ded_s { copy_ptr ul_pwr_ctrl_ded_v1530; copy_ptr semi_static_cfi_cfg_r15; copy_ptr blind_pdsch_repeat_cfg_r15; + // group 11 + copy_ptr spucch_cfg_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/rr_common.h b/lib/include/srslte/asn1/rrc/rr_common.h index 24875578d..97367b293 100644 --- a/lib/include/srslte/asn1/rrc/rr_common.h +++ b/lib/include/srslte/asn1/rrc/rr_common.h @@ -2027,6 +2027,27 @@ struct wus_cfg_r15_s { void to_json(json_writer& j) const; }; +// WUS-Config-v1560 ::= SEQUENCE +struct wus_cfg_v1560_s { + struct pwr_boost_r15_opts { + enum options { db0, db1dot8, db3, db4dot8, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated pwr_boost_r15_e_; + + // member variables + pwr_boost_r15_e_ pwr_boost_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RadioResourceConfigCommonSIB ::= SEQUENCE struct rr_cfg_common_sib_s { bool ext = false; @@ -2066,6 +2087,8 @@ struct rr_cfg_common_sib_s { copy_ptr high_speed_cfg_v1530; // group 6 copy_ptr ul_pwr_ctrl_common_v1540; + // group 7 + copy_ptr wus_cfg_v1560; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/rr_ded.h b/lib/include/srslte/asn1/rrc/rr_ded.h index 23b98b339..0b0866bf0 100644 --- a/lib/include/srslte/asn1/rrc/rr_ded.h +++ b/lib/include/srslte/asn1/rrc/rr_ded.h @@ -576,27 +576,27 @@ struct lc_ch_cfg_s { types type_; setup_e_ c; }; - struct chl_access_prio_r15_c_ { + struct ch_access_prio_r15_c_ { typedef setup_e types; // choice methods - chl_access_prio_r15_c_() = default; + ch_access_prio_r15_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; - bool operator==(const chl_access_prio_r15_c_& other) const; - bool operator!=(const chl_access_prio_r15_c_& other) const { return not(*this == other); } + bool operator==(const ch_access_prio_r15_c_& other) const; + bool operator!=(const ch_access_prio_r15_c_& other) const { return not(*this == other); } // getters uint8_t& setup() { - assert_choice_type("setup", type_.to_string(), "channellAccessPriority-r15"); + assert_choice_type("setup", type_.to_string(), "channelAccessPriority-r15"); return c; } const uint8_t& setup() const { - assert_choice_type("setup", type_.to_string(), "channellAccessPriority-r15"); + assert_choice_type("setup", type_.to_string(), "channelAccessPriority-r15"); return c; } uint8_t& set_setup() @@ -629,7 +629,7 @@ struct lc_ch_cfg_s { bool lch_cell_restrict_r15_present = false; copy_ptr allowed_tti_lens_r15; copy_ptr lc_ch_sr_restrict_r15; - copy_ptr chl_access_prio_r15; + copy_ptr ch_access_prio_r15; fixed_bitstring<32> lch_cell_restrict_r15; // sequence methods @@ -863,8 +863,8 @@ struct crs_assist_info_r13_s { // CRS-AssistanceInfo-r15 ::= SEQUENCE struct crs_assist_info_r15_s { - bool crs_intf_mitig_enabled_minus15_present = false; - uint16_t pci_r15 = 0; + bool crs_intf_mitig_enabled_r15_present = false; + uint16_t pci_r15 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2247,7 +2247,7 @@ struct drb_to_add_mod_s { // group 4 bool lc_ch_id_r15_present = false; copy_ptr rlc_cfg_v1530; - copy_ptr rlc_bearer_cfg_dupl_r15; + copy_ptr rlc_bearer_cfg_secondary_r15; uint8_t lc_ch_id_r15 = 32; // sequence methods @@ -3284,8 +3284,10 @@ struct srb_to_add_mod_s { bool pdcp_ver_change_r15_present = false; bool srb_id_v1530_present = false; copy_ptr rlc_cfg_v1530; - copy_ptr rlc_bearer_cfg_dupl_r15; + copy_ptr rlc_bearer_cfg_secondary_r15; uint8_t srb_id_v1530 = 4; + // group 1 + copy_ptr rlc_cfg_v1560; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4280,12 +4282,12 @@ struct sps_cfg_v1540_s { void to_json(json_writer& j) const; }; -// SRB-ToAddModExtList-r15 ::= SEQUENCE (SIZE (1)) OF SRB-ToAddMod -using srb_to_add_mod_ext_list_r15_l = std::array; - // SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod using srb_to_add_mod_list_l = dyn_array; +// SRB-ToAddModListExt-r15 ::= SEQUENCE (SIZE (1)) OF SRB-ToAddMod +using srb_to_add_mod_list_ext_r15_l = std::array; + // RadioResourceConfigDedicated ::= SEQUENCE struct rr_cfg_ded_s { struct mac_main_cfg_c_ { @@ -4326,20 +4328,18 @@ struct rr_cfg_ded_s { }; struct crs_intf_mitig_cfg_r15_c_ { struct setup_c_ { - struct crs_intf_mitig_num_prbs_r15_opts { + struct crs_intf_mitig_num_prbs_opts { enum options { n6, n24, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated crs_intf_mitig_num_prbs_r15_e_; + typedef enumerated crs_intf_mitig_num_prbs_e_; struct types_opts { - enum options { crs_intf_mitig_enabled_minus15, crs_intf_mitig_num_prbs_r15, nulltype } value; - typedef int8_t number_type; + enum options { crs_intf_mitig_enabled, crs_intf_mitig_num_prbs, nulltype } value; std::string to_string() const; - int8_t to_number() const; }; typedef enumerated types; @@ -4351,25 +4351,25 @@ struct rr_cfg_ded_s { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() + crs_intf_mitig_num_prbs_e_& crs_intf_mitig_num_prbs() { - assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "setup"); + assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "setup"); return c; } - const crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() const + const crs_intf_mitig_num_prbs_e_& crs_intf_mitig_num_prbs() const { - assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "setup"); + assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "setup"); return c; } - crs_intf_mitig_num_prbs_r15_e_& set_crs_intf_mitig_num_prbs_r15() + crs_intf_mitig_num_prbs_e_& set_crs_intf_mitig_num_prbs() { - set(types::crs_intf_mitig_num_prbs_r15); + set(types::crs_intf_mitig_num_prbs); return c; } private: - types type_; - crs_intf_mitig_num_prbs_r15_e_ c; + types type_; + crs_intf_mitig_num_prbs_e_ c; }; typedef setup_e types; @@ -4432,9 +4432,9 @@ struct rr_cfg_ded_s { // group 5 copy_ptr sps_cfg_v1430; // group 6 - bool srb_to_release_ext_list_r15_present = false; - copy_ptr srb_to_add_mod_ext_list_r15; - uint8_t srb_to_release_ext_list_r15 = 4; + bool srb_to_release_list_ext_r15_present = false; + copy_ptr srb_to_add_mod_list_ext_r15; + uint8_t srb_to_release_list_ext_r15 = 4; copy_ptr sps_cfg_v1530; copy_ptr crs_intf_mitig_cfg_r15; copy_ptr neigh_cells_crs_info_r15; @@ -6123,7 +6123,7 @@ struct phys_cfg_ded_scell_r10_s { // group 7 copy_ptr phys_cfg_ded_stti_r15; copy_ptr pdsch_cfg_ded_v1530; - copy_ptr cqi_report_cfg_v1530; + copy_ptr dummy; copy_ptr cqi_report_cfg_scell_r15; copy_ptr cqi_short_cfg_scell_r15; copy_ptr csi_rs_cfg_v1530; @@ -6132,6 +6132,8 @@ struct phys_cfg_ded_scell_r10_s { copy_ptr pusch_cfg_ded_v1530; copy_ptr semi_static_cfi_cfg_r15; copy_ptr blind_pdsch_repeat_cfg_r15; + // group 8 + copy_ptr spucch_cfg_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6456,7 +6458,9 @@ struct drb_to_add_mod_scg_r12_s { bool lc_ch_id_scg_r15_present = false; uint8_t lc_ch_id_scg_r15 = 32; copy_ptr rlc_cfg_v1530; - copy_ptr rlc_bearer_cfg_dupl_r15; + copy_ptr rlc_bearer_cfg_secondary_r15; + // group 2 + copy_ptr rlc_cfg_v1560; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6684,6 +6688,8 @@ struct rr_cfg_ded_scg_r12_s { // group 1 copy_ptr srb_to_add_mod_list_scg_r15; copy_ptr srb_to_release_list_scg_r15; + // group 2 + copy_ptr drb_to_release_list_scg_r15; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/si.h b/lib/include/srslte/asn1/rrc/si.h index 3e7b0a3e9..93e4b2823 100644 --- a/lib/include/srslte/asn1/rrc/si.h +++ b/lib/include/srslte/asn1/rrc/si.h @@ -230,20 +230,18 @@ struct sib_type1_v1540_ies_s { // SystemInformationBlockType1-v1530-IEs ::= SEQUENCE struct sib_type1_v1530_ies_s { struct crs_intf_mitig_cfg_r15_c_ { - struct crs_intf_mitig_num_prbs_r15_opts { + struct crs_intf_mitig_num_prbs_opts { enum options { n6, n24, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated crs_intf_mitig_num_prbs_r15_e_; + typedef enumerated crs_intf_mitig_num_prbs_e_; struct types_opts { - enum options { crs_intf_mitig_enabled_minus15, crs_intf_mitig_num_prbs_r15, nulltype } value; - typedef int8_t number_type; + enum options { crs_intf_mitig_enabled, crs_intf_mitig_num_prbs, nulltype } value; std::string to_string() const; - int8_t to_number() const; }; typedef enumerated types; @@ -255,25 +253,25 @@ struct sib_type1_v1530_ies_s { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() + crs_intf_mitig_num_prbs_e_& crs_intf_mitig_num_prbs() { - assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "crs-IntfMitigConfig-r15"); + assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "crs-IntfMitigConfig-r15"); return c; } - const crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() const + const crs_intf_mitig_num_prbs_e_& crs_intf_mitig_num_prbs() const { - assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "crs-IntfMitigConfig-r15"); + assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "crs-IntfMitigConfig-r15"); return c; } - crs_intf_mitig_num_prbs_r15_e_& set_crs_intf_mitig_num_prbs_r15() + crs_intf_mitig_num_prbs_e_& set_crs_intf_mitig_num_prbs() { - set(types::crs_intf_mitig_num_prbs_r15); + set(types::crs_intf_mitig_num_prbs); return c; } private: - types type_; - crs_intf_mitig_num_prbs_r15_e_ c; + types type_; + crs_intf_mitig_num_prbs_e_ c; }; struct cell_barred_crs_r15_opts { enum options { barred, not_barred, nulltype } value; @@ -348,6 +346,16 @@ struct cell_sel_info_ce1_v1360_s { void to_json(json_writer& j) const; }; +// SI-Periodicity-r12 ::= ENUMERATED +struct si_periodicity_r12_opts { + enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; +}; +typedef enumerated si_periodicity_r12_e; + // SystemInformationBlockType1-v1450-IEs ::= SEQUENCE struct sib_type1_v1450_ies_s { bool tdd_cfg_v1450_present = false; @@ -1165,18 +1173,8 @@ struct ue_timers_and_consts_s { // SchedulingInfo ::= SEQUENCE struct sched_info_s { - struct si_periodicity_opts { - enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated si_periodicity_e_; - - // member variables - si_periodicity_e_ si_periodicity; - sib_map_info_l sib_map_info; + si_periodicity_r12_e si_periodicity; + sib_map_info_l sib_map_info; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/uecap.h b/lib/include/srslte/asn1/rrc/uecap.h index 1697f3db9..4d05fd6d9 100644 --- a/lib/include/srslte/asn1/rrc/uecap.h +++ b/lib/include/srslte/asn1/rrc/uecap.h @@ -36,6 +36,18 @@ struct ca_bw_class_r10_opts { }; typedef enumerated ca_bw_class_r10_e; +// UECapabilityEnquiry-v1560-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1560_ies_s { + bool requested_cap_common_r15_present = false; + bool non_crit_ext_present = false; + dyn_octstring requested_cap_common_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // BandIndication-r14 ::= SEQUENCE struct band_ind_r14_s { bool ca_bw_class_ul_r14_present = false; @@ -49,14 +61,28 @@ struct band_ind_r14_s { void to_json(json_writer& j) const; }; +// UECapabilityEnquiry-v1550-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1550_ies_s { + bool requested_cap_nr_r15_present = false; + bool non_crit_ext_present = false; + dyn_octstring requested_cap_nr_r15; + ue_cap_enquiry_v1560_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // BandCombination-r14 ::= SEQUENCE (SIZE (1..64)) OF BandIndication-r14 using band_combination_r14_l = dyn_array; // UECapabilityEnquiry-v1530-IEs ::= SEQUENCE struct ue_cap_enquiry_v1530_ies_s { - bool request_stti_spt_cap_r15_present = false; - bool eutra_nr_only_r15_present = false; - bool non_crit_ext_present = false; + bool request_stti_spt_cap_r15_present = false; + bool eutra_nr_only_r15_present = false; + bool non_crit_ext_present = false; + ue_cap_enquiry_v1550_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1121,8 +1147,8 @@ struct mimo_ca_params_per_bo_bc_v1430_s { void to_json(json_writer& j) const; }; -// RetuningTimeInfo-r14 ::= SEQUENCE -struct retuning_time_info_r14_s { +// SRS-CapabilityPerBandPair-r14 ::= SEQUENCE +struct srs_cap_per_band_pair_r14_s { struct retuning_info_s_ { struct rf_retuning_time_dl_r14_opts { enum options { @@ -1208,16 +1234,16 @@ struct ul_minus256_qam_per_cc_info_r14_s { // BandParameters-v1430 ::= SEQUENCE struct band_params_v1430_s { using ul_minus256_qam_per_cc_info_list_r14_l_ = dyn_array; - using retuning_time_info_band_list_r14_l_ = dyn_array; + using srs_cap_per_band_pair_list_r14_l_ = dyn_array; // member variables bool band_params_dl_v1430_present = false; bool ul_minus256_qam_r14_present = false; bool ul_minus256_qam_per_cc_info_list_r14_present = false; - bool retuning_time_info_band_list_r14_present = false; + bool srs_cap_per_band_pair_list_r14_present = false; mimo_ca_params_per_bo_bc_v1430_s band_params_dl_v1430; ul_minus256_qam_per_cc_info_list_r14_l_ ul_minus256_qam_per_cc_info_list_r14; - retuning_time_info_band_list_r14_l_ retuning_time_info_band_list_r14; + srs_cap_per_band_pair_list_r14_l_ srs_cap_per_band_pair_list_r14; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1341,6 +1367,45 @@ struct band_combination_params_v1470_s { void to_json(json_writer& j) const; }; +// SRS-CapabilityPerBandPair-v14b0 ::= SEQUENCE +struct srs_cap_per_band_pair_v14b0_s { + bool srs_flex_timing_r14_present = false; + bool srs_harq_ref_cfg_r14_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v14b0 ::= SEQUENCE +struct band_params_v14b0_s { + using srs_cap_per_band_pair_list_v14b0_l_ = dyn_array; + + // member variables + bool srs_cap_per_band_pair_list_v14b0_present = false; + srs_cap_per_band_pair_list_v14b0_l_ srs_cap_per_band_pair_list_v14b0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v14b0 ::= SEQUENCE +struct band_combination_params_v14b0_s { + using band_param_list_v14b0_l_ = dyn_array; + + // member variables + bool band_param_list_v14b0_present = false; + band_param_list_v14b0_l_ band_param_list_v14b0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // DL-UL-CCs-r15 ::= SEQUENCE struct dl_ul_ccs_r15_s { bool max_num_dl_ccs_r15_present = false; @@ -1636,12 +1701,23 @@ struct feature_set_ul_r15_s { void to_json(json_writer& j) const; }; +// FeatureSetDL-v1550 ::= SEQUENCE +struct feature_set_dl_v1550_s { + bool dl_minus1024_qam_r15_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // FeatureSetsEUTRA-r15 ::= SEQUENCE struct feature_sets_eutra_r15_s { using feature_sets_dl_r15_l_ = dyn_array; using feature_sets_dl_per_cc_r15_l_ = dyn_array; using feature_sets_ul_r15_l_ = dyn_array; using feature_sets_ul_per_cc_r15_l_ = dyn_array; + using feature_sets_dl_v1550_l_ = dyn_array; // member variables bool ext = false; @@ -1654,6 +1730,8 @@ struct feature_sets_eutra_r15_s { feature_sets_ul_r15_l_ feature_sets_ul_r15; feature_sets_ul_per_cc_r15_l_ feature_sets_ul_per_cc_r15; // ... + // group 0 + copy_ptr feature_sets_dl_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3024,6 +3102,30 @@ struct rf_params_v1470_s { void to_json(json_writer& j) const; }; +// SupportedBandCombination-v14b0 ::= SEQUENCE (SIZE (1..128)) OF BandCombinationParameters-v14b0 +using supported_band_combination_v14b0_l = dyn_array; + +// SupportedBandCombinationAdd-v14b0 ::= SEQUENCE (SIZE (1..256)) OF BandCombinationParameters-v14b0 +using supported_band_combination_add_v14b0_l = dyn_array; + +// SupportedBandCombinationReduced-v14b0 ::= SEQUENCE (SIZE (1..384)) OF BandCombinationParameters-v14b0 +using supported_band_combination_reduced_v14b0_l = dyn_array; + +// RF-Parameters-v14b0 ::= SEQUENCE +struct rf_params_v14b0_s { + bool supported_band_combination_v14b0_present = false; + bool supported_band_combination_add_v14b0_present = false; + bool supported_band_combination_reduced_v14b0_present = false; + supported_band_combination_v14b0_l supported_band_combination_v14b0; + supported_band_combination_add_v14b0_l supported_band_combination_add_v14b0; + supported_band_combination_reduced_v14b0_l supported_band_combination_reduced_v14b0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // SupportedBandCombination-v1530 ::= SEQUENCE (SIZE (1..128)) OF BandCombinationParameters-v1530 using supported_band_combination_v1530_l = dyn_array; @@ -3209,6 +3311,42 @@ struct sl_params_v1530_s { void to_json(json_writer& j) const; }; +// NeighCellSI-AcquisitionParameters-v15a0 ::= SEQUENCE +struct neigh_cell_si_acquisition_params_v15a0_s { + bool eutra_cgi_report_nedc_r15_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1540 ::= SEQUENCE +struct phy_layer_params_v1540_s { + struct stti_spt_cap_v1540_s_ {}; + + // member variables + bool stti_spt_cap_v1540_present = false; + bool crs_im_tm1_to_tm9_one_rx_port_v1540_present = false; + bool cch_im_ref_rec_type_a_one_rx_port_v1540_present = false; + stti_spt_cap_v1540_s_ stti_spt_cap_v1540; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1550 ::= SEQUENCE +struct phy_layer_params_v1550_s { + bool dmrs_overhead_reduction_r15_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // EUTRA-5GC-Parameters-r15 ::= SEQUENCE struct eutra_minus5_gc_params_r15_s { bool eutra_minus5_gc_r15_present = false; @@ -3225,10 +3363,15 @@ struct eutra_minus5_gc_params_r15_s { void to_json(json_writer& j) const; }; -// NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE -struct neigh_cell_si_acquisition_params_v1530_s { - bool report_cgi_nr_en_dc_r15_present = false; - bool report_cgi_nr_no_en_dc_r15_present = false; +// UE-EUTRA-CapabilityAddXDD-Mode-v15a0 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v15a0_s { + bool phy_layer_params_v1530_present = false; + bool phy_layer_params_v1540_present = false; + bool phy_layer_params_v1550_present = false; + phy_layer_params_v1530_s phy_layer_params_v1530; + phy_layer_params_v1540_s phy_layer_params_v1540; + phy_layer_params_v1550_s phy_layer_params_v1550; + neigh_cell_si_acquisition_params_v15a0_s neigh_cell_si_acquisition_params_v15a0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3236,9 +3379,10 @@ struct neigh_cell_si_acquisition_params_v1530_s { void to_json(json_writer& j) const; }; -// Other-Parameters-v1540 ::= SEQUENCE -struct other_params_v1540_s { - bool in_dev_coex_ind_endc_r15_present = false; +// IRAT-ParametersNR-v1570 ::= SEQUENCE +struct irat_params_nr_v1570_s { + bool ss_sinr_meas_nr_fr1_r15_present = false; + bool ss_sinr_meas_nr_fr2_r15_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3246,15 +3390,153 @@ struct other_params_v1540_s { void to_json(json_writer& j) const; }; -// PhyLayerParameters-v1540 ::= SEQUENCE -struct phy_layer_params_v1540_s { - struct stti_spt_cap_v1540_s_ {}; +// PDCP-ParametersNR-v1560 ::= SEQUENCE +struct pdcp_params_nr_v1560_s { + bool ims_vo_nr_pdcp_scg_ngendc_r15_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RF-Parameters-v1570 ::= SEQUENCE +struct rf_params_v1570_s { + struct dl_minus1024_qam_scaling_factor_r15_opts { + enum options { v1, v1dot2, v1dot25, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated dl_minus1024_qam_scaling_factor_r15_e_; // member variables - bool stti_spt_cap_v1540_present = false; - bool crs_im_tm1_to_tm9_one_rx_port_v1540_present = false; - bool cch_im_ref_rec_type_a_one_rx_port_v1540_present = false; - stti_spt_cap_v1540_s_ stti_spt_cap_v1540; + dl_minus1024_qam_scaling_factor_r15_e_ dl_minus1024_qam_scaling_factor_r15; + uint8_t dl_minus1024_qam_total_weighted_layers_r15 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v15a0-IEs ::= SEQUENCE +struct ue_eutra_cap_v15a0_ies_s { + bool eutra_minus5_gc_params_r15_present = false; + bool fdd_add_ue_eutra_cap_v15a0_present = false; + bool tdd_add_ue_eutra_cap_v15a0_present = false; + bool non_crit_ext_present = false; + neigh_cell_si_acquisition_params_v15a0_s neigh_cell_si_acquisition_params_v15a0; + eutra_minus5_gc_params_r15_s eutra_minus5_gc_params_r15; + ue_eutra_cap_add_xdd_mode_v15a0_s fdd_add_ue_eutra_cap_v15a0; + ue_eutra_cap_add_xdd_mode_v15a0_s tdd_add_ue_eutra_cap_v15a0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersNR-v1560 ::= SEQUENCE +struct irat_params_nr_v1560_s { + bool ng_en_dc_r15_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellSI-AcquisitionParameters-v1550 ::= SEQUENCE +struct neigh_cell_si_acquisition_params_v1550_s { + bool eutra_cgi_report_endc_r15_present = false; + bool utra_geran_cgi_report_endc_r15_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1570-IEs ::= SEQUENCE +struct ue_eutra_cap_v1570_ies_s { + bool rf_params_v1570_present = false; + bool irat_params_nr_v1570_present = false; + bool non_crit_ext_present = false; + rf_params_v1570_s rf_params_v1570; + irat_params_nr_v1570_s irat_params_nr_v1570; + ue_eutra_cap_v15a0_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1560 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1560_s { + pdcp_params_nr_v1560_s pdcp_params_nr_v1560; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MAC-Parameters-v1550 ::= SEQUENCE +struct mac_params_v1550_s { + bool elcid_support_r15_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1560-IEs ::= SEQUENCE +struct ue_eutra_cap_v1560_ies_s { + bool applied_cap_filt_common_r15_present = false; + bool non_crit_ext_present = false; + pdcp_params_nr_v1560_s pdcp_params_nr_v1560; + irat_params_nr_v1560_s irat_params_nr_v1560; + dyn_octstring applied_cap_filt_common_r15; + ue_eutra_cap_add_xdd_mode_v1560_s fdd_add_ue_eutra_cap_v1560; + ue_eutra_cap_add_xdd_mode_v1560_s tdd_add_ue_eutra_cap_v1560; + ue_eutra_cap_v1570_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1550 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1550_s { + bool neigh_cell_si_acquisition_params_v1550_present = false; + neigh_cell_si_acquisition_params_v1550_s neigh_cell_si_acquisition_params_v1550; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE +struct neigh_cell_si_acquisition_params_v1530_s { + bool report_cgi_nr_en_dc_r15_present = false; + bool report_cgi_nr_no_en_dc_r15_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Other-Parameters-v1540 ::= SEQUENCE +struct other_params_v1540_s { + bool in_dev_coex_ind_endc_r15_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3275,6 +3557,23 @@ struct sl_params_v1540_s { void to_json(json_writer& j) const; }; +// UE-EUTRA-Capability-v1550-IEs ::= SEQUENCE +struct ue_eutra_cap_v1550_ies_s { + bool neigh_cell_si_acquisition_params_v1550_present = false; + bool non_crit_ext_present = false; + neigh_cell_si_acquisition_params_v1550_s neigh_cell_si_acquisition_params_v1550; + phy_layer_params_v1550_s phy_layer_params_v1550; + mac_params_v1550_s mac_params_v1550; + ue_eutra_cap_add_xdd_mode_v1550_s fdd_add_ue_eutra_cap_v1550; + ue_eutra_cap_add_xdd_mode_v1550_s tdd_add_ue_eutra_cap_v1550; + ue_eutra_cap_v1560_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // UE-EUTRA-CapabilityAddXDD-Mode-v1540 ::= SEQUENCE struct ue_eutra_cap_add_xdd_mode_v1540_s { bool eutra_minus5_gc_params_r15_present = false; @@ -3367,6 +3666,7 @@ struct ue_eutra_cap_v1540_ies_s { ue_eutra_cap_add_xdd_mode_v1540_s tdd_add_ue_eutra_cap_v1540; sl_params_v1540_s sl_params_v1540; irat_params_nr_v1540_s irat_params_nr_v1540; + ue_eutra_cap_v1550_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3388,8 +3688,8 @@ struct ue_eutra_cap_add_xdd_mode_v1530_s { // MeasParameters-v1520 ::= SEQUENCE struct meas_params_v1520_s { - bool meas_gap_patterns_v1520_present = false; - fixed_bitstring<8> meas_gap_patterns_v1520; + bool meas_gap_patterns_r15_present = false; + fixed_bitstring<8> meas_gap_patterns_r15; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3761,6 +4061,16 @@ struct pdcp_params_v1430_s { void to_json(json_writer& j) const; }; +// PhyLayerParameters-v14a0 ::= SEQUENCE +struct phy_layer_params_v14a0_s { + bool ssp10_tdd_only_r14_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RLC-Parameters-v1430 ::= SEQUENCE struct rlc_params_v1430_s { bool extended_poll_byte_r14_present = false; @@ -3794,6 +4104,18 @@ struct ue_eutra_cap_v1440_ies_s { void to_json(json_writer& j) const; }; +// UE-EUTRA-Capability-v14b0-IEs ::= SEQUENCE +struct ue_eutra_cap_v14b0_ies_s { + bool rf_params_v14b0_present = false; + bool non_crit_ext_present = false; + rf_params_v14b0_s rf_params_v14b0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // UE-EUTRA-CapabilityAddXDD-Mode-v1430 ::= SEQUENCE struct ue_eutra_cap_add_xdd_mode_v1430_s { bool phy_layer_params_v1430_present = false; @@ -3944,6 +4266,18 @@ struct ue_eutra_cap_v1430_ies_s { void to_json(json_writer& j) const; }; +// UE-EUTRA-Capability-v14a0-IEs ::= SEQUENCE +struct ue_eutra_cap_v14a0_ies_s { + bool non_crit_ext_present = false; + phy_layer_params_v14a0_s phy_layer_params_v14a0; + ue_eutra_cap_v14b0_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // CE-Parameters-v1350 ::= SEQUENCE struct ce_params_v1350_s { bool unicast_freq_hop_r13_present = false; @@ -3976,6 +4310,7 @@ struct ue_eutra_cap_v1470_ies_s { mbms_params_v1470_s mbms_params_v1470; phy_layer_params_v1470_s phy_layer_params_v1470; rf_params_v1470_s rf_params_v1470; + ue_eutra_cap_v14a0_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4007,8 +4342,8 @@ struct ue_eutra_cap_v1350_ies_s { void to_json(json_writer& j) const; }; -// UE-EUTRA-Capability-v13x0-IEs ::= SEQUENCE -struct ue_eutra_cap_v13x0_ies_s { +// UE-EUTRA-Capability-v13e0a-IEs ::= SEQUENCE +struct ue_eutra_cap_v13e0a_ies_s { bool late_non_crit_ext_present = false; bool non_crit_ext_present = false; dyn_octstring late_non_crit_ext; @@ -4059,10 +4394,10 @@ struct ue_eutra_cap_v1340_ies_s { // UE-EUTRA-Capability-v1390-IEs ::= SEQUENCE struct ue_eutra_cap_v1390_ies_s { - bool rf_params_v1390_present = false; - bool non_crit_ext_present = false; - rf_params_v1390_s rf_params_v1390; - ue_eutra_cap_v13x0_ies_s non_crit_ext; + bool rf_params_v1390_present = false; + bool non_crit_ext_present = false; + rf_params_v1390_s rf_params_v1390; + ue_eutra_cap_v13e0a_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/ul_ccch_msg.h b/lib/include/srslte/asn1/rrc/ul_ccch_msg.h index 37f23c641..5d7b0f13f 100644 --- a/lib/include/srslte/asn1/rrc/ul_ccch_msg.h +++ b/lib/include/srslte/asn1/rrc/ul_ccch_msg.h @@ -182,6 +182,18 @@ private: void destroy_(); }; +// RRCEarlyDataRequest-v1590-IEs ::= SEQUENCE +struct rrc_early_data_request_v1590_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // ReestabUE-Identity ::= SEQUENCE struct reestab_ue_id_s { fixed_bitstring<16> c_rnti; @@ -419,17 +431,18 @@ struct rrc_conn_resume_request_r13_ies_s { // RRCEarlyDataRequest-r15-IEs ::= SEQUENCE struct rrc_early_data_request_r15_ies_s { struct establishment_cause_r15_opts { - enum options { mo_data_r15, delay_tolerant_access_r15, nulltype } value; + enum options { mo_data, delay_tolerant_access, nulltype } value; std::string to_string() const; }; typedef enumerated establishment_cause_r15_e_; // member variables - bool non_crit_ext_present = false; - s_tmsi_s s_tmsi_r15; - establishment_cause_r15_e_ establishment_cause_r15; - dyn_octstring ded_info_nas_r15; + bool non_crit_ext_present = false; + s_tmsi_s s_tmsi_r15; + establishment_cause_r15_e_ establishment_cause_r15; + dyn_octstring ded_info_nas_r15; + rrc_early_data_request_v1590_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc/ul_dcch_msg.h b/lib/include/srslte/asn1/rrc/ul_dcch_msg.h index 7fd47dd04..5e76b092b 100644 --- a/lib/include/srslte/asn1/rrc/ul_dcch_msg.h +++ b/lib/include/srslte/asn1/rrc/ul_dcch_msg.h @@ -847,17 +847,6 @@ using affected_carrier_freq_list_v1310_l = dyn_array; -// FailureReportSCG-v12d0 ::= SEQUENCE -struct fail_report_scg_v12d0_s { - bool meas_result_neigh_cells_v12d0_present = false; - meas_result_list2_eutra_v9e0_l meas_result_neigh_cells_v12d0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // IDC-SubframePattern-r11 ::= CHOICE struct idc_sf_pattern_r11_c { struct sf_pattern_tdd_r11_c_ { @@ -1998,18 +1987,6 @@ struct rstd_inter_freq_info_r10_s { void to_json(json_writer& j) const; }; -// SCGFailureInformation-v12d0-IEs ::= SEQUENCE -struct scg_fail_info_v12d0_ies_s { - bool fail_report_scg_v12d0_present = false; - bool non_crit_ext_present = false; - fail_report_scg_v12d0_s fail_report_scg_v12d0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // SL-CommTxResourceReq-r12 ::= SEQUENCE struct sl_comm_tx_res_req_r12_s { bool carrier_freq_r12_present = false; @@ -2230,6 +2207,18 @@ struct mbms_interest_ind_v1310_ies_s { void to_json(json_writer& j) const; }; +// MeasReportAppLayer-v1590-IEs ::= SEQUENCE +struct meas_report_app_layer_v1590_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // ProximityIndication-v930-IEs ::= SEQUENCE struct proximity_ind_v930_ies_s { bool late_non_crit_ext_present = false; @@ -2583,8 +2572,20 @@ struct registered_mme_s { void to_json(json_writer& j) const; }; -// SCGFailureInformation-v1310-IEs ::= SEQUENCE -struct scg_fail_info_v1310_ies_s { +// SCGFailureInformation-v12d0a-IEs ::= SEQUENCE +struct scg_fail_info_v12d0a_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformationNR-v1590-IEs ::= SEQUENCE +struct scg_fail_info_nr_v1590_ies_s { bool late_non_crit_ext_present = false; bool non_crit_ext_present = false; dyn_octstring late_non_crit_ext; @@ -2991,19 +2992,20 @@ struct mbms_interest_ind_r11_ies_s { // MeasReportAppLayer-r15-IEs ::= SEQUENCE struct meas_report_app_layer_r15_ies_s { - struct service_type_opts { + struct service_type_r15_opts { enum options { qoe, qoemtsi, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value; std::string to_string() const; }; - typedef enumerated service_type_e_; + typedef enumerated service_type_r15_e_; // member variables - bool meas_report_app_layer_container_r15_present = false; - bool service_type_present = false; - bool non_crit_ext_present = false; - bounded_octstring<1, 8000> meas_report_app_layer_container_r15; - service_type_e_ service_type; + bool meas_report_app_layer_container_r15_present = false; + bool service_type_r15_present = false; + bool non_crit_ext_present = false; + bounded_octstring<1, 8000> meas_report_app_layer_container_r15; + service_type_r15_e_ service_type_r15; + meas_report_app_layer_v1590_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3188,10 +3190,10 @@ struct rrc_conn_setup_complete_r8_ies_s { // SCGFailureInformation-r12-IEs ::= SEQUENCE struct scg_fail_info_r12_ies_s { - bool fail_report_scg_r12_present = false; - bool non_crit_ext_present = false; - fail_report_scg_r12_s fail_report_scg_r12; - scg_fail_info_v1310_ies_s non_crit_ext; + bool fail_report_scg_r12_present = false; + bool non_crit_ext_present = false; + fail_report_scg_r12_s fail_report_scg_r12; + scg_fail_info_v12d0a_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3201,9 +3203,10 @@ struct scg_fail_info_r12_ies_s { // SCGFailureInformationNR-r15-IEs ::= SEQUENCE struct scg_fail_info_nr_r15_ies_s { - bool fail_report_scg_nr_r15_present = false; - bool non_crit_ext_present = false; - fail_report_scg_nr_r15_s fail_report_scg_nr_r15; + bool fail_report_scg_nr_r15_present = false; + bool non_crit_ext_present = false; + fail_report_scg_nr_r15_s fail_report_scg_nr_r15; + scg_fail_info_nr_v1590_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/include/srslte/asn1/rrc_nbiot.h b/lib/include/srslte/asn1/rrc_nbiot.h index ec71814dd..3ea7b1cd8 100644 --- a/lib/include/srslte/asn1/rrc_nbiot.h +++ b/lib/include/srslte/asn1/rrc_nbiot.h @@ -134,6 +134,27 @@ struct carrier_freq_nb_r13_s { void to_json(json_writer& j) const; }; +// CarrierFreq-NB-v1550 ::= SEQUENCE +struct carrier_freq_nb_v1550_s { + struct carrier_freq_offset_v1550_opts { + enum options { v_minus8dot5, v_minus4dot5, v3dot5, v7dot5, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated carrier_freq_offset_v1550_e_; + + // member variables + carrier_freq_offset_v1550_e_ carrier_freq_offset_v1550; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // DL-AM-RLC-NB-r13 ::= SEQUENCE struct dl_am_rlc_nb_r13_s { bool enable_status_report_sn_gap_r13_present = false; @@ -478,6 +499,8 @@ struct dl_carrier_cfg_ded_nb_r13_s { nrs_pwr_offset_non_anchor_v1330_e_ nrs_pwr_offset_non_anchor_v1330; // group 1 copy_ptr dl_gap_non_anchor_v1530; + // group 2 + copy_ptr dl_carrier_freq_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1565,6 +1588,8 @@ struct as_cfg_nb_s { fixed_bitstring<16> source_ue_id_r13; carrier_freq_nb_r13_s source_dl_carrier_freq_r13; // ... + // group 0 + copy_ptr source_dl_carrier_freq_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2834,6 +2859,35 @@ struct nprach_params_tdd_nb_r15_s { void to_json(json_writer& j) const; }; +// NPRACH-ParametersTDD-NB-v1550 ::= SEQUENCE +struct nprach_params_tdd_nb_v1550_s { + struct max_num_preamb_attempt_ce_v1550_opts { + enum options { n3, n4, n5, n6, n7, n8, n10, spare1, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_preamb_attempt_ce_v1550_e_; + struct num_repeats_per_preamb_attempt_v1550_opts { + enum options { n1, n2, n4, n8, n16, n32, n64, n128, n256, n512, n1024, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated num_repeats_per_preamb_attempt_v1550_e_; + + // member variables + max_num_preamb_attempt_ce_v1550_e_ max_num_preamb_attempt_ce_v1550; + num_repeats_per_preamb_attempt_v1550_e_ num_repeats_per_preamb_attempt_v1550; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // PagingWeight-NB-r14 ::= ENUMERATED struct paging_weight_nb_r14_opts { enum options { w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, nulltype } value; @@ -3097,6 +3151,8 @@ struct dl_carrier_cfg_common_nb_r14_s { // ... // group 0 copy_ptr dl_gap_non_anchor_v1530; + // group 1 + copy_ptr dl_carrier_freq_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3134,6 +3190,9 @@ using nprach_params_list_fmt2_nb_r15_l = dyn_array; // NPRACH-ParametersListTDD-NB-r15 ::= SEQUENCE (SIZE (1..3)) OF NPRACH-ParametersTDD-NB-r15 using nprach_params_list_tdd_nb_r15_l = dyn_array; +// NPRACH-ParametersListTDD-NB-v1550 ::= SEQUENCE (SIZE (1..3)) OF NPRACH-ParametersTDD-NB-v1550 +using nprach_params_list_tdd_nb_v1550_l = dyn_array; + // PCCH-Config-NB-r14 ::= SEQUENCE struct pcch_cfg_nb_r14_s { struct npdcch_num_repeat_paging_r14_opts { @@ -3419,6 +3478,8 @@ struct inter_freq_carrier_freq_info_nb_r13_s { // group 2 copy_ptr nsss_rrm_cfg_r15; copy_ptr inter_freq_neigh_cell_list_v1530; + // group 3 + copy_ptr dl_carrier_freq_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3523,19 +3584,19 @@ struct nprach_cfg_sib_nb_v1530_s { std::string to_string() const; }; typedef enumerated nprach_preamb_format_r15_e_; - struct num_repeats_per_preamb_attempt_r15_opts { + struct dummy_opts { enum options { n1, n2, n4, n8, n16, n32, n64, n128, n256, n512, n1024, nulltype } value; typedef uint16_t number_type; std::string to_string() const; uint16_t to_number() const; }; - typedef enumerated num_repeats_per_preamb_attempt_r15_e_; + typedef enumerated dummy_e_; // member variables - nprach_preamb_format_r15_e_ nprach_preamb_format_r15; - num_repeats_per_preamb_attempt_r15_e_ num_repeats_per_preamb_attempt_r15; - nprach_params_list_tdd_nb_r15_l nprach_params_list_tdd_r15; + nprach_preamb_format_r15_e_ nprach_preamb_format_r15; + dummy_e_ dummy; + nprach_params_list_tdd_nb_r15_l nprach_params_list_tdd_r15; }; struct fmt2_params_r15_s_ { bool nprach_params_list_fmt2_r15_present = false; @@ -3564,6 +3625,21 @@ struct nprach_cfg_sib_nb_v1530_s { void to_json(json_writer& j) const; }; +// NPRACH-ConfigSIB-NB-v1550 ::= SEQUENCE +struct nprach_cfg_sib_nb_v1550_s { + struct tdd_params_v1550_s_ { + nprach_params_list_tdd_nb_v1550_l nprach_params_list_tdd_v1550; + }; + + // member variables + tdd_params_v1550_s_ tdd_params_v1550; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // NPRACH-ProbabilityAnchor-NB-r14 ::= SEQUENCE struct nprach_probability_anchor_nb_r14_s { struct nprach_probability_anchor_r14_opts { @@ -4120,6 +4196,8 @@ struct rr_cfg_common_sib_nb_r13_s { copy_ptr nprach_cfg_v1530; copy_ptr dl_gap_v1530; copy_ptr wus_cfg_r15; + // group 3 + copy_ptr nprach_cfg_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -5652,6 +5730,18 @@ struct rrc_conn_reest_nb_v1430_ies_s { void to_json(json_writer& j) const; }; +// RRCEarlyDataComplete-NB-v1590-IEs ::= SEQUENCE +struct rrc_early_data_complete_nb_v1590_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RedirectedCarrierInfo-NB-r13 ::= CarrierFreq-NB-r13 typedef carrier_freq_nb_r13_s redirected_carrier_info_nb_r13_s; @@ -5746,15 +5836,16 @@ struct rrc_conn_setup_nb_r13_ies_s { // RRCEarlyDataComplete-NB-r15-IEs ::= SEQUENCE struct rrc_early_data_complete_nb_r15_ies_s { - bool ded_info_nas_r15_present = false; - bool extended_wait_time_r15_present = false; - bool redirected_carrier_info_r15_present = false; - bool redirected_carrier_info_ext_r15_present = false; - bool non_crit_ext_present = false; - dyn_octstring ded_info_nas_r15; - uint16_t extended_wait_time_r15 = 1; - redirected_carrier_info_nb_r13_s redirected_carrier_info_r15; - redirected_carrier_info_nb_v1430_s redirected_carrier_info_ext_r15; + bool ded_info_nas_r15_present = false; + bool extended_wait_time_r15_present = false; + bool redirected_carrier_info_r15_present = false; + bool redirected_carrier_info_ext_r15_present = false; + bool non_crit_ext_present = false; + dyn_octstring ded_info_nas_r15; + uint16_t extended_wait_time_r15 = 1; + redirected_carrier_info_nb_r13_s redirected_carrier_info_r15; + redirected_carrier_info_nb_v1430_s redirected_carrier_info_ext_r15; + rrc_early_data_complete_nb_v1590_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6240,12 +6331,40 @@ struct dl_ccch_msg_nb_s { void to_json(json_writer& j) const; }; +// RRCConnectionRelease-NB-v15b0-IEs ::= SEQUENCE +struct rrc_conn_release_nb_v15b0_ies_s { + bool no_last_cell_upd_r15_present = false; + bool non_crit_ext_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RedirectedCarrierInfo-NB-v1550 ::= CarrierFreq-NB-v1550 +typedef carrier_freq_nb_v1550_s redirected_carrier_info_nb_v1550_s; + +// RRCConnectionRelease-NB-v1550-IEs ::= SEQUENCE +struct rrc_conn_release_nb_v1550_ies_s { + bool redirected_carrier_info_v1550_present = false; + bool non_crit_ext_present = false; + redirected_carrier_info_nb_v1550_s redirected_carrier_info_v1550; + rrc_conn_release_nb_v15b0_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RRCConnectionRelease-NB-v1530-IEs ::= SEQUENCE struct rrc_conn_release_nb_v1530_ies_s { - bool drb_continue_rohc_r15_present = false; - bool next_hop_chaining_count_r15_present = false; - bool non_crit_ext_present = false; - uint8_t next_hop_chaining_count_r15 = 0; + bool drb_continue_rohc_r15_present = false; + bool next_hop_chaining_count_r15_present = false; + bool non_crit_ext_present = false; + uint8_t next_hop_chaining_count_r15 = 0; + rrc_conn_release_nb_v1550_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -8234,22 +8353,35 @@ struct rrc_conn_setup_complete_nb_s { void to_json(json_writer& j) const; }; +// RRCEarlyDataRequest-NB-v1590-IEs ::= SEQUENCE +struct rrc_early_data_request_nb_v1590_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RRCEarlyDataRequest-NB-r15-IEs ::= SEQUENCE struct rrc_early_data_request_nb_r15_ies_s { struct establishment_cause_r15_opts { - enum options { mo_data_r15, mo_exception_data_r15, delay_tolerant_access_r15, spare1, nulltype } value; + enum options { mo_data, mo_exception_data, delay_tolerant_access, spare1, nulltype } value; std::string to_string() const; }; typedef enumerated establishment_cause_r15_e_; // member variables - bool cqi_npdcch_r15_present = false; - bool non_crit_ext_present = false; - s_tmsi_s s_tmsi_r15; - establishment_cause_r15_e_ establishment_cause_r15; - cqi_npdcch_nb_r14_e cqi_npdcch_r15; - dyn_octstring ded_info_nas_r15; + bool cqi_npdcch_r15_present = false; + bool non_crit_ext_present = false; + s_tmsi_s s_tmsi_r15; + establishment_cause_r15_e_ establishment_cause_r15; + cqi_npdcch_nb_r14_e cqi_npdcch_r15; + dyn_octstring ded_info_nas_r15; + rrc_early_data_request_nb_v1590_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/lib/src/asn1/rrc.cc b/lib/src/asn1/rrc.cc index 5a7385c22..bafe046f1 100644 --- a/lib/src/asn1/rrc.cc +++ b/lib/src/asn1/rrc.cc @@ -114,14 +114,9 @@ int8_t sl_tx_pwr_r14_c::types_opts::to_number() const std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types_opts::to_string() const { - static const char* options[] = {"crs-IntfMitigEnabled-15", "crs-IntfMitigNumPRBs-r15"}; + static const char* options[] = {"crs-IntfMitigEnabled", "crs-IntfMitigNumPRBs"}; 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 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 sl_offset_ind_r12_c::types_opts::to_string() const { @@ -236,6 +231,12 @@ std::string sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::types_op return convert_enum_idx(options, 2, value, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::types"); } +std::string ssb_to_measure_r15_c::types_opts::to_string() const +{ + static const char* options[] = {"shortBitmap-r15", "mediumBitmap-r15", "longBitmap-r15"}; + return convert_enum_idx(options, 3, value, "ssb_to_measure_r15_c::types"); +} + 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 @@ -1063,14 +1064,9 @@ std::string rr_cfg_ded_s::mac_main_cfg_c_::types_opts::to_string() const std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types_opts::to_string() const { - static const char* options[] = {"crs-IntfMitigEnabled-15", "crs-IntfMitigNumPRBs-r15"}; + static const char* options[] = {"crs-IntfMitigEnabled", "crs-IntfMitigNumPRBs"}; 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 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 { @@ -1196,100 +1192,6 @@ std::string phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::type return convert_enum_idx(options, 2, value, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::types"); } -std::string drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types_opts::to_string() const -{ - 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 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 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 const char* options[] = {"intra5GC-r15", "fivegc-ToEPC-r15", "epc-To5GC-r15"}; - return convert_enum_idx(options, 3, value, "security_cfg_ho_v1530_s::handov_type_v1530_c_::types"); -} - -std::string rach_skip_r14_s::target_ta_r14_c_::types_opts::to_string() const -{ - 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 const uint8_t options[] = {0}; - return map_enum_number(options, 1, value, "rach_skip_r14_s::target_ta_r14_c_::types"); -} - -std::string sl_disc_tx_ref_carrier_ded_r13_c::types_opts::to_string() const -{ - 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 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 rclwi_cfg_r13_s::cmd_c_::types_opts::to_string() const -{ - 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 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 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 const char* options[] = {"cellList-r15", "ran-AreaConfigList-r15"}; - return convert_enum_idx(options, 2, value, "ran_notif_area_info_r15_c::types"); -} - -std::string sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types_opts::to_string() const -{ - 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 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 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 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 meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types_opts::to_string() const { static const char* options[] = {"ms40-r12", "ms80-r12", "ms160-r12"}; @@ -1434,6 +1336,23 @@ std::string report_cfg_inter_rat_s::trigger_type_c_::types_opts::to_string() con return convert_enum_idx(options, 2, value, "report_cfg_inter_rat_s::trigger_type_c_::types"); } +std::string drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types_opts::to_string() const +{ + 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 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 const uint8_t options[] = {4, 6}; + return map_enum_number(options, 2, value, "ip_address_r13_c::types"); +} + std::string meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_string() const { static const char* options[] = {"measObjectEUTRA", @@ -1472,18 +1391,18 @@ uint16_t meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types_opts::to_number() return 0; } -std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types_opts::to_string() const -{ - 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 report_cfg_to_add_mod_s::report_cfg_c_::types_opts::to_string() const { 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 security_cfg_ho_v1530_s::handov_type_v1530_c_::types_opts::to_string() const +{ + static const char* options[] = {"intra5GC-r15", "fivegc-ToEPC-r15", "epc-To5GC-r15"}; + return convert_enum_idx(options, 3, value, "security_cfg_ho_v1530_s::handov_type_v1530_c_::types"); +} + std::string meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types_opts::to_string() const { static const char* options[] = {"rstd0-r15", "rstd1-r15", "rstd2-r15", "rstd3-r15", "rstd4-r15", "rstd5-r15", @@ -1500,6 +1419,83 @@ uint8_t meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::typ options, 21, value, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types"); } +std::string rach_skip_r14_s::target_ta_r14_c_::types_opts::to_string() const +{ + 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 const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "rach_skip_r14_s::target_ta_r14_c_::types"); +} + +std::string sl_disc_tx_ref_carrier_ded_r13_c::types_opts::to_string() const +{ + 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 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 rclwi_cfg_r13_s::cmd_c_::types_opts::to_string() const +{ + 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 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 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 const char* options[] = {"cellList-r15", "ran-AreaConfigList-r15"}; + return convert_enum_idx(options, 2, value, "ran_notif_area_info_r15_c::types"); +} + +std::string sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types_opts::to_string() const +{ + 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 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 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 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 prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types_opts::to_string() const +{ + 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 rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::types_opts::to_string() const { static const char* options[] = {"geran-r9", "utra-FDD-r9", "utra-TDD-r9", "utra-TDD-r10"}; @@ -4657,6 +4653,40 @@ std::string visited_cell_info_r12_s::visited_cell_id_r12_c_::types_opts::to_stri return convert_enum_idx(options, 2, value, "visited_cell_info_r12_s::visited_cell_id_r12_c_::types"); } +// FailureReportSCG-v12d0 ::= SEQUENCE +SRSASN_CODE fail_report_scg_v12d0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_neigh_cells_v12d0_present, 1)); + + if (meas_result_neigh_cells_v12d0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_v12d0, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_report_scg_v12d0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_v12d0_present, 1)); + + if (meas_result_neigh_cells_v12d0_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_v12d0, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +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 (const auto& e1 : meas_result_neigh_cells_v12d0) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + std::string idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types_opts::to_string() const { static const char* options[] = {"subframeConfig0-r11", "subframeConfig1-5-r11", "subframeConfig6-r11"}; @@ -4699,6 +4729,44 @@ uint8_t rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types_opts::to_numbe return map_enum_number(options, 21, value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types"); } +// SCGFailureInformation-v12d0b-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_v12d0b_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_report_scg_v12d0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fail_report_scg_v12d0_present) { + HANDLE_CODE(fail_report_scg_v12d0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_v12d0b_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_report_scg_v12d0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fail_report_scg_v12d0_present) { + HANDLE_CODE(fail_report_scg_v12d0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_fail_info_v12d0b_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_report_scg_v12d0_present) { + j.write_fieldname("failureReportSCG-v12d0"); + fail_report_scg_v12d0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + std::string meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const { static const char* options[] = {"measResultListEUTRA", @@ -5028,12 +5096,304 @@ band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_ options, 3, value, "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types"); } +// MIMO-WeightedLayersCapabilities-r13 ::= SEQUENCE +SRSASN_CODE mimo_weighted_layers_cap_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rel_weight_four_layers_r13_present, 1)); + HANDLE_CODE(bref.pack(rel_weight_eight_layers_r13_present, 1)); + + HANDLE_CODE(rel_weight_two_layers_r13.pack(bref)); + if (rel_weight_four_layers_r13_present) { + HANDLE_CODE(rel_weight_four_layers_r13.pack(bref)); + } + if (rel_weight_eight_layers_r13_present) { + HANDLE_CODE(rel_weight_eight_layers_r13.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, total_weighted_layers_r13, (uint8_t)2u, (uint8_t)128u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_weighted_layers_cap_r13_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rel_weight_four_layers_r13_present, 1)); + HANDLE_CODE(bref.unpack(rel_weight_eight_layers_r13_present, 1)); + + HANDLE_CODE(rel_weight_two_layers_r13.unpack(bref)); + if (rel_weight_four_layers_r13_present) { + HANDLE_CODE(rel_weight_four_layers_r13.unpack(bref)); + } + if (rel_weight_eight_layers_r13_present) { + HANDLE_CODE(rel_weight_eight_layers_r13.unpack(bref)); + } + HANDLE_CODE(unpack_integer(total_weighted_layers_r13, bref, (uint8_t)2u, (uint8_t)128u)); + + return SRSASN_SUCCESS; +} +void mimo_weighted_layers_cap_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("relWeightTwoLayers-r13", rel_weight_two_layers_r13.to_string()); + if (rel_weight_four_layers_r13_present) { + j.write_str("relWeightFourLayers-r13", rel_weight_four_layers_r13.to_string()); + } + if (rel_weight_eight_layers_r13_present) { + j.write_str("relWeightEightLayers-r13", rel_weight_eight_layers_r13.to_string()); + } + j.write_int("totalWeightedLayers-r13", total_weighted_layers_r13); + j.end_obj(); +} + +std::string mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_opts::to_string() const +{ + static const char* options[] = {"v1", "v1dot25", "v1dot5", "v1dot75", "v2", "v2dot5", "v3", "v4"}; + return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_e_"); +} +float mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_opts::to_number() const +{ + static const float options[] = {1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0}; + return map_enum_number(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_e_"); +} +std::string mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_opts::to_number_string() const +{ + static const char* options[] = {"1", "1.25", "1.5", "1.75", "2", "2.5", "3", "4"}; + return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_e_"); +} + +std::string mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_opts::to_string() const +{ + static const char* options[] = {"v1", "v1dot25", "v1dot5", "v1dot75", "v2", "v2dot5", "v3", "v4"}; + return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_e_"); +} +float mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_opts::to_number() const +{ + static const float options[] = {1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0}; + return map_enum_number(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_e_"); +} +std::string mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_opts::to_number_string() const +{ + static const char* options[] = {"1", "1.25", "1.5", "1.75", "2", "2.5", "3", "4"}; + return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_e_"); +} + +std::string mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_opts::to_string() const +{ + static const char* options[] = {"v1", "v1dot25", "v1dot5", "v1dot75", "v2", "v2dot5", "v3", "v4"}; + return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_e_"); +} +float mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_opts::to_number() const +{ + static const float options[] = {1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0}; + return map_enum_number(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_e_"); +} +std::string mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_opts::to_number_string() const +{ + static const char* options[] = {"1", "1.25", "1.5", "1.75", "2", "2.5", "3", "4"}; + return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_e_"); +} + +// MIMO-UE-Parameters-v13e0 ::= SEQUENCE +SRSASN_CODE mimo_ue_params_v13e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mimo_weighted_layers_cap_r13_present, 1)); + + if (mimo_weighted_layers_cap_r13_present) { + HANDLE_CODE(mimo_weighted_layers_cap_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ue_params_v13e0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mimo_weighted_layers_cap_r13_present, 1)); + + if (mimo_weighted_layers_cap_r13_present) { + HANDLE_CODE(mimo_weighted_layers_cap_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ue_params_v13e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mimo_weighted_layers_cap_r13_present) { + j.write_fieldname("mimo-WeightedLayersCapabilities-r13"); + mimo_weighted_layers_cap_r13.to_json(j); + } + j.end_obj(); +} + +// MeasResult3EUTRA-r15 ::= SEQUENCE +SRSASN_CODE meas_result3_eutra_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_serving_cell_r15_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cell_list_r15_present, 1)); + + HANDLE_CODE(pack_integer(bref, carrier_freq_r15, (uint32_t)0u, (uint32_t)262143u)); + if (meas_result_serving_cell_r15_present) { + HANDLE_CODE(meas_result_serving_cell_r15.pack(bref)); + } + if (meas_result_neigh_cell_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cell_list_r15, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result3_eutra_r15_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_serving_cell_r15_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_r15_present, 1)); + + HANDLE_CODE(unpack_integer(carrier_freq_r15, bref, (uint32_t)0u, (uint32_t)262143u)); + if (meas_result_serving_cell_r15_present) { + HANDLE_CODE(meas_result_serving_cell_r15.unpack(bref)); + } + if (meas_result_neigh_cell_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cell_list_r15, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void meas_result3_eutra_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + if (meas_result_serving_cell_r15_present) { + j.write_fieldname("measResultServingCell-r15"); + meas_result_serving_cell_r15.to_json(j); + } + if (meas_result_neigh_cell_list_r15_present) { + j.start_array("measResultNeighCellList-r15"); + for (const auto& e1 : meas_result_neigh_cell_list_r15) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MeasResultSCG-FailureMRDC-r15 ::= SEQUENCE +SRSASN_CODE meas_result_scg_fail_mrdc_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_eutra_r15, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_scg_fail_mrdc_r15_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_eutra_r15, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result_scg_fail_mrdc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("measResultFreqListEUTRA-r15"); + for (const auto& e1 : meas_result_freq_list_eutra_r15) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// PhyLayerParameters-v13e0 ::= SEQUENCE +SRSASN_CODE phy_layer_params_v13e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(mimo_ue_params_v13e0.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v13e0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(mimo_ue_params_v13e0.unpack(bref)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_v13e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("mimo-UE-Parameters-v13e0"); + mimo_ue_params_v13e0.to_json(j); + j.end_obj(); +} + std::string mbms_params_v1470_s::mbms_max_bw_r14_c_::types_opts::to_string() const { static const char* options[] = {"implicitValue", "explicitValue"}; return convert_enum_idx(options, 2, value, "mbms_params_v1470_s::mbms_max_bw_r14_c_::types"); } +// UE-EUTRA-Capability-v13e0b-IEs ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_v13e0b_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(phy_layer_params_v13e0.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v13e0b_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(phy_layer_params_v13e0.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v13e0b_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("phyLayerParameters-v13e0"); + phy_layer_params_v13e0.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SCG-Config-v12i0b-IEs ::= SEQUENCE +SRSASN_CODE scg_cfg_v12i0b_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scg_radio_cfg_v12i0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (scg_radio_cfg_v12i0_present) { + HANDLE_CODE(scg_radio_cfg_v12i0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_v12i0b_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scg_radio_cfg_v12i0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (scg_radio_cfg_v12i0_present) { + HANDLE_CODE(scg_radio_cfg_v12i0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_cfg_v12i0b_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (scg_radio_cfg_v12i0_present) { + j.write_fieldname("scg-RadioConfig-v12i0"); + scg_radio_cfg_v12i0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + std::string scg_cfg_r12_s::crit_exts_c_::c1_c_::types_opts::to_string() const { static const char* options[] = { diff --git a/lib/src/asn1/rrc/bcch_msg.cc b/lib/src/asn1/rrc/bcch_msg.cc index e9309ca57..be646a9b9 100644 --- a/lib/src/asn1/rrc/bcch_msg.cc +++ b/lib/src/asn1/rrc/bcch_msg.cc @@ -49,6 +49,33 @@ void bcch_bch_msg_s::to_json(json_writer& j) const j.end_array(); } +// SIB-Type-v12j0 ::= ENUMERATED +std::string sib_type_v12j0_opts::to_string() const +{ + static const char* options[] = {"sibType19-v1250", + "sibType20-v1310", + "sibType21-v1430", + "sibType24-v1530", + "sibType25-v1530", + "sibType26-v1530", + "spare10", + "spare9", + "spare8", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(options, 16, value, "sib_type_v12j0_e"); +} +uint8_t sib_type_v12j0_opts::to_number() const +{ + static const uint8_t options[] = {19, 20, 21, 24, 25, 26}; + return map_enum_number(options, 6, value, "sib_type_v12j0_e"); +} + // NS-PmaxValue-v10l0 ::= SEQUENCE SRSASN_CODE ns_pmax_value_v10l0_s::pack(bit_ref& bref) const { @@ -143,6 +170,67 @@ void ns_pmax_value_r10_s::to_json(json_writer& j) const j.end_obj(); } +// SchedulingInfo-v12j0 ::= SEQUENCE +SRSASN_CODE sched_info_v12j0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sib_map_info_v12j0_present, 1)); + + if (sib_map_info_v12j0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info_v12j0, 1, 31)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_info_v12j0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sib_map_info_v12j0_present, 1)); + + if (sib_map_info_v12j0_present) { + HANDLE_CODE(unpack_dyn_seq_of(sib_map_info_v12j0, bref, 1, 31)); + } + + return SRSASN_SUCCESS; +} +void sched_info_v12j0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sib_map_info_v12j0_present) { + j.start_array("sib-MappingInfo-v12j0"); + for (const auto& e1 : sib_map_info_v12j0) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + j.end_obj(); +} + +// SchedulingInfoExt-r12 ::= SEQUENCE +SRSASN_CODE sched_info_ext_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(si_periodicity_r12.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info_r12, 1, 31)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_info_ext_r12_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(si_periodicity_r12.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(sib_map_info_r12, bref, 1, 31)); + + return SRSASN_SUCCESS; +} +void sched_info_ext_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("si-Periodicity-r12", si_periodicity_r12.to_string()); + j.start_array("sib-MappingInfo-r12"); + for (const auto& e1 : sib_map_info_r12) { + j.write_str(e1.to_string()); + } + j.end_array(); + j.end_obj(); +} + // BandClassInfoCDMA2000 ::= SEQUENCE SRSASN_CODE band_class_info_cdma2000_s::pack(bit_ref& bref) const { @@ -332,6 +420,39 @@ void multi_band_info_v9e0_s::to_json(json_writer& j) const j.end_obj(); } +// NS-PmaxValueNR-r15 ::= SEQUENCE +SRSASN_CODE ns_pmax_value_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_pmax_nr_r15_present, 1)); + + if (add_pmax_nr_r15_present) { + HANDLE_CODE(pack_integer(bref, add_pmax_nr_r15, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(pack_integer(bref, add_spec_emission_nr_r15, (uint8_t)0u, (uint8_t)7u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ns_pmax_value_nr_r15_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_pmax_nr_r15_present, 1)); + + if (add_pmax_nr_r15_present) { + HANDLE_CODE(unpack_integer(add_pmax_nr_r15, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(unpack_integer(add_spec_emission_nr_r15, bref, (uint8_t)0u, (uint8_t)7u)); + + return SRSASN_SUCCESS; +} +void ns_pmax_value_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (add_pmax_nr_r15_present) { + j.write_int("additionalPmaxNR-r15", add_pmax_nr_r15); + } + j.write_int("additionalSpectrumEmissionNR-r15", add_spec_emission_nr_r15); + j.end_obj(); +} + // NeighCellCDMA2000-r11 ::= SEQUENCE SRSASN_CODE neigh_cell_cdma2000_r11_s::pack(bit_ref& bref) const { @@ -433,6 +554,62 @@ void redist_neigh_cell_r13_s::to_json(json_writer& j) const j.end_obj(); } +// SystemInformationBlockType1-v12j0-IEs ::= SEQUENCE +SRSASN_CODE sib_type1_v12j0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sched_info_list_v12j0_present, 1)); + HANDLE_CODE(bref.pack(sched_info_list_ext_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sched_info_list_v12j0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list_v12j0, 1, 32)); + } + if (sched_info_list_ext_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list_ext_r12, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v12j0_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sched_info_list_v12j0_present, 1)); + HANDLE_CODE(bref.unpack(sched_info_list_ext_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sched_info_list_v12j0_present) { + HANDLE_CODE(unpack_dyn_seq_of(sched_info_list_v12j0, bref, 1, 32)); + } + if (sched_info_list_ext_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(sched_info_list_ext_r12, bref, 1, 32)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v12j0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sched_info_list_v12j0_present) { + j.start_array("schedulingInfoList-v12j0"); + for (const auto& e1 : sched_info_list_v12j0) { + e1.to_json(j); + } + j.end_array(); + } + if (sched_info_list_ext_r12_present) { + j.start_array("schedulingInfoListExt-r12"); + for (const auto& e1 : sched_info_list_ext_r12) { + e1.to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // SystemInformationBlockType2-v10n0-IEs ::= SEQUENCE SRSASN_CODE sib_type2_v10n0_ies_s::pack(bit_ref& bref) const { @@ -770,39 +947,6 @@ void inter_freq_neigh_cell_info_s::to_json(json_writer& j) const j.end_obj(); } -// NS-PmaxValueNR-r15 ::= SEQUENCE -SRSASN_CODE ns_pmax_value_nr_r15_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(add_pmax_nr_r15_present, 1)); - - if (add_pmax_nr_r15_present) { - HANDLE_CODE(pack_integer(bref, add_pmax_nr_r15, (int8_t)-30, (int8_t)33)); - } - HANDLE_CODE(pack_integer(bref, add_spec_emission_nr_r15, (uint8_t)0u, (uint8_t)7u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ns_pmax_value_nr_r15_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(add_pmax_nr_r15_present, 1)); - - if (add_pmax_nr_r15_present) { - HANDLE_CODE(unpack_integer(add_pmax_nr_r15, bref, (int8_t)-30, (int8_t)33)); - } - HANDLE_CODE(unpack_integer(add_spec_emission_nr_r15, bref, (uint8_t)0u, (uint8_t)7u)); - - return SRSASN_SUCCESS; -} -void ns_pmax_value_nr_r15_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (add_pmax_nr_r15_present) { - j.write_int("additionalPmaxNR-r15", add_pmax_nr_r15); - } - j.write_int("additionalSpectrumEmissionNR-r15", add_spec_emission_nr_r15); - j.end_obj(); -} - // PLMN-IdentityInfo2-r12 ::= CHOICE void plmn_id_info2_r12_c::destroy_() { @@ -918,6 +1062,48 @@ SRSASN_CODE plmn_id_info2_r12_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +// SystemInformationBlockType1-v10x0-IEs ::= SEQUENCE +SRSASN_CODE sib_type1_v10x0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v10x0_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v10x0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + // SystemInformationBlockType2-v10m0-IEs ::= SEQUENCE SRSASN_CODE sib_type2_v10m0_ies_s::pack(bit_ref& bref) const { @@ -1610,6 +1796,9 @@ SRSASN_CODE sib_type1_v10l0_ies_s::pack(bit_ref& bref) const if (multi_band_info_list_v10l0_present) { HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10l0, 1, 8, SeqOfPacker(1, 8, Packer()))); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -1625,6 +1814,9 @@ SRSASN_CODE sib_type1_v10l0_ies_s::unpack(cbit_ref& bref) if (multi_band_info_list_v10l0_present) { HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10l0, bref, 1, 8, SeqOfPacker(1, 8, Packer()))); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -1651,8 +1843,7 @@ void sib_type1_v10l0_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -1826,7 +2017,7 @@ SRSASN_CODE carrier_freq_nr_r15_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, ns_pmax_list_nr_r15, 1, 8)); } if (q_qual_min_r15_present) { - HANDLE_CODE(pack_integer(bref, q_qual_min_r15, (int8_t)-34, (int8_t)-3)); + HANDLE_CODE(pack_integer(bref, q_qual_min_r15, (int8_t)-43, (int8_t)-12)); } HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell_r15, 1)); if (max_rs_idx_cell_qual_r15_present) { @@ -1836,6 +2027,32 @@ SRSASN_CODE carrier_freq_nr_r15_s::pack(bit_ref& bref) const HANDLE_CODE(thresh_rs_idx_r15.pack(bref)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= multi_band_ns_pmax_list_nr_v1550.is_present(); + group_flags[0] |= multi_band_ns_pmax_list_nr_sul_v1550.is_present(); + group_flags[0] |= ssb_to_measure_r15.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(multi_band_ns_pmax_list_nr_v1550.is_present(), 1)); + HANDLE_CODE(bref.pack(multi_band_ns_pmax_list_nr_sul_v1550.is_present(), 1)); + HANDLE_CODE(bref.pack(ssb_to_measure_r15.is_present(), 1)); + if (multi_band_ns_pmax_list_nr_v1550.is_present()) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *multi_band_ns_pmax_list_nr_v1550, 1, 31, SeqOfPacker(1, 8, Packer()))); + } + if (multi_band_ns_pmax_list_nr_sul_v1550.is_present()) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *multi_band_ns_pmax_list_nr_sul_v1550, 1, 32, SeqOfPacker(1, 8, Packer()))); + } + if (ssb_to_measure_r15.is_present()) { + HANDLE_CODE(ssb_to_measure_r15->pack(bref)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE carrier_freq_nr_r15_s::unpack(cbit_ref& bref) @@ -1889,7 +2106,7 @@ SRSASN_CODE carrier_freq_nr_r15_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(ns_pmax_list_nr_r15, bref, 1, 8)); } if (q_qual_min_r15_present) { - HANDLE_CODE(unpack_integer(q_qual_min_r15, bref, (int8_t)-34, (int8_t)-3)); + HANDLE_CODE(unpack_integer(q_qual_min_r15, bref, (int8_t)-43, (int8_t)-12)); } HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell_r15, 1)); if (max_rs_idx_cell_qual_r15_present) { @@ -1899,6 +2116,35 @@ SRSASN_CODE carrier_freq_nr_r15_s::unpack(cbit_ref& bref) HANDLE_CODE(thresh_rs_idx_r15.unpack(bref)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool multi_band_ns_pmax_list_nr_v1550_present; + HANDLE_CODE(bref.unpack(multi_band_ns_pmax_list_nr_v1550_present, 1)); + multi_band_ns_pmax_list_nr_v1550.set_present(multi_band_ns_pmax_list_nr_v1550_present); + bool multi_band_ns_pmax_list_nr_sul_v1550_present; + HANDLE_CODE(bref.unpack(multi_band_ns_pmax_list_nr_sul_v1550_present, 1)); + multi_band_ns_pmax_list_nr_sul_v1550.set_present(multi_band_ns_pmax_list_nr_sul_v1550_present); + bool ssb_to_measure_r15_present; + HANDLE_CODE(bref.unpack(ssb_to_measure_r15_present, 1)); + ssb_to_measure_r15.set_present(ssb_to_measure_r15_present); + if (multi_band_ns_pmax_list_nr_v1550.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*multi_band_ns_pmax_list_nr_v1550, bref, 1, 31, SeqOfPacker(1, 8, Packer()))); + } + if (multi_band_ns_pmax_list_nr_sul_v1550.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*multi_band_ns_pmax_list_nr_sul_v1550, bref, 1, 32, SeqOfPacker(1, 8, Packer()))); + } + if (ssb_to_measure_r15.is_present()) { + HANDLE_CODE(ssb_to_measure_r15->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } void carrier_freq_nr_r15_s::to_json(json_writer& j) const @@ -1966,6 +2212,34 @@ void carrier_freq_nr_r15_s::to_json(json_writer& j) const j.write_fieldname("threshRS-Index-r15"); thresh_rs_idx_r15.to_json(j); } + if (ext) { + if (multi_band_ns_pmax_list_nr_v1550.is_present()) { + j.start_array("multiBandNsPmaxListNR-v1550"); + for (const auto& e1 : *multi_band_ns_pmax_list_nr_v1550) { + j.start_array(); + for (const auto& e2 : e1) { + e2.to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (multi_band_ns_pmax_list_nr_sul_v1550.is_present()) { + j.start_array("multiBandNsPmaxListNR-SUL-v1550"); + for (const auto& e1 : *multi_band_ns_pmax_list_nr_sul_v1550) { + j.start_array(); + for (const auto& e2 : e1) { + e2.to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (ssb_to_measure_r15.is_present()) { + j.write_fieldname("ssb-ToMeasure-r15"); + ssb_to_measure_r15->to_json(j); + } + } j.end_obj(); } @@ -3248,17 +3522,17 @@ uint16_t mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_opts::to_n std::string mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_opts::to_string() const { - static const char* options[] = {"khz-7dot5", "khz-1dot25"}; + static const char* options[] = {"kHz7dot5", "kHz1dot25"}; 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 const float options[] = {-7.5, -1.25}; + 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 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_"); } @@ -7093,7 +7367,7 @@ SRSASN_CODE sib_type26_r15_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(sync_freq_list_r15_present, 1)); HANDLE_CODE(bref.pack(slss_tx_multi_freq_r15_present, 1)); HANDLE_CODE(bref.pack(v2x_freq_sel_cfg_list_r15_present, 1)); - HANDLE_CODE(bref.pack(thresh_s_rssi_cbr_r14_present, 1)); + HANDLE_CODE(bref.pack(thresh_s_rssi_cbr_r15_present, 1)); if (v2x_inter_freq_info_list_r15_present) { HANDLE_CODE(pack_dyn_seq_of(bref, v2x_inter_freq_info_list_r15, 0, 7)); @@ -7110,10 +7384,17 @@ SRSASN_CODE sib_type26_r15_s::pack(bit_ref& bref) const if (v2x_freq_sel_cfg_list_r15_present) { HANDLE_CODE(pack_dyn_seq_of(bref, v2x_freq_sel_cfg_list_r15, 1, 8)); } - if (thresh_s_rssi_cbr_r14_present) { - HANDLE_CODE(pack_integer(bref, thresh_s_rssi_cbr_r14, (uint8_t)0u, (uint8_t)45u)); + if (thresh_s_rssi_cbr_r15_present) { + HANDLE_CODE(pack_integer(bref, thresh_s_rssi_cbr_r15, (uint8_t)0u, (uint8_t)45u)); } + if (ext) { + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + } return SRSASN_SUCCESS; } SRSASN_CODE sib_type26_r15_s::unpack(cbit_ref& bref) @@ -7125,7 +7406,7 @@ SRSASN_CODE sib_type26_r15_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(sync_freq_list_r15_present, 1)); HANDLE_CODE(bref.unpack(slss_tx_multi_freq_r15_present, 1)); HANDLE_CODE(bref.unpack(v2x_freq_sel_cfg_list_r15_present, 1)); - HANDLE_CODE(bref.unpack(thresh_s_rssi_cbr_r14_present, 1)); + HANDLE_CODE(bref.unpack(thresh_s_rssi_cbr_r15_present, 1)); if (v2x_inter_freq_info_list_r15_present) { HANDLE_CODE(unpack_dyn_seq_of(v2x_inter_freq_info_list_r15, bref, 0, 7)); @@ -7142,10 +7423,17 @@ SRSASN_CODE sib_type26_r15_s::unpack(cbit_ref& bref) if (v2x_freq_sel_cfg_list_r15_present) { HANDLE_CODE(unpack_dyn_seq_of(v2x_freq_sel_cfg_list_r15, bref, 1, 8)); } - if (thresh_s_rssi_cbr_r14_present) { - HANDLE_CODE(unpack_integer(thresh_s_rssi_cbr_r14, bref, (uint8_t)0u, (uint8_t)45u)); + if (thresh_s_rssi_cbr_r15_present) { + HANDLE_CODE(unpack_integer(thresh_s_rssi_cbr_r15, bref, (uint8_t)0u, (uint8_t)45u)); } + if (ext) { + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + } return SRSASN_SUCCESS; } void sib_type26_r15_s::to_json(json_writer& j) const @@ -7186,8 +7474,13 @@ void sib_type26_r15_s::to_json(json_writer& j) const } j.end_array(); } - if (thresh_s_rssi_cbr_r14_present) { - j.write_int("threshS-RSSI-CBR-r14", thresh_s_rssi_cbr_r14); + if (thresh_s_rssi_cbr_r15_present) { + j.write_int("threshS-RSSI-CBR-r15", thresh_s_rssi_cbr_r15); + } + if (ext) { + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } } j.end_obj(); } diff --git a/lib/src/asn1/rrc/dl_ccch_msg.cc b/lib/src/asn1/rrc/dl_ccch_msg.cc index 34ffc8bba..936caa189 100644 --- a/lib/src/asn1/rrc/dl_ccch_msg.cc +++ b/lib/src/asn1/rrc/dl_ccch_msg.cc @@ -835,6 +835,43 @@ void rrc_conn_setup_v8a0_ies_s::to_json(json_writer& j) const j.end_obj(); } +// RRCEarlyDataComplete-v1590-IEs ::= SEQUENCE +SRSASN_CODE rrc_early_data_complete_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_complete_v1590_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_early_data_complete_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // RedirectedCarrierInfo-r15-IEs ::= CHOICE void redirected_carrier_info_r15_ies_c::destroy_() { @@ -1202,6 +1239,9 @@ SRSASN_CODE rrc_early_data_complete_r15_ies_s::pack(bit_ref& bref) const if (redirected_carrier_info_r15_present) { HANDLE_CODE(redirected_carrier_info_r15.pack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -1229,6 +1269,9 @@ SRSASN_CODE rrc_early_data_complete_r15_ies_s::unpack(cbit_ref& bref) if (redirected_carrier_info_r15_present) { HANDLE_CODE(redirected_carrier_info_r15.unpack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -1255,8 +1298,7 @@ void rrc_early_data_complete_r15_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } diff --git a/lib/src/asn1/rrc/dl_dcch_msg.cc b/lib/src/asn1/rrc/dl_dcch_msg.cc index c1e55f9f3..98b8571bf 100644 --- a/lib/src/asn1/rrc/dl_dcch_msg.cc +++ b/lib/src/asn1/rrc/dl_dcch_msg.cc @@ -608,6 +608,18 @@ void sl_tx_pool_to_add_mod_r14_s::to_json(json_writer& j) const j.end_obj(); } +// SubframeAssignment-r15 ::= ENUMERATED +std::string sf_assign_r15_opts::to_string() const +{ + 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 const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 7, value, "sf_assign_r15_e"); +} + // UplinkPowerControlCommonPSCell-r12 ::= SEQUENCE SRSASN_CODE ul_pwr_ctrl_common_ps_cell_r12_s::pack(bit_ref& bref) const { @@ -1565,16 +1577,62 @@ SRSASN_CODE sl_disc_tx_res_r13_c::setup_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -// SubframeAssignment-r15 ::= ENUMERATED -std::string sf_assign_r15_opts::to_string() const +// TDM-PatternConfig-r15 ::= CHOICE +void tdm_pattern_cfg_r15_c::set(types::options e) { - static const char* options[] = {"sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"}; - return convert_enum_idx(options, 7, value, "sf_assign_r15_e"); + type_ = e; } -uint8_t sf_assign_r15_opts::to_number() const +void tdm_pattern_cfg_r15_c::to_json(json_writer& j) const { - static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6}; - return map_enum_number(options, 7, value, "sf_assign_r15_e"); + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_str("subframeAssignment-r15", c.sf_assign_r15.to_string()); + j.write_int("harq-Offset-r15", c.harq_offset_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "tdm_pattern_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE tdm_pattern_cfg_r15_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.sf_assign_r15.pack(bref)); + HANDLE_CODE(pack_integer(bref, c.harq_offset_r15, (uint8_t)0u, (uint8_t)9u)); + break; + default: + log_invalid_choice_id(type_, "tdm_pattern_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tdm_pattern_cfg_r15_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.sf_assign_r15.unpack(bref)); + HANDLE_CODE(unpack_integer(c.harq_offset_r15, bref, (uint8_t)0u, (uint8_t)9u)); + break; + default: + log_invalid_choice_id(type_, "tdm_pattern_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } // TunnelConfigLWIP-r13 ::= SEQUENCE @@ -2453,63 +2511,6 @@ SRSASN_CODE rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::set(types::options e) -{ - type_ = e; -} -void rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::release: - break; - case types::setup: - j.write_fieldname("setup"); - j.start_obj(); - j.write_str("subframeAssignment-r15", c.sf_assign_r15.to_string()); - j.write_int("harq-Offset-r15", c.harq_offset_r15); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::release: - break; - case types::setup: - HANDLE_CODE(c.sf_assign_r15.pack(bref)); - HANDLE_CODE(pack_integer(bref, c.harq_offset_r15, (uint8_t)0u, (uint8_t)9u)); - break; - default: - log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::release: - break; - case types::setup: - HANDLE_CODE(c.sf_assign_r15.unpack(bref)); - HANDLE_CODE(unpack_integer(c.harq_offset_r15, bref, (uint8_t)0u, (uint8_t)9u)); - break; - default: - log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - // SCG-Configuration-v13c0 ::= CHOICE void scg_cfg_v13c0_c::set(types::options e) { @@ -3885,6 +3886,35 @@ void rrc_conn_recfg_v1430_ies_s::to_json(json_writer& j) const j.end_obj(); } +// RRCConnectionRelease-v15b0-IEs ::= SEQUENCE +SRSASN_CODE rrc_conn_release_v15b0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(no_last_cell_upd_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_v15b0_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(no_last_cell_upd_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_conn_release_v15b0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (no_last_cell_upd_r15_present) { + j.write_str("noLastCellUpdate-r15", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // RadioResourceConfigDedicated-v1370 ::= SEQUENCE SRSASN_CODE rr_cfg_ded_v1370_s::pack(bit_ref& bref) const { @@ -3950,6 +3980,9 @@ SRSASN_CODE scg_cfg_part_scg_r12_s::pack(bit_ref& bref) const group_flags[2] |= pscell_to_add_mod_v1440.is_present(); group_flags[3] |= scell_group_to_release_list_scg_r15.is_present(); group_flags[3] |= scell_group_to_add_mod_list_scg_r15.is_present(); + group_flags[4] |= meas_cfg_sn_r15.is_present(); + group_flags[4] |= tdm_pattern_cfg_ne_dc_r15.is_present(); + group_flags[5] |= p_max_eutra_r15_present; group_flags.pack(bref); if (group_flags[0]) { @@ -3992,6 +4025,26 @@ SRSASN_CODE scg_cfg_part_scg_r12_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, *scell_group_to_add_mod_list_scg_r15, 1, 4)); } } + if (group_flags[4]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(meas_cfg_sn_r15.is_present(), 1)); + HANDLE_CODE(bref.pack(tdm_pattern_cfg_ne_dc_r15.is_present(), 1)); + if (meas_cfg_sn_r15.is_present()) { + HANDLE_CODE(meas_cfg_sn_r15->pack(bref)); + } + if (tdm_pattern_cfg_ne_dc_r15.is_present()) { + HANDLE_CODE(tdm_pattern_cfg_ne_dc_r15->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(p_max_eutra_r15_present, 1)); + if (p_max_eutra_r15_present) { + HANDLE_CODE(pack_integer(bref, p_max_eutra_r15, (int8_t)-30, (int8_t)33)); + } + } } return SRSASN_SUCCESS; } @@ -4021,7 +4074,7 @@ SRSASN_CODE scg_cfg_part_scg_r12_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(4); + ext_groups_unpacker_guard group_flags(6); group_flags.unpack(bref); if (group_flags[0]) { @@ -4076,6 +4129,30 @@ SRSASN_CODE scg_cfg_part_scg_r12_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(*scell_group_to_add_mod_list_scg_r15, bref, 1, 4)); } } + if (group_flags[4]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool meas_cfg_sn_r15_present; + HANDLE_CODE(bref.unpack(meas_cfg_sn_r15_present, 1)); + meas_cfg_sn_r15.set_present(meas_cfg_sn_r15_present); + bool tdm_pattern_cfg_ne_dc_r15_present; + HANDLE_CODE(bref.unpack(tdm_pattern_cfg_ne_dc_r15_present, 1)); + tdm_pattern_cfg_ne_dc_r15.set_present(tdm_pattern_cfg_ne_dc_r15_present); + if (meas_cfg_sn_r15.is_present()) { + HANDLE_CODE(meas_cfg_sn_r15->unpack(bref)); + } + if (tdm_pattern_cfg_ne_dc_r15.is_present()) { + HANDLE_CODE(tdm_pattern_cfg_ne_dc_r15->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(p_max_eutra_r15_present, 1)); + if (p_max_eutra_r15_present) { + HANDLE_CODE(unpack_integer(p_max_eutra_r15, bref, (int8_t)-30, (int8_t)33)); + } + } } return SRSASN_SUCCESS; } @@ -4148,6 +4225,17 @@ void scg_cfg_part_scg_r12_s::to_json(json_writer& j) const } j.end_array(); } + if (meas_cfg_sn_r15.is_present()) { + j.write_fieldname("measConfigSN-r15"); + meas_cfg_sn_r15->to_json(j); + } + if (tdm_pattern_cfg_ne_dc_r15.is_present()) { + j.write_fieldname("tdm-PatternConfigNE-DC-r15"); + tdm_pattern_cfg_ne_dc_r15->to_json(j); + } + if (p_max_eutra_r15_present) { + j.write_int("p-MaxEUTRA-r15", p_max_eutra_r15); + } } j.end_obj(); } @@ -4357,7 +4445,7 @@ SRSASN_CODE rrc_inactive_cfg_r15_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(ran_notif_area_info_r15_present, 1)); HANDLE_CODE(bref.pack(periodic_rnau_timer_r15_present, 1)); HANDLE_CODE(bref.pack(next_hop_chaining_count_r15_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(dummy_present, 1)); HANDLE_CODE(full_i_rnti_r15.pack(bref)); HANDLE_CODE(short_i_rnti_r15.pack(bref)); @@ -4382,7 +4470,7 @@ SRSASN_CODE rrc_inactive_cfg_r15_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(ran_notif_area_info_r15_present, 1)); HANDLE_CODE(bref.unpack(periodic_rnau_timer_r15_present, 1)); HANDLE_CODE(bref.unpack(next_hop_chaining_count_r15_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(dummy_present, 1)); HANDLE_CODE(full_i_rnti_r15.unpack(bref)); HANDLE_CODE(short_i_rnti_r15.unpack(bref)); @@ -4419,8 +4507,8 @@ void rrc_inactive_cfg_r15_s::to_json(json_writer& j) const if (next_hop_chaining_count_r15_present) { j.write_int("nextHopChainingCount-r15", next_hop_chaining_count_r15); } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); + if (dummy_present) { + j.write_fieldname("dummy"); j.start_obj(); j.end_obj(); } @@ -4613,6 +4701,9 @@ SRSASN_CODE rrc_conn_release_v1540_ies_s::pack(bit_ref& bref) const if (wait_time_present) { HANDLE_CODE(pack_integer(bref, wait_time, (uint8_t)1u, (uint8_t)16u)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -4624,6 +4715,9 @@ SRSASN_CODE rrc_conn_release_v1540_ies_s::unpack(cbit_ref& bref) if (wait_time_present) { HANDLE_CODE(unpack_integer(wait_time, bref, (uint8_t)1u, (uint8_t)16u)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -4635,8 +4729,7 @@ void rrc_conn_release_v1540_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -8073,7 +8166,7 @@ void other_cfg_r9_s::meas_cfg_app_layer_r15_c_::to_json(json_writer& j) const j.write_fieldname("setup"); j.start_obj(); j.write_str("measConfigAppLayerContainer-r15", c.meas_cfg_app_layer_container_r15.to_string()); - j.write_str("serviceType", c.service_type.to_string()); + j.write_str("serviceType-r15", c.service_type_r15.to_string()); j.end_obj(); break; default: @@ -8089,7 +8182,7 @@ SRSASN_CODE other_cfg_r9_s::meas_cfg_app_layer_r15_c_::pack(bit_ref& bref) const break; case types::setup: HANDLE_CODE(c.meas_cfg_app_layer_container_r15.pack(bref)); - HANDLE_CODE(c.service_type.pack(bref)); + HANDLE_CODE(c.service_type_r15.pack(bref)); break; default: log_invalid_choice_id(type_, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_"); @@ -8107,7 +8200,7 @@ SRSASN_CODE other_cfg_r9_s::meas_cfg_app_layer_r15_c_::unpack(cbit_ref& bref) break; case types::setup: HANDLE_CODE(c.meas_cfg_app_layer_container_r15.unpack(bref)); - HANDLE_CODE(c.service_type.unpack(bref)); + HANDLE_CODE(c.service_type_r15.unpack(bref)); break; default: log_invalid_choice_id(type_, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_"); @@ -8116,10 +8209,11 @@ SRSASN_CODE other_cfg_r9_s::meas_cfg_app_layer_r15_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -std::string other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_opts::to_string() const +std::string other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_r15_opts::to_string() const { 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_"); + return convert_enum_idx( + options, 8, value, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_r15_e_"); } // RRCConnectionReconfiguration-v1020-IEs ::= SEQUENCE diff --git a/lib/src/asn1/rrc/ho_cmd.cc b/lib/src/asn1/rrc/ho_cmd.cc index ebb380d68..f4ceae81c 100644 --- a/lib/src/asn1/rrc/ho_cmd.cc +++ b/lib/src/asn1/rrc/ho_cmd.cc @@ -58,8 +58,8 @@ void scg_cfg_v13c0_ies_s::to_json(json_writer& j) const j.end_obj(); } -// SCG-Config-v12x0-IEs ::= SEQUENCE -SRSASN_CODE scg_cfg_v12x0_ies_s::pack(bit_ref& bref) const +// SCG-Config-v12i0a-IEs ::= SEQUENCE +SRSASN_CODE scg_cfg_v12i0a_ies_s::pack(bit_ref& bref) const { HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); @@ -73,7 +73,7 @@ SRSASN_CODE scg_cfg_v12x0_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE scg_cfg_v12x0_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE scg_cfg_v12i0a_ies_s::unpack(cbit_ref& bref) { HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); @@ -87,7 +87,7 @@ SRSASN_CODE scg_cfg_v12x0_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void scg_cfg_v12x0_ies_s::to_json(json_writer& j) const +void scg_cfg_v12i0a_ies_s::to_json(json_writer& j) const { j.start_obj(); if (late_non_crit_ext_present) { @@ -143,6 +143,53 @@ void scg_cfg_r12_ies_s::to_json(json_writer& j) const j.end_obj(); } +// AS-Config-v1550 ::= SEQUENCE +SRSASN_CODE as_cfg_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tdm_pattern_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(p_max_eutra_r15_present, 1)); + + if (tdm_pattern_cfg_r15_present) { + HANDLE_CODE(tdm_pattern_cfg_r15.sf_assign_r15.pack(bref)); + HANDLE_CODE(pack_integer(bref, tdm_pattern_cfg_r15.harq_offset_r15, (uint8_t)0u, (uint8_t)9u)); + } + if (p_max_eutra_r15_present) { + HANDLE_CODE(pack_integer(bref, p_max_eutra_r15, (int8_t)-30, (int8_t)33)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tdm_pattern_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(p_max_eutra_r15_present, 1)); + + if (tdm_pattern_cfg_r15_present) { + HANDLE_CODE(tdm_pattern_cfg_r15.sf_assign_r15.unpack(bref)); + HANDLE_CODE(unpack_integer(tdm_pattern_cfg_r15.harq_offset_r15, bref, (uint8_t)0u, (uint8_t)9u)); + } + if (p_max_eutra_r15_present) { + HANDLE_CODE(unpack_integer(p_max_eutra_r15, bref, (int8_t)-30, (int8_t)33)); + } + + return SRSASN_SUCCESS; +} +void as_cfg_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tdm_pattern_cfg_r15_present) { + j.write_fieldname("tdm-PatternConfig-r15"); + j.start_obj(); + j.write_str("subframeAssignment-r15", tdm_pattern_cfg_r15.sf_assign_r15.to_string()); + j.write_int("harq-Offset-r15", tdm_pattern_cfg_r15.harq_offset_r15); + j.end_obj(); + } + if (p_max_eutra_r15_present) { + j.write_int("p-MaxEUTRA-r15", p_max_eutra_r15); + } + j.end_obj(); +} + // AS-ConfigNR-r15 ::= SEQUENCE SRSASN_CODE as_cfg_nr_r15_s::pack(bit_ref& bref) const { @@ -195,6 +242,22 @@ void as_cfg_nr_r15_s::to_json(json_writer& j) const j.end_obj(); } +// AS-ConfigNR-v1570 ::= SEQUENCE +SRSASN_CODE as_cfg_nr_v1570_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_nr_v1570_s::unpack(cbit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void as_cfg_nr_v1570_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sourceSCG-ConfiguredNR-r15", "true"); + j.end_obj(); +} + // SCG-Config-r12 ::= SEQUENCE SRSASN_CODE scg_cfg_r12_s::pack(bit_ref& bref) const { @@ -434,6 +497,8 @@ SRSASN_CODE as_cfg_s::pack(bit_ref& bref) const group_flags[1] |= source_scell_cfg_list_r10.is_present(); group_flags[2] |= source_cfg_scg_r12.is_present(); group_flags[3] |= as_cfg_nr_r15.is_present(); + group_flags[4] |= as_cfg_v1550.is_present(); + group_flags[5] |= as_cfg_nr_v1570.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -469,6 +534,22 @@ SRSASN_CODE as_cfg_s::pack(bit_ref& bref) const HANDLE_CODE(as_cfg_nr_r15->pack(bref)); } } + if (group_flags[4]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(as_cfg_v1550.is_present(), 1)); + if (as_cfg_v1550.is_present()) { + HANDLE_CODE(as_cfg_v1550->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(as_cfg_nr_v1570.is_present(), 1)); + if (as_cfg_nr_v1570.is_present()) { + HANDLE_CODE(as_cfg_nr_v1570->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -486,7 +567,7 @@ SRSASN_CODE as_cfg_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(source_dl_carrier_freq, bref, (uint32_t)0u, (uint32_t)65535u)); if (ext) { - ext_groups_unpacker_guard group_flags(4); + ext_groups_unpacker_guard group_flags(6); group_flags.unpack(bref); if (group_flags[0]) { @@ -528,6 +609,26 @@ SRSASN_CODE as_cfg_s::unpack(cbit_ref& bref) HANDLE_CODE(as_cfg_nr_r15->unpack(bref)); } } + if (group_flags[4]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool as_cfg_v1550_present; + HANDLE_CODE(bref.unpack(as_cfg_v1550_present, 1)); + as_cfg_v1550.set_present(as_cfg_v1550_present); + if (as_cfg_v1550.is_present()) { + HANDLE_CODE(as_cfg_v1550->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool as_cfg_nr_v1570_present; + HANDLE_CODE(bref.unpack(as_cfg_nr_v1570_present, 1)); + as_cfg_nr_v1570.set_present(as_cfg_nr_v1570_present); + if (as_cfg_nr_v1570.is_present()) { + HANDLE_CODE(as_cfg_nr_v1570->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -571,6 +672,14 @@ void as_cfg_s::to_json(json_writer& j) const j.write_fieldname("as-ConfigNR-r15"); as_cfg_nr_r15->to_json(j); } + if (as_cfg_v1550.is_present()) { + j.write_fieldname("as-Config-v1550"); + as_cfg_v1550->to_json(j); + } + if (as_cfg_nr_v1570.is_present()) { + j.write_fieldname("as-ConfigNR-v1570"); + as_cfg_nr_v1570->to_json(j); + } } j.end_obj(); } diff --git a/lib/src/asn1/rrc/meascfg.cc b/lib/src/asn1/rrc/meascfg.cc index bc4befa22..38d83532a 100644 --- a/lib/src/asn1/rrc/meascfg.cc +++ b/lib/src/asn1/rrc/meascfg.cc @@ -615,6 +615,162 @@ bool ss_rssi_meas_r15_s::operator==(const ss_rssi_meas_r15_s& other) const return meas_slots_r15 == other.meas_slots_r15 and end_symbol_r15 == other.end_symbol_r15; } +// SSB-ToMeasure-r15 ::= CHOICE +void ssb_to_measure_r15_c::destroy_() +{ + switch (type_) { + case types::short_bitmap_r15: + c.destroy >(); + break; + case types::medium_bitmap_r15: + c.destroy >(); + break; + case types::long_bitmap_r15: + c.destroy >(); + break; + default: + break; + } +} +void ssb_to_measure_r15_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::short_bitmap_r15: + c.init >(); + break; + case types::medium_bitmap_r15: + c.init >(); + break; + case types::long_bitmap_r15: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_r15_c"); + } +} +ssb_to_measure_r15_c::ssb_to_measure_r15_c(const ssb_to_measure_r15_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::short_bitmap_r15: + c.init(other.c.get >()); + break; + case types::medium_bitmap_r15: + c.init(other.c.get >()); + break; + case types::long_bitmap_r15: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_r15_c"); + } +} +ssb_to_measure_r15_c& ssb_to_measure_r15_c::operator=(const ssb_to_measure_r15_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::short_bitmap_r15: + c.set(other.c.get >()); + break; + case types::medium_bitmap_r15: + c.set(other.c.get >()); + break; + case types::long_bitmap_r15: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_r15_c"); + } + + return *this; +} +void ssb_to_measure_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::short_bitmap_r15: + j.write_str("shortBitmap-r15", c.get >().to_string()); + break; + case types::medium_bitmap_r15: + j.write_str("mediumBitmap-r15", c.get >().to_string()); + break; + case types::long_bitmap_r15: + j.write_str("longBitmap-r15", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE ssb_to_measure_r15_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::short_bitmap_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::medium_bitmap_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::long_bitmap_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_to_measure_r15_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::short_bitmap_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::medium_bitmap_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::long_bitmap_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} +bool ssb_to_measure_r15_c::operator==(const ssb_to_measure_r15_c& other) const +{ + if (type_ != other.type_) { + return false; + } + switch (type_) { + case types::short_bitmap_r15: + return c.get >() == other.c.get >(); + case types::medium_bitmap_r15: + return c.get >() == other.c.get >(); + case types::long_bitmap_r15: + return c.get >() == other.c.get >(); + default: + return true; + } + return true; +} + // ThresholdListNR-r15 ::= SEQUENCE SRSASN_CODE thres_list_nr_r15_s::pack(bit_ref& bref) const { @@ -754,307 +910,103 @@ bool carrier_freq_cdma2000_s::operator==(const carrier_freq_cdma2000_s& other) c return band_class == other.band_class and arfcn == other.arfcn; } -// RACH-ConfigDedicated ::= SEQUENCE -SRSASN_CODE rach_cfg_ded_s::pack(bit_ref& bref) const +// MeasCSI-RS-Config-r12 ::= SEQUENCE +SRSASN_CODE meas_csi_rs_cfg_r12_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, ra_prach_mask_idx, (uint8_t)0u, (uint8_t)15u)); + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, meas_csi_rs_id_r12, (uint8_t)1u, (uint8_t)96u)); + HANDLE_CODE(pack_integer(bref, pci_r12, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(pack_integer(bref, scrambling_id_r12, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(pack_integer(bref, res_cfg_r12, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, sf_offset_r12, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(csi_rs_individual_offset_r12.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE rach_cfg_ded_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_csi_rs_cfg_r12_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(ra_prach_mask_idx, bref, (uint8_t)0u, (uint8_t)15u)); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(meas_csi_rs_id_r12, bref, (uint8_t)1u, (uint8_t)96u)); + HANDLE_CODE(unpack_integer(pci_r12, bref, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(unpack_integer(scrambling_id_r12, bref, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(unpack_integer(res_cfg_r12, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(sf_offset_r12, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(csi_rs_individual_offset_r12.unpack(bref)); return SRSASN_SUCCESS; } -void rach_cfg_ded_s::to_json(json_writer& j) const +void meas_csi_rs_cfg_r12_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("ra-PreambleIndex", ra_preamb_idx); - j.write_int("ra-PRACH-MaskIndex", ra_prach_mask_idx); + j.write_int("measCSI-RS-Id-r12", meas_csi_rs_id_r12); + j.write_int("physCellId-r12", pci_r12); + j.write_int("scramblingIdentity-r12", scrambling_id_r12); + j.write_int("resourceConfig-r12", res_cfg_r12); + j.write_int("subframeOffset-r12", sf_offset_r12); + j.write_str("csi-RS-IndividualOffset-r12", csi_rs_individual_offset_r12.to_string()); j.end_obj(); } +bool meas_csi_rs_cfg_r12_s::operator==(const meas_csi_rs_cfg_r12_s& other) const +{ + return ext == other.ext and meas_csi_rs_id_r12 == other.meas_csi_rs_id_r12 and pci_r12 == other.pci_r12 and + scrambling_id_r12 == other.scrambling_id_r12 and res_cfg_r12 == other.res_cfg_r12 and + sf_offset_r12 == other.sf_offset_r12 and csi_rs_individual_offset_r12 == other.csi_rs_individual_offset_r12; +} -// RACH-Skip-r14 ::= SEQUENCE -SRSASN_CODE rach_skip_r14_s::pack(bit_ref& bref) const +// PhysCellIdRangeUTRA-FDD-r9 ::= SEQUENCE +SRSASN_CODE pci_range_utra_fdd_r9_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ul_cfg_info_r14_present, 1)); + HANDLE_CODE(bref.pack(range_r9_present, 1)); - HANDLE_CODE(target_ta_r14.pack(bref)); - if (ul_cfg_info_r14_present) { - HANDLE_CODE(pack_integer(bref, ul_cfg_info_r14.nof_conf_ul_processes_r14, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(ul_cfg_info_r14.ul_sched_interv_r14.pack(bref)); - HANDLE_CODE(pack_integer(bref, ul_cfg_info_r14.ul_start_sf_r14, (uint8_t)0u, (uint8_t)9u)); - HANDLE_CODE(ul_cfg_info_r14.ul_grant_r14.pack(bref)); + HANDLE_CODE(pack_integer(bref, start_r9, (uint16_t)0u, (uint16_t)511u)); + if (range_r9_present) { + HANDLE_CODE(pack_integer(bref, range_r9, (uint16_t)2u, (uint16_t)512u)); } return SRSASN_SUCCESS; } -SRSASN_CODE rach_skip_r14_s::unpack(cbit_ref& bref) +SRSASN_CODE pci_range_utra_fdd_r9_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ul_cfg_info_r14_present, 1)); + HANDLE_CODE(bref.unpack(range_r9_present, 1)); - HANDLE_CODE(target_ta_r14.unpack(bref)); - if (ul_cfg_info_r14_present) { - HANDLE_CODE(unpack_integer(ul_cfg_info_r14.nof_conf_ul_processes_r14, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(ul_cfg_info_r14.ul_sched_interv_r14.unpack(bref)); - HANDLE_CODE(unpack_integer(ul_cfg_info_r14.ul_start_sf_r14, bref, (uint8_t)0u, (uint8_t)9u)); - HANDLE_CODE(ul_cfg_info_r14.ul_grant_r14.unpack(bref)); + HANDLE_CODE(unpack_integer(start_r9, bref, (uint16_t)0u, (uint16_t)511u)); + if (range_r9_present) { + HANDLE_CODE(unpack_integer(range_r9, bref, (uint16_t)2u, (uint16_t)512u)); } return SRSASN_SUCCESS; } -void rach_skip_r14_s::to_json(json_writer& j) const +void pci_range_utra_fdd_r9_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("targetTA-r14"); - target_ta_r14.to_json(j); - if (ul_cfg_info_r14_present) { - j.write_fieldname("ul-ConfigInfo-r14"); - j.start_obj(); - j.write_int("numberOfConfUL-Processes-r14", ul_cfg_info_r14.nof_conf_ul_processes_r14); - j.write_str("ul-SchedInterval-r14", ul_cfg_info_r14.ul_sched_interv_r14.to_string()); - j.write_int("ul-StartSubframe-r14", ul_cfg_info_r14.ul_start_sf_r14); - j.write_str("ul-Grant-r14", ul_cfg_info_r14.ul_grant_r14.to_string()); - j.end_obj(); + j.write_int("start-r9", start_r9); + if (range_r9_present) { + j.write_int("range-r9", range_r9); } j.end_obj(); } - -void rach_skip_r14_s::target_ta_r14_c_::destroy_() {} -void rach_skip_r14_s::target_ta_r14_c_::set(types::options e) +bool pci_range_utra_fdd_r9_s::operator==(const pci_range_utra_fdd_r9_s& other) const { - destroy_(); - type_ = e; + return start_r9 == other.start_r9 and range_r9_present == other.range_r9_present and + (not range_r9_present or range_r9 == other.range_r9); } -rach_skip_r14_s::target_ta_r14_c_::target_ta_r14_c_(const rach_skip_r14_s::target_ta_r14_c_& other) + +// AltTTT-CellsToAddMod-r12 ::= SEQUENCE +SRSASN_CODE alt_ttt_cells_to_add_mod_r12_s::pack(bit_ref& bref) const { - type_ = other.type(); - switch (type_) { - case types::ta0_r14: - break; - case types::mcg_ptag_r14: - break; - case types::scg_ptag_r14: - break; - case types::mcg_stag_r14: - c.init(other.c.get()); - break; - case types::scg_stag_r14: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); - } + HANDLE_CODE(pack_integer(bref, cell_idx_r12, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pci_range_r12.pack(bref)); + + return SRSASN_SUCCESS; } -rach_skip_r14_s::target_ta_r14_c_& -rach_skip_r14_s::target_ta_r14_c_::operator=(const rach_skip_r14_s::target_ta_r14_c_& other) +SRSASN_CODE alt_ttt_cells_to_add_mod_r12_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ta0_r14: - break; - case types::mcg_ptag_r14: - break; - case types::scg_ptag_r14: - break; - case types::mcg_stag_r14: - c.set(other.c.get()); - break; - case types::scg_stag_r14: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); - } + HANDLE_CODE(unpack_integer(cell_idx_r12, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pci_range_r12.unpack(bref)); - return *this; + return SRSASN_SUCCESS; } -void rach_skip_r14_s::target_ta_r14_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ta0_r14: - break; - case types::mcg_ptag_r14: - break; - case types::scg_ptag_r14: - break; - case types::mcg_stag_r14: - j.write_int("mcg-STAG-r14", c.get()); - break; - case types::scg_stag_r14: - j.write_int("scg-STAG-r14", c.get()); - break; - default: - log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); - } - j.end_obj(); -} -SRSASN_CODE rach_skip_r14_s::target_ta_r14_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ta0_r14: - break; - case types::mcg_ptag_r14: - break; - case types::scg_ptag_r14: - break; - case types::mcg_stag_r14: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)3u)); - break; - case types::scg_stag_r14: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)3u)); - break; - default: - log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rach_skip_r14_s::target_ta_r14_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ta0_r14: - break; - case types::mcg_ptag_r14: - break; - case types::scg_ptag_r14: - break; - case types::mcg_stag_r14: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)3u)); - break; - case types::scg_stag_r14: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)3u)); - break; - default: - log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_opts::to_string() const -{ - 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 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_"); -} - -// MeasCSI-RS-Config-r12 ::= SEQUENCE -SRSASN_CODE meas_csi_rs_cfg_r12_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, meas_csi_rs_id_r12, (uint8_t)1u, (uint8_t)96u)); - HANDLE_CODE(pack_integer(bref, pci_r12, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(pack_integer(bref, scrambling_id_r12, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(pack_integer(bref, res_cfg_r12, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, sf_offset_r12, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(csi_rs_individual_offset_r12.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_csi_rs_cfg_r12_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(meas_csi_rs_id_r12, bref, (uint8_t)1u, (uint8_t)96u)); - HANDLE_CODE(unpack_integer(pci_r12, bref, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(unpack_integer(scrambling_id_r12, bref, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(unpack_integer(res_cfg_r12, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(sf_offset_r12, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(csi_rs_individual_offset_r12.unpack(bref)); - - return SRSASN_SUCCESS; -} -void meas_csi_rs_cfg_r12_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("measCSI-RS-Id-r12", meas_csi_rs_id_r12); - j.write_int("physCellId-r12", pci_r12); - j.write_int("scramblingIdentity-r12", scrambling_id_r12); - j.write_int("resourceConfig-r12", res_cfg_r12); - j.write_int("subframeOffset-r12", sf_offset_r12); - j.write_str("csi-RS-IndividualOffset-r12", csi_rs_individual_offset_r12.to_string()); - j.end_obj(); -} -bool meas_csi_rs_cfg_r12_s::operator==(const meas_csi_rs_cfg_r12_s& other) const -{ - return ext == other.ext and meas_csi_rs_id_r12 == other.meas_csi_rs_id_r12 and pci_r12 == other.pci_r12 and - scrambling_id_r12 == other.scrambling_id_r12 and res_cfg_r12 == other.res_cfg_r12 and - sf_offset_r12 == other.sf_offset_r12 and csi_rs_individual_offset_r12 == other.csi_rs_individual_offset_r12; -} - -// PhysCellIdRangeUTRA-FDD-r9 ::= SEQUENCE -SRSASN_CODE pci_range_utra_fdd_r9_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(range_r9_present, 1)); - - HANDLE_CODE(pack_integer(bref, start_r9, (uint16_t)0u, (uint16_t)511u)); - if (range_r9_present) { - HANDLE_CODE(pack_integer(bref, range_r9, (uint16_t)2u, (uint16_t)512u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pci_range_utra_fdd_r9_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(range_r9_present, 1)); - - HANDLE_CODE(unpack_integer(start_r9, bref, (uint16_t)0u, (uint16_t)511u)); - if (range_r9_present) { - HANDLE_CODE(unpack_integer(range_r9, bref, (uint16_t)2u, (uint16_t)512u)); - } - - return SRSASN_SUCCESS; -} -void pci_range_utra_fdd_r9_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("start-r9", start_r9); - if (range_r9_present) { - j.write_int("range-r9", range_r9); - } - j.end_obj(); -} -bool pci_range_utra_fdd_r9_s::operator==(const pci_range_utra_fdd_r9_s& other) const -{ - return start_r9 == other.start_r9 and range_r9_present == other.range_r9_present and - (not range_r9_present or range_r9 == other.range_r9); -} - -// AltTTT-CellsToAddMod-r12 ::= SEQUENCE -SRSASN_CODE alt_ttt_cells_to_add_mod_r12_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, cell_idx_r12, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pci_range_r12.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE alt_ttt_cells_to_add_mod_r12_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(cell_idx_r12, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pci_range_r12.unpack(bref)); - - return SRSASN_SUCCESS; -} -void alt_ttt_cells_to_add_mod_r12_s::to_json(json_writer& j) const +void alt_ttt_cells_to_add_mod_r12_s::to_json(json_writer& j) const { j.start_obj(); j.write_int("cellIndex-r12", cell_idx_r12); @@ -1372,29 +1324,6 @@ bool csg_allowed_report_cells_r9_s::operator==(const csg_allowed_report_cells_r9 (not pci_range_utra_fdd_list_r9_present or pci_range_utra_fdd_list_r9 == other.pci_range_utra_fdd_list_r9); } -// CarrierFreqGERAN ::= SEQUENCE -SRSASN_CODE carrier_freq_geran_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, arfcn, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(band_ind.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE carrier_freq_geran_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(arfcn, bref, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(band_ind.unpack(bref)); - - return SRSASN_SUCCESS; -} -void carrier_freq_geran_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("arfcn", arfcn); - j.write_str("bandIndicator", band_ind.to_string()); - j.end_obj(); -} - // MeasCycleSCell-r10 ::= ENUMERATED std::string meas_cycle_scell_r10_opts::to_string() const { @@ -2364,36 +2293,6 @@ bool meas_sf_pattern_cfg_neigh_r10_c::operator==(const meas_sf_pattern_cfg_neigh (not c.meas_sf_cell_list_r10_present or c.meas_sf_cell_list_r10 == other.c.meas_sf_cell_list_r10); } -// MobilityControlInfo-v10l0 ::= SEQUENCE -SRSASN_CODE mob_ctrl_info_v10l0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(add_spec_emission_v10l0_present, 1)); - - if (add_spec_emission_v10l0_present) { - HANDLE_CODE(pack_integer(bref, add_spec_emission_v10l0, (uint16_t)33u, (uint16_t)288u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mob_ctrl_info_v10l0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(add_spec_emission_v10l0_present, 1)); - - if (add_spec_emission_v10l0_present) { - HANDLE_CODE(unpack_integer(add_spec_emission_v10l0, bref, (uint16_t)33u, (uint16_t)288u)); - } - - return SRSASN_SUCCESS; -} -void mob_ctrl_info_v10l0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (add_spec_emission_v10l0_present) { - j.write_int("additionalSpectrumEmission-v10l0", add_spec_emission_v10l0); - } - j.end_obj(); -} - // PhysCellIdGERAN ::= SEQUENCE SRSASN_CODE pci_geran_s::pack(bit_ref& bref) const { @@ -2590,6 +2489,20 @@ SRSASN_CODE rs_cfg_ssb_nr_r15_s::pack(bit_ref& bref) const HANDLE_CODE(meas_timing_cfg_r15.pack(bref)); HANDLE_CODE(subcarrier_spacing_ssb_r15.pack(bref)); + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ssb_to_measure_r15.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ssb_to_measure_r15.is_present(), 1)); + if (ssb_to_measure_r15.is_present()) { + HANDLE_CODE(ssb_to_measure_r15->pack(bref)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE rs_cfg_ssb_nr_r15_s::unpack(cbit_ref& bref) @@ -2598,6 +2511,21 @@ SRSASN_CODE rs_cfg_ssb_nr_r15_s::unpack(cbit_ref& bref) HANDLE_CODE(meas_timing_cfg_r15.unpack(bref)); HANDLE_CODE(subcarrier_spacing_ssb_r15.unpack(bref)); + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool ssb_to_measure_r15_present; + HANDLE_CODE(bref.unpack(ssb_to_measure_r15_present, 1)); + ssb_to_measure_r15.set_present(ssb_to_measure_r15_present); + if (ssb_to_measure_r15.is_present()) { + HANDLE_CODE(ssb_to_measure_r15->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } void rs_cfg_ssb_nr_r15_s::to_json(json_writer& j) const @@ -2606,12 +2534,20 @@ void rs_cfg_ssb_nr_r15_s::to_json(json_writer& j) const j.write_fieldname("measTimingConfig-r15"); meas_timing_cfg_r15.to_json(j); j.write_str("subcarrierSpacingSSB-r15", subcarrier_spacing_ssb_r15.to_string()); + if (ext) { + if (ssb_to_measure_r15.is_present()) { + j.write_fieldname("ssb-ToMeasure-r15"); + ssb_to_measure_r15->to_json(j); + } + } j.end_obj(); } bool rs_cfg_ssb_nr_r15_s::operator==(const rs_cfg_ssb_nr_r15_s& other) const { return ext == other.ext and meas_timing_cfg_r15 == other.meas_timing_cfg_r15 and - subcarrier_spacing_ssb_r15 == other.subcarrier_spacing_ssb_r15; + subcarrier_spacing_ssb_r15 == other.subcarrier_spacing_ssb_r15 and + (not ext or (ssb_to_measure_r15.is_present() == other.ssb_to_measure_r15.is_present() and + (not ssb_to_measure_r15.is_present() or *ssb_to_measure_r15 == *other.ssb_to_measure_r15))); } std::string rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_opts::to_string() const @@ -2625,41 +2561,41 @@ uint8_t rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_opts::to_number() const return map_enum_number(options, 4, value, "rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); } -// RSRQ-RangeConfig-r12 ::= CHOICE -void rsrq_range_cfg_r12_c::set(types::options e) +void rs_cfg_ssb_nr_r15_s::ssb_to_measure_r15_c_::set(types::options e) { type_ = e; } -void rsrq_range_cfg_r12_c::to_json(json_writer& j) const +void rs_cfg_ssb_nr_r15_s::ssb_to_measure_r15_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { case types::release: break; case types::setup: - j.write_int("setup", c); + j.write_fieldname("setup"); + c.to_json(j); break; default: - log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + log_invalid_choice_id(type_, "rs_cfg_ssb_nr_r15_s::ssb_to_measure_r15_c_"); } j.end_obj(); } -SRSASN_CODE rsrq_range_cfg_r12_c::pack(bit_ref& bref) const +SRSASN_CODE rs_cfg_ssb_nr_r15_s::ssb_to_measure_r15_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { case types::release: break; case types::setup: - HANDLE_CODE(pack_integer(bref, c, (int8_t)-30, (int8_t)46)); + HANDLE_CODE(c.pack(bref)); break; default: - log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + log_invalid_choice_id(type_, "rs_cfg_ssb_nr_r15_s::ssb_to_measure_r15_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rsrq_range_cfg_r12_c::unpack(cbit_ref& bref) +SRSASN_CODE rs_cfg_ssb_nr_r15_s::ssb_to_measure_r15_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); @@ -2668,22 +2604,78 @@ SRSASN_CODE rsrq_range_cfg_r12_c::unpack(cbit_ref& bref) case types::release: break; case types::setup: - HANDLE_CODE(unpack_integer(c, bref, (int8_t)-30, (int8_t)46)); + HANDLE_CODE(c.unpack(bref)); break; default: - log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + log_invalid_choice_id(type_, "rs_cfg_ssb_nr_r15_s::ssb_to_measure_r15_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -bool rsrq_range_cfg_r12_c::operator==(const rsrq_range_cfg_r12_c& other) const +bool rs_cfg_ssb_nr_r15_s::ssb_to_measure_r15_c_::operator==(const ssb_to_measure_r15_c_& other) const { return type() == other.type() and c == other.c; } -// ReportInterval ::= ENUMERATED -std::string report_interv_opts::to_string() const -{ +// RSRQ-RangeConfig-r12 ::= CHOICE +void rsrq_range_cfg_r12_c::set(types::options e) +{ + type_ = e; +} +void rsrq_range_cfg_r12_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_int("setup", c); + break; + default: + log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE rsrq_range_cfg_r12_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_integer(bref, c, (int8_t)-30, (int8_t)46)); + break; + default: + log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rsrq_range_cfg_r12_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_integer(c, bref, (int8_t)-30, (int8_t)46)); + break; + default: + log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} +bool rsrq_range_cfg_r12_c::operator==(const rsrq_range_cfg_r12_c& other) const +{ + return type() == other.type() and c == other.c; +} + +// ReportInterval ::= ENUMERATED +std::string report_interv_opts::to_string() const +{ static const char* options[] = {"ms120", "ms240", "ms480", @@ -3392,62 +3384,6 @@ bool wlan_name_list_cfg_r15_c::operator==(const wlan_name_list_cfg_r15_c& other) return type() == other.type() and c == other.c; } -// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE -SRSASN_CODE logged_meas_cfg_v1530_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(bt_name_list_r15_present, 1)); - HANDLE_CODE(bref.pack(wlan_name_list_r15_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (bt_name_list_r15_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, bt_name_list_r15, 1, 4)); - } - if (wlan_name_list_r15_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, wlan_name_list_r15, 1, 4)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE logged_meas_cfg_v1530_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(bt_name_list_r15_present, 1)); - HANDLE_CODE(bref.unpack(wlan_name_list_r15_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (bt_name_list_r15_present) { - HANDLE_CODE(unpack_dyn_seq_of(bt_name_list_r15, bref, 1, 4)); - } - if (wlan_name_list_r15_present) { - HANDLE_CODE(unpack_dyn_seq_of(wlan_name_list_r15, bref, 1, 4)); - } - - return SRSASN_SUCCESS; -} -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 (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 (const auto& e1 : wlan_name_list_r15) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - // MeasGapConfigPerCC-r14 ::= SEQUENCE SRSASN_CODE meas_gap_cfg_per_cc_r14_s::pack(bit_ref& bref) const { @@ -5431,14 +5367,14 @@ void eutra_event_s::event_id_c_::to_json(json_writer& j) const j.write_fieldname("eventH1-r15"); j.start_obj(); j.write_int("h1-ThresholdOffset-r15", c.get().h1_thres_offset_r15); - j.write_int("h1-Hysteresis-15", c.get().h1_hysteresis_minus15); + j.write_int("h1-Hysteresis-r15", c.get().h1_hysteresis_r15); j.end_obj(); break; case types::event_h2_r15: j.write_fieldname("eventH2-r15"); j.start_obj(); j.write_int("h2-ThresholdOffset-r15", c.get().h2_thres_offset_r15); - j.write_int("h2-Hysteresis-15", c.get().h2_hysteresis_minus15); + j.write_int("h2-Hysteresis-r15", c.get().h2_hysteresis_r15); j.end_obj(); break; default: @@ -5494,12 +5430,12 @@ SRSASN_CODE eutra_event_s::event_id_c_::pack(bit_ref& bref) const case types::event_h1_r15: { varlength_field_pack_guard varlen_scope(bref, false); HANDLE_CODE(pack_integer(bref, c.get().h1_thres_offset_r15, (uint16_t)0u, (uint16_t)300u)); - HANDLE_CODE(pack_integer(bref, c.get().h1_hysteresis_minus15, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(pack_integer(bref, c.get().h1_hysteresis_r15, (uint8_t)1u, (uint8_t)16u)); } break; case types::event_h2_r15: { varlength_field_pack_guard varlen_scope(bref, false); HANDLE_CODE(pack_integer(bref, c.get().h2_thres_offset_r15, (uint16_t)0u, (uint16_t)300u)); - HANDLE_CODE(pack_integer(bref, c.get().h2_hysteresis_minus15, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(pack_integer(bref, c.get().h2_hysteresis_r15, (uint8_t)1u, (uint8_t)16u)); } break; default: log_invalid_choice_id(type_, "eutra_event_s::event_id_c_"); @@ -5557,12 +5493,12 @@ SRSASN_CODE eutra_event_s::event_id_c_::unpack(cbit_ref& bref) case types::event_h1_r15: { varlength_field_unpack_guard varlen_scope(bref, false); HANDLE_CODE(unpack_integer(c.get().h1_thres_offset_r15, bref, (uint16_t)0u, (uint16_t)300u)); - HANDLE_CODE(unpack_integer(c.get().h1_hysteresis_minus15, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(unpack_integer(c.get().h1_hysteresis_r15, bref, (uint8_t)1u, (uint8_t)16u)); } break; case types::event_h2_r15: { varlength_field_unpack_guard varlen_scope(bref, false); HANDLE_CODE(unpack_integer(c.get().h2_thres_offset_r15, bref, (uint16_t)0u, (uint16_t)300u)); - HANDLE_CODE(unpack_integer(c.get().h2_hysteresis_minus15, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(unpack_integer(c.get().h2_hysteresis_r15, bref, (uint8_t)1u, (uint8_t)16u)); } break; default: log_invalid_choice_id(type_, "eutra_event_s::event_id_c_"); @@ -5604,10 +5540,10 @@ bool eutra_event_s::event_id_c_::operator==(const event_id_c_& other) const return c.get().v2_thres_r14 == other.c.get().v2_thres_r14; case types::event_h1_r15: return c.get().h1_thres_offset_r15 == other.c.get().h1_thres_offset_r15 and - c.get().h1_hysteresis_minus15 == other.c.get().h1_hysteresis_minus15; + c.get().h1_hysteresis_r15 == other.c.get().h1_hysteresis_r15; case types::event_h2_r15: return c.get().h2_thres_offset_r15 == other.c.get().h2_thres_offset_r15 and - c.get().h2_hysteresis_minus15 == other.c.get().h2_hysteresis_minus15; + c.get().h2_hysteresis_r15 == other.c.get().h2_hysteresis_r15; default: return true; } @@ -7522,30 +7458,6 @@ std::string report_cfg_inter_rat_s::report_sftd_meas_r15_opts::to_string() const return convert_enum_idx(options, 2, value, "report_cfg_inter_rat_s::report_sftd_meas_r15_e_"); } -// CellGlobalIdEUTRA ::= SEQUENCE -SRSASN_CODE cell_global_id_eutra_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(plmn_id.pack(bref)); - HANDLE_CODE(cell_id.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cell_global_id_eutra_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(plmn_id.unpack(bref)); - HANDLE_CODE(cell_id.unpack(bref)); - - return SRSASN_SUCCESS; -} -void cell_global_id_eutra_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("plmn-Identity"); - plmn_id.to_json(j); - j.write_str("cellIdentity", cell_id.to_string()); - j.end_obj(); -} - // MeasIdToAddMod ::= SEQUENCE SRSASN_CODE meas_id_to_add_mod_s::pack(bit_ref& bref) const { @@ -8633,221 +8545,70 @@ bool report_cfg_to_add_mod_s::report_cfg_c_::operator==(const report_cfg_c_& oth return true; } -// CarrierBandwidthEUTRA ::= SEQUENCE -SRSASN_CODE carrier_bw_eutra_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_bw_present, 1)); - - HANDLE_CODE(dl_bw.pack(bref)); - if (ul_bw_present) { - HANDLE_CODE(ul_bw.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE carrier_bw_eutra_s::unpack(cbit_ref& bref) +// MeasGapConfigDensePRS-r15 ::= CHOICE +void meas_gap_cfg_dense_prs_r15_c::set(types::options e) { - HANDLE_CODE(bref.unpack(ul_bw_present, 1)); - - HANDLE_CODE(dl_bw.unpack(bref)); - if (ul_bw_present) { - HANDLE_CODE(ul_bw.unpack(bref)); - } - - return SRSASN_SUCCESS; + type_ = e; } -void carrier_bw_eutra_s::to_json(json_writer& j) const +void meas_gap_cfg_dense_prs_r15_c::to_json(json_writer& j) const { j.start_obj(); - j.write_str("dl-Bandwidth", dl_bw.to_string()); - if (ul_bw_present) { - j.write_str("ul-Bandwidth", ul_bw.to_string()); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("gapOffsetDensePRS-r15"); + c.gap_offset_dense_prs_r15.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); } j.end_obj(); } - -std::string carrier_bw_eutra_s::dl_bw_opts::to_string() const +SRSASN_CODE meas_gap_cfg_dense_prs_r15_c::pack(bit_ref& bref) const { - 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_"); + type_.pack(bref); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.gap_offset_dense_prs_r15.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -uint8_t carrier_bw_eutra_s::dl_bw_opts::to_number() const +SRSASN_CODE meas_gap_cfg_dense_prs_r15_c::unpack(cbit_ref& bref) { - 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_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.gap_offset_dense_prs_r15.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -std::string carrier_bw_eutra_s::ul_bw_opts::to_string() const +void meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::destroy_() {} +void meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::set(types::options e) { - 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_"); + destroy_(); + type_ = e; } -uint8_t carrier_bw_eutra_s::ul_bw_opts::to_number() const -{ - 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_"); -} - -// CarrierFreqEUTRA ::= SEQUENCE -SRSASN_CODE carrier_freq_eutra_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_carrier_freq_present, 1)); - - HANDLE_CODE(pack_integer(bref, dl_carrier_freq, (uint32_t)0u, (uint32_t)65535u)); - if (ul_carrier_freq_present) { - HANDLE_CODE(pack_integer(bref, ul_carrier_freq, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE carrier_freq_eutra_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ul_carrier_freq_present, 1)); - - HANDLE_CODE(unpack_integer(dl_carrier_freq, bref, (uint32_t)0u, (uint32_t)65535u)); - if (ul_carrier_freq_present) { - HANDLE_CODE(unpack_integer(ul_carrier_freq, bref, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -void carrier_freq_eutra_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("dl-CarrierFreq", dl_carrier_freq); - if (ul_carrier_freq_present) { - j.write_int("ul-CarrierFreq", ul_carrier_freq); - } - j.end_obj(); -} - -// CarrierFreqEUTRA-v9e0 ::= SEQUENCE -SRSASN_CODE carrier_freq_eutra_v9e0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_carrier_freq_v9e0_present, 1)); - - HANDLE_CODE(pack_integer(bref, dl_carrier_freq_v9e0, (uint32_t)0u, (uint32_t)262143u)); - if (ul_carrier_freq_v9e0_present) { - HANDLE_CODE(pack_integer(bref, ul_carrier_freq_v9e0, (uint32_t)0u, (uint32_t)262143u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE carrier_freq_eutra_v9e0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ul_carrier_freq_v9e0_present, 1)); - - HANDLE_CODE(unpack_integer(dl_carrier_freq_v9e0, bref, (uint32_t)0u, (uint32_t)262143u)); - if (ul_carrier_freq_v9e0_present) { - HANDLE_CODE(unpack_integer(ul_carrier_freq_v9e0, bref, (uint32_t)0u, (uint32_t)262143u)); - } - - return SRSASN_SUCCESS; -} -void carrier_freq_eutra_v9e0_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("dl-CarrierFreq-v9e0", dl_carrier_freq_v9e0); - if (ul_carrier_freq_v9e0_present) { - j.write_int("ul-CarrierFreq-v9e0", ul_carrier_freq_v9e0); - } - j.end_obj(); -} - -// MeasGapConfigDensePRS-r15 ::= CHOICE -void meas_gap_cfg_dense_prs_r15_c::set(types::options e) -{ - type_ = e; -} -void meas_gap_cfg_dense_prs_r15_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::release: - break; - case types::setup: - j.write_fieldname("setup"); - j.start_obj(); - j.write_fieldname("gapOffsetDensePRS-r15"); - c.gap_offset_dense_prs_r15.to_json(j); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); - } - j.end_obj(); -} -SRSASN_CODE meas_gap_cfg_dense_prs_r15_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::release: - break; - case types::setup: - HANDLE_CODE(c.gap_offset_dense_prs_r15.pack(bref)); - break; - default: - log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_gap_cfg_dense_prs_r15_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::release: - break; - case types::setup: - HANDLE_CODE(c.gap_offset_dense_prs_r15.unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::destroy_() {} -void meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::gap_offset_dense_prs_r15_c_( - const meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_& other) +meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::gap_offset_dense_prs_r15_c_( + const meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_& other) { type_ = other.type(); switch (type_) { @@ -9386,79 +9147,6 @@ uint8_t meas_scale_factor_r12_opts::to_number() const return map_enum_number(options, 2, value, "meas_scale_factor_r12_e"); } -// MobilityControlInfoV2X-r14 ::= SEQUENCE -SRSASN_CODE mob_ctrl_info_v2x_r14_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(v2x_comm_tx_pool_exceptional_r14_present, 1)); - HANDLE_CODE(bref.pack(v2x_comm_rx_pool_r14_present, 1)); - HANDLE_CODE(bref.pack(v2x_comm_sync_cfg_r14_present, 1)); - HANDLE_CODE(bref.pack(cbr_mob_tx_cfg_list_r14_present, 1)); - - if (v2x_comm_tx_pool_exceptional_r14_present) { - HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.pack(bref)); - } - if (v2x_comm_rx_pool_r14_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_rx_pool_r14, 1, 16)); - } - if (v2x_comm_sync_cfg_r14_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_sync_cfg_r14, 1, 16)); - } - if (cbr_mob_tx_cfg_list_r14_present) { - HANDLE_CODE(cbr_mob_tx_cfg_list_r14.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mob_ctrl_info_v2x_r14_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(v2x_comm_tx_pool_exceptional_r14_present, 1)); - HANDLE_CODE(bref.unpack(v2x_comm_rx_pool_r14_present, 1)); - HANDLE_CODE(bref.unpack(v2x_comm_sync_cfg_r14_present, 1)); - HANDLE_CODE(bref.unpack(cbr_mob_tx_cfg_list_r14_present, 1)); - - if (v2x_comm_tx_pool_exceptional_r14_present) { - HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.unpack(bref)); - } - if (v2x_comm_rx_pool_r14_present) { - HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_rx_pool_r14, bref, 1, 16)); - } - if (v2x_comm_sync_cfg_r14_present) { - HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_sync_cfg_r14, bref, 1, 16)); - } - if (cbr_mob_tx_cfg_list_r14_present) { - HANDLE_CODE(cbr_mob_tx_cfg_list_r14.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mob_ctrl_info_v2x_r14_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (v2x_comm_tx_pool_exceptional_r14_present) { - j.write_fieldname("v2x-CommTxPoolExceptional-r14"); - v2x_comm_tx_pool_exceptional_r14.to_json(j); - } - if (v2x_comm_rx_pool_r14_present) { - j.start_array("v2x-CommRxPool-r14"); - 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 (const auto& e1 : v2x_comm_sync_cfg_r14) { - e1.to_json(j); - } - j.end_array(); - } - if (cbr_mob_tx_cfg_list_r14_present) { - j.write_fieldname("cbr-MobilityTxConfigList-r14"); - cbr_mob_tx_cfg_list_r14.to_json(j); - } - j.end_obj(); -} - // QuantityConfig ::= SEQUENCE SRSASN_CODE quant_cfg_s::pack(bit_ref& bref) const { @@ -9672,26 +9360,230 @@ bool quant_cfg_s::operator==(const quant_cfg_s& other) const (not quant_cfg_nr_list_r15.is_present() or *quant_cfg_nr_list_r15 == *other.quant_cfg_nr_list_r15))); } -// MeasConfig ::= SEQUENCE -SRSASN_CODE meas_cfg_s::pack(bit_ref& bref) const +// RACH-ConfigDedicated ::= SEQUENCE +SRSASN_CODE rach_cfg_ded_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_obj_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(report_cfg_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(report_cfg_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(meas_id_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(meas_id_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(quant_cfg_present, 1)); - HANDLE_CODE(bref.pack(meas_gap_cfg_present, 1)); - HANDLE_CODE(bref.pack(s_measure_present, 1)); - HANDLE_CODE(bref.pack(pre_regist_info_hrpd_present, 1)); - HANDLE_CODE(bref.pack(speed_state_pars_present, 1)); + HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, ra_prach_mask_idx, (uint8_t)0u, (uint8_t)15u)); - if (meas_obj_to_rem_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_rem_list, 1, 32, integer_packer(1, 32))); + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_ded_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(ra_prach_mask_idx, bref, (uint8_t)0u, (uint8_t)15u)); + + return SRSASN_SUCCESS; +} +void rach_cfg_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ra-PreambleIndex", ra_preamb_idx); + j.write_int("ra-PRACH-MaskIndex", ra_prach_mask_idx); + j.end_obj(); +} + +// RACH-Skip-r14 ::= SEQUENCE +SRSASN_CODE rach_skip_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_cfg_info_r14_present, 1)); + + HANDLE_CODE(target_ta_r14.pack(bref)); + if (ul_cfg_info_r14_present) { + HANDLE_CODE(pack_integer(bref, ul_cfg_info_r14.nof_conf_ul_processes_r14, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(ul_cfg_info_r14.ul_sched_interv_r14.pack(bref)); + HANDLE_CODE(pack_integer(bref, ul_cfg_info_r14.ul_start_sf_r14, (uint8_t)0u, (uint8_t)9u)); + HANDLE_CODE(ul_cfg_info_r14.ul_grant_r14.pack(bref)); } - if (meas_obj_to_add_mod_list_present) { + + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_skip_r14_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_cfg_info_r14_present, 1)); + + HANDLE_CODE(target_ta_r14.unpack(bref)); + if (ul_cfg_info_r14_present) { + HANDLE_CODE(unpack_integer(ul_cfg_info_r14.nof_conf_ul_processes_r14, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(ul_cfg_info_r14.ul_sched_interv_r14.unpack(bref)); + HANDLE_CODE(unpack_integer(ul_cfg_info_r14.ul_start_sf_r14, bref, (uint8_t)0u, (uint8_t)9u)); + HANDLE_CODE(ul_cfg_info_r14.ul_grant_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rach_skip_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("targetTA-r14"); + target_ta_r14.to_json(j); + if (ul_cfg_info_r14_present) { + j.write_fieldname("ul-ConfigInfo-r14"); + j.start_obj(); + j.write_int("numberOfConfUL-Processes-r14", ul_cfg_info_r14.nof_conf_ul_processes_r14); + j.write_str("ul-SchedInterval-r14", ul_cfg_info_r14.ul_sched_interv_r14.to_string()); + j.write_int("ul-StartSubframe-r14", ul_cfg_info_r14.ul_start_sf_r14); + j.write_str("ul-Grant-r14", ul_cfg_info_r14.ul_grant_r14.to_string()); + j.end_obj(); + } + j.end_obj(); +} + +void rach_skip_r14_s::target_ta_r14_c_::destroy_() {} +void rach_skip_r14_s::target_ta_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rach_skip_r14_s::target_ta_r14_c_::target_ta_r14_c_(const rach_skip_r14_s::target_ta_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + c.init(other.c.get()); + break; + case types::scg_stag_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + } +} +rach_skip_r14_s::target_ta_r14_c_& +rach_skip_r14_s::target_ta_r14_c_::operator=(const rach_skip_r14_s::target_ta_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + c.set(other.c.get()); + break; + case types::scg_stag_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + } + + return *this; +} +void rach_skip_r14_s::target_ta_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + j.write_int("mcg-STAG-r14", c.get()); + break; + case types::scg_stag_r14: + j.write_int("scg-STAG-r14", c.get()); + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE rach_skip_r14_s::target_ta_r14_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)3u)); + break; + case types::scg_stag_r14: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)3u)); + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_skip_r14_s::target_ta_r14_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)3u)); + break; + case types::scg_stag_r14: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)3u)); + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_opts::to_string() const +{ + 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 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_"); +} + +// MeasConfig ::= SEQUENCE +SRSASN_CODE meas_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_obj_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(report_cfg_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(report_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(quant_cfg_present, 1)); + HANDLE_CODE(bref.pack(meas_gap_cfg_present, 1)); + HANDLE_CODE(bref.pack(s_measure_present, 1)); + HANDLE_CODE(bref.pack(pre_regist_info_hrpd_present, 1)); + HANDLE_CODE(bref.pack(speed_state_pars_present, 1)); + + if (meas_obj_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_rem_list, 1, 32, integer_packer(1, 32))); + } + if (meas_obj_to_add_mod_list_present) { HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_add_mod_list, 1, 32)); } if (report_cfg_to_rem_list_present) { @@ -10320,6 +10212,363 @@ SRSASN_CODE meas_cfg_s::height_thresh_ref_r15_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +// CarrierFreqGERAN ::= SEQUENCE +SRSASN_CODE carrier_freq_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, arfcn, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(band_ind.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_geran_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(arfcn, bref, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(band_ind.unpack(bref)); + + return SRSASN_SUCCESS; +} +void carrier_freq_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("arfcn", arfcn); + j.write_str("bandIndicator", band_ind.to_string()); + j.end_obj(); +} + +// MobilityControlInfo-v10l0 ::= SEQUENCE +SRSASN_CODE mob_ctrl_info_v10l0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_spec_emission_v10l0_present, 1)); + + if (add_spec_emission_v10l0_present) { + HANDLE_CODE(pack_integer(bref, add_spec_emission_v10l0, (uint16_t)33u, (uint16_t)288u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_ctrl_info_v10l0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_spec_emission_v10l0_present, 1)); + + if (add_spec_emission_v10l0_present) { + HANDLE_CODE(unpack_integer(add_spec_emission_v10l0, bref, (uint16_t)33u, (uint16_t)288u)); + } + + return SRSASN_SUCCESS; +} +void mob_ctrl_info_v10l0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (add_spec_emission_v10l0_present) { + j.write_int("additionalSpectrumEmission-v10l0", add_spec_emission_v10l0); + } + j.end_obj(); +} + +// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE +SRSASN_CODE logged_meas_cfg_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(bt_name_list_r15_present, 1)); + HANDLE_CODE(bref.pack(wlan_name_list_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (bt_name_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, bt_name_list_r15, 1, 4)); + } + if (wlan_name_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_name_list_r15, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_v1530_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(bt_name_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(wlan_name_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (bt_name_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(bt_name_list_r15, bref, 1, 4)); + } + if (wlan_name_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_name_list_r15, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +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 (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 (const auto& e1 : wlan_name_list_r15) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CellGlobalIdEUTRA ::= SEQUENCE +SRSASN_CODE cell_global_id_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(cell_id.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_global_id_eutra_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(cell_id.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_global_id_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity"); + plmn_id.to_json(j); + j.write_str("cellIdentity", cell_id.to_string()); + j.end_obj(); +} + +// CarrierBandwidthEUTRA ::= SEQUENCE +SRSASN_CODE carrier_bw_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_bw_present, 1)); + + HANDLE_CODE(dl_bw.pack(bref)); + if (ul_bw_present) { + HANDLE_CODE(ul_bw.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_bw_eutra_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_bw_present, 1)); + + HANDLE_CODE(dl_bw.unpack(bref)); + if (ul_bw_present) { + HANDLE_CODE(ul_bw.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void carrier_bw_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("dl-Bandwidth", dl_bw.to_string()); + if (ul_bw_present) { + j.write_str("ul-Bandwidth", ul_bw.to_string()); + } + j.end_obj(); +} + +std::string carrier_bw_eutra_s::dl_bw_opts::to_string() const +{ + 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 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 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 const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "carrier_bw_eutra_s::ul_bw_e_"); +} + +// CarrierFreqEUTRA ::= SEQUENCE +SRSASN_CODE carrier_freq_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_carrier_freq_present, 1)); + + HANDLE_CODE(pack_integer(bref, dl_carrier_freq, (uint32_t)0u, (uint32_t)65535u)); + if (ul_carrier_freq_present) { + HANDLE_CODE(pack_integer(bref, ul_carrier_freq, (uint32_t)0u, (uint32_t)65535u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_eutra_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_carrier_freq_present, 1)); + + HANDLE_CODE(unpack_integer(dl_carrier_freq, bref, (uint32_t)0u, (uint32_t)65535u)); + if (ul_carrier_freq_present) { + HANDLE_CODE(unpack_integer(ul_carrier_freq, bref, (uint32_t)0u, (uint32_t)65535u)); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq", dl_carrier_freq); + if (ul_carrier_freq_present) { + j.write_int("ul-CarrierFreq", ul_carrier_freq); + } + j.end_obj(); +} + +// CarrierFreqEUTRA-v9e0 ::= SEQUENCE +SRSASN_CODE carrier_freq_eutra_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_carrier_freq_v9e0_present, 1)); + + HANDLE_CODE(pack_integer(bref, dl_carrier_freq_v9e0, (uint32_t)0u, (uint32_t)262143u)); + if (ul_carrier_freq_v9e0_present) { + HANDLE_CODE(pack_integer(bref, ul_carrier_freq_v9e0, (uint32_t)0u, (uint32_t)262143u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_eutra_v9e0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_carrier_freq_v9e0_present, 1)); + + HANDLE_CODE(unpack_integer(dl_carrier_freq_v9e0, bref, (uint32_t)0u, (uint32_t)262143u)); + if (ul_carrier_freq_v9e0_present) { + HANDLE_CODE(unpack_integer(ul_carrier_freq_v9e0, bref, (uint32_t)0u, (uint32_t)262143u)); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_eutra_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq-v9e0", dl_carrier_freq_v9e0); + if (ul_carrier_freq_v9e0_present) { + j.write_int("ul-CarrierFreq-v9e0", ul_carrier_freq_v9e0); + } + j.end_obj(); +} + +// MobilityControlInfoV2X-r14 ::= SEQUENCE +SRSASN_CODE mob_ctrl_info_v2x_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(v2x_comm_tx_pool_exceptional_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_rx_pool_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_sync_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(cbr_mob_tx_cfg_list_r14_present, 1)); + + if (v2x_comm_tx_pool_exceptional_r14_present) { + HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.pack(bref)); + } + if (v2x_comm_rx_pool_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_rx_pool_r14, 1, 16)); + } + if (v2x_comm_sync_cfg_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_sync_cfg_r14, 1, 16)); + } + if (cbr_mob_tx_cfg_list_r14_present) { + HANDLE_CODE(cbr_mob_tx_cfg_list_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_ctrl_info_v2x_r14_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(v2x_comm_tx_pool_exceptional_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_rx_pool_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_sync_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(cbr_mob_tx_cfg_list_r14_present, 1)); + + if (v2x_comm_tx_pool_exceptional_r14_present) { + HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.unpack(bref)); + } + if (v2x_comm_rx_pool_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_rx_pool_r14, bref, 1, 16)); + } + if (v2x_comm_sync_cfg_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_sync_cfg_r14, bref, 1, 16)); + } + if (cbr_mob_tx_cfg_list_r14_present) { + HANDLE_CODE(cbr_mob_tx_cfg_list_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mob_ctrl_info_v2x_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (v2x_comm_tx_pool_exceptional_r14_present) { + j.write_fieldname("v2x-CommTxPoolExceptional-r14"); + v2x_comm_tx_pool_exceptional_r14.to_json(j); + } + if (v2x_comm_rx_pool_r14_present) { + j.start_array("v2x-CommRxPool-r14"); + 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 (const auto& e1 : v2x_comm_sync_cfg_r14) { + e1.to_json(j); + } + j.end_array(); + } + if (cbr_mob_tx_cfg_list_r14_present) { + j.write_fieldname("cbr-MobilityTxConfigList-r14"); + cbr_mob_tx_cfg_list_r14.to_json(j); + } + j.end_obj(); +} + // MobilityControlInfo ::= SEQUENCE SRSASN_CODE mob_ctrl_info_s::pack(bit_ref& bref) const { @@ -12456,14 +12705,14 @@ SRSASN_CODE cgi_info_nr_r15_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(plmn_id_info_list_r15_present, 1)); - HANDLE_CODE(bref.pack(freq_band_list_minus15_present, 1)); + HANDLE_CODE(bref.pack(freq_band_list_r15_present, 1)); HANDLE_CODE(bref.pack(no_sib1_r15_present, 1)); if (plmn_id_info_list_r15_present) { HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_info_list_r15, 1, 12)); } - if (freq_band_list_minus15_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_minus15, 1, 32, integer_packer(1, 1024))); + if (freq_band_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_r15, 1, 32, integer_packer(1, 1024))); } if (no_sib1_r15_present) { HANDLE_CODE(pack_integer(bref, no_sib1_r15.ssb_subcarrier_offset_r15, (uint8_t)0u, (uint8_t)15u)); @@ -12476,14 +12725,14 @@ SRSASN_CODE cgi_info_nr_r15_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(plmn_id_info_list_r15_present, 1)); - HANDLE_CODE(bref.unpack(freq_band_list_minus15_present, 1)); + HANDLE_CODE(bref.unpack(freq_band_list_r15_present, 1)); HANDLE_CODE(bref.unpack(no_sib1_r15_present, 1)); if (plmn_id_info_list_r15_present) { HANDLE_CODE(unpack_dyn_seq_of(plmn_id_info_list_r15, bref, 1, 12)); } - if (freq_band_list_minus15_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_minus15, bref, 1, 32, integer_packer(1, 1024))); + if (freq_band_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_r15, bref, 1, 32, integer_packer(1, 1024))); } if (no_sib1_r15_present) { HANDLE_CODE(unpack_integer(no_sib1_r15.ssb_subcarrier_offset_r15, bref, (uint8_t)0u, (uint8_t)15u)); @@ -12502,9 +12751,9 @@ void cgi_info_nr_r15_s::to_json(json_writer& j) const } j.end_array(); } - if (freq_band_list_minus15_present) { - j.start_array("frequencyBandList-15"); - for (const auto& e1 : freq_band_list_minus15) { + if (freq_band_list_r15_present) { + j.start_array("frequencyBandList-r15"); + for (const auto& e1 : freq_band_list_r15) { j.write_int(e1); } j.end_array(); diff --git a/lib/src/asn1/rrc/phy_ded.cc b/lib/src/asn1/rrc/phy_ded.cc index 9074fc286..70abc65a5 100644 --- a/lib/src/asn1/rrc/phy_ded.cc +++ b/lib/src/asn1/rrc/phy_ded.cc @@ -9777,10 +9777,10 @@ void spucch_cfg_r15_c::to_json(json_writer& j) const if (c.two_ant_port_activ_spucch_format1a1b_r15_present) { j.write_str("twoAntennaPortActivatedSPUCCH-Format1a1b-r15", "true"); } - j.write_fieldname("twoAntennaPortActivatedSPUCCH-Format3-r15"); + j.write_fieldname("dummy"); j.start_obj(); j.start_array("n3SPUCCH-AN-List-r15"); - for (const auto& e1 : c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15) { + for (const auto& e1 : c.dummy.n3_spucch_an_list_r15) { j.write_int(e1); } j.end_array(); @@ -9804,8 +9804,7 @@ SRSASN_CODE spucch_cfg_r15_c::pack(bit_ref& bref) const if (c.spucch_set_r15_present) { HANDLE_CODE(pack_dyn_seq_of(bref, c.spucch_set_r15, 1, 4)); } - HANDLE_CODE(pack_dyn_seq_of( - bref, c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15, 1, 4, integer_packer(0, 549))); + HANDLE_CODE(pack_dyn_seq_of(bref, c.dummy.n3_spucch_an_list_r15, 1, 4, integer_packer(0, 549))); break; default: log_invalid_choice_id(type_, "spucch_cfg_r15_c"); @@ -9827,8 +9826,7 @@ SRSASN_CODE spucch_cfg_r15_c::unpack(cbit_ref& bref) if (c.spucch_set_r15_present) { HANDLE_CODE(unpack_dyn_seq_of(c.spucch_set_r15, bref, 1, 4)); } - HANDLE_CODE(unpack_dyn_seq_of( - c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15, bref, 1, 4, integer_packer(0, 549))); + HANDLE_CODE(unpack_dyn_seq_of(c.dummy.n3_spucch_an_list_r15, bref, 1, 4, integer_packer(0, 549))); break; default: log_invalid_choice_id(type_, "spucch_cfg_r15_c"); @@ -9842,8 +9840,7 @@ bool spucch_cfg_r15_c::operator==(const spucch_cfg_r15_c& other) const (not c.spucch_set_r15_present or c.spucch_set_r15 == other.c.spucch_set_r15) and c.two_ant_port_activ_spucch_format1a1b_r15_present == other.c.two_ant_port_activ_spucch_format1a1b_r15_present and - c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15 == - other.c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15; + c.dummy.n3_spucch_an_list_r15 == other.c.dummy.n3_spucch_an_list_r15; } // SRS-CC-SetIndex-r14 ::= SEQUENCE @@ -15742,6 +15739,81 @@ bool phys_cfg_ded_stti_r15_c::operator==(const phys_cfg_ded_stti_r15_c& other) c (not c.short_tti_r15_present or c.short_tti_r15 == other.c.short_tti_r15); } +// SPUCCH-Config-v1550 ::= CHOICE +void spucch_cfg_v1550_c::set(types::options e) +{ + type_ = e; +} +void spucch_cfg_v1550_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("twoAntennaPortActivatedSPUCCH-Format3-v1550"); + j.start_obj(); + j.start_array("n3SPUCCH-AN-List-v1550"); + for (const auto& e1 : c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "spucch_cfg_v1550_c"); + } + j.end_obj(); +} +SRSASN_CODE spucch_cfg_v1550_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550, + 1, + 4, + integer_packer(0, 549))); + break; + default: + log_invalid_choice_id(type_, "spucch_cfg_v1550_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE spucch_cfg_v1550_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550, + bref, + 1, + 4, + integer_packer(0, 549))); + break; + default: + log_invalid_choice_id(type_, "spucch_cfg_v1550_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} +bool spucch_cfg_v1550_c::operator==(const spucch_cfg_v1550_c& other) const +{ + return type() == other.type() and c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550 == + other.c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550; +} + // SRS-TPC-PDCCH-Config-r14 ::= CHOICE void srs_tpc_pdcch_cfg_r14_c::set(types::options e) { @@ -17257,6 +17329,7 @@ SRSASN_CODE phys_cfg_ded_s::pack(bit_ref& bref) const group_flags[10] |= ul_pwr_ctrl_ded_v1530.is_present(); group_flags[10] |= semi_static_cfi_cfg_r15.is_present(); group_flags[10] |= blind_pdsch_repeat_cfg_r15.is_present(); + group_flags[11] |= spucch_cfg_v1550.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -17593,6 +17666,14 @@ SRSASN_CODE phys_cfg_ded_s::pack(bit_ref& bref) const HANDLE_CODE(blind_pdsch_repeat_cfg_r15->pack(bref)); } } + if (group_flags[11]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(spucch_cfg_v1550.is_present(), 1)); + if (spucch_cfg_v1550.is_present()) { + HANDLE_CODE(spucch_cfg_v1550->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -17642,7 +17723,7 @@ SRSASN_CODE phys_cfg_ded_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(11); + ext_groups_unpacker_guard group_flags(12); group_flags.unpack(bref); if (group_flags[0]) { @@ -18119,6 +18200,16 @@ SRSASN_CODE phys_cfg_ded_s::unpack(cbit_ref& bref) HANDLE_CODE(blind_pdsch_repeat_cfg_r15->unpack(bref)); } } + if (group_flags[11]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool spucch_cfg_v1550_present; + HANDLE_CODE(bref.unpack(spucch_cfg_v1550_present, 1)); + spucch_cfg_v1550.set_present(spucch_cfg_v1550_present); + if (spucch_cfg_v1550.is_present()) { + HANDLE_CODE(spucch_cfg_v1550->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -18485,6 +18576,10 @@ void phys_cfg_ded_s::to_json(json_writer& j) const j.write_fieldname("blindPDSCH-Repetition-Config-r15"); blind_pdsch_repeat_cfg_r15->to_json(j); } + if (spucch_cfg_v1550.is_present()) { + j.write_fieldname("spucch-Config-v1550"); + spucch_cfg_v1550->to_json(j); + } } j.end_obj(); } diff --git a/lib/src/asn1/rrc/rr_common.cc b/lib/src/asn1/rrc/rr_common.cc index 757509c43..5da38c960 100644 --- a/lib/src/asn1/rrc/rr_common.cc +++ b/lib/src/asn1/rrc/rr_common.cc @@ -3624,6 +3624,42 @@ uint16_t wus_cfg_r15_s::time_offset_e_drx_long_r15_opts::to_number() const return map_enum_number(options, 2, value, "wus_cfg_r15_s::time_offset_e_drx_long_r15_e_"); } +// WUS-Config-v1560 ::= SEQUENCE +SRSASN_CODE wus_cfg_v1560_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pwr_boost_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE wus_cfg_v1560_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(pwr_boost_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void wus_cfg_v1560_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("powerBoost-r15", pwr_boost_r15.to_string()); + j.end_obj(); +} + +std::string wus_cfg_v1560_s::pwr_boost_r15_opts::to_string() const +{ + static const char* options[] = {"dB0", "dB1dot8", "dB3", "dB4dot8"}; + return convert_enum_idx(options, 4, value, "wus_cfg_v1560_s::pwr_boost_r15_e_"); +} +float wus_cfg_v1560_s::pwr_boost_r15_opts::to_number() const +{ + static const float options[] = {0.0, 1.8, 3.0, 4.8}; + return map_enum_number(options, 4, value, "wus_cfg_v1560_s::pwr_boost_r15_e_"); +} +std::string wus_cfg_v1560_s::pwr_boost_r15_opts::to_number_string() const +{ + static const char* options[] = {"0", "1.8", "3", "4.8"}; + return convert_enum_idx(options, 4, value, "wus_cfg_v1560_s::pwr_boost_r15_e_"); +} + // RadioResourceConfigCommonSIB ::= SEQUENCE SRSASN_CODE rr_cfg_common_sib_s::pack(bit_ref& bref) const { @@ -3659,6 +3695,7 @@ SRSASN_CODE rr_cfg_common_sib_s::pack(bit_ref& bref) const group_flags[5] |= wus_cfg_r15.is_present(); group_flags[5] |= high_speed_cfg_v1530.is_present(); group_flags[6] |= ul_pwr_ctrl_common_v1540.is_present(); + group_flags[7] |= wus_cfg_v1560.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -3761,6 +3798,14 @@ SRSASN_CODE rr_cfg_common_sib_s::pack(bit_ref& bref) const HANDLE_CODE(ul_pwr_ctrl_common_v1540->pack(bref)); } } + if (group_flags[7]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(wus_cfg_v1560.is_present(), 1)); + if (wus_cfg_v1560.is_present()) { + HANDLE_CODE(wus_cfg_v1560->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -3779,7 +3824,7 @@ SRSASN_CODE rr_cfg_common_sib_s::unpack(cbit_ref& bref) HANDLE_CODE(ul_cp_len.unpack(bref)); if (ext) { - ext_groups_unpacker_guard group_flags(7); + ext_groups_unpacker_guard group_flags(8); group_flags.unpack(bref); if (group_flags[0]) { @@ -3918,6 +3963,16 @@ SRSASN_CODE rr_cfg_common_sib_s::unpack(cbit_ref& bref) HANDLE_CODE(ul_pwr_ctrl_common_v1540->unpack(bref)); } } + if (group_flags[7]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool wus_cfg_v1560_present; + HANDLE_CODE(bref.unpack(wus_cfg_v1560_present, 1)); + wus_cfg_v1560.set_present(wus_cfg_v1560_present); + if (wus_cfg_v1560.is_present()) { + HANDLE_CODE(wus_cfg_v1560->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -4016,6 +4071,10 @@ void rr_cfg_common_sib_s::to_json(json_writer& j) const j.write_fieldname("uplinkPowerControlCommon-v1540"); ul_pwr_ctrl_common_v1540->to_json(j); } + if (wus_cfg_v1560.is_present()) { + j.write_fieldname("wus-Config-v1560"); + wus_cfg_v1560->to_json(j); + } } j.end_obj(); } diff --git a/lib/src/asn1/rrc/rr_ded.cc b/lib/src/asn1/rrc/rr_ded.cc index 3de4e6273..fa48e7f56 100644 --- a/lib/src/asn1/rrc/rr_ded.cc +++ b/lib/src/asn1/rrc/rr_ded.cc @@ -401,7 +401,7 @@ SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const group_flags[2] |= bit_rate_query_prohibit_timer_r14_present; group_flags[3] |= allowed_tti_lens_r15.is_present(); group_flags[3] |= lc_ch_sr_restrict_r15.is_present(); - group_flags[3] |= chl_access_prio_r15.is_present(); + group_flags[3] |= ch_access_prio_r15.is_present(); group_flags[3] |= lch_cell_restrict_r15_present; group_flags.pack(bref); @@ -435,7 +435,7 @@ SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(allowed_tti_lens_r15.is_present(), 1)); HANDLE_CODE(bref.pack(lc_ch_sr_restrict_r15.is_present(), 1)); - HANDLE_CODE(bref.pack(chl_access_prio_r15.is_present(), 1)); + HANDLE_CODE(bref.pack(ch_access_prio_r15.is_present(), 1)); HANDLE_CODE(bref.pack(lch_cell_restrict_r15_present, 1)); if (allowed_tti_lens_r15.is_present()) { HANDLE_CODE(allowed_tti_lens_r15->pack(bref)); @@ -443,8 +443,8 @@ SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const if (lc_ch_sr_restrict_r15.is_present()) { HANDLE_CODE(lc_ch_sr_restrict_r15->pack(bref)); } - if (chl_access_prio_r15.is_present()) { - HANDLE_CODE(chl_access_prio_r15->pack(bref)); + if (ch_access_prio_r15.is_present()) { + HANDLE_CODE(ch_access_prio_r15->pack(bref)); } if (lch_cell_restrict_r15_present) { HANDLE_CODE(lch_cell_restrict_r15.pack(bref)); @@ -506,9 +506,9 @@ SRSASN_CODE lc_ch_cfg_s::unpack(cbit_ref& bref) bool lc_ch_sr_restrict_r15_present; HANDLE_CODE(bref.unpack(lc_ch_sr_restrict_r15_present, 1)); lc_ch_sr_restrict_r15.set_present(lc_ch_sr_restrict_r15_present); - bool chl_access_prio_r15_present; - HANDLE_CODE(bref.unpack(chl_access_prio_r15_present, 1)); - chl_access_prio_r15.set_present(chl_access_prio_r15_present); + bool ch_access_prio_r15_present; + HANDLE_CODE(bref.unpack(ch_access_prio_r15_present, 1)); + ch_access_prio_r15.set_present(ch_access_prio_r15_present); HANDLE_CODE(bref.unpack(lch_cell_restrict_r15_present, 1)); if (allowed_tti_lens_r15.is_present()) { HANDLE_CODE(allowed_tti_lens_r15->unpack(bref)); @@ -516,8 +516,8 @@ SRSASN_CODE lc_ch_cfg_s::unpack(cbit_ref& bref) if (lc_ch_sr_restrict_r15.is_present()) { HANDLE_CODE(lc_ch_sr_restrict_r15->unpack(bref)); } - if (chl_access_prio_r15.is_present()) { - HANDLE_CODE(chl_access_prio_r15->unpack(bref)); + if (ch_access_prio_r15.is_present()) { + HANDLE_CODE(ch_access_prio_r15->unpack(bref)); } if (lch_cell_restrict_r15_present) { HANDLE_CODE(lch_cell_restrict_r15.unpack(bref)); @@ -561,9 +561,9 @@ void lc_ch_cfg_s::to_json(json_writer& j) const j.write_fieldname("logicalChannelSR-Restriction-r15"); lc_ch_sr_restrict_r15->to_json(j); } - if (chl_access_prio_r15.is_present()) { - j.write_fieldname("channellAccessPriority-r15"); - chl_access_prio_r15->to_json(j); + if (ch_access_prio_r15.is_present()) { + j.write_fieldname("channelAccessPriority-r15"); + ch_access_prio_r15->to_json(j); } if (lch_cell_restrict_r15_present) { j.write_str("lch-CellRestriction-r15", lch_cell_restrict_r15.to_string()); @@ -592,8 +592,8 @@ bool lc_ch_cfg_s::operator==(const lc_ch_cfg_s& other) const (not allowed_tti_lens_r15.is_present() or *allowed_tti_lens_r15 == *other.allowed_tti_lens_r15) and lc_ch_sr_restrict_r15.is_present() == other.lc_ch_sr_restrict_r15.is_present() and (not lc_ch_sr_restrict_r15.is_present() or *lc_ch_sr_restrict_r15 == *other.lc_ch_sr_restrict_r15) and - chl_access_prio_r15.is_present() == other.chl_access_prio_r15.is_present() and - (not chl_access_prio_r15.is_present() or *chl_access_prio_r15 == *other.chl_access_prio_r15) and + ch_access_prio_r15.is_present() == other.ch_access_prio_r15.is_present() and + (not ch_access_prio_r15.is_present() or *ch_access_prio_r15 == *other.ch_access_prio_r15) and lch_cell_restrict_r15_present == other.lch_cell_restrict_r15_present and (not lch_cell_restrict_r15_present or lch_cell_restrict_r15 == other.lch_cell_restrict_r15))); } @@ -773,11 +773,11 @@ std::string lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::setup_opts::to_string() const return convert_enum_idx(options, 2, value, "lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::setup_e_"); } -void lc_ch_cfg_s::chl_access_prio_r15_c_::set(types::options e) +void lc_ch_cfg_s::ch_access_prio_r15_c_::set(types::options e) { type_ = e; } -void lc_ch_cfg_s::chl_access_prio_r15_c_::to_json(json_writer& j) const +void lc_ch_cfg_s::ch_access_prio_r15_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { @@ -787,11 +787,11 @@ void lc_ch_cfg_s::chl_access_prio_r15_c_::to_json(json_writer& j) const j.write_int("setup", c); break; default: - log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_"); + log_invalid_choice_id(type_, "lc_ch_cfg_s::ch_access_prio_r15_c_"); } j.end_obj(); } -SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::pack(bit_ref& bref) const +SRSASN_CODE lc_ch_cfg_s::ch_access_prio_r15_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { @@ -801,12 +801,12 @@ SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, c, (uint8_t)1u, (uint8_t)4u)); break; default: - log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_"); + log_invalid_choice_id(type_, "lc_ch_cfg_s::ch_access_prio_r15_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::unpack(cbit_ref& bref) +SRSASN_CODE lc_ch_cfg_s::ch_access_prio_r15_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); @@ -818,12 +818,12 @@ SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(c, bref, (uint8_t)1u, (uint8_t)4u)); break; default: - log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_"); + log_invalid_choice_id(type_, "lc_ch_cfg_s::ch_access_prio_r15_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -bool lc_ch_cfg_s::chl_access_prio_r15_c_::operator==(const chl_access_prio_r15_c_& other) const +bool lc_ch_cfg_s::ch_access_prio_r15_c_::operator==(const ch_access_prio_r15_c_& other) const { return type() == other.type() and c == other.c; } @@ -1331,7 +1331,7 @@ uint8_t crs_assist_info_r13_s::ant_ports_count_r13_opts::to_number() const // CRS-AssistanceInfo-r15 ::= SEQUENCE SRSASN_CODE crs_assist_info_r15_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_minus15_present, 1)); + HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_r15_present, 1)); HANDLE_CODE(pack_integer(bref, pci_r15, (uint16_t)0u, (uint16_t)503u)); @@ -1339,7 +1339,7 @@ SRSASN_CODE crs_assist_info_r15_s::pack(bit_ref& bref) const } SRSASN_CODE crs_assist_info_r15_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_minus15_present, 1)); + HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_r15_present, 1)); HANDLE_CODE(unpack_integer(pci_r15, bref, (uint16_t)0u, (uint16_t)503u)); @@ -1349,15 +1349,14 @@ void crs_assist_info_r15_s::to_json(json_writer& j) const { j.start_obj(); j.write_int("physCellId-r15", pci_r15); - if (crs_intf_mitig_enabled_minus15_present) { - j.write_str("crs-IntfMitigEnabled-15", "enabled"); + if (crs_intf_mitig_enabled_r15_present) { + j.write_str("crs-IntfMitigEnabled-r15", "enabled"); } j.end_obj(); } bool crs_assist_info_r15_s::operator==(const crs_assist_info_r15_s& other) const { - return pci_r15 == other.pci_r15 and - crs_intf_mitig_enabled_minus15_present == other.crs_intf_mitig_enabled_minus15_present; + return pci_r15 == other.pci_r15 and crs_intf_mitig_enabled_r15_present == other.crs_intf_mitig_enabled_r15_present; } // NeighCellsInfo-r12 ::= SEQUENCE @@ -3983,7 +3982,7 @@ SRSASN_CODE drb_to_add_mod_s::pack(bit_ref& bref) const group_flags[2] |= lwa_wlan_ac_r14_present; group_flags[3] |= rlc_cfg_v1510.is_present(); group_flags[4] |= rlc_cfg_v1530.is_present(); - group_flags[4] |= rlc_bearer_cfg_dupl_r15.is_present(); + group_flags[4] |= rlc_bearer_cfg_secondary_r15.is_present(); group_flags[4] |= lc_ch_id_r15_present; group_flags.pack(bref); @@ -4044,13 +4043,13 @@ SRSASN_CODE drb_to_add_mod_s::pack(bit_ref& bref) const varlength_field_pack_guard varlen_scope(bref, false); HANDLE_CODE(bref.pack(rlc_cfg_v1530.is_present(), 1)); - HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15.is_present(), 1)); + HANDLE_CODE(bref.pack(rlc_bearer_cfg_secondary_r15.is_present(), 1)); HANDLE_CODE(bref.pack(lc_ch_id_r15_present, 1)); if (rlc_cfg_v1530.is_present()) { HANDLE_CODE(rlc_cfg_v1530->pack(bref)); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref)); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + HANDLE_CODE(rlc_bearer_cfg_secondary_r15->pack(bref)); } if (lc_ch_id_r15_present) { HANDLE_CODE(pack_integer(bref, lc_ch_id_r15, (uint8_t)32u, (uint8_t)38u)); @@ -4156,15 +4155,15 @@ SRSASN_CODE drb_to_add_mod_s::unpack(cbit_ref& bref) bool rlc_cfg_v1530_present; HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1)); rlc_cfg_v1530.set_present(rlc_cfg_v1530_present); - bool rlc_bearer_cfg_dupl_r15_present; - HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1)); - rlc_bearer_cfg_dupl_r15.set_present(rlc_bearer_cfg_dupl_r15_present); + bool rlc_bearer_cfg_secondary_r15_present; + HANDLE_CODE(bref.unpack(rlc_bearer_cfg_secondary_r15_present, 1)); + rlc_bearer_cfg_secondary_r15.set_present(rlc_bearer_cfg_secondary_r15_present); HANDLE_CODE(bref.unpack(lc_ch_id_r15_present, 1)); if (rlc_cfg_v1530.is_present()) { HANDLE_CODE(rlc_cfg_v1530->unpack(bref)); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref)); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + HANDLE_CODE(rlc_bearer_cfg_secondary_r15->unpack(bref)); } if (lc_ch_id_r15_present) { HANDLE_CODE(unpack_integer(lc_ch_id_r15, bref, (uint8_t)32u, (uint8_t)38u)); @@ -4234,9 +4233,9 @@ void drb_to_add_mod_s::to_json(json_writer& j) const j.write_fieldname("rlc-Config-v1530"); rlc_cfg_v1530->to_json(j); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - j.write_fieldname("rlc-BearerConfigDupl-r15"); - rlc_bearer_cfg_dupl_r15->to_json(j); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + j.write_fieldname("rlc-BearerConfigSecondary-r15"); + rlc_bearer_cfg_secondary_r15->to_json(j); } if (lc_ch_id_r15_present) { j.write_int("logicalChannelIdentity-r15", lc_ch_id_r15); @@ -4274,8 +4273,9 @@ bool drb_to_add_mod_s::operator==(const drb_to_add_mod_s& other) const (not rlc_cfg_v1510.is_present() or *rlc_cfg_v1510 == *other.rlc_cfg_v1510) and rlc_cfg_v1530.is_present() == other.rlc_cfg_v1530.is_present() and (not rlc_cfg_v1530.is_present() or *rlc_cfg_v1530 == *other.rlc_cfg_v1530) and - rlc_bearer_cfg_dupl_r15.is_present() == other.rlc_bearer_cfg_dupl_r15.is_present() and - (not rlc_bearer_cfg_dupl_r15.is_present() or *rlc_bearer_cfg_dupl_r15 == *other.rlc_bearer_cfg_dupl_r15) and + rlc_bearer_cfg_secondary_r15.is_present() == other.rlc_bearer_cfg_secondary_r15.is_present() and + (not rlc_bearer_cfg_secondary_r15.is_present() or + *rlc_bearer_cfg_secondary_r15 == *other.rlc_bearer_cfg_secondary_r15) and lc_ch_id_r15_present == other.lc_ch_id_r15_present and (not lc_ch_id_r15_present or lc_ch_id_r15 == other.lc_ch_id_r15))); } @@ -5575,8 +5575,9 @@ SRSASN_CODE srb_to_add_mod_s::pack(bit_ref& bref) const ext_groups_packer_guard group_flags; group_flags[0] |= pdcp_ver_change_r15_present; group_flags[0] |= rlc_cfg_v1530.is_present(); - group_flags[0] |= rlc_bearer_cfg_dupl_r15.is_present(); + group_flags[0] |= rlc_bearer_cfg_secondary_r15.is_present(); group_flags[0] |= srb_id_v1530_present; + group_flags[1] |= rlc_cfg_v1560.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -5584,18 +5585,26 @@ SRSASN_CODE srb_to_add_mod_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(pdcp_ver_change_r15_present, 1)); HANDLE_CODE(bref.pack(rlc_cfg_v1530.is_present(), 1)); - HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15.is_present(), 1)); + HANDLE_CODE(bref.pack(rlc_bearer_cfg_secondary_r15.is_present(), 1)); HANDLE_CODE(bref.pack(srb_id_v1530_present, 1)); if (rlc_cfg_v1530.is_present()) { HANDLE_CODE(rlc_cfg_v1530->pack(bref)); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref)); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + HANDLE_CODE(rlc_bearer_cfg_secondary_r15->pack(bref)); } if (srb_id_v1530_present) { HANDLE_CODE(pack_integer(bref, srb_id_v1530, (uint8_t)4u, (uint8_t)4u)); } } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(rlc_cfg_v1560.is_present(), 1)); + if (rlc_cfg_v1560.is_present()) { + HANDLE_CODE(rlc_cfg_v1560->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -5614,7 +5623,7 @@ SRSASN_CODE srb_to_add_mod_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(1); + ext_groups_unpacker_guard group_flags(2); group_flags.unpack(bref); if (group_flags[0]) { @@ -5624,20 +5633,30 @@ SRSASN_CODE srb_to_add_mod_s::unpack(cbit_ref& bref) bool rlc_cfg_v1530_present; HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1)); rlc_cfg_v1530.set_present(rlc_cfg_v1530_present); - bool rlc_bearer_cfg_dupl_r15_present; - HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1)); - rlc_bearer_cfg_dupl_r15.set_present(rlc_bearer_cfg_dupl_r15_present); + bool rlc_bearer_cfg_secondary_r15_present; + HANDLE_CODE(bref.unpack(rlc_bearer_cfg_secondary_r15_present, 1)); + rlc_bearer_cfg_secondary_r15.set_present(rlc_bearer_cfg_secondary_r15_present); HANDLE_CODE(bref.unpack(srb_id_v1530_present, 1)); if (rlc_cfg_v1530.is_present()) { HANDLE_CODE(rlc_cfg_v1530->unpack(bref)); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref)); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + HANDLE_CODE(rlc_bearer_cfg_secondary_r15->unpack(bref)); } if (srb_id_v1530_present) { HANDLE_CODE(unpack_integer(srb_id_v1530, bref, (uint8_t)4u, (uint8_t)4u)); } } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool rlc_cfg_v1560_present; + HANDLE_CODE(bref.unpack(rlc_cfg_v1560_present, 1)); + rlc_cfg_v1560.set_present(rlc_cfg_v1560_present); + if (rlc_cfg_v1560.is_present()) { + HANDLE_CODE(rlc_cfg_v1560->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -5661,13 +5680,17 @@ void srb_to_add_mod_s::to_json(json_writer& j) const j.write_fieldname("rlc-Config-v1530"); rlc_cfg_v1530->to_json(j); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - j.write_fieldname("rlc-BearerConfigDupl-r15"); - rlc_bearer_cfg_dupl_r15->to_json(j); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + j.write_fieldname("rlc-BearerConfigSecondary-r15"); + rlc_bearer_cfg_secondary_r15->to_json(j); } if (srb_id_v1530_present) { j.write_int("srb-Identity-v1530", srb_id_v1530); } + if (rlc_cfg_v1560.is_present()) { + j.write_fieldname("rlc-Config-v1560"); + rlc_cfg_v1560->to_json(j); + } } j.end_obj(); } @@ -5676,14 +5699,16 @@ bool srb_to_add_mod_s::operator==(const srb_to_add_mod_s& other) const return ext == other.ext and srb_id == other.srb_id and rlc_cfg_present == other.rlc_cfg_present and (not rlc_cfg_present or rlc_cfg == other.rlc_cfg) and lc_ch_cfg_present == other.lc_ch_cfg_present and (not lc_ch_cfg_present or lc_ch_cfg == other.lc_ch_cfg) and - (not ext or - (pdcp_ver_change_r15_present == other.pdcp_ver_change_r15_present and - rlc_cfg_v1530.is_present() == other.rlc_cfg_v1530.is_present() and - (not rlc_cfg_v1530.is_present() or *rlc_cfg_v1530 == *other.rlc_cfg_v1530) and - rlc_bearer_cfg_dupl_r15.is_present() == other.rlc_bearer_cfg_dupl_r15.is_present() and - (not rlc_bearer_cfg_dupl_r15.is_present() or *rlc_bearer_cfg_dupl_r15 == *other.rlc_bearer_cfg_dupl_r15) and - srb_id_v1530_present == other.srb_id_v1530_present and - (not srb_id_v1530_present or srb_id_v1530 == other.srb_id_v1530))); + (not ext or (pdcp_ver_change_r15_present == other.pdcp_ver_change_r15_present and + rlc_cfg_v1530.is_present() == other.rlc_cfg_v1530.is_present() and + (not rlc_cfg_v1530.is_present() or *rlc_cfg_v1530 == *other.rlc_cfg_v1530) and + rlc_bearer_cfg_secondary_r15.is_present() == other.rlc_bearer_cfg_secondary_r15.is_present() and + (not rlc_bearer_cfg_secondary_r15.is_present() or + *rlc_bearer_cfg_secondary_r15 == *other.rlc_bearer_cfg_secondary_r15) and + srb_id_v1530_present == other.srb_id_v1530_present and + (not srb_id_v1530_present or srb_id_v1530 == other.srb_id_v1530) and + rlc_cfg_v1560.is_present() == other.rlc_cfg_v1560.is_present() and + (not rlc_cfg_v1560.is_present() or *rlc_cfg_v1560 == *other.rlc_cfg_v1560))); } void srb_to_add_mod_s::rlc_cfg_c_::set(types::options e) @@ -7988,8 +8013,8 @@ SRSASN_CODE rr_cfg_ded_s::pack(bit_ref& bref) const group_flags[4] |= neigh_cells_crs_info_r13.is_present(); group_flags[4] |= rlf_timers_and_consts_r13.is_present(); group_flags[5] |= sps_cfg_v1430.is_present(); - group_flags[6] |= srb_to_add_mod_ext_list_r15.is_present(); - group_flags[6] |= srb_to_release_ext_list_r15_present; + group_flags[6] |= srb_to_add_mod_list_ext_r15.is_present(); + group_flags[6] |= srb_to_release_list_ext_r15_present; group_flags[6] |= sps_cfg_v1530.is_present(); group_flags[6] |= crs_intf_mitig_cfg_r15.is_present(); group_flags[6] |= neigh_cells_crs_info_r15.is_present(); @@ -8054,19 +8079,19 @@ SRSASN_CODE rr_cfg_ded_s::pack(bit_ref& bref) const if (group_flags[6]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(srb_to_add_mod_ext_list_r15.is_present(), 1)); - HANDLE_CODE(bref.pack(srb_to_release_ext_list_r15_present, 1)); + HANDLE_CODE(bref.pack(srb_to_add_mod_list_ext_r15.is_present(), 1)); + HANDLE_CODE(bref.pack(srb_to_release_list_ext_r15_present, 1)); HANDLE_CODE(bref.pack(sps_cfg_v1530.is_present(), 1)); HANDLE_CODE(bref.pack(crs_intf_mitig_cfg_r15.is_present(), 1)); HANDLE_CODE(bref.pack(neigh_cells_crs_info_r15.is_present(), 1)); HANDLE_CODE(bref.pack(drb_to_add_mod_list_r15.is_present(), 1)); HANDLE_CODE(bref.pack(drb_to_release_list_r15.is_present(), 1)); HANDLE_CODE(bref.pack(dummy.is_present(), 1)); - if (srb_to_add_mod_ext_list_r15.is_present()) { - HANDLE_CODE(pack_fixed_seq_of(bref, &(*srb_to_add_mod_ext_list_r15)[0], srb_to_add_mod_ext_list_r15->size())); + if (srb_to_add_mod_list_ext_r15.is_present()) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(*srb_to_add_mod_list_ext_r15)[0], srb_to_add_mod_list_ext_r15->size())); } - if (srb_to_release_ext_list_r15_present) { - HANDLE_CODE(pack_integer(bref, srb_to_release_ext_list_r15, (uint8_t)4u, (uint8_t)4u)); + if (srb_to_release_list_ext_r15_present) { + HANDLE_CODE(pack_integer(bref, srb_to_release_list_ext_r15, (uint8_t)4u, (uint8_t)4u)); } if (sps_cfg_v1530.is_present()) { HANDLE_CODE(sps_cfg_v1530->pack(bref)); @@ -8200,10 +8225,10 @@ SRSASN_CODE rr_cfg_ded_s::unpack(cbit_ref& bref) if (group_flags[6]) { varlength_field_unpack_guard varlen_scope(bref, false); - bool srb_to_add_mod_ext_list_r15_present; - HANDLE_CODE(bref.unpack(srb_to_add_mod_ext_list_r15_present, 1)); - srb_to_add_mod_ext_list_r15.set_present(srb_to_add_mod_ext_list_r15_present); - HANDLE_CODE(bref.unpack(srb_to_release_ext_list_r15_present, 1)); + bool srb_to_add_mod_list_ext_r15_present; + HANDLE_CODE(bref.unpack(srb_to_add_mod_list_ext_r15_present, 1)); + srb_to_add_mod_list_ext_r15.set_present(srb_to_add_mod_list_ext_r15_present); + HANDLE_CODE(bref.unpack(srb_to_release_list_ext_r15_present, 1)); bool sps_cfg_v1530_present; HANDLE_CODE(bref.unpack(sps_cfg_v1530_present, 1)); sps_cfg_v1530.set_present(sps_cfg_v1530_present); @@ -8222,11 +8247,11 @@ SRSASN_CODE rr_cfg_ded_s::unpack(cbit_ref& bref) bool dummy_present; HANDLE_CODE(bref.unpack(dummy_present, 1)); dummy.set_present(dummy_present); - if (srb_to_add_mod_ext_list_r15.is_present()) { - HANDLE_CODE(unpack_fixed_seq_of(&(*srb_to_add_mod_ext_list_r15)[0], bref, srb_to_add_mod_ext_list_r15->size())); + if (srb_to_add_mod_list_ext_r15.is_present()) { + HANDLE_CODE(unpack_fixed_seq_of(&(*srb_to_add_mod_list_ext_r15)[0], bref, srb_to_add_mod_list_ext_r15->size())); } - if (srb_to_release_ext_list_r15_present) { - HANDLE_CODE(unpack_integer(srb_to_release_ext_list_r15, bref, (uint8_t)4u, (uint8_t)4u)); + if (srb_to_release_list_ext_r15_present) { + HANDLE_CODE(unpack_integer(srb_to_release_list_ext_r15, bref, (uint8_t)4u, (uint8_t)4u)); } if (sps_cfg_v1530.is_present()) { HANDLE_CODE(sps_cfg_v1530->unpack(bref)); @@ -8325,15 +8350,15 @@ void rr_cfg_ded_s::to_json(json_writer& j) const j.write_fieldname("sps-Config-v1430"); sps_cfg_v1430->to_json(j); } - if (srb_to_add_mod_ext_list_r15.is_present()) { - j.start_array("srb-ToAddModExtList-r15"); - for (const auto& e1 : *srb_to_add_mod_ext_list_r15) { + if (srb_to_add_mod_list_ext_r15.is_present()) { + j.start_array("srb-ToAddModListExt-r15"); + for (const auto& e1 : *srb_to_add_mod_list_ext_r15) { e1.to_json(j); } j.end_array(); } - if (srb_to_release_ext_list_r15_present) { - j.write_int("srb-ToReleaseExtList-r15", srb_to_release_ext_list_r15); + if (srb_to_release_list_ext_r15_present) { + j.write_int("srb-ToReleaseListExt-r15", srb_to_release_list_ext_r15); } if (sps_cfg_v1530.is_present()) { j.write_fieldname("sps-Config-v1530"); @@ -8488,10 +8513,10 @@ void rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::to_json(json_writer& j) { j.start_obj(); switch (type_) { - case types::crs_intf_mitig_enabled_minus15: + case types::crs_intf_mitig_enabled: break; - case types::crs_intf_mitig_num_prbs_r15: - j.write_str("crs-IntfMitigNumPRBs-r15", c.to_string()); + case types::crs_intf_mitig_num_prbs: + j.write_str("crs-IntfMitigNumPRBs", c.to_string()); break; default: log_invalid_choice_id(type_, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_"); @@ -8502,9 +8527,9 @@ SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::pack(bit_ref& bre { type_.pack(bref); switch (type_) { - case types::crs_intf_mitig_enabled_minus15: + case types::crs_intf_mitig_enabled: break; - case types::crs_intf_mitig_num_prbs_r15: + case types::crs_intf_mitig_num_prbs: HANDLE_CODE(c.pack(bref)); break; default: @@ -8519,9 +8544,9 @@ SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::unpack(cbit_ref& e.unpack(bref); set(e); switch (type_) { - case types::crs_intf_mitig_enabled_minus15: + case types::crs_intf_mitig_enabled: break; - case types::crs_intf_mitig_num_prbs_r15: + case types::crs_intf_mitig_num_prbs: HANDLE_CODE(c.unpack(bref)); break; default: @@ -8531,17 +8556,17 @@ SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::unpack(cbit_ref& return SRSASN_SUCCESS; } -std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_opts::to_string() const +std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_opts::to_string() const { 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_"); + options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_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 +uint8_t rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_opts::to_number() const { 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_"); + options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_e_"); } // PDCCH-CandidateReductionValue-r14 ::= ENUMERATED @@ -11390,7 +11415,7 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const group_flags[6] |= csi_rs_cfg_v1480.is_present(); group_flags[7] |= phys_cfg_ded_stti_r15.is_present(); group_flags[7] |= pdsch_cfg_ded_v1530.is_present(); - group_flags[7] |= cqi_report_cfg_v1530.is_present(); + group_flags[7] |= dummy.is_present(); group_flags[7] |= cqi_report_cfg_scell_r15.is_present(); group_flags[7] |= cqi_short_cfg_scell_r15.is_present(); group_flags[7] |= csi_rs_cfg_v1530.is_present(); @@ -11399,6 +11424,7 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const group_flags[7] |= pusch_cfg_ded_v1530.is_present(); group_flags[7] |= semi_static_cfi_cfg_r15.is_present(); group_flags[7] |= blind_pdsch_repeat_cfg_r15.is_present(); + group_flags[8] |= spucch_cfg_v1550.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -11612,7 +11638,7 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(phys_cfg_ded_stti_r15.is_present(), 1)); HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1530.is_present(), 1)); - HANDLE_CODE(bref.pack(cqi_report_cfg_v1530.is_present(), 1)); + HANDLE_CODE(bref.pack(dummy.is_present(), 1)); HANDLE_CODE(bref.pack(cqi_report_cfg_scell_r15.is_present(), 1)); HANDLE_CODE(bref.pack(cqi_short_cfg_scell_r15.is_present(), 1)); HANDLE_CODE(bref.pack(csi_rs_cfg_v1530.is_present(), 1)); @@ -11627,8 +11653,8 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const if (pdsch_cfg_ded_v1530.is_present()) { HANDLE_CODE(pdsch_cfg_ded_v1530->pack(bref)); } - if (cqi_report_cfg_v1530.is_present()) { - HANDLE_CODE(cqi_report_cfg_v1530->pack(bref)); + if (dummy.is_present()) { + HANDLE_CODE(dummy->pack(bref)); } if (cqi_report_cfg_scell_r15.is_present()) { HANDLE_CODE(cqi_report_cfg_scell_r15->pack(bref)); @@ -11655,6 +11681,14 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const HANDLE_CODE(blind_pdsch_repeat_cfg_r15->pack(bref)); } } + if (group_flags[8]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(spucch_cfg_v1550.is_present(), 1)); + if (spucch_cfg_v1550.is_present()) { + HANDLE_CODE(spucch_cfg_v1550->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -11714,7 +11748,7 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(8); + ext_groups_unpacker_guard group_flags(9); group_flags.unpack(bref); if (group_flags[0]) { @@ -12018,9 +12052,9 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(cbit_ref& bref) bool pdsch_cfg_ded_v1530_present; HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1530_present, 1)); pdsch_cfg_ded_v1530.set_present(pdsch_cfg_ded_v1530_present); - bool cqi_report_cfg_v1530_present; - HANDLE_CODE(bref.unpack(cqi_report_cfg_v1530_present, 1)); - cqi_report_cfg_v1530.set_present(cqi_report_cfg_v1530_present); + bool dummy_present; + HANDLE_CODE(bref.unpack(dummy_present, 1)); + dummy.set_present(dummy_present); bool cqi_report_cfg_scell_r15_present; HANDLE_CODE(bref.unpack(cqi_report_cfg_scell_r15_present, 1)); cqi_report_cfg_scell_r15.set_present(cqi_report_cfg_scell_r15_present); @@ -12051,8 +12085,8 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(cbit_ref& bref) if (pdsch_cfg_ded_v1530.is_present()) { HANDLE_CODE(pdsch_cfg_ded_v1530->unpack(bref)); } - if (cqi_report_cfg_v1530.is_present()) { - HANDLE_CODE(cqi_report_cfg_v1530->unpack(bref)); + if (dummy.is_present()) { + HANDLE_CODE(dummy->unpack(bref)); } if (cqi_report_cfg_scell_r15.is_present()) { HANDLE_CODE(cqi_report_cfg_scell_r15->unpack(bref)); @@ -12079,6 +12113,16 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(cbit_ref& bref) HANDLE_CODE(blind_pdsch_repeat_cfg_r15->unpack(bref)); } } + if (group_flags[8]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool spucch_cfg_v1550_present; + HANDLE_CODE(bref.unpack(spucch_cfg_v1550_present, 1)); + spucch_cfg_v1550.set_present(spucch_cfg_v1550_present); + if (spucch_cfg_v1550.is_present()) { + HANDLE_CODE(spucch_cfg_v1550->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -12356,9 +12400,9 @@ void phys_cfg_ded_scell_r10_s::to_json(json_writer& j) const j.write_fieldname("pdsch-ConfigDedicated-v1530"); pdsch_cfg_ded_v1530->to_json(j); } - if (cqi_report_cfg_v1530.is_present()) { - j.write_fieldname("cqi-ReportConfig-v1530"); - cqi_report_cfg_v1530->to_json(j); + if (dummy.is_present()) { + j.write_fieldname("dummy"); + dummy->to_json(j); } if (cqi_report_cfg_scell_r15.is_present()) { j.write_fieldname("cqi-ReportConfigSCell-r15"); @@ -12392,6 +12436,10 @@ void phys_cfg_ded_scell_r10_s::to_json(json_writer& j) const j.write_fieldname("blindPDSCH-Repetition-Config-r15"); blind_pdsch_repeat_cfg_r15->to_json(j); } + if (spucch_cfg_v1550.is_present()) { + j.write_fieldname("spucch-Config-v1550"); + spucch_cfg_v1550->to_json(j); + } } j.end_obj(); } @@ -12551,8 +12599,7 @@ bool phys_cfg_ded_scell_r10_s::operator==(const phys_cfg_ded_scell_r10_s& other) (not phys_cfg_ded_stti_r15.is_present() or *phys_cfg_ded_stti_r15 == *other.phys_cfg_ded_stti_r15) and pdsch_cfg_ded_v1530.is_present() == other.pdsch_cfg_ded_v1530.is_present() and (not pdsch_cfg_ded_v1530.is_present() or *pdsch_cfg_ded_v1530 == *other.pdsch_cfg_ded_v1530) and - cqi_report_cfg_v1530.is_present() == other.cqi_report_cfg_v1530.is_present() and - (not cqi_report_cfg_v1530.is_present() or *cqi_report_cfg_v1530 == *other.cqi_report_cfg_v1530) and + dummy.is_present() == other.dummy.is_present() and (not dummy.is_present() or *dummy == *other.dummy) and cqi_report_cfg_scell_r15.is_present() == other.cqi_report_cfg_scell_r15.is_present() and (not cqi_report_cfg_scell_r15.is_present() or *cqi_report_cfg_scell_r15 == *other.cqi_report_cfg_scell_r15) and @@ -12571,7 +12618,9 @@ bool phys_cfg_ded_scell_r10_s::operator==(const phys_cfg_ded_scell_r10_s& other) (not semi_static_cfi_cfg_r15.is_present() or *semi_static_cfi_cfg_r15 == *other.semi_static_cfi_cfg_r15) and blind_pdsch_repeat_cfg_r15.is_present() == other.blind_pdsch_repeat_cfg_r15.is_present() and (not blind_pdsch_repeat_cfg_r15.is_present() or - *blind_pdsch_repeat_cfg_r15 == *other.blind_pdsch_repeat_cfg_r15))); + *blind_pdsch_repeat_cfg_r15 == *other.blind_pdsch_repeat_cfg_r15) and + spucch_cfg_v1550.is_present() == other.spucch_cfg_v1550.is_present() and + (not spucch_cfg_v1550.is_present() or *spucch_cfg_v1550 == *other.spucch_cfg_v1550))); } void phys_cfg_ded_scell_r10_s::pucch_scell_c_::set(types::options e) @@ -13965,7 +14014,8 @@ SRSASN_CODE drb_to_add_mod_scg_r12_s::pack(bit_ref& bref) const group_flags[0] |= rlc_cfg_v1430.is_present(); group_flags[1] |= lc_ch_id_scg_r15_present; group_flags[1] |= rlc_cfg_v1530.is_present(); - group_flags[1] |= rlc_bearer_cfg_dupl_r15.is_present(); + group_flags[1] |= rlc_bearer_cfg_secondary_r15.is_present(); + group_flags[2] |= rlc_cfg_v1560.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -13981,15 +14031,23 @@ SRSASN_CODE drb_to_add_mod_scg_r12_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(lc_ch_id_scg_r15_present, 1)); HANDLE_CODE(bref.pack(rlc_cfg_v1530.is_present(), 1)); - HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15.is_present(), 1)); + HANDLE_CODE(bref.pack(rlc_bearer_cfg_secondary_r15.is_present(), 1)); if (lc_ch_id_scg_r15_present) { HANDLE_CODE(pack_integer(bref, lc_ch_id_scg_r15, (uint8_t)32u, (uint8_t)38u)); } if (rlc_cfg_v1530.is_present()) { HANDLE_CODE(rlc_cfg_v1530->pack(bref)); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref)); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + HANDLE_CODE(rlc_bearer_cfg_secondary_r15->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(rlc_cfg_v1560.is_present(), 1)); + if (rlc_cfg_v1560.is_present()) { + HANDLE_CODE(rlc_cfg_v1560->pack(bref)); } } } @@ -14022,7 +14080,7 @@ SRSASN_CODE drb_to_add_mod_scg_r12_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(3); group_flags.unpack(bref); if (group_flags[0]) { @@ -14042,17 +14100,27 @@ SRSASN_CODE drb_to_add_mod_scg_r12_s::unpack(cbit_ref& bref) bool rlc_cfg_v1530_present; HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1)); rlc_cfg_v1530.set_present(rlc_cfg_v1530_present); - bool rlc_bearer_cfg_dupl_r15_present; - HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1)); - rlc_bearer_cfg_dupl_r15.set_present(rlc_bearer_cfg_dupl_r15_present); + bool rlc_bearer_cfg_secondary_r15_present; + HANDLE_CODE(bref.unpack(rlc_bearer_cfg_secondary_r15_present, 1)); + rlc_bearer_cfg_secondary_r15.set_present(rlc_bearer_cfg_secondary_r15_present); if (lc_ch_id_scg_r15_present) { HANDLE_CODE(unpack_integer(lc_ch_id_scg_r15, bref, (uint8_t)32u, (uint8_t)38u)); } if (rlc_cfg_v1530.is_present()) { HANDLE_CODE(rlc_cfg_v1530->unpack(bref)); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref)); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + HANDLE_CODE(rlc_bearer_cfg_secondary_r15->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool rlc_cfg_v1560_present; + HANDLE_CODE(bref.unpack(rlc_cfg_v1560_present, 1)); + rlc_cfg_v1560.set_present(rlc_cfg_v1560_present); + if (rlc_cfg_v1560.is_present()) { + HANDLE_CODE(rlc_cfg_v1560->unpack(bref)); } } } @@ -14093,9 +14161,13 @@ void drb_to_add_mod_scg_r12_s::to_json(json_writer& j) const j.write_fieldname("rlc-Config-v1530"); rlc_cfg_v1530->to_json(j); } - if (rlc_bearer_cfg_dupl_r15.is_present()) { - j.write_fieldname("rlc-BearerConfigDupl-r15"); - rlc_bearer_cfg_dupl_r15->to_json(j); + if (rlc_bearer_cfg_secondary_r15.is_present()) { + j.write_fieldname("rlc-BearerConfigSecondary-r15"); + rlc_bearer_cfg_secondary_r15->to_json(j); + } + if (rlc_cfg_v1560.is_present()) { + j.write_fieldname("rlc-Config-v1560"); + rlc_cfg_v1560->to_json(j); } } j.end_obj(); @@ -14677,6 +14749,7 @@ SRSASN_CODE rr_cfg_ded_scg_r12_s::pack(bit_ref& bref) const group_flags[0] |= drb_to_add_mod_list_scg_r15.is_present(); group_flags[1] |= srb_to_add_mod_list_scg_r15.is_present(); group_flags[1] |= srb_to_release_list_scg_r15.is_present(); + group_flags[2] |= drb_to_release_list_scg_r15.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -14699,6 +14772,14 @@ SRSASN_CODE rr_cfg_ded_scg_r12_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, *srb_to_release_list_scg_r15, 1, 2, integer_packer(1, 2))); } } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(drb_to_release_list_scg_r15.is_present(), 1)); + if (drb_to_release_list_scg_r15.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *drb_to_release_list_scg_r15, 1, 15, integer_packer(1, 32))); + } + } } return SRSASN_SUCCESS; } @@ -14720,7 +14801,7 @@ SRSASN_CODE rr_cfg_ded_scg_r12_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(3); group_flags.unpack(bref); if (group_flags[0]) { @@ -14749,6 +14830,16 @@ SRSASN_CODE rr_cfg_ded_scg_r12_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(*srb_to_release_list_scg_r15, bref, 1, 2, integer_packer(1, 2))); } } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool drb_to_release_list_scg_r15_present; + HANDLE_CODE(bref.unpack(drb_to_release_list_scg_r15_present, 1)); + drb_to_release_list_scg_r15.set_present(drb_to_release_list_scg_r15_present); + if (drb_to_release_list_scg_r15.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*drb_to_release_list_scg_r15, bref, 1, 15, integer_packer(1, 32))); + } + } } return SRSASN_SUCCESS; } @@ -14792,6 +14883,13 @@ void rr_cfg_ded_scg_r12_s::to_json(json_writer& j) const } j.end_array(); } + if (drb_to_release_list_scg_r15.is_present()) { + j.start_array("drb-ToReleaseListSCG-r15"); + for (const auto& e1 : *drb_to_release_list_scg_r15) { + j.write_int(e1); + } + j.end_array(); + } } j.end_obj(); } diff --git a/lib/src/asn1/rrc/si.cc b/lib/src/asn1/rrc/si.cc index ad93b7aac..fdb36111a 100644 --- a/lib/src/asn1/rrc/si.cc +++ b/lib/src/asn1/rrc/si.cc @@ -449,10 +449,10 @@ void sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::to_json(json_writer& j) c { j.start_obj(); switch (type_) { - case types::crs_intf_mitig_enabled_minus15: + case types::crs_intf_mitig_enabled: break; - case types::crs_intf_mitig_num_prbs_r15: - j.write_str("crs-IntfMitigNumPRBs-r15", c.to_string()); + case types::crs_intf_mitig_num_prbs: + j.write_str("crs-IntfMitigNumPRBs", c.to_string()); break; default: log_invalid_choice_id(type_, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_"); @@ -463,9 +463,9 @@ SRSASN_CODE sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::pack(bit_ref& bref { type_.pack(bref); switch (type_) { - case types::crs_intf_mitig_enabled_minus15: + case types::crs_intf_mitig_enabled: break; - case types::crs_intf_mitig_num_prbs_r15: + case types::crs_intf_mitig_num_prbs: HANDLE_CODE(c.pack(bref)); break; default: @@ -480,9 +480,9 @@ SRSASN_CODE sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::unpack(cbit_ref& b e.unpack(bref); set(e); switch (type_) { - case types::crs_intf_mitig_enabled_minus15: + case types::crs_intf_mitig_enabled: break; - case types::crs_intf_mitig_num_prbs_r15: + case types::crs_intf_mitig_num_prbs: HANDLE_CODE(c.unpack(bref)); break; default: @@ -492,17 +492,17 @@ SRSASN_CODE sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::unpack(cbit_ref& b return SRSASN_SUCCESS; } -std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_opts::to_string() const +std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_opts::to_string() const { 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_"); + options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_e_"); } -uint8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_opts::to_number() const +uint8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_opts::to_number() const { 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_"); + options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_e_"); } std::string sib_type1_v1530_ies_s::cell_barred_crs_r15_opts::to_string() const @@ -583,6 +583,18 @@ void cell_sel_info_ce1_v1360_s::to_json(json_writer& j) const j.end_obj(); } +// SI-Periodicity-r12 ::= ENUMERATED +std::string si_periodicity_r12_opts::to_string() const +{ + static const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; + return convert_enum_idx(options, 7, value, "si_periodicity_r12_e"); +} +uint16_t si_periodicity_r12_opts::to_number() const +{ + static const uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 7, value, "si_periodicity_r12_e"); +} + // SystemInformationBlockType1-v1450-IEs ::= SEQUENCE SRSASN_CODE sib_type1_v1450_ies_s::pack(bit_ref& bref) const { @@ -2472,17 +2484,6 @@ void sched_info_s::to_json(json_writer& j) const j.end_obj(); } -std::string sched_info_s::si_periodicity_opts::to_string() const -{ - 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 const uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; - return map_enum_number(options, 7, value, "sched_info_s::si_periodicity_e_"); -} - // SystemInformationBlockType1-v920-IEs ::= SEQUENCE SRSASN_CODE sib_type1_v920_ies_s::pack(bit_ref& bref) const { diff --git a/lib/src/asn1/rrc/uecap.cc b/lib/src/asn1/rrc/uecap.cc index 5a91629fc..4339792a9 100644 --- a/lib/src/asn1/rrc/uecap.cc +++ b/lib/src/asn1/rrc/uecap.cc @@ -27,6 +27,43 @@ std::string ca_bw_class_r10_opts::to_string() const return convert_enum_idx(options, 6, value, "ca_bw_class_r10_e"); } +// UECapabilityEnquiry-v1560-IEs ::= SEQUENCE +SRSASN_CODE ue_cap_enquiry_v1560_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(requested_cap_common_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (requested_cap_common_r15_present) { + HANDLE_CODE(requested_cap_common_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v1560_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(requested_cap_common_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (requested_cap_common_r15_present) { + HANDLE_CODE(requested_cap_common_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v1560_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (requested_cap_common_r15_present) { + j.write_str("requestedCapabilityCommon-r15", requested_cap_common_r15.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // BandIndication-r14 ::= SEQUENCE SRSASN_CODE band_ind_r14_s::pack(bit_ref& bref) const { @@ -63,6 +100,48 @@ void band_ind_r14_s::to_json(json_writer& j) const j.end_obj(); } +// UECapabilityEnquiry-v1550-IEs ::= SEQUENCE +SRSASN_CODE ue_cap_enquiry_v1550_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(requested_cap_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (requested_cap_nr_r15_present) { + HANDLE_CODE(requested_cap_nr_r15.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v1550_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(requested_cap_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (requested_cap_nr_r15_present) { + HANDLE_CODE(requested_cap_nr_r15.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v1550_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (requested_cap_nr_r15_present) { + j.write_str("requestedCapabilityNR-r15", requested_cap_nr_r15.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + // UECapabilityEnquiry-v1530-IEs ::= SEQUENCE SRSASN_CODE ue_cap_enquiry_v1530_ies_s::pack(bit_ref& bref) const { @@ -70,6 +149,10 @@ SRSASN_CODE ue_cap_enquiry_v1530_ies_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(eutra_nr_only_r15_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + return SRSASN_SUCCESS; } SRSASN_CODE ue_cap_enquiry_v1530_ies_s::unpack(cbit_ref& bref) @@ -78,6 +161,10 @@ SRSASN_CODE ue_cap_enquiry_v1530_ies_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(eutra_nr_only_r15_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + return SRSASN_SUCCESS; } void ue_cap_enquiry_v1530_ies_s::to_json(json_writer& j) const @@ -91,8 +178,7 @@ void ue_cap_enquiry_v1530_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -2722,8 +2808,8 @@ void mimo_ca_params_per_bo_bc_v1430_s::to_json(json_writer& j) const j.end_obj(); } -// RetuningTimeInfo-r14 ::= SEQUENCE -SRSASN_CODE retuning_time_info_r14_s::pack(bit_ref& bref) const +// SRS-CapabilityPerBandPair-r14 ::= SEQUENCE +SRSASN_CODE srs_cap_per_band_pair_r14_s::pack(bit_ref& bref) const { HANDLE_CODE(bref.pack(retuning_info.rf_retuning_time_dl_r14_present, 1)); HANDLE_CODE(bref.pack(retuning_info.rf_retuning_time_ul_r14_present, 1)); @@ -2736,7 +2822,7 @@ SRSASN_CODE retuning_time_info_r14_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE retuning_time_info_r14_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_cap_per_band_pair_r14_s::unpack(cbit_ref& bref) { HANDLE_CODE(bref.unpack(retuning_info.rf_retuning_time_dl_r14_present, 1)); HANDLE_CODE(bref.unpack(retuning_info.rf_retuning_time_ul_r14_present, 1)); @@ -2749,7 +2835,7 @@ SRSASN_CODE retuning_time_info_r14_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void retuning_time_info_r14_s::to_json(json_writer& j) const +void srs_cap_per_band_pair_r14_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("retuningInfo"); @@ -2764,7 +2850,7 @@ void retuning_time_info_r14_s::to_json(json_writer& j) const j.end_obj(); } -std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_opts::to_string() const +std::string srs_cap_per_band_pair_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_opts::to_string() const { static const char* options[] = {"n0", "n0dot5", @@ -2782,21 +2868,24 @@ std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_ "n6dot5", "n7", "spare1"}; - return convert_enum_idx(options, 16, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_"); + return convert_enum_idx( + options, 16, value, "srs_cap_per_band_pair_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 +float srs_cap_per_band_pair_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_opts::to_number() const { 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_"); + return map_enum_number( + options, 15, value, "srs_cap_per_band_pair_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 +std::string srs_cap_per_band_pair_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_opts::to_number_string() const { 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_"); + return convert_enum_idx( + options, 16, value, "srs_cap_per_band_pair_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 +std::string srs_cap_per_band_pair_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_opts::to_string() const { static const char* options[] = {"n0", "n0dot5", @@ -2814,18 +2903,21 @@ std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_ "n6dot5", "n7", "spare1"}; - return convert_enum_idx(options, 16, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); + return convert_enum_idx( + options, 16, value, "srs_cap_per_band_pair_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 +float srs_cap_per_band_pair_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_opts::to_number() const { 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_"); + return map_enum_number( + options, 15, value, "srs_cap_per_band_pair_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 +std::string srs_cap_per_band_pair_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_opts::to_number_string() const { 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_"); + return convert_enum_idx( + options, 16, value, "srs_cap_per_band_pair_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); } // UL-256QAM-perCC-Info-r14 ::= SEQUENCE @@ -2856,7 +2948,7 @@ SRSASN_CODE band_params_v1430_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(band_params_dl_v1430_present, 1)); HANDLE_CODE(bref.pack(ul_minus256_qam_r14_present, 1)); HANDLE_CODE(bref.pack(ul_minus256_qam_per_cc_info_list_r14_present, 1)); - HANDLE_CODE(bref.pack(retuning_time_info_band_list_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_cap_per_band_pair_list_r14_present, 1)); if (band_params_dl_v1430_present) { HANDLE_CODE(band_params_dl_v1430.pack(bref)); @@ -2864,8 +2956,8 @@ SRSASN_CODE band_params_v1430_s::pack(bit_ref& bref) const if (ul_minus256_qam_per_cc_info_list_r14_present) { HANDLE_CODE(pack_dyn_seq_of(bref, ul_minus256_qam_per_cc_info_list_r14, 2, 32)); } - if (retuning_time_info_band_list_r14_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, retuning_time_info_band_list_r14, 1, 64)); + if (srs_cap_per_band_pair_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_cap_per_band_pair_list_r14, 1, 64)); } return SRSASN_SUCCESS; @@ -2875,7 +2967,7 @@ SRSASN_CODE band_params_v1430_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(band_params_dl_v1430_present, 1)); HANDLE_CODE(bref.unpack(ul_minus256_qam_r14_present, 1)); HANDLE_CODE(bref.unpack(ul_minus256_qam_per_cc_info_list_r14_present, 1)); - HANDLE_CODE(bref.unpack(retuning_time_info_band_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_cap_per_band_pair_list_r14_present, 1)); if (band_params_dl_v1430_present) { HANDLE_CODE(band_params_dl_v1430.unpack(bref)); @@ -2883,8 +2975,8 @@ SRSASN_CODE band_params_v1430_s::unpack(cbit_ref& bref) if (ul_minus256_qam_per_cc_info_list_r14_present) { HANDLE_CODE(unpack_dyn_seq_of(ul_minus256_qam_per_cc_info_list_r14, bref, 2, 32)); } - if (retuning_time_info_band_list_r14_present) { - HANDLE_CODE(unpack_dyn_seq_of(retuning_time_info_band_list_r14, bref, 1, 64)); + if (srs_cap_per_band_pair_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_cap_per_band_pair_list_r14, bref, 1, 64)); } return SRSASN_SUCCESS; @@ -2906,9 +2998,9 @@ void band_params_v1430_s::to_json(json_writer& j) const } j.end_array(); } - if (retuning_time_info_band_list_r14_present) { - j.start_array("retuningTimeInfoBandList-r14"); - for (const auto& e1 : retuning_time_info_band_list_r14) { + if (srs_cap_per_band_pair_list_r14_present) { + j.start_array("srs-CapabilityPerBandPairList-r14"); + for (const auto& e1 : srs_cap_per_band_pair_list_r14) { e1.to_json(j); } j.end_array(); @@ -3223,6 +3315,101 @@ void band_combination_params_v1470_s::to_json(json_writer& j) const j.end_obj(); } +// SRS-CapabilityPerBandPair-v14b0 ::= SEQUENCE +SRSASN_CODE srs_cap_per_band_pair_v14b0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(srs_flex_timing_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_harq_ref_cfg_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_cap_per_band_pair_v14b0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(srs_flex_timing_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_harq_ref_cfg_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void srs_cap_per_band_pair_v14b0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (srs_flex_timing_r14_present) { + j.write_str("srs-FlexibleTiming-r14", "supported"); + } + if (srs_harq_ref_cfg_r14_present) { + j.write_str("srs-HARQ-ReferenceConfig-r14", "supported"); + } + j.end_obj(); +} + +// BandParameters-v14b0 ::= SEQUENCE +SRSASN_CODE band_params_v14b0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(srs_cap_per_band_pair_list_v14b0_present, 1)); + + if (srs_cap_per_band_pair_list_v14b0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_cap_per_band_pair_list_v14b0, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v14b0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(srs_cap_per_band_pair_list_v14b0_present, 1)); + + if (srs_cap_per_band_pair_list_v14b0_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_cap_per_band_pair_list_v14b0, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_params_v14b0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (srs_cap_per_band_pair_list_v14b0_present) { + j.start_array("srs-CapabilityPerBandPairList-v14b0"); + for (const auto& e1 : srs_cap_per_band_pair_list_v14b0) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// BandCombinationParameters-v14b0 ::= SEQUENCE +SRSASN_CODE band_combination_params_v14b0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v14b0_present, 1)); + + if (band_param_list_v14b0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v14b0, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v14b0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v14b0_present, 1)); + + if (band_param_list_v14b0_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v14b0, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v14b0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v14b0_present) { + j.start_array("bandParameterList-v14b0"); + for (const auto& e1 : band_param_list_v14b0) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + // DL-UL-CCs-r15 ::= SEQUENCE SRSASN_CODE dl_ul_ccs_r15_s::pack(bit_ref& bref) const { @@ -4092,6 +4279,28 @@ void feature_set_ul_r15_s::to_json(json_writer& j) const j.end_obj(); } +// FeatureSetDL-v1550 ::= SEQUENCE +SRSASN_CODE feature_set_dl_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dl_minus1024_qam_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_set_dl_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dl_minus1024_qam_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void feature_set_dl_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_minus1024_qam_r15_present) { + j.write_str("dl-1024QAM-r15", "supported"); + } + j.end_obj(); +} + // FeatureSetsEUTRA-r15 ::= SEQUENCE SRSASN_CODE feature_sets_eutra_r15_s::pack(bit_ref& bref) const { @@ -4114,6 +4323,20 @@ SRSASN_CODE feature_sets_eutra_r15_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, feature_sets_ul_per_cc_r15, 1, 32)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= feature_sets_dl_v1550.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(feature_sets_dl_v1550.is_present(), 1)); + if (feature_sets_dl_v1550.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *feature_sets_dl_v1550, 1, 256)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE feature_sets_eutra_r15_s::unpack(cbit_ref& bref) @@ -4137,6 +4360,21 @@ SRSASN_CODE feature_sets_eutra_r15_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(feature_sets_ul_per_cc_r15, bref, 1, 32)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool feature_sets_dl_v1550_present; + HANDLE_CODE(bref.unpack(feature_sets_dl_v1550_present, 1)); + feature_sets_dl_v1550.set_present(feature_sets_dl_v1550_present); + if (feature_sets_dl_v1550.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*feature_sets_dl_v1550, bref, 1, 256)); + } + } + } return SRSASN_SUCCESS; } void feature_sets_eutra_r15_s::to_json(json_writer& j) const @@ -4170,6 +4408,15 @@ void feature_sets_eutra_r15_s::to_json(json_writer& j) const } j.end_array(); } + if (ext) { + if (feature_sets_dl_v1550.is_present()) { + j.start_array("featureSetsDL-v1550"); + for (const auto& e1 : *feature_sets_dl_v1550) { + e1.to_json(j); + } + j.end_array(); + } + } j.end_obj(); } @@ -7593,6 +7840,70 @@ void rf_params_v1470_s::to_json(json_writer& j) const j.end_obj(); } +// RF-Parameters-v14b0 ::= SEQUENCE +SRSASN_CODE rf_params_v14b0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v14b0_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v14b0_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_v14b0_present, 1)); + + if (supported_band_combination_v14b0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v14b0, 1, 128)); + } + if (supported_band_combination_add_v14b0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v14b0, 1, 256)); + } + if (supported_band_combination_reduced_v14b0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_v14b0, 1, 384)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v14b0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v14b0_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v14b0_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_v14b0_present, 1)); + + if (supported_band_combination_v14b0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v14b0, bref, 1, 128)); + } + if (supported_band_combination_add_v14b0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v14b0, bref, 1, 256)); + } + if (supported_band_combination_reduced_v14b0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_v14b0, bref, 1, 384)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v14b0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v14b0_present) { + j.start_array("supportedBandCombination-v14b0"); + for (const auto& e1 : supported_band_combination_v14b0) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v14b0_present) { + j.start_array("supportedBandCombinationAdd-v14b0"); + for (const auto& e1 : supported_band_combination_add_v14b0) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_v14b0_present) { + j.start_array("supportedBandCombinationReduced-v14b0"); + for (const auto& e1 : supported_band_combination_reduced_v14b0) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + // RF-Parameters-v1530 ::= SEQUENCE SRSASN_CODE rf_params_v1530_s::pack(bit_ref& bref) const { @@ -8100,144 +8411,637 @@ std::string sl_params_v1530_s::slss_supported_tx_freq_r15_opts::to_string() cons return convert_enum_idx(options, 2, value, "sl_params_v1530_s::slss_supported_tx_freq_r15_e_"); } -// EUTRA-5GC-Parameters-r15 ::= SEQUENCE -SRSASN_CODE eutra_minus5_gc_params_r15_s::pack(bit_ref& bref) const +// NeighCellSI-AcquisitionParameters-v15a0 ::= SEQUENCE +SRSASN_CODE neigh_cell_si_acquisition_params_v15a0_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(eutra_minus5_gc_r15_present, 1)); - HANDLE_CODE(bref.pack(eutra_epc_ho_eutra_minus5_gc_r15_present, 1)); - HANDLE_CODE(bref.pack(ho_eutra_minus5_gc_fdd_tdd_r15_present, 1)); - HANDLE_CODE(bref.pack(ho_interfreq_eutra_minus5_gc_r15_present, 1)); - HANDLE_CODE(bref.pack(ims_voice_over_mcg_bearer_eutra_minus5_gc_r15_present, 1)); - HANDLE_CODE(bref.pack(inactive_state_r15_present, 1)); - HANDLE_CODE(bref.pack(reflective_qos_r15_present, 1)); + HANDLE_CODE(bref.pack(eutra_cgi_report_nedc_r15_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE eutra_minus5_gc_params_r15_s::unpack(cbit_ref& bref) +SRSASN_CODE neigh_cell_si_acquisition_params_v15a0_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(eutra_minus5_gc_r15_present, 1)); - HANDLE_CODE(bref.unpack(eutra_epc_ho_eutra_minus5_gc_r15_present, 1)); - HANDLE_CODE(bref.unpack(ho_eutra_minus5_gc_fdd_tdd_r15_present, 1)); - HANDLE_CODE(bref.unpack(ho_interfreq_eutra_minus5_gc_r15_present, 1)); - HANDLE_CODE(bref.unpack(ims_voice_over_mcg_bearer_eutra_minus5_gc_r15_present, 1)); - HANDLE_CODE(bref.unpack(inactive_state_r15_present, 1)); - HANDLE_CODE(bref.unpack(reflective_qos_r15_present, 1)); + HANDLE_CODE(bref.unpack(eutra_cgi_report_nedc_r15_present, 1)); return SRSASN_SUCCESS; } -void eutra_minus5_gc_params_r15_s::to_json(json_writer& j) const +void neigh_cell_si_acquisition_params_v15a0_s::to_json(json_writer& j) const { j.start_obj(); - if (eutra_minus5_gc_r15_present) { - j.write_str("eutra-5GC-r15", "supported"); - } - if (eutra_epc_ho_eutra_minus5_gc_r15_present) { - j.write_str("eutra-EPC-HO-EUTRA-5GC-r15", "supported"); - } - if (ho_eutra_minus5_gc_fdd_tdd_r15_present) { - j.write_str("ho-EUTRA-5GC-FDD-TDD-r15", "supported"); - } - if (ho_interfreq_eutra_minus5_gc_r15_present) { - j.write_str("ho-InterfreqEUTRA-5GC-r15", "supported"); - } - if (ims_voice_over_mcg_bearer_eutra_minus5_gc_r15_present) { - j.write_str("ims-VoiceOverMCG-BearerEUTRA-5GC-r15", "supported"); - } - if (inactive_state_r15_present) { - j.write_str("inactiveState-r15", "supported"); - } - if (reflective_qos_r15_present) { - j.write_str("reflectiveQoS-r15", "supported"); + if (eutra_cgi_report_nedc_r15_present) { + j.write_str("eutra-CGI-Reporting-NEDC-r15", "supported"); } j.end_obj(); } -// NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE -SRSASN_CODE neigh_cell_si_acquisition_params_v1530_s::pack(bit_ref& bref) const +// PhyLayerParameters-v1540 ::= SEQUENCE +SRSASN_CODE phy_layer_params_v1540_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(report_cgi_nr_en_dc_r15_present, 1)); - HANDLE_CODE(bref.pack(report_cgi_nr_no_en_dc_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_cap_v1540_present, 1)); + HANDLE_CODE(bref.pack(crs_im_tm1_to_tm9_one_rx_port_v1540_present, 1)); + HANDLE_CODE(bref.pack(cch_im_ref_rec_type_a_one_rx_port_v1540_present, 1)); + + if (stti_spt_cap_v1540_present) { + } return SRSASN_SUCCESS; } -SRSASN_CODE neigh_cell_si_acquisition_params_v1530_s::unpack(cbit_ref& bref) +SRSASN_CODE phy_layer_params_v1540_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(stti_spt_cap_v1540_present, 1)); + HANDLE_CODE(bref.unpack(crs_im_tm1_to_tm9_one_rx_port_v1540_present, 1)); + HANDLE_CODE(bref.unpack(cch_im_ref_rec_type_a_one_rx_port_v1540_present, 1)); + + if (stti_spt_cap_v1540_present) { + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1540_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (stti_spt_cap_v1540_present) { + j.write_fieldname("stti-SPT-Capabilities-v1540"); + j.start_obj(); + j.write_str("slotPDSCH-TxDiv-TM8-r15", "supported"); + j.end_obj(); + } + if (crs_im_tm1_to_tm9_one_rx_port_v1540_present) { + j.write_str("crs-IM-TM1-toTM9-OneRX-Port-v1540", "supported"); + } + if (cch_im_ref_rec_type_a_one_rx_port_v1540_present) { + j.write_str("cch-IM-RefRecTypeA-OneRX-Port-v1540", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1550 ::= SEQUENCE +SRSASN_CODE phy_layer_params_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dmrs_overhead_reduction_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dmrs_overhead_reduction_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dmrs_overhead_reduction_r15_present) { + j.write_str("dmrs-OverheadReduction-r15", "supported"); + } + j.end_obj(); +} + +// EUTRA-5GC-Parameters-r15 ::= SEQUENCE +SRSASN_CODE eutra_minus5_gc_params_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(eutra_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.pack(eutra_epc_ho_eutra_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.pack(ho_eutra_minus5_gc_fdd_tdd_r15_present, 1)); + HANDLE_CODE(bref.pack(ho_interfreq_eutra_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.pack(ims_voice_over_mcg_bearer_eutra_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.pack(inactive_state_r15_present, 1)); + HANDLE_CODE(bref.pack(reflective_qos_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE eutra_minus5_gc_params_r15_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(eutra_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.unpack(eutra_epc_ho_eutra_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.unpack(ho_eutra_minus5_gc_fdd_tdd_r15_present, 1)); + HANDLE_CODE(bref.unpack(ho_interfreq_eutra_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.unpack(ims_voice_over_mcg_bearer_eutra_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.unpack(inactive_state_r15_present, 1)); + HANDLE_CODE(bref.unpack(reflective_qos_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void eutra_minus5_gc_params_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (eutra_minus5_gc_r15_present) { + j.write_str("eutra-5GC-r15", "supported"); + } + if (eutra_epc_ho_eutra_minus5_gc_r15_present) { + j.write_str("eutra-EPC-HO-EUTRA-5GC-r15", "supported"); + } + if (ho_eutra_minus5_gc_fdd_tdd_r15_present) { + j.write_str("ho-EUTRA-5GC-FDD-TDD-r15", "supported"); + } + if (ho_interfreq_eutra_minus5_gc_r15_present) { + j.write_str("ho-InterfreqEUTRA-5GC-r15", "supported"); + } + if (ims_voice_over_mcg_bearer_eutra_minus5_gc_r15_present) { + j.write_str("ims-VoiceOverMCG-BearerEUTRA-5GC-r15", "supported"); + } + if (inactive_state_r15_present) { + j.write_str("inactiveState-r15", "supported"); + } + if (reflective_qos_r15_present) { + j.write_str("reflectiveQoS-r15", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v15a0 ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v15a0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(phy_layer_params_v1540_present, 1)); + HANDLE_CODE(bref.pack(phy_layer_params_v1550_present, 1)); + + if (phy_layer_params_v1530_present) { + HANDLE_CODE(phy_layer_params_v1530.pack(bref)); + } + if (phy_layer_params_v1540_present) { + HANDLE_CODE(phy_layer_params_v1540.pack(bref)); + } + if (phy_layer_params_v1550_present) { + HANDLE_CODE(phy_layer_params_v1550.pack(bref)); + } + HANDLE_CODE(neigh_cell_si_acquisition_params_v15a0.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v15a0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(phy_layer_params_v1540_present, 1)); + HANDLE_CODE(bref.unpack(phy_layer_params_v1550_present, 1)); + + if (phy_layer_params_v1530_present) { + HANDLE_CODE(phy_layer_params_v1530.unpack(bref)); + } + if (phy_layer_params_v1540_present) { + HANDLE_CODE(phy_layer_params_v1540.unpack(bref)); + } + if (phy_layer_params_v1550_present) { + HANDLE_CODE(phy_layer_params_v1550.unpack(bref)); + } + HANDLE_CODE(neigh_cell_si_acquisition_params_v15a0.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v15a0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1530_present) { + j.write_fieldname("phyLayerParameters-v1530"); + phy_layer_params_v1530.to_json(j); + } + if (phy_layer_params_v1540_present) { + j.write_fieldname("phyLayerParameters-v1540"); + phy_layer_params_v1540.to_json(j); + } + if (phy_layer_params_v1550_present) { + j.write_fieldname("phyLayerParameters-v1550"); + phy_layer_params_v1550.to_json(j); + } + j.write_fieldname("neighCellSI-AcquisitionParameters-v15a0"); + neigh_cell_si_acquisition_params_v15a0.to_json(j); + j.end_obj(); +} + +// IRAT-ParametersNR-v1570 ::= SEQUENCE +SRSASN_CODE irat_params_nr_v1570_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ss_sinr_meas_nr_fr1_r15_present, 1)); + HANDLE_CODE(bref.pack(ss_sinr_meas_nr_fr2_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_nr_v1570_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ss_sinr_meas_nr_fr1_r15_present, 1)); + HANDLE_CODE(bref.unpack(ss_sinr_meas_nr_fr2_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void irat_params_nr_v1570_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ss_sinr_meas_nr_fr1_r15_present) { + j.write_str("ss-SINR-Meas-NR-FR1-r15", "supported"); + } + if (ss_sinr_meas_nr_fr2_r15_present) { + j.write_str("ss-SINR-Meas-NR-FR2-r15", "supported"); + } + j.end_obj(); +} + +// PDCP-ParametersNR-v1560 ::= SEQUENCE +SRSASN_CODE pdcp_params_nr_v1560_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ims_vo_nr_pdcp_scg_ngendc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_nr_v1560_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ims_vo_nr_pdcp_scg_ngendc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void pdcp_params_nr_v1560_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ims_vo_nr_pdcp_scg_ngendc_r15_present) { + j.write_str("ims-VoNR-PDCP-SCG-NGENDC-r15", "supported"); + } + j.end_obj(); +} + +// RF-Parameters-v1570 ::= SEQUENCE +SRSASN_CODE rf_params_v1570_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(dl_minus1024_qam_scaling_factor_r15.pack(bref)); + HANDLE_CODE(pack_integer(bref, dl_minus1024_qam_total_weighted_layers_r15, (uint8_t)0u, (uint8_t)10u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1570_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(dl_minus1024_qam_scaling_factor_r15.unpack(bref)); + HANDLE_CODE(unpack_integer(dl_minus1024_qam_total_weighted_layers_r15, bref, (uint8_t)0u, (uint8_t)10u)); + + return SRSASN_SUCCESS; +} +void rf_params_v1570_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("dl-1024QAM-ScalingFactor-r15", dl_minus1024_qam_scaling_factor_r15.to_string()); + j.write_int("dl-1024QAM-TotalWeightedLayers-r15", dl_minus1024_qam_total_weighted_layers_r15); + j.end_obj(); +} + +std::string rf_params_v1570_s::dl_minus1024_qam_scaling_factor_r15_opts::to_string() const +{ + static const char* options[] = {"v1", "v1dot2", "v1dot25"}; + return convert_enum_idx(options, 3, value, "rf_params_v1570_s::dl_minus1024_qam_scaling_factor_r15_e_"); +} +float rf_params_v1570_s::dl_minus1024_qam_scaling_factor_r15_opts::to_number() const +{ + static const float options[] = {1.0, 1.2, 1.25}; + return map_enum_number(options, 3, value, "rf_params_v1570_s::dl_minus1024_qam_scaling_factor_r15_e_"); +} +std::string rf_params_v1570_s::dl_minus1024_qam_scaling_factor_r15_opts::to_number_string() const +{ + static const char* options[] = {"1", "1.2", "1.25"}; + return convert_enum_idx(options, 3, value, "rf_params_v1570_s::dl_minus1024_qam_scaling_factor_r15_e_"); +} + +// UE-EUTRA-Capability-v15a0-IEs ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_v15a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(eutra_minus5_gc_params_r15_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_cap_v15a0_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_cap_v15a0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(neigh_cell_si_acquisition_params_v15a0.pack(bref)); + if (eutra_minus5_gc_params_r15_present) { + HANDLE_CODE(eutra_minus5_gc_params_r15.pack(bref)); + } + if (fdd_add_ue_eutra_cap_v15a0_present) { + HANDLE_CODE(fdd_add_ue_eutra_cap_v15a0.pack(bref)); + } + if (tdd_add_ue_eutra_cap_v15a0_present) { + HANDLE_CODE(tdd_add_ue_eutra_cap_v15a0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v15a0_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(eutra_minus5_gc_params_r15_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_cap_v15a0_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_cap_v15a0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(neigh_cell_si_acquisition_params_v15a0.unpack(bref)); + if (eutra_minus5_gc_params_r15_present) { + HANDLE_CODE(eutra_minus5_gc_params_r15.unpack(bref)); + } + if (fdd_add_ue_eutra_cap_v15a0_present) { + HANDLE_CODE(fdd_add_ue_eutra_cap_v15a0.unpack(bref)); + } + if (tdd_add_ue_eutra_cap_v15a0_present) { + HANDLE_CODE(tdd_add_ue_eutra_cap_v15a0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v15a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("neighCellSI-AcquisitionParameters-v15a0"); + neigh_cell_si_acquisition_params_v15a0.to_json(j); + if (eutra_minus5_gc_params_r15_present) { + j.write_fieldname("eutra-5GC-Parameters-r15"); + eutra_minus5_gc_params_r15.to_json(j); + } + if (fdd_add_ue_eutra_cap_v15a0_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v15a0"); + fdd_add_ue_eutra_cap_v15a0.to_json(j); + } + if (tdd_add_ue_eutra_cap_v15a0_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v15a0"); + tdd_add_ue_eutra_cap_v15a0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// IRAT-ParametersNR-v1560 ::= SEQUENCE +SRSASN_CODE irat_params_nr_v1560_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ng_en_dc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_nr_v1560_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ng_en_dc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void irat_params_nr_v1560_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ng_en_dc_r15_present) { + j.write_str("ng-EN-DC-r15", "supported"); + } + j.end_obj(); +} + +// NeighCellSI-AcquisitionParameters-v1550 ::= SEQUENCE +SRSASN_CODE neigh_cell_si_acquisition_params_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(eutra_cgi_report_endc_r15_present, 1)); + HANDLE_CODE(bref.pack(utra_geran_cgi_report_endc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cell_si_acquisition_params_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(eutra_cgi_report_endc_r15_present, 1)); + HANDLE_CODE(bref.unpack(utra_geran_cgi_report_endc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void neigh_cell_si_acquisition_params_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (eutra_cgi_report_endc_r15_present) { + j.write_str("eutra-CGI-Reporting-ENDC-r15", "supported"); + } + if (utra_geran_cgi_report_endc_r15_present) { + j.write_str("utra-GERAN-CGI-Reporting-ENDC-r15", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1570-IEs ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_v1570_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v1570_present, 1)); + HANDLE_CODE(bref.pack(irat_params_nr_v1570_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v1570_present) { + HANDLE_CODE(rf_params_v1570.pack(bref)); + } + if (irat_params_nr_v1570_present) { + HANDLE_CODE(irat_params_nr_v1570.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1570_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(report_cgi_nr_en_dc_r15_present, 1)); - HANDLE_CODE(bref.unpack(report_cgi_nr_no_en_dc_r15_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1570_present, 1)); + HANDLE_CODE(bref.unpack(irat_params_nr_v1570_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v1570_present) { + HANDLE_CODE(rf_params_v1570.unpack(bref)); + } + if (irat_params_nr_v1570_present) { + HANDLE_CODE(irat_params_nr_v1570.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } -void neigh_cell_si_acquisition_params_v1530_s::to_json(json_writer& j) const +void ue_eutra_cap_v1570_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (report_cgi_nr_en_dc_r15_present) { - j.write_str("reportCGI-NR-EN-DC-r15", "supported"); + if (rf_params_v1570_present) { + j.write_fieldname("rf-Parameters-v1570"); + rf_params_v1570.to_json(j); } - if (report_cgi_nr_no_en_dc_r15_present) { - j.write_str("reportCGI-NR-NoEN-DC-r15", "supported"); + if (irat_params_nr_v1570_present) { + j.write_fieldname("irat-ParametersNR-v1570"); + irat_params_nr_v1570.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } j.end_obj(); } -// Other-Parameters-v1540 ::= SEQUENCE -SRSASN_CODE other_params_v1540_s::pack(bit_ref& bref) const +// UE-EUTRA-CapabilityAddXDD-Mode-v1560 ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1560_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(in_dev_coex_ind_endc_r15_present, 1)); + HANDLE_CODE(pdcp_params_nr_v1560.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE other_params_v1540_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1560_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(in_dev_coex_ind_endc_r15_present, 1)); + HANDLE_CODE(pdcp_params_nr_v1560.unpack(bref)); return SRSASN_SUCCESS; } -void other_params_v1540_s::to_json(json_writer& j) const +void ue_eutra_cap_add_xdd_mode_v1560_s::to_json(json_writer& j) const { j.start_obj(); - if (in_dev_coex_ind_endc_r15_present) { - j.write_str("inDeviceCoexInd-ENDC-r15", "supported"); + j.write_fieldname("pdcp-ParametersNR-v1560"); + pdcp_params_nr_v1560.to_json(j); + j.end_obj(); +} + +// MAC-Parameters-v1550 ::= SEQUENCE +SRSASN_CODE mac_params_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(elcid_support_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_params_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(elcid_support_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void mac_params_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (elcid_support_r15_present) { + j.write_str("eLCID-Support-r15", "supported"); } j.end_obj(); } -// PhyLayerParameters-v1540 ::= SEQUENCE -SRSASN_CODE phy_layer_params_v1540_s::pack(bit_ref& bref) const +// UE-EUTRA-Capability-v1560-IEs ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_v1560_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(stti_spt_cap_v1540_present, 1)); - HANDLE_CODE(bref.pack(crs_im_tm1_to_tm9_one_rx_port_v1540_present, 1)); - HANDLE_CODE(bref.pack(cch_im_ref_rec_type_a_one_rx_port_v1540_present, 1)); + HANDLE_CODE(bref.pack(applied_cap_filt_common_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (stti_spt_cap_v1540_present) { + HANDLE_CODE(pdcp_params_nr_v1560.pack(bref)); + HANDLE_CODE(irat_params_nr_v1560.pack(bref)); + if (applied_cap_filt_common_r15_present) { + HANDLE_CODE(applied_cap_filt_common_r15.pack(bref)); + } + HANDLE_CODE(fdd_add_ue_eutra_cap_v1560.pack(bref)); + HANDLE_CODE(tdd_add_ue_eutra_cap_v1560.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE phy_layer_params_v1540_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_eutra_cap_v1560_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(stti_spt_cap_v1540_present, 1)); - HANDLE_CODE(bref.unpack(crs_im_tm1_to_tm9_one_rx_port_v1540_present, 1)); - HANDLE_CODE(bref.unpack(cch_im_ref_rec_type_a_one_rx_port_v1540_present, 1)); + HANDLE_CODE(bref.unpack(applied_cap_filt_common_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (stti_spt_cap_v1540_present) { + HANDLE_CODE(pdcp_params_nr_v1560.unpack(bref)); + HANDLE_CODE(irat_params_nr_v1560.unpack(bref)); + if (applied_cap_filt_common_r15_present) { + HANDLE_CODE(applied_cap_filt_common_r15.unpack(bref)); + } + HANDLE_CODE(fdd_add_ue_eutra_cap_v1560.unpack(bref)); + HANDLE_CODE(tdd_add_ue_eutra_cap_v1560.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void phy_layer_params_v1540_s::to_json(json_writer& j) const +void ue_eutra_cap_v1560_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (stti_spt_cap_v1540_present) { - j.write_fieldname("stti-SPT-Capabilities-v1540"); - j.start_obj(); - j.write_str("slotPDSCH-TxDiv-TM8-r15", "supported"); - j.end_obj(); + j.write_fieldname("pdcp-ParametersNR-v1560"); + pdcp_params_nr_v1560.to_json(j); + j.write_fieldname("irat-ParametersNR-v1560"); + irat_params_nr_v1560.to_json(j); + if (applied_cap_filt_common_r15_present) { + j.write_str("appliedCapabilityFilterCommon-r15", applied_cap_filt_common_r15.to_string()); } - if (crs_im_tm1_to_tm9_one_rx_port_v1540_present) { - j.write_str("crs-IM-TM1-toTM9-OneRX-Port-v1540", "supported"); + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1560"); + fdd_add_ue_eutra_cap_v1560.to_json(j); + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1560"); + tdd_add_ue_eutra_cap_v1560.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } - if (cch_im_ref_rec_type_a_one_rx_port_v1540_present) { - j.write_str("cch-IM-RefRecTypeA-OneRX-Port-v1540", "supported"); + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1550 ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(neigh_cell_si_acquisition_params_v1550_present, 1)); + + if (neigh_cell_si_acquisition_params_v1550_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_v1550.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(neigh_cell_si_acquisition_params_v1550_present, 1)); + + if (neigh_cell_si_acquisition_params_v1550_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_v1550.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (neigh_cell_si_acquisition_params_v1550_present) { + j.write_fieldname("neighCellSI-AcquisitionParameters-v1550"); + neigh_cell_si_acquisition_params_v1550.to_json(j); + } + j.end_obj(); +} + +// NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE +SRSASN_CODE neigh_cell_si_acquisition_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(report_cgi_nr_en_dc_r15_present, 1)); + HANDLE_CODE(bref.pack(report_cgi_nr_no_en_dc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cell_si_acquisition_params_v1530_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(report_cgi_nr_en_dc_r15_present, 1)); + HANDLE_CODE(bref.unpack(report_cgi_nr_no_en_dc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void neigh_cell_si_acquisition_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (report_cgi_nr_en_dc_r15_present) { + j.write_str("reportCGI-NR-EN-DC-r15", "supported"); + } + if (report_cgi_nr_no_en_dc_r15_present) { + j.write_str("reportCGI-NR-NoEN-DC-r15", "supported"); + } + j.end_obj(); +} + +// Other-Parameters-v1540 ::= SEQUENCE +SRSASN_CODE other_params_v1540_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(in_dev_coex_ind_endc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_params_v1540_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(in_dev_coex_ind_endc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void other_params_v1540_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (in_dev_coex_ind_endc_r15_present) { + j.write_str("inDeviceCoexInd-ENDC-r15", "supported"); } j.end_obj(); } @@ -8279,6 +9083,65 @@ void sl_params_v1540_s::to_json(json_writer& j) const j.end_obj(); } +// UE-EUTRA-Capability-v1550-IEs ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_v1550_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(neigh_cell_si_acquisition_params_v1550_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (neigh_cell_si_acquisition_params_v1550_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_v1550.pack(bref)); + } + HANDLE_CODE(phy_layer_params_v1550.pack(bref)); + HANDLE_CODE(mac_params_v1550.pack(bref)); + HANDLE_CODE(fdd_add_ue_eutra_cap_v1550.pack(bref)); + HANDLE_CODE(tdd_add_ue_eutra_cap_v1550.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1550_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(neigh_cell_si_acquisition_params_v1550_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (neigh_cell_si_acquisition_params_v1550_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_v1550.unpack(bref)); + } + HANDLE_CODE(phy_layer_params_v1550.unpack(bref)); + HANDLE_CODE(mac_params_v1550.unpack(bref)); + HANDLE_CODE(fdd_add_ue_eutra_cap_v1550.unpack(bref)); + HANDLE_CODE(tdd_add_ue_eutra_cap_v1550.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1550_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (neigh_cell_si_acquisition_params_v1550_present) { + j.write_fieldname("neighCellSI-AcquisitionParameters-v1550"); + neigh_cell_si_acquisition_params_v1550.to_json(j); + } + j.write_fieldname("phyLayerParameters-v1550"); + phy_layer_params_v1550.to_json(j); + j.write_fieldname("mac-Parameters-v1550"); + mac_params_v1550.to_json(j); + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1550"); + fdd_add_ue_eutra_cap_v1550.to_json(j); + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1550"); + tdd_add_ue_eutra_cap_v1550.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + // UE-EUTRA-CapabilityAddXDD-Mode-v1540 ::= SEQUENCE SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1540_s::pack(bit_ref& bref) const { @@ -8533,6 +9396,9 @@ SRSASN_CODE ue_eutra_cap_v1540_ies_s::pack(bit_ref& bref) const if (irat_params_nr_v1540_present) { HANDLE_CODE(irat_params_nr_v1540.pack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -8561,6 +9427,9 @@ SRSASN_CODE ue_eutra_cap_v1540_ies_s::unpack(cbit_ref& bref) if (irat_params_nr_v1540_present) { HANDLE_CODE(irat_params_nr_v1540.unpack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -8591,8 +9460,7 @@ void ue_eutra_cap_v1540_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -8636,20 +9504,20 @@ void ue_eutra_cap_add_xdd_mode_v1530_s::to_json(json_writer& j) const // MeasParameters-v1520 ::= SEQUENCE SRSASN_CODE meas_params_v1520_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(meas_gap_patterns_v1520_present, 1)); + HANDLE_CODE(bref.pack(meas_gap_patterns_r15_present, 1)); - if (meas_gap_patterns_v1520_present) { - HANDLE_CODE(meas_gap_patterns_v1520.pack(bref)); + if (meas_gap_patterns_r15_present) { + HANDLE_CODE(meas_gap_patterns_r15.pack(bref)); } return SRSASN_SUCCESS; } SRSASN_CODE meas_params_v1520_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(meas_gap_patterns_v1520_present, 1)); + HANDLE_CODE(bref.unpack(meas_gap_patterns_r15_present, 1)); - if (meas_gap_patterns_v1520_present) { - HANDLE_CODE(meas_gap_patterns_v1520.unpack(bref)); + if (meas_gap_patterns_r15_present) { + HANDLE_CODE(meas_gap_patterns_r15.unpack(bref)); } return SRSASN_SUCCESS; @@ -8657,8 +9525,8 @@ SRSASN_CODE meas_params_v1520_s::unpack(cbit_ref& bref) void meas_params_v1520_s::to_json(json_writer& j) const { j.start_obj(); - if (meas_gap_patterns_v1520_present) { - j.write_str("measGapPatterns-v1520", meas_gap_patterns_v1520.to_string()); + if (meas_gap_patterns_r15_present) { + j.write_str("measGapPatterns-r15", meas_gap_patterns_r15.to_string()); } j.end_obj(); } @@ -9746,6 +10614,28 @@ uint16_t pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_opts::to_number( return map_enum_number(options, 14, value, "pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_e_"); } +// PhyLayerParameters-v14a0 ::= SEQUENCE +SRSASN_CODE phy_layer_params_v14a0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ssp10_tdd_only_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v14a0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ssp10_tdd_only_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_v14a0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ssp10_tdd_only_r14_present) { + j.write_str("ssp10-TDD-Only-r14", "supported"); + } + j.end_obj(); +} + // RLC-Parameters-v1430 ::= SEQUENCE SRSASN_CODE rlc_params_v1430_s::pack(bit_ref& bref) const { @@ -9829,6 +10719,44 @@ void ue_eutra_cap_v1440_ies_s::to_json(json_writer& j) const j.end_obj(); } +// UE-EUTRA-Capability-v14b0-IEs ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_v14b0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v14b0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v14b0_present) { + HANDLE_CODE(rf_params_v14b0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v14b0_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v14b0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v14b0_present) { + HANDLE_CODE(rf_params_v14b0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v14b0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v14b0_present) { + j.write_fieldname("rf-Parameters-v14b0"); + rf_params_v14b0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // UE-EUTRA-CapabilityAddXDD-Mode-v1430 ::= SEQUENCE SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1430_s::pack(bit_ref& bref) const { @@ -10271,6 +11199,41 @@ uint8_t ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_opts::to_number() const return map_enum_number(options, 6, value, "ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_e_"); } +// UE-EUTRA-Capability-v14a0-IEs ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_v14a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(phy_layer_params_v14a0.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v14a0_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(phy_layer_params_v14a0.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v14a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("phyLayerParameters-v14a0"); + phy_layer_params_v14a0.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + // CE-Parameters-v1350 ::= SEQUENCE SRSASN_CODE ce_params_v1350_s::pack(bit_ref& bref) const { @@ -10353,6 +11316,9 @@ SRSASN_CODE ue_eutra_cap_v1470_ies_s::pack(bit_ref& bref) const if (rf_params_v1470_present) { HANDLE_CODE(rf_params_v1470.pack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -10372,6 +11338,9 @@ SRSASN_CODE ue_eutra_cap_v1470_ies_s::unpack(cbit_ref& bref) if (rf_params_v1470_present) { HANDLE_CODE(rf_params_v1470.unpack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -10392,8 +11361,7 @@ void ue_eutra_cap_v1470_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -10465,8 +11433,8 @@ void ue_eutra_cap_v1350_ies_s::to_json(json_writer& j) const j.end_obj(); } -// UE-EUTRA-Capability-v13x0-IEs ::= SEQUENCE -SRSASN_CODE ue_eutra_cap_v13x0_ies_s::pack(bit_ref& bref) const +// UE-EUTRA-Capability-v13e0a-IEs ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_v13e0a_ies_s::pack(bit_ref& bref) const { HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); @@ -10480,7 +11448,7 @@ SRSASN_CODE ue_eutra_cap_v13x0_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE ue_eutra_cap_v13x0_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_eutra_cap_v13e0a_ies_s::unpack(cbit_ref& bref) { HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); @@ -10494,7 +11462,7 @@ SRSASN_CODE ue_eutra_cap_v13x0_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void ue_eutra_cap_v13x0_ies_s::to_json(json_writer& j) const +void ue_eutra_cap_v13e0a_ies_s::to_json(json_writer& j) const { j.start_obj(); if (late_non_crit_ext_present) { diff --git a/lib/src/asn1/rrc/ul_ccch_msg.cc b/lib/src/asn1/rrc/ul_ccch_msg.cc index 212c0dd9f..9d73adc8a 100644 --- a/lib/src/asn1/rrc/ul_ccch_msg.cc +++ b/lib/src/asn1/rrc/ul_ccch_msg.cc @@ -279,6 +279,43 @@ SRSASN_CODE init_ue_id_minus5_gc_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +// RRCEarlyDataRequest-v1590-IEs ::= SEQUENCE +SRSASN_CODE rrc_early_data_request_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_request_v1590_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_early_data_request_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // ReestabUE-Identity ::= SEQUENCE SRSASN_CODE reestab_ue_id_s::pack(bit_ref& bref) const { @@ -728,6 +765,9 @@ SRSASN_CODE rrc_early_data_request_r15_ies_s::pack(bit_ref& bref) const HANDLE_CODE(s_tmsi_r15.pack(bref)); HANDLE_CODE(establishment_cause_r15.pack(bref)); HANDLE_CODE(ded_info_nas_r15.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -738,6 +778,9 @@ SRSASN_CODE rrc_early_data_request_r15_ies_s::unpack(cbit_ref& bref) HANDLE_CODE(s_tmsi_r15.unpack(bref)); HANDLE_CODE(establishment_cause_r15.unpack(bref)); HANDLE_CODE(ded_info_nas_r15.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -750,15 +793,14 @@ void rrc_early_data_request_r15_ies_s::to_json(json_writer& j) const j.write_str("dedicatedInfoNAS-r15", ded_info_nas_r15.to_string()); if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } std::string rrc_early_data_request_r15_ies_s::establishment_cause_r15_opts::to_string() const { - static const char* options[] = {"mo-Data-r15", "delayTolerantAccess-r15"}; + static const char* options[] = {"mo-Data", "delayTolerantAccess"}; return convert_enum_idx(options, 2, value, "rrc_early_data_request_r15_ies_s::establishment_cause_r15_e_"); } diff --git a/lib/src/asn1/rrc/ul_dcch_msg.cc b/lib/src/asn1/rrc/ul_dcch_msg.cc index ee2f07185..6c055dc7c 100644 --- a/lib/src/asn1/rrc/ul_dcch_msg.cc +++ b/lib/src/asn1/rrc/ul_dcch_msg.cc @@ -221,7 +221,7 @@ void rrc_conn_setup_complete_v1540_ies_s::to_json(json_writer& j) const { j.start_obj(); if (gummei_type_v1540_present) { - j.write_str("gummei-Type-v1540", "mappedFrom5G"); + j.write_str("gummei-Type-v1540", "mappedFrom5G-v1540"); } if (guami_type_r15_present) { j.write_str("guami-Type-r15", guami_type_r15.to_string()); @@ -2165,40 +2165,6 @@ void ue_info_resp_v1250_ies_s::to_json(json_writer& j) const j.end_obj(); } -// FailureReportSCG-v12d0 ::= SEQUENCE -SRSASN_CODE fail_report_scg_v12d0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_result_neigh_cells_v12d0_present, 1)); - - if (meas_result_neigh_cells_v12d0_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_v12d0, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_report_scg_v12d0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_result_neigh_cells_v12d0_present, 1)); - - if (meas_result_neigh_cells_v12d0_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_v12d0, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -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 (const auto& e1 : meas_result_neigh_cells_v12d0) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - // IDC-SubframePattern-r11 ::= CHOICE void idc_sf_pattern_r11_c::destroy_() { @@ -4410,44 +4376,6 @@ SRSASN_CODE rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::unpack(cbit_ref& return SRSASN_SUCCESS; } -// SCGFailureInformation-v12d0-IEs ::= SEQUENCE -SRSASN_CODE scg_fail_info_v12d0_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(fail_report_scg_v12d0_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (fail_report_scg_v12d0_present) { - HANDLE_CODE(fail_report_scg_v12d0.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE scg_fail_info_v12d0_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(fail_report_scg_v12d0_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (fail_report_scg_v12d0_present) { - HANDLE_CODE(fail_report_scg_v12d0.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void scg_fail_info_v12d0_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fail_report_scg_v12d0_present) { - j.write_fieldname("failureReportSCG-v12d0"); - fail_report_scg_v12d0.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - // SL-CommTxResourceReq-r12 ::= SEQUENCE SRSASN_CODE sl_comm_tx_res_req_r12_s::pack(bit_ref& bref) const { @@ -5070,6 +4998,43 @@ void mbms_interest_ind_v1310_ies_s::to_json(json_writer& j) const j.end_obj(); } +// MeasReportAppLayer-v1590-IEs ::= SEQUENCE +SRSASN_CODE meas_report_app_layer_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_app_layer_v1590_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_report_app_layer_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // ProximityIndication-v930-IEs ::= SEQUENCE SRSASN_CODE proximity_ind_v930_ies_s::pack(bit_ref& bref) const { @@ -6119,8 +6084,45 @@ void registered_mme_s::to_json(json_writer& j) const j.end_obj(); } -// SCGFailureInformation-v1310-IEs ::= SEQUENCE -SRSASN_CODE scg_fail_info_v1310_ies_s::pack(bit_ref& bref) const +// SCGFailureInformation-v12d0a-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_v12d0a_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_v12d0a_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_fail_info_v12d0a_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SCGFailureInformationNR-v1590-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_nr_v1590_ies_s::pack(bit_ref& bref) const { HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); @@ -6131,7 +6133,7 @@ SRSASN_CODE scg_fail_info_v1310_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE scg_fail_info_v1310_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE scg_fail_info_nr_v1590_ies_s::unpack(cbit_ref& bref) { HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); @@ -6142,7 +6144,7 @@ SRSASN_CODE scg_fail_info_v1310_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void scg_fail_info_v1310_ies_s::to_json(json_writer& j) const +void scg_fail_info_nr_v1590_ies_s::to_json(json_writer& j) const { j.start_obj(); if (late_non_crit_ext_present) { @@ -7216,14 +7218,17 @@ void mbms_interest_ind_r11_ies_s::to_json(json_writer& j) const SRSASN_CODE meas_report_app_layer_r15_ies_s::pack(bit_ref& bref) const { HANDLE_CODE(bref.pack(meas_report_app_layer_container_r15_present, 1)); - HANDLE_CODE(bref.pack(service_type_present, 1)); + HANDLE_CODE(bref.pack(service_type_r15_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); if (meas_report_app_layer_container_r15_present) { HANDLE_CODE(meas_report_app_layer_container_r15.pack(bref)); } - if (service_type_present) { - HANDLE_CODE(service_type.pack(bref)); + if (service_type_r15_present) { + HANDLE_CODE(service_type_r15.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; @@ -7231,14 +7236,17 @@ SRSASN_CODE meas_report_app_layer_r15_ies_s::pack(bit_ref& bref) const SRSASN_CODE meas_report_app_layer_r15_ies_s::unpack(cbit_ref& bref) { HANDLE_CODE(bref.unpack(meas_report_app_layer_container_r15_present, 1)); - HANDLE_CODE(bref.unpack(service_type_present, 1)); + HANDLE_CODE(bref.unpack(service_type_r15_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); if (meas_report_app_layer_container_r15_present) { HANDLE_CODE(meas_report_app_layer_container_r15.unpack(bref)); } - if (service_type_present) { - HANDLE_CODE(service_type.unpack(bref)); + if (service_type_r15_present) { + HANDLE_CODE(service_type_r15.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; @@ -7249,21 +7257,20 @@ void meas_report_app_layer_r15_ies_s::to_json(json_writer& j) const if (meas_report_app_layer_container_r15_present) { j.write_str("measReportAppLayerContainer-r15", meas_report_app_layer_container_r15.to_string()); } - if (service_type_present) { - j.write_str("serviceType", service_type.to_string()); + if (service_type_r15_present) { + j.write_str("serviceType-r15", service_type_r15.to_string()); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } -std::string meas_report_app_layer_r15_ies_s::service_type_opts::to_string() const +std::string meas_report_app_layer_r15_ies_s::service_type_r15_opts::to_string() const { 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_"); + return convert_enum_idx(options, 8, value, "meas_report_app_layer_r15_ies_s::service_type_r15_e_"); } // ProximityIndication-r9-IEs ::= SEQUENCE @@ -7727,6 +7734,9 @@ SRSASN_CODE scg_fail_info_nr_r15_ies_s::pack(bit_ref& bref) const if (fail_report_scg_nr_r15_present) { HANDLE_CODE(fail_report_scg_nr_r15.pack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -7738,6 +7748,9 @@ SRSASN_CODE scg_fail_info_nr_r15_ies_s::unpack(cbit_ref& bref) if (fail_report_scg_nr_r15_present) { HANDLE_CODE(fail_report_scg_nr_r15.unpack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -7750,8 +7763,7 @@ void scg_fail_info_nr_r15_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -8564,9 +8576,6 @@ void fail_info_r15_s::to_json(json_writer& j) const j.write_fieldname("failedLogicalChannelInfo-r15"); failed_lc_ch_info_r15.to_json(j); } - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); j.end_obj(); } diff --git a/lib/src/asn1/rrc_nbiot.cc b/lib/src/asn1/rrc_nbiot.cc index fef73efe4..10883403d 100644 --- a/lib/src/asn1/rrc_nbiot.cc +++ b/lib/src/asn1/rrc_nbiot.cc @@ -170,6 +170,42 @@ std::string carrier_freq_nb_r13_s::carrier_freq_offset_r13_opts::to_number_strin return convert_enum_idx(options, 21, value, "carrier_freq_nb_r13_s::carrier_freq_offset_r13_e_"); } +// CarrierFreq-NB-v1550 ::= SEQUENCE +SRSASN_CODE carrier_freq_nb_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(carrier_freq_offset_v1550.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_nb_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(carrier_freq_offset_v1550.unpack(bref)); + + return SRSASN_SUCCESS; +} +void carrier_freq_nb_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("carrierFreqOffset-v1550", carrier_freq_offset_v1550.to_string()); + j.end_obj(); +} + +std::string carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_opts::to_string() const +{ + static const char* options[] = {"v-8dot5", "v-4dot5", "v3dot5", "v7dot5"}; + return convert_enum_idx(options, 4, value, "carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_e_"); +} +float carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_opts::to_number() const +{ + static const float options[] = {-8.5, -4.5, 3.5, 7.5}; + return map_enum_number(options, 4, value, "carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_e_"); +} +std::string carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_opts::to_number_string() const +{ + static const char* options[] = {"-8.5", "-4.5", "3.5", "7.5"}; + return convert_enum_idx(options, 4, value, "carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_e_"); +} + // DL-AM-RLC-NB-r13 ::= SEQUENCE SRSASN_CODE dl_am_rlc_nb_r13_s::pack(bit_ref& bref) const { @@ -491,6 +527,7 @@ SRSASN_CODE dl_carrier_cfg_ded_nb_r13_s::pack(bit_ref& bref) const ext_groups_packer_guard group_flags; group_flags[0] |= nrs_pwr_offset_non_anchor_v1330_present; group_flags[1] |= dl_gap_non_anchor_v1530.is_present(); + group_flags[2] |= dl_carrier_freq_v1550.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -509,6 +546,14 @@ SRSASN_CODE dl_carrier_cfg_ded_nb_r13_s::pack(bit_ref& bref) const HANDLE_CODE(dl_gap_non_anchor_v1530->pack(bref)); } } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dl_carrier_freq_v1550.is_present(), 1)); + if (dl_carrier_freq_v1550.is_present()) { + HANDLE_CODE(dl_carrier_freq_v1550->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -535,7 +580,7 @@ SRSASN_CODE dl_carrier_cfg_ded_nb_r13_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(3); group_flags.unpack(bref); if (group_flags[0]) { @@ -556,6 +601,16 @@ SRSASN_CODE dl_carrier_cfg_ded_nb_r13_s::unpack(cbit_ref& bref) HANDLE_CODE(dl_gap_non_anchor_v1530->unpack(bref)); } } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool dl_carrier_freq_v1550_present; + HANDLE_CODE(bref.unpack(dl_carrier_freq_v1550_present, 1)); + dl_carrier_freq_v1550.set_present(dl_carrier_freq_v1550_present); + if (dl_carrier_freq_v1550.is_present()) { + HANDLE_CODE(dl_carrier_freq_v1550->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -590,6 +645,10 @@ void dl_carrier_cfg_ded_nb_r13_s::to_json(json_writer& j) const j.write_fieldname("dl-GapNonAnchor-v1530"); dl_gap_non_anchor_v1530->to_json(j); } + if (dl_carrier_freq_v1550.is_present()) { + j.write_fieldname("dl-CarrierFreq-v1550"); + dl_carrier_freq_v1550->to_json(j); + } } j.end_obj(); } @@ -3202,6 +3261,20 @@ SRSASN_CODE as_cfg_nb_s::pack(bit_ref& bref) const HANDLE_CODE(source_ue_id_r13.pack(bref)); HANDLE_CODE(source_dl_carrier_freq_r13.pack(bref)); + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= source_dl_carrier_freq_v1550.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(source_dl_carrier_freq_v1550.is_present(), 1)); + if (source_dl_carrier_freq_v1550.is_present()) { + HANDLE_CODE(source_dl_carrier_freq_v1550->pack(bref)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE as_cfg_nb_s::unpack(cbit_ref& bref) @@ -3212,6 +3285,21 @@ SRSASN_CODE as_cfg_nb_s::unpack(cbit_ref& bref) HANDLE_CODE(source_ue_id_r13.unpack(bref)); HANDLE_CODE(source_dl_carrier_freq_r13.unpack(bref)); + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool source_dl_carrier_freq_v1550_present; + HANDLE_CODE(bref.unpack(source_dl_carrier_freq_v1550_present, 1)); + source_dl_carrier_freq_v1550.set_present(source_dl_carrier_freq_v1550_present); + if (source_dl_carrier_freq_v1550.is_present()) { + HANDLE_CODE(source_dl_carrier_freq_v1550->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } void as_cfg_nb_s::to_json(json_writer& j) const @@ -3224,6 +3312,12 @@ void as_cfg_nb_s::to_json(json_writer& j) const j.write_str("sourceUE-Identity-r13", source_ue_id_r13.to_string()); j.write_fieldname("sourceDl-CarrierFreq-r13"); source_dl_carrier_freq_r13.to_json(j); + if (ext) { + if (source_dl_carrier_freq_v1550.is_present()) { + j.write_fieldname("sourceDL-CarrierFreq-v1550"); + source_dl_carrier_freq_v1550->to_json(j); + } + } j.end_obj(); } @@ -5690,6 +5784,51 @@ uint8_t nprach_params_tdd_nb_r15_s::nprach_params_r15_s_::nprach_num_cbra_start_ options, 16, value, "nprach_params_tdd_nb_r15_s::nprach_params_r15_s_::nprach_num_cbra_start_subcarriers_r15_e_"); } +// NPRACH-ParametersTDD-NB-v1550 ::= SEQUENCE +SRSASN_CODE nprach_params_tdd_nb_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(max_num_preamb_attempt_ce_v1550.pack(bref)); + HANDLE_CODE(num_repeats_per_preamb_attempt_v1550.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE nprach_params_tdd_nb_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(max_num_preamb_attempt_ce_v1550.unpack(bref)); + HANDLE_CODE(num_repeats_per_preamb_attempt_v1550.unpack(bref)); + + return SRSASN_SUCCESS; +} +void nprach_params_tdd_nb_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("maxNumPreambleAttemptCE-v1550", max_num_preamb_attempt_ce_v1550.to_string()); + j.write_str("numRepetitionsPerPreambleAttempt-v1550", num_repeats_per_preamb_attempt_v1550.to_string()); + j.end_obj(); +} + +std::string nprach_params_tdd_nb_v1550_s::max_num_preamb_attempt_ce_v1550_opts::to_string() const +{ + static const char* options[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "spare1"}; + return convert_enum_idx(options, 8, value, "nprach_params_tdd_nb_v1550_s::max_num_preamb_attempt_ce_v1550_e_"); +} +uint8_t nprach_params_tdd_nb_v1550_s::max_num_preamb_attempt_ce_v1550_opts::to_number() const +{ + static const uint8_t options[] = {3, 4, 5, 6, 7, 8, 10}; + return map_enum_number(options, 7, value, "nprach_params_tdd_nb_v1550_s::max_num_preamb_attempt_ce_v1550_e_"); +} + +std::string nprach_params_tdd_nb_v1550_s::num_repeats_per_preamb_attempt_v1550_opts::to_string() const +{ + static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32", "n64", "n128", "n256", "n512", "n1024"}; + return convert_enum_idx(options, 11, value, "nprach_params_tdd_nb_v1550_s::num_repeats_per_preamb_attempt_v1550_e_"); +} +uint16_t nprach_params_tdd_nb_v1550_s::num_repeats_per_preamb_attempt_v1550_opts::to_number() const +{ + static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + return map_enum_number(options, 11, value, "nprach_params_tdd_nb_v1550_s::num_repeats_per_preamb_attempt_v1550_e_"); +} + // PagingWeight-NB-r14 ::= ENUMERATED std::string paging_weight_nb_r14_opts::to_string() const { @@ -5854,6 +5993,7 @@ SRSASN_CODE dl_carrier_cfg_common_nb_r14_s::pack(bit_ref& bref) const if (ext) { ext_groups_packer_guard group_flags; group_flags[0] |= dl_gap_non_anchor_v1530.is_present(); + group_flags[1] |= dl_carrier_freq_v1550.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -5864,6 +6004,14 @@ SRSASN_CODE dl_carrier_cfg_common_nb_r14_s::pack(bit_ref& bref) const HANDLE_CODE(dl_gap_non_anchor_v1530->pack(bref)); } } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dl_carrier_freq_v1550.is_present(), 1)); + if (dl_carrier_freq_v1550.is_present()) { + HANDLE_CODE(dl_carrier_freq_v1550->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -5888,7 +6036,7 @@ SRSASN_CODE dl_carrier_cfg_common_nb_r14_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(1); + ext_groups_unpacker_guard group_flags(2); group_flags.unpack(bref); if (group_flags[0]) { @@ -5901,6 +6049,16 @@ SRSASN_CODE dl_carrier_cfg_common_nb_r14_s::unpack(cbit_ref& bref) HANDLE_CODE(dl_gap_non_anchor_v1530->unpack(bref)); } } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool dl_carrier_freq_v1550_present; + HANDLE_CODE(bref.unpack(dl_carrier_freq_v1550_present, 1)); + dl_carrier_freq_v1550.set_present(dl_carrier_freq_v1550_present); + if (dl_carrier_freq_v1550.is_present()) { + HANDLE_CODE(dl_carrier_freq_v1550->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -5931,6 +6089,10 @@ void dl_carrier_cfg_common_nb_r14_s::to_json(json_writer& j) const j.write_fieldname("dl-GapNonAnchor-v1530"); dl_gap_non_anchor_v1530->to_json(j); } + if (dl_carrier_freq_v1550.is_present()) { + j.write_fieldname("dl-CarrierFreq-v1550"); + dl_carrier_freq_v1550->to_json(j); + } } j.end_obj(); } @@ -6637,6 +6799,7 @@ SRSASN_CODE inter_freq_carrier_freq_info_nb_r13_s::pack(bit_ref& bref) const group_flags[1] |= ce_authorisation_offset_r14_present; group_flags[2] |= nsss_rrm_cfg_r15.is_present(); group_flags[2] |= inter_freq_neigh_cell_list_v1530.is_present(); + group_flags[3] |= dl_carrier_freq_v1550.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -6671,6 +6834,14 @@ SRSASN_CODE inter_freq_carrier_freq_info_nb_r13_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_neigh_cell_list_v1530, 1, 16)); } } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dl_carrier_freq_v1550.is_present(), 1)); + if (dl_carrier_freq_v1550.is_present()) { + HANDLE_CODE(dl_carrier_freq_v1550->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -6706,7 +6877,7 @@ SRSASN_CODE inter_freq_carrier_freq_info_nb_r13_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(3); + ext_groups_unpacker_guard group_flags(4); group_flags.unpack(bref); if (group_flags[0]) { @@ -6745,6 +6916,16 @@ SRSASN_CODE inter_freq_carrier_freq_info_nb_r13_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_neigh_cell_list_v1530, bref, 1, 16)); } } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool dl_carrier_freq_v1550_present; + HANDLE_CODE(bref.unpack(dl_carrier_freq_v1550_present, 1)); + dl_carrier_freq_v1550.set_present(dl_carrier_freq_v1550_present); + if (dl_carrier_freq_v1550.is_present()) { + HANDLE_CODE(dl_carrier_freq_v1550->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -6805,6 +6986,10 @@ void inter_freq_carrier_freq_info_nb_r13_s::to_json(json_writer& j) const } j.end_array(); } + if (dl_carrier_freq_v1550.is_present()) { + j.write_fieldname("dl-CarrierFreq-v1550"); + dl_carrier_freq_v1550->to_json(j); + } } j.end_obj(); } @@ -7051,7 +7236,7 @@ SRSASN_CODE nprach_cfg_sib_nb_v1530_s::pack(bit_ref& bref) const if (tdd_params_r15_present) { HANDLE_CODE(tdd_params_r15.nprach_preamb_format_r15.pack(bref)); - HANDLE_CODE(tdd_params_r15.num_repeats_per_preamb_attempt_r15.pack(bref)); + HANDLE_CODE(tdd_params_r15.dummy.pack(bref)); HANDLE_CODE(pack_dyn_seq_of(bref, tdd_params_r15.nprach_params_list_tdd_r15, 1, 3)); } if (fmt2_params_r15_present) { @@ -7083,7 +7268,7 @@ SRSASN_CODE nprach_cfg_sib_nb_v1530_s::unpack(cbit_ref& bref) if (tdd_params_r15_present) { HANDLE_CODE(tdd_params_r15.nprach_preamb_format_r15.unpack(bref)); - HANDLE_CODE(tdd_params_r15.num_repeats_per_preamb_attempt_r15.unpack(bref)); + HANDLE_CODE(tdd_params_r15.dummy.unpack(bref)); HANDLE_CODE(unpack_dyn_seq_of(tdd_params_r15.nprach_params_list_tdd_r15, bref, 1, 3)); } if (fmt2_params_r15_present) { @@ -7114,7 +7299,7 @@ void nprach_cfg_sib_nb_v1530_s::to_json(json_writer& j) const j.write_fieldname("tdd-Parameters-r15"); j.start_obj(); j.write_str("nprach-PreambleFormat-r15", tdd_params_r15.nprach_preamb_format_r15.to_string()); - j.write_str("numRepetitionsPerPreambleAttempt-r15", tdd_params_r15.num_repeats_per_preamb_attempt_r15.to_string()); + j.write_str("dummy", tdd_params_r15.dummy.to_string()); j.start_array("nprach-ParametersListTDD-r15"); for (const auto& e1 : tdd_params_r15.nprach_params_list_tdd_r15) { e1.to_json(j); @@ -7171,17 +7356,42 @@ std::string nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::nprach_preamb_format_r options, 5, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::nprach_preamb_format_r15_e_"); } -std::string nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::num_repeats_per_preamb_attempt_r15_opts::to_string() const +std::string nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::dummy_opts::to_string() const { static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32", "n64", "n128", "n256", "n512", "n1024"}; - return convert_enum_idx( - options, 11, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::num_repeats_per_preamb_attempt_r15_e_"); + return convert_enum_idx(options, 11, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::dummy_e_"); } -uint16_t nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::num_repeats_per_preamb_attempt_r15_opts::to_number() const +uint16_t nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::dummy_opts::to_number() const { static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; - return map_enum_number( - options, 11, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::num_repeats_per_preamb_attempt_r15_e_"); + return map_enum_number(options, 11, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::dummy_e_"); +} + +// NPRACH-ConfigSIB-NB-v1550 ::= SEQUENCE +SRSASN_CODE nprach_cfg_sib_nb_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, tdd_params_v1550.nprach_params_list_tdd_v1550, 1, 3)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE nprach_cfg_sib_nb_v1550_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(tdd_params_v1550.nprach_params_list_tdd_v1550, bref, 1, 3)); + + return SRSASN_SUCCESS; +} +void nprach_cfg_sib_nb_v1550_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("tdd-Parameters-v1550"); + j.start_obj(); + j.start_array("nprach-ParametersListTDD-v1550"); + for (const auto& e1 : tdd_params_v1550.nprach_params_list_tdd_v1550) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); + j.end_obj(); } // NPRACH-ProbabilityAnchor-NB-r14 ::= SEQUENCE @@ -8301,6 +8511,7 @@ SRSASN_CODE rr_cfg_common_sib_nb_r13_s::pack(bit_ref& bref) const group_flags[2] |= nprach_cfg_v1530.is_present(); group_flags[2] |= dl_gap_v1530.is_present(); group_flags[2] |= wus_cfg_r15.is_present(); + group_flags[3] |= nprach_cfg_v1550.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -8335,6 +8546,14 @@ SRSASN_CODE rr_cfg_common_sib_nb_r13_s::pack(bit_ref& bref) const HANDLE_CODE(wus_cfg_r15->pack(bref)); } } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(nprach_cfg_v1550.is_present(), 1)); + if (nprach_cfg_v1550.is_present()) { + HANDLE_CODE(nprach_cfg_v1550->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -8355,7 +8574,7 @@ SRSASN_CODE rr_cfg_common_sib_nb_r13_s::unpack(cbit_ref& bref) HANDLE_CODE(ul_pwr_ctrl_common_r13.unpack(bref)); if (ext) { - ext_groups_unpacker_guard group_flags(3); + ext_groups_unpacker_guard group_flags(4); group_flags.unpack(bref); if (group_flags[0]) { @@ -8400,6 +8619,16 @@ SRSASN_CODE rr_cfg_common_sib_nb_r13_s::unpack(cbit_ref& bref) HANDLE_CODE(wus_cfg_r15->unpack(bref)); } } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool nprach_cfg_v1550_present; + HANDLE_CODE(bref.unpack(nprach_cfg_v1550_present, 1)); + nprach_cfg_v1550.set_present(nprach_cfg_v1550_present); + if (nprach_cfg_v1550.is_present()) { + HANDLE_CODE(nprach_cfg_v1550->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -8445,6 +8674,10 @@ void rr_cfg_common_sib_nb_r13_s::to_json(json_writer& j) const j.write_fieldname("wus-Config-r15"); wus_cfg_r15->to_json(j); } + if (nprach_cfg_v1550.is_present()) { + j.write_fieldname("nprach-Config-v1550"); + nprach_cfg_v1550->to_json(j); + } } j.end_obj(); } @@ -11827,6 +12060,43 @@ void rrc_conn_reest_nb_v1430_ies_s::to_json(json_writer& j) const j.end_obj(); } +// RRCEarlyDataComplete-NB-v1590-IEs ::= SEQUENCE +SRSASN_CODE rrc_early_data_complete_nb_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_complete_nb_v1590_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_early_data_complete_nb_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // RedirectedCarrierInfo-NB-v1430 ::= SEQUENCE SRSASN_CODE redirected_carrier_info_nb_v1430_s::pack(bit_ref& bref) const { @@ -12045,6 +12315,9 @@ SRSASN_CODE rrc_early_data_complete_nb_r15_ies_s::pack(bit_ref& bref) const if (redirected_carrier_info_ext_r15_present) { HANDLE_CODE(redirected_carrier_info_ext_r15.pack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -12068,6 +12341,9 @@ SRSASN_CODE rrc_early_data_complete_nb_r15_ies_s::unpack(cbit_ref& bref) if (redirected_carrier_info_ext_r15_present) { HANDLE_CODE(redirected_carrier_info_ext_r15.unpack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -12090,8 +12366,7 @@ void rrc_early_data_complete_nb_r15_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -13191,6 +13466,78 @@ void dl_ccch_msg_nb_s::to_json(json_writer& j) const j.end_array(); } +// RRCConnectionRelease-NB-v15b0-IEs ::= SEQUENCE +SRSASN_CODE rrc_conn_release_nb_v15b0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(no_last_cell_upd_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_nb_v15b0_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(no_last_cell_upd_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_conn_release_nb_v15b0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (no_last_cell_upd_r15_present) { + j.write_str("noLastCellUpdate-r15", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionRelease-NB-v1550-IEs ::= SEQUENCE +SRSASN_CODE rrc_conn_release_nb_v1550_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(redirected_carrier_info_v1550_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (redirected_carrier_info_v1550_present) { + HANDLE_CODE(redirected_carrier_info_v1550.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_nb_v1550_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(redirected_carrier_info_v1550_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (redirected_carrier_info_v1550_present) { + HANDLE_CODE(redirected_carrier_info_v1550.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_release_nb_v1550_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (redirected_carrier_info_v1550_present) { + j.write_fieldname("redirectedCarrierInfo-v1550"); + redirected_carrier_info_v1550.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + // RRCConnectionRelease-NB-v1530-IEs ::= SEQUENCE SRSASN_CODE rrc_conn_release_nb_v1530_ies_s::pack(bit_ref& bref) const { @@ -13201,6 +13548,9 @@ SRSASN_CODE rrc_conn_release_nb_v1530_ies_s::pack(bit_ref& bref) const if (next_hop_chaining_count_r15_present) { HANDLE_CODE(pack_integer(bref, next_hop_chaining_count_r15, (uint8_t)0u, (uint8_t)7u)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -13213,6 +13563,9 @@ SRSASN_CODE rrc_conn_release_nb_v1530_ies_s::unpack(cbit_ref& bref) if (next_hop_chaining_count_r15_present) { HANDLE_CODE(unpack_integer(next_hop_chaining_count_r15, bref, (uint8_t)0u, (uint8_t)7u)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -13227,8 +13580,7 @@ void rrc_conn_release_nb_v1530_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -18027,6 +18379,43 @@ std::string rrc_conn_setup_complete_nb_s::crit_exts_c_::types_opts::to_string() return convert_enum_idx(options, 2, value, "rrc_conn_setup_complete_nb_s::crit_exts_c_::types"); } +// RRCEarlyDataRequest-NB-v1590-IEs ::= SEQUENCE +SRSASN_CODE rrc_early_data_request_nb_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_request_nb_v1590_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_early_data_request_nb_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // RRCEarlyDataRequest-NB-r15-IEs ::= SEQUENCE SRSASN_CODE rrc_early_data_request_nb_r15_ies_s::pack(bit_ref& bref) const { @@ -18039,6 +18428,9 @@ SRSASN_CODE rrc_early_data_request_nb_r15_ies_s::pack(bit_ref& bref) const HANDLE_CODE(cqi_npdcch_r15.pack(bref)); } HANDLE_CODE(ded_info_nas_r15.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -18053,6 +18445,9 @@ SRSASN_CODE rrc_early_data_request_nb_r15_ies_s::unpack(cbit_ref& bref) HANDLE_CODE(cqi_npdcch_r15.unpack(bref)); } HANDLE_CODE(ded_info_nas_r15.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -18068,15 +18463,14 @@ void rrc_early_data_request_nb_r15_ies_s::to_json(json_writer& j) const j.write_str("dedicatedInfoNAS-r15", ded_info_nas_r15.to_string()); if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } std::string rrc_early_data_request_nb_r15_ies_s::establishment_cause_r15_opts::to_string() const { - static const char* options[] = {"mo-Data-r15", "mo-ExceptionData-r15", "delayTolerantAccess-r15", "spare1"}; + static const char* options[] = {"mo-Data", "mo-ExceptionData", "delayTolerantAccess", "spare1"}; return convert_enum_idx(options, 4, value, "rrc_early_data_request_nb_r15_ies_s::establishment_cause_r15_e_"); } diff --git a/lib/test/asn1/rrc_test.cc b/lib/test/asn1/rrc_test.cc index 5a047986a..cead6f1d3 100644 --- a/lib/test/asn1/rrc_test.cc +++ b/lib/test/asn1/rrc_test.cc @@ -259,7 +259,7 @@ int test_bcch_dl_sch_msg2() sib_type1_s& sib1 = bcch_msg.msg.c1().sib_type1(); TESTASSERT(not sib1.p_max_present); TESTASSERT(sib1.sched_info_list.size() == 1); - TESTASSERT(sib1.sched_info_list[0].si_periodicity.value == sched_info_s::si_periodicity_e_::rf16); + TESTASSERT(sib1.sched_info_list[0].si_periodicity.value == si_periodicity_r12_e::rf16); TESTASSERT(sib1.sched_info_list[0].sib_map_info.size() == 1); TESTASSERT(sib1.sched_info_list[0].sib_map_info[0] == sib_type_e::sib_type13_v920); diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index 574683ca9..00772e3d6 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -174,11 +174,11 @@ void rrc::get_metrics(rrc_metrics_t& m) // Save strongest cells metrics for (auto& c : meas_cells) { phy_meas_t meas = {}; - meas.cfo_hz = c->get_cfo_hz(); - meas.earfcn = c->get_earfcn(); - meas.rsrq = c->get_rsrq(); - meas.rsrp = c->get_rsrp(); - meas.pci = c->get_pci(); + meas.cfo_hz = c->get_cfo_hz(); + meas.earfcn = c->get_earfcn(); + meas.rsrq = c->get_rsrq(); + meas.rsrp = c->get_rsrp(); + meas.pci = c->get_pci(); m.neighbour_cells.push_back(meas); } } @@ -1248,7 +1248,7 @@ void rrc::handle_sib1() // Print SIB scheduling info for (uint32_t i = 0; i < sib1->sched_info_list.size(); ++i) { - sched_info_s::si_periodicity_e_ p = sib1->sched_info_list[i].si_periodicity; + si_periodicity_r12_e p = sib1->sched_info_list[i].si_periodicity; for (uint32_t j = 0; j < sib1->sched_info_list[i].sib_map_info.size(); ++j) { sib_type_e t = sib1->sched_info_list[i].sib_map_info[j]; rrc_log->debug("SIB scheduling info, sib_type=%d, si_periodicity=%d\n", t.to_number(), p.to_number()); @@ -1258,8 +1258,8 @@ void rrc::handle_sib1() // Set TDD Config if (sib1->tdd_cfg_present) { srslte_tdd_config_t tdd_config = {}; - tdd_config.sf_config = sib1->tdd_cfg.sf_assign.to_number(); - tdd_config.ss_config = sib1->tdd_cfg.special_sf_patterns.to_number(); + tdd_config.sf_config = sib1->tdd_cfg.sf_assign.to_number(); + tdd_config.ss_config = sib1->tdd_cfg.special_sf_patterns.to_number(); phy->set_config_tdd(tdd_config); } } From 099dad8cb1906815ce7c583f4d9563202ca7d0ef Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 17 Dec 2020 16:04:15 +0000 Subject: [PATCH 47/59] disable PHR handling in the UL sched by default --- .../interfaces/enb_rrc_interface_types.h | 1 + .../srslte/interfaces/sched_interface.h | 3 ++- srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h | 18 +++++++++++------- srsenb/src/enb_cfg_parser.cc | 1 + srsenb/src/stack/mac/sched_ue.cc | 2 +- srsenb/src/stack/rrc/rrc.cc | 11 ++++++----- srsenb/test/mac/sched_test_rand.cc | 1 + srsenb/test/mac/sched_tpc_test.cc | 4 ++-- 8 files changed, 25 insertions(+), 16 deletions(-) diff --git a/lib/include/srslte/interfaces/enb_rrc_interface_types.h b/lib/include/srslte/interfaces/enb_rrc_interface_types.h index 095391c1b..22be4e7a7 100644 --- a/lib/include/srslte/interfaces/enb_rrc_interface_types.h +++ b/lib/include/srslte/interfaces/enb_rrc_interface_types.h @@ -55,6 +55,7 @@ struct cell_cfg_t { double ul_freq_hz; int target_ul_sinr_db; uint32_t initial_dl_cqi; + bool enable_phr_handling; std::vector scell_list; rrc_meas_cfg_t meas_cfg; }; diff --git a/lib/include/srslte/interfaces/sched_interface.h b/lib/include/srslte/interfaces/sched_interface.h index b48af0f21..0ef50bc7b 100644 --- a/lib/include/srslte/interfaces/sched_interface.h +++ b/lib/include/srslte/interfaces/sched_interface.h @@ -67,6 +67,8 @@ public: /* pusch configuration */ srslte_pusch_hopping_cfg_t pusch_hopping_cfg; float target_ul_sinr; + bool enable_phr_handling; + bool enable_64qam; /* prach configuration */ uint32_t prach_config; @@ -78,7 +80,6 @@ public: uint32_t maxharq_msg3tx; uint32_t n1pucch_an; uint32_t delta_pucch_shift; - bool enable_64qam; // If non-negative, statically allocate N prbs at the edges of the uplink for PUCCH int nrb_pucch; diff --git a/srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h b/srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h index 1dfd9086f..1774f1236 100644 --- a/srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h +++ b/srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h @@ -33,12 +33,13 @@ class tpc public: static constexpr int PHR_NEG_NOF_PRB = 1; - tpc(uint32_t cell_nof_prb, float target_snr_dB_ = -1.0) : + tpc(uint32_t cell_nof_prb, float target_snr_dB_ = -1.0, bool phr_handling_flag_ = false) : nof_prb(cell_nof_prb), target_snr_dB(target_snr_dB_), snr_avg(0.1, target_snr_dB_), win_pusch_tpc_values(FDD_HARQ_DELAY_UL_MS + FDD_HARQ_DELAY_DL_MS), - win_pucch_tpc_values(FDD_HARQ_DELAY_DL_MS + FDD_HARQ_DELAY_UL_MS) + win_pucch_tpc_values(FDD_HARQ_DELAY_DL_MS + FDD_HARQ_DELAY_UL_MS), + phr_handling_flag(phr_handling_flag_) { max_prbs_cached = nof_prb; } @@ -52,11 +53,13 @@ public: pusch_phr_flag = false; // compute and cache the max nof UL PRBs that avoids overflowing PHR - max_prbs_cached = PHR_NEG_NOF_PRB; - for (int n = nof_prb; n > PHR_NEG_NOF_PRB; --n) { - if (last_phr >= 10 * log10(n)) { - max_prbs_cached = n; - break; + if (phr_handling_flag) { + max_prbs_cached = PHR_NEG_NOF_PRB; + for (int n = nof_prb; n > PHR_NEG_NOF_PRB; --n) { + if (last_phr >= 10 * log10(n)) { + max_prbs_cached = n; + break; + } } } } @@ -178,6 +181,7 @@ private: uint32_t nof_prb; float target_snr_dB; + bool phr_handling_flag; // PHR-related variables int last_phr = undefined_phr; diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 4e442a057..146f2e447 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -735,6 +735,7 @@ static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root) parse_default_field(cell_cfg.initial_dl_cqi, cellroot, "initial_dl_cqi", 5u); parse_default_field(cell_cfg.meas_cfg.meas_gap_period, cellroot, "meas_gap_period", 0u); HANDLEPARSERCODE(parse_default_field(cell_cfg.target_ul_sinr_db, cellroot, "target_ul_sinr", -1)); + HANDLEPARSERCODE(parse_default_field(cell_cfg.enable_phr_handling, cellroot, "enable_phr_handling", false)); if (cellroot.exists("ho_active") and cellroot["ho_active"]) { HANDLEPARSERCODE(parse_meas_cell_list(&cell_cfg.meas_cfg, cellroot["meas_cell_list"])); diff --git a/srsenb/src/stack/mac/sched_ue.cc b/srsenb/src/stack/mac/sched_ue.cc index 2ae3ee4c9..9644798e4 100644 --- a/srsenb/src/stack/mac/sched_ue.cc +++ b/srsenb/src/stack/mac/sched_ue.cc @@ -1323,7 +1323,7 @@ cc_sched_ue::cc_sched_ue(const sched_interface::ue_cfg_t& cfg_, ue_cc_idx(ue_cc_idx_), last_tti(current_tti), harq_ent(SCHED_MAX_HARQ_PROC, SCHED_MAX_HARQ_PROC), - tpc_fsm(cell_cfg_.nof_prb(), cell_cfg_.cfg.target_ul_sinr) + tpc_fsm(cell_cfg_.nof_prb(), cell_cfg_.cfg.target_ul_sinr, cell_cfg_.cfg.enable_phr_handling) { dl_cqi_rx = false; dl_cqi = (ue_cc_idx == 0) ? cell_params->cfg.initial_dl_cqi : 0; diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index 8efd62f55..64e269d74 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -612,11 +612,12 @@ void rrc::config_mac() item.si_window_ms = cfg.sib1.si_win_len.to_number(); item.prach_rar_window = cfg.sibs[1].sib2().rr_cfg_common.rach_cfg_common.ra_supervision_info.ra_resp_win_size.to_number(); - item.prach_freq_offset = cfg.sibs[1].sib2().rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset; - item.maxharq_msg3tx = cfg.sibs[1].sib2().rr_cfg_common.rach_cfg_common.max_harq_msg3_tx; - item.enable_64qam = cfg.sibs[1].sib2().rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.enable64_qam; - item.initial_dl_cqi = cfg.cell_list[ccidx].initial_dl_cqi; - item.target_ul_sinr = cfg.cell_list[ccidx].target_ul_sinr_db; + item.prach_freq_offset = cfg.sibs[1].sib2().rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset; + item.maxharq_msg3tx = cfg.sibs[1].sib2().rr_cfg_common.rach_cfg_common.max_harq_msg3_tx; + item.enable_64qam = cfg.sibs[1].sib2().rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.enable64_qam; + item.initial_dl_cqi = cfg.cell_list[ccidx].initial_dl_cqi; + item.target_ul_sinr = cfg.cell_list[ccidx].target_ul_sinr_db; + item.enable_phr_handling = cfg.cell_list[ccidx].enable_phr_handling; item.nrb_pucch = SRSLTE_MAX(cfg.sr_cfg.nof_prb, cfg.cqi_cfg.nof_prb); rrc_log->info("Allocating %d PRBs for PUCCH\n", item.nrb_pucch); diff --git a/srsenb/test/mac/sched_test_rand.cc b/srsenb/test/mac/sched_test_rand.cc index 016665e32..5b87854f1 100644 --- a/srsenb/test/mac/sched_test_rand.cc +++ b/srsenb/test/mac/sched_test_rand.cc @@ -271,6 +271,7 @@ sched_sim_events rand_sim_params(uint32_t nof_ttis) sim_gen.sim_args.cell_cfg = {generate_default_cell_cfg(nof_prb)}; sim_gen.sim_args.cell_cfg[0].target_ul_sinr = pick_random_uniform({10, 15, 20, -1}); + sim_gen.sim_args.cell_cfg[0].enable_phr_handling = false; sim_gen.sim_args.default_ue_sim_cfg.ue_cfg = generate_default_ue_cfg(); sim_gen.sim_args.default_ue_sim_cfg.periodic_cqi = true; sim_gen.sim_args.default_ue_sim_cfg.ue_cfg.maxharq_tx = std::uniform_int_distribution<>{1, 5}(srsenb::get_rand_gen()); diff --git a/srsenb/test/mac/sched_tpc_test.cc b/srsenb/test/mac/sched_tpc_test.cc index 181b9b821..3d09f7626 100644 --- a/srsenb/test/mac/sched_tpc_test.cc +++ b/srsenb/test/mac/sched_tpc_test.cc @@ -26,7 +26,7 @@ int test_finite_target_snr() const uint32_t nof_prbs = 50; const int target_snr = 15; - tpc tpcfsm(nof_prbs, 15); + tpc tpcfsm(nof_prbs, 15, true); // TEST: While no SNR info is provided, no TPC commands are sent for (uint32_t i = 0; i < 100; ++i) { @@ -71,7 +71,7 @@ int test_undefined_target_snr() { const uint32_t nof_prbs = 50; - tpc tpcfsm(nof_prbs); + tpc tpcfsm(nof_prbs, -1, true); TESTASSERT(tpcfsm.max_ul_prbs() == 50); // TEST: While the PHR is not updated, a limited number of TPC commands should be sent From 48b37394f1437ffdc7927f5d140508304f891399 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 18 Dec 2020 10:25:30 +0100 Subject: [PATCH 48/59] rlc: remove unneeded log entry was added for testing only --- lib/src/upper/rlc.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/src/upper/rlc.cc b/lib/src/upper/rlc.cc index cf1f10156..b5343cdc4 100644 --- a/lib/src/upper/rlc.cc +++ b/lib/src/upper/rlc.cc @@ -101,11 +101,6 @@ void rlc::get_metrics(rlc_metrics_t& m, const uint32_t nof_tti) for (rlc_map_t::iterator it = rlc_array.begin(); it != rlc_array.end(); ++it) { rlc_bearer_metrics_t metrics = it->second->get_metrics(); - rlc_log->info("rx_rate_mbps: lcid=%d metrics.num_rx_pdu_bytes=%ld nof_tti=%d\n", - it->first, - metrics.num_rx_pdu_bytes, - nof_tti); - // Rx/Tx rate based on real time double rx_rate_mbps_real_time = (metrics.num_rx_pdu_bytes * 8 / (double)1e6) / secs.count(); double tx_rate_mbps_real_time = (metrics.num_tx_pdu_bytes * 8 / (double)1e6) / secs.count(); From 0c20b7a4553a7737b573fa66cf12b7e86dbf238f Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Thu, 10 Dec 2020 20:21:07 +0000 Subject: [PATCH 49/59] Added support for S1AP modify bearer request support. This includes: - Handle received E-RAB S1AP at s1ap.cc. - Added methods to rrc.cc, rrc_ue.cc and rrc_bearer_cfg.cc to handle erab modify request. - Made RLC add_bearer() function capable of re-creating the RLC entity. - Send RRC reconfiguration to the UE and reply to the EPC with S1AP modify bearer response. This commit also adds support to srsEPC to send S1AP modify bearer request for testing purposes. --- lib/include/srslte/asn1/s1ap_utils.h | 2 + .../srslte/interfaces/enb_interfaces.h | 4 + .../srslte/interfaces/epc_interfaces.h | 5 ++ lib/include/srslte/rrc/rrc_cfg_utils.h | 10 ++- lib/src/upper/rlc.cc | 8 +- srsenb/hdr/stack/rrc/rrc.h | 8 ++ srsenb/hdr/stack/rrc/rrc_bearer_cfg.h | 3 + srsenb/hdr/stack/rrc/rrc_ue.h | 3 + srsenb/hdr/stack/upper/s1ap.h | 3 + srsenb/src/stack/rrc/rrc.cc | 50 +++++++++++++ srsenb/src/stack/rrc/rrc_bearer_cfg.cc | 17 +++++ srsenb/src/stack/rrc/rrc_ue.cc | 11 +++ srsenb/src/stack/rrc/ue_rr_cfg.cc | 34 ++++----- srsenb/src/stack/upper/s1ap.cc | 73 ++++++++++++++++++- srsepc/hdr/mme/s1ap.h | 5 ++ srsepc/hdr/mme/s1ap_erab_mngmt_proc.h | 5 ++ srsepc/src/mme/s1ap.cc | 10 +++ srsepc/src/mme/s1ap_erab_mngmt_proc.cc | 47 ++++++++++++ 18 files changed, 273 insertions(+), 25 deletions(-) diff --git a/lib/include/srslte/asn1/s1ap_utils.h b/lib/include/srslte/asn1/s1ap_utils.h index a5d6f16b3..8200d937b 100644 --- a/lib/include/srslte/asn1/s1ap_utils.h +++ b/lib/include/srslte/asn1/s1ap_utils.h @@ -26,6 +26,7 @@ struct init_context_setup_request_s; struct ue_context_mod_request_s; struct erab_setup_request_s; struct erab_release_cmd_s; +struct erab_modify_request_s; struct ue_paging_id_c; struct ho_request_s; struct sourceenb_to_targetenb_transparent_container_s; @@ -34,6 +35,7 @@ struct erab_setup_resp_s; struct rrc_establishment_cause_opts; struct cause_radio_network_opts; struct bearers_subject_to_status_transfer_item_ies_o; +struct erab_level_qos_params_s; template struct protocol_ie_single_container_s; diff --git a/lib/include/srslte/interfaces/enb_interfaces.h b/lib/include/srslte/interfaces/enb_interfaces.h index 1b614713b..5f32ed787 100644 --- a/lib/include/srslte/interfaces/enb_interfaces.h +++ b/lib/include/srslte/interfaces/enb_interfaces.h @@ -425,6 +425,10 @@ public: virtual bool setup_ue_ctxt(uint16_t rnti, const asn1::s1ap::init_context_setup_request_s& msg) = 0; virtual bool modify_ue_ctxt(uint16_t rnti, const asn1::s1ap::ue_context_mod_request_s& msg) = 0; virtual bool setup_ue_erabs(uint16_t rnti, const asn1::s1ap::erab_setup_request_s& msg) = 0; + virtual void modify_erabs(uint16_t rnti, + const asn1::s1ap::erab_modify_request_s& msg, + std::vector* erabs_modified, + std::vector* erabs_failed_to_modify) = 0; virtual bool release_erabs(uint32_t rnti) = 0; virtual void release_erabs(uint32_t rnti, const asn1::s1ap::erab_release_cmd_s& msg, diff --git a/lib/include/srslte/interfaces/epc_interfaces.h b/lib/include/srslte/interfaces/epc_interfaces.h index 1a0469198..bb3de8a0e 100644 --- a/lib/include/srslte/interfaces/epc_interfaces.h +++ b/lib/include/srslte/interfaces/epc_interfaces.h @@ -63,6 +63,11 @@ public: uint32_t mme_ue_s1ap_id, std::vector erabs_to_release, struct sctp_sndrcvinfo enb_sri) = 0; + virtual bool send_erab_modify_request(uint32_t enb_ue_s1ap_id, + uint32_t mme_ue_s1ap_id, + std::map erabs_to_modify, + srslte::byte_buffer_t* nas_msg, + struct sctp_sndrcvinfo enb_sri) = 0; virtual bool send_downlink_nas_transport(uint32_t enb_ue_s1ap_id, uint32_t mme_ue_s1ap_id, srslte::byte_buffer_t* nas_msg, diff --git a/lib/include/srslte/rrc/rrc_cfg_utils.h b/lib/include/srslte/rrc/rrc_cfg_utils.h index 4afcc299a..f790515db 100644 --- a/lib/include/srslte/rrc/rrc_cfg_utils.h +++ b/lib/include/srslte/rrc/rrc_cfg_utils.h @@ -14,6 +14,8 @@ #define SRSLTE_RRC_CFG_UTILS_H #include "srslte/asn1/rrc_utils.h" +#include "srslte/common/common.h" +#include "srslte/common/logmap.h" #include #include @@ -289,12 +291,16 @@ void compute_cfg_diff(const toAddModList& src_list, if (&src_list == &target_list) { // early exit return; - } else if (&src_list == &add_diff_list) { + } + + if (&src_list == &add_diff_list) { // use const src_list toAddModList src_list2 = src_list; compute_cfg_diff(src_list2, target_list, add_diff_list, rem_diff_list); return; - } else if (&target_list == &add_diff_list) { + } + + if (&target_list == &add_diff_list) { // use const target_list toAddModList target_list2 = target_list; compute_cfg_diff(src_list, target_list2, add_diff_list, rem_diff_list); diff --git a/lib/src/upper/rlc.cc b/lib/src/upper/rlc.cc index b5343cdc4..188cb94b0 100644 --- a/lib/src/upper/rlc.cc +++ b/lib/src/upper/rlc.cc @@ -167,7 +167,8 @@ void rlc::reset() delete (it->second); } rlc_array.clear(); - // the multicast bearer (MRB) is not removed here because eMBMS services continue to be streamed in idle mode (3GPP TS 23.246 version 14.1.0 Release 14 section 8) + // the multicast bearer (MRB) is not removed here because eMBMS services continue to be streamed in idle mode (3GPP + // TS 23.246 version 14.1.0 Release 14 section 8) } // Add SRB0 again @@ -390,6 +391,11 @@ void rlc::add_bearer(uint32_t lcid, const rlc_config_t& cnfg) rlc_common* rlc_entity = nullptr; + if (cnfg.rlc_mode != rlc_mode_t::tm and rlc_array.find(lcid) != rlc_array.end()) { + // RLC entity already exists. Recreating it. + rlc_array.erase(lcid); + } + if (not valid_lcid(lcid)) { if (cnfg.rat == srslte_rat_t::lte) { switch (cnfg.rlc_mode) { diff --git a/srsenb/hdr/stack/rrc/rrc.h b/srsenb/hdr/stack/rrc/rrc.h index 14d97c9e0..5c71a10bf 100644 --- a/srsenb/hdr/stack/rrc/rrc.h +++ b/srsenb/hdr/stack/rrc/rrc.h @@ -76,6 +76,14 @@ public: bool setup_ue_ctxt(uint16_t rnti, const asn1::s1ap::init_context_setup_request_s& msg) override; bool modify_ue_ctxt(uint16_t rnti, const asn1::s1ap::ue_context_mod_request_s& msg) override; bool setup_ue_erabs(uint16_t rnti, const asn1::s1ap::erab_setup_request_s& msg) override; + void modify_erabs(uint16_t rnti, + const asn1::s1ap::erab_modify_request_s& msg, + std::vector* erabs_modified, + std::vector* erabs_failed_to_modify) override; + bool modify_ue_erab(uint16_t rnti, + uint8_t erab_id, + const asn1::s1ap::erab_level_qos_params_s& qos_params, + const asn1::unbounded_octstring* nas_pdu); bool release_erabs(uint32_t rnti) override; void release_erabs(uint32_t rnti, const asn1::s1ap::erab_release_cmd_s& msg, diff --git a/srsenb/hdr/stack/rrc/rrc_bearer_cfg.h b/srsenb/hdr/stack/rrc/rrc_bearer_cfg.h index bf4f0041e..b1e62bf49 100644 --- a/srsenb/hdr/stack/rrc/rrc_bearer_cfg.h +++ b/srsenb/hdr/stack/rrc/rrc_bearer_cfg.h @@ -69,6 +69,9 @@ public: const asn1::unbounded_octstring* nas_pdu); bool release_erab(uint8_t erab_id); void release_erabs(); + bool modify_erab(uint8_t erab_id, + const asn1::s1ap::erab_level_qos_params_s& qos, + const asn1::unbounded_octstring* nas_pdu); // Methods to apply bearer updates void add_gtpu_bearer(gtpu_interface_rrc* gtpu, uint32_t erab_id); diff --git a/srsenb/hdr/stack/rrc/rrc_ue.h b/srsenb/hdr/stack/rrc/rrc_ue.h index e832c8dd6..4a20183d3 100644 --- a/srsenb/hdr/stack/rrc/rrc_ue.h +++ b/srsenb/hdr/stack/rrc/rrc_ue.h @@ -67,6 +67,9 @@ public: bool setup_erabs(const asn1::s1ap::erab_to_be_setup_list_bearer_su_req_l& e); bool release_erabs(); bool release_erab(uint32_t erab_id); + bool modify_erab(uint16_t erab_id, + const asn1::s1ap::erab_level_qos_params_s& qos_params, + const asn1::unbounded_octstring* nas_pdu); // handover void handle_ho_preparation_complete(bool is_success, srslte::unique_byte_buffer_t container); diff --git a/srsenb/hdr/stack/upper/s1ap.h b/srsenb/hdr/stack/upper/s1ap.h index f1e295dd4..3e27607b0 100644 --- a/srsenb/hdr/stack/upper/s1ap.h +++ b/srsenb/hdr/stack/upper/s1ap.h @@ -139,6 +139,7 @@ private: bool handle_s1setupfailure(const asn1::s1ap::s1_setup_fail_s& msg); bool handle_erabsetuprequest(const asn1::s1ap::erab_setup_request_s& msg); bool handle_erabreleasecommand(const asn1::s1ap::erab_release_cmd_s& msg); + bool handle_erabmodifyrequest(const asn1::s1ap::erab_modify_request_s& msg); bool handle_uecontextmodifyrequest(const asn1::s1ap::ue_context_mod_request_s& msg); // bool send_ue_capabilities(uint16_t rnti, LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *caps) @@ -192,6 +193,8 @@ private: bool send_erab_setup_response(const asn1::s1ap::erab_setup_resp_s& res_); bool send_erab_release_response(const std::vector& erabs_successfully_released, const std::vector& erabs_failed_to_release); + bool send_erab_modify_response(const std::vector& erabs_successfully_released, + const std::vector& erabs_failed_to_release); bool was_uectxtrelease_requested() const { return release_requested; } ue_ctxt_t ctxt = {}; diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index 64e269d74..94d3514c7 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -333,6 +333,56 @@ void rrc::release_erabs(uint32_t rnti, return; } +void rrc::modify_erabs(uint16_t rnti, + const asn1::s1ap::erab_modify_request_s& msg, + std::vector* erabs_modified, + std::vector* erabs_failed_to_modify) +{ + rrc_log->info("Modifying E-RABs for 0x%x\n", rnti); + auto user_it = users.find(rnti); + + if (user_it == users.end()) { + rrc_log->warning("Unrecognised rnti: 0x%x\n", rnti); + return; + } + + // Iterate over bearers + for (uint32_t i = 0; i < msg.protocol_ies.erab_to_be_modified_list_bearer_mod_req.value.size(); i++) { + const asn1::s1ap::erab_to_be_modified_item_bearer_mod_req_s& erab_to_mod = + msg.protocol_ies.erab_to_be_modified_list_bearer_mod_req.value[i] + .value.erab_to_be_modified_item_bearer_mod_req(); + + uint32_t erab_id = erab_to_mod.erab_id; + asn1::s1ap::erab_level_qos_params_s qos_params = erab_to_mod.erab_level_qos_params; + + bool ret = modify_ue_erab(rnti, erab_id, qos_params, &erab_to_mod.nas_pdu); + if (ret) { + erabs_modified->push_back(erab_to_mod.erab_id); + } else { + erabs_failed_to_modify->push_back(erab_to_mod.erab_id); + } + } + + return; +} + +bool rrc::modify_ue_erab(uint16_t rnti, + uint8_t erab_id, + const asn1::s1ap::erab_level_qos_params_s& qos_params, + const asn1::unbounded_octstring* nas_pdu) +{ + rrc_log->info("Modifying E-RAB for 0x%x. E-RAB Id %d\n", rnti, erab_id); + auto user_it = users.find(rnti); + + if (user_it == users.end()) { + rrc_log->warning("Unrecognised rnti: 0x%x\n", rnti); + return false; + } + + bool ret = user_it->second->modify_erab(erab_id, qos_params, nas_pdu); + return ret; +} + /******************************************************************************* Paging functions These functions use a different mutex because access different shared variables diff --git a/srsenb/src/stack/rrc/rrc_bearer_cfg.cc b/srsenb/src/stack/rrc/rrc_bearer_cfg.cc index ab5778ea7..c569a25c6 100644 --- a/srsenb/src/stack/rrc/rrc_bearer_cfg.cc +++ b/srsenb/src/stack/rrc/rrc_bearer_cfg.cc @@ -285,6 +285,23 @@ void bearer_cfg_handler::release_erabs() } } +bool bearer_cfg_handler::modify_erab(uint8_t erab_id, + const asn1::s1ap::erab_level_qos_params_s& qos, + const asn1::unbounded_octstring* nas_pdu) +{ + log_h->info("Modifying E-RAB %d\n", erab_id); + std::map::iterator erab_it = erabs.find(erab_id); + if (erab_it == erabs.end()) { + log_h->error("Could not find E-RAB to modify\n"); + return false; + } + auto address = erab_it->second.address; + uint32_t teid_out = erab_it->second.teid_out; + release_erab(erab_id); + add_erab(erab_id, qos, address, teid_out, nas_pdu); + return true; +} + void bearer_cfg_handler::add_gtpu_bearer(srsenb::gtpu_interface_rrc* gtpu, uint32_t erab_id) { auto it = erabs.find(erab_id); diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index b95f3c3c7..1df46ea74 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -838,6 +838,17 @@ bool rrc::ue::release_erab(uint32_t erab_id) return bearer_list.release_erab(erab_id); } +bool rrc::ue::modify_erab(uint16_t erab_id, + const asn1::s1ap::erab_level_qos_params_s& qos_params, + const asn1::unbounded_octstring* nas_pdu) +{ + bool ret = bearer_list.modify_erab(erab_id, qos_params, nas_pdu); + if (ret) { + send_connection_reconf(nullptr, false); + } + return ret; +} + void rrc::ue::notify_s1ap_ue_erab_setup_response(const asn1::s1ap::erab_to_be_setup_list_bearer_su_req_l& e) { asn1::s1ap::erab_setup_resp_s res; diff --git a/srsenb/src/stack/rrc/ue_rr_cfg.cc b/srsenb/src/stack/rrc/ue_rr_cfg.cc index d561e2a47..e6f408db1 100644 --- a/srsenb/src/stack/rrc/ue_rr_cfg.cc +++ b/srsenb/src/stack/rrc/ue_rr_cfg.cc @@ -127,9 +127,7 @@ void fill_cqi_report_enb_cfg(cqi_report_cfg_s& cqi_report_cfg, const rrc_cfg_t& cqi_report_cfg.nom_pdsch_rs_epre_offset = 0; } -int fill_cqi_report_setup(cqi_report_cfg_s& cqi_rep, - const rrc_cfg_t& enb_cfg, - const ue_cell_ded_list& ue_cell_list) +int fill_cqi_report_setup(cqi_report_cfg_s& cqi_rep, const rrc_cfg_t& enb_cfg, const ue_cell_ded_list& ue_cell_list) { // eNB params set at this point @@ -148,9 +146,7 @@ int fill_cqi_report_setup(cqi_report_cfg_s& cqi_rep, return SRSLTE_SUCCESS; } -void fill_cqi_report_reconf(cqi_report_cfg_s& cqi_rep, - const rrc_cfg_t& enb_cfg, - const ue_cell_ded_list& ue_cell_list) +void fill_cqi_report_reconf(cqi_report_cfg_s& cqi_rep, const rrc_cfg_t& enb_cfg, const ue_cell_ded_list& ue_cell_list) { // Get RRC setup CQI config if (fill_cqi_report_setup(cqi_rep, enb_cfg, ue_cell_list) == SRSLTE_ERROR) { @@ -229,9 +225,7 @@ void fill_phy_cfg_ded_enb_cfg(phys_cfg_ded_s& phy_cfg, const rrc_cfg_t& enb_cfg) fill_cqi_report_enb_cfg(phy_cfg.cqi_report_cfg, enb_cfg); } -void fill_phy_cfg_ded_setup(phys_cfg_ded_s& phy_cfg, - const rrc_cfg_t& enb_cfg, - const ue_cell_ded_list& ue_cell_list) +void fill_phy_cfg_ded_setup(phys_cfg_ded_s& phy_cfg, const rrc_cfg_t& enb_cfg, const ue_cell_ded_list& ue_cell_list) { // Set PHYConfigDedicated base fill_phy_cfg_ded_enb_cfg(phy_cfg, enb_cfg); @@ -246,7 +240,7 @@ void fill_phy_cfg_ded_setup(phys_cfg_ded_s& phy_cfg, /// Fills ASN1 PhysicalConfigurationDedicated struct with eNB config params at RRCReconf void fill_phy_cfg_ded_reconf(phys_cfg_ded_s& phy_cfg, const rrc_cfg_t& enb_cfg, - const ue_cell_ded_list& ue_cell_list, + const ue_cell_ded_list& ue_cell_list, const srslte::rrc_ue_capabilities_t& ue_caps) { // Use RRCSetup as starting point @@ -296,9 +290,9 @@ void fill_rr_cfg_ded_enb_cfg(asn1::rrc::rr_cfg_ded_s& rr_cfg, const rrc_cfg_t& e rr_cfg.sps_cfg_present = false; } -void fill_rr_cfg_ded_setup(asn1::rrc::rr_cfg_ded_s& rr_cfg, - const rrc_cfg_t& enb_cfg, - const ue_cell_ded_list& ue_cell_list) +void fill_rr_cfg_ded_setup(asn1::rrc::rr_cfg_ded_s& rr_cfg, + const rrc_cfg_t& enb_cfg, + const ue_cell_ded_list& ue_cell_list) { // Establish default enb config fill_rr_cfg_ded_enb_cfg(rr_cfg, enb_cfg); @@ -315,7 +309,7 @@ void fill_rr_cfg_ded_setup(asn1::rrc::rr_cfg_ded_s& rr_cfg, void fill_rr_cfg_ded_reconf(asn1::rrc::rr_cfg_ded_s& rr_cfg, const rr_cfg_ded_s& current_rr_cfg, const rrc_cfg_t& enb_cfg, - const ue_cell_ded_list& ue_cell_list, + const ue_cell_ded_list& ue_cell_list, const bearer_cfg_handler& bearers, const srslte::rrc_ue_capabilities_t& ue_caps, bool phy_cfg_updated) @@ -389,7 +383,7 @@ void apply_rr_cfg_ded_diff(rr_cfg_ded_s& current_rr_cfg_ded, const rr_cfg_ded_s& void fill_scells_reconf(asn1::rrc::rrc_conn_recfg_r8_ies_s& recfg_r8, const scell_to_add_mod_list_r10_l& current_scells, const rrc_cfg_t& enb_cfg, - const ue_cell_ded_list& ue_cell_list, + const ue_cell_ded_list& ue_cell_list, const srslte::rrc_ue_capabilities_t& ue_caps) { // check whether there has been scell updates @@ -411,10 +405,10 @@ void fill_scells_reconf(asn1::rrc::rrc_conn_recfg_r8_ies_s& recfg_r8, scell_to_add_mod_list_r10_l target_scells(ue_cell_list.nof_cells() - 1); for (size_t ue_cc_idx = 1; ue_cc_idx < ue_cell_list.nof_cells(); ++ue_cc_idx) { - const ue_cell_ded& scell = *ue_cell_list.get_ue_cc_idx(ue_cc_idx); - const enb_cell_common& scell_cfg = *scell.cell_common; - const sib_type1_s& cell_sib1 = scell_cfg.sib1; - const sib_type2_s& cell_sib2 = scell_cfg.sib2; + const ue_cell_ded& scell = *ue_cell_list.get_ue_cc_idx(ue_cc_idx); + const enb_cell_common& scell_cfg = *scell.cell_common; + const sib_type1_s& cell_sib1 = scell_cfg.sib1; + const sib_type2_s& cell_sib2 = scell_cfg.sib2; scell_to_add_mod_r10_s& asn1cell = target_scells[ue_cc_idx - 1]; asn1cell.scell_idx_r10 = ue_cc_idx; @@ -563,7 +557,7 @@ void apply_scells_to_add_diff(asn1::rrc::scell_to_add_mod_list_r10_l& current_sc void apply_reconf_updates(asn1::rrc::rrc_conn_recfg_r8_ies_s& recfg_r8, ue_var_cfg_t& current_ue_cfg, const rrc_cfg_t& enb_cfg, - const ue_cell_ded_list& ue_cell_list, + const ue_cell_ded_list& ue_cell_list, bearer_cfg_handler& bearers, const srslte::rrc_ue_capabilities_t& ue_caps, bool phy_cfg_updated) diff --git a/srsenb/src/stack/upper/s1ap.cc b/srsenb/src/stack/upper/s1ap.cc index 1ee11e5ae..1c088898e 100644 --- a/srsenb/src/stack/upper/s1ap.cc +++ b/srsenb/src/stack/upper/s1ap.cc @@ -569,6 +569,8 @@ bool s1ap::handle_initiatingmessage(const init_msg_s& msg) return handle_erabsetuprequest(msg.value.erab_setup_request()); case s1ap_elem_procs_o::init_msg_c::types_opts::erab_release_cmd: return handle_erabreleasecommand(msg.value.erab_release_cmd()); + case s1ap_elem_procs_o::init_msg_c::types_opts::erab_modify_request: + return handle_erabmodifyrequest(msg.value.erab_modify_request()); case s1ap_elem_procs_o::init_msg_c::types_opts::ue_context_mod_request: return handle_uecontextmodifyrequest(msg.value.ue_context_mod_request()); case s1ap_elem_procs_o::init_msg_c::types_opts::ho_request: @@ -707,9 +709,12 @@ bool s1ap::handle_erabsetuprequest(const erab_setup_request_s& msg) return rrc->setup_ue_erabs(u->ctxt.rnti, msg); } -bool s1ap::handle_erabreleasecommand(const erab_release_cmd_s& msg) +bool s1ap::handle_erabmodifyrequest(const erab_modify_request_s& msg) { - s1ap_log->info("Received ERABReleaseCommand\n"); + s1ap_log->info("Received ERABModifyRequest\n"); + std::vector erab_successful_modified = {}; + std::vector erab_failed_to_modify = {}; + if (msg.ext) { s1ap_log->warning("Not handling S1AP message extension\n"); } @@ -718,9 +723,32 @@ bool s1ap::handle_erabreleasecommand(const erab_release_cmd_s& msg) return false; } + // Modify E-RABs from RRC + rrc->modify_erabs(u->ctxt.rnti, msg, &erab_successful_modified, &erab_failed_to_modify); + + // Send E-RAB modify response back to the MME + if (not u->send_erab_modify_response(erab_successful_modified, erab_failed_to_modify)) { + s1ap_log->info("Failed to send ERABReleaseResponse\n"); + return false; + } + + return true; +} + +bool s1ap::handle_erabreleasecommand(const erab_release_cmd_s& msg) +{ + s1ap_log->info("Received ERABReleaseCommand\n"); std::vector erab_successful_release = {}; std::vector erab_failed_to_release = {}; + if (msg.ext) { + s1ap_log->warning("Not handling S1AP message extension\n"); + } + ue* u = find_s1apmsg_user(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + if (u == nullptr) { + return false; + } + // Release E-RABs from RRC rrc->release_erabs(u->ctxt.rnti, msg, &erab_successful_release, &erab_failed_to_release); @@ -1279,6 +1307,47 @@ bool s1ap::ue::send_erab_release_response(const std::vector& erabs_suc return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "E_RABReleaseResponse"); } + +bool s1ap::ue::send_erab_modify_response(const std::vector& erabs_successfully_modified, + const std::vector& erabs_failed_to_modify) +{ + if (not s1ap_ptr->mme_connected) { + return false; + } + + asn1::s1ap::s1ap_pdu_c tx_pdu; + tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_ERAB_MODIFY); + + auto& container = tx_pdu.successful_outcome().value.erab_modify_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; + + // Fill in which E-RABs were successfully released + if (not erabs_successfully_modified.empty()) { + container.erab_modify_list_bearer_mod_res_present = true; + container.erab_modify_list_bearer_mod_res.value.resize(erabs_successfully_modified.size()); + for (uint32_t i = 0; i < container.erab_modify_list_bearer_mod_res.value.size(); i++) { + container.erab_modify_list_bearer_mod_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_MODIFY_ITEM_BEARER_MOD_RES); + container.erab_modify_list_bearer_mod_res.value[i].value.erab_modify_item_bearer_mod_res().erab_id = + erabs_successfully_modified[i]; + } + } + + // Fill in which E-RABs were *not* successfully released + if (not erabs_failed_to_modify.empty()) { + container.erab_failed_to_modify_list_present = true; + container.erab_failed_to_modify_list.value.resize(erabs_failed_to_modify.size()); + for (uint32_t i = 0; i < container.erab_failed_to_modify_list.value.size(); i++) { + container.erab_failed_to_modify_list.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_ITEM); + container.erab_failed_to_modify_list.value[i].value.erab_item().erab_id = erabs_failed_to_modify[i]; + container.erab_failed_to_modify_list.value[i].value.erab_item().cause.set(asn1::s1ap::cause_c::types::misc); + container.erab_failed_to_modify_list.value[i].value.erab_item().cause.misc() = + asn1::s1ap::cause_misc_opts::unspecified; + } + } + + return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "E_RABReleaseResponse"); +} /********************* * Handover Messages ********************/ diff --git a/srsepc/hdr/mme/s1ap.h b/srsepc/hdr/mme/s1ap.h index c458d8e1f..08363d8ef 100644 --- a/srsepc/hdr/mme/s1ap.h +++ b/srsepc/hdr/mme/s1ap.h @@ -106,6 +106,11 @@ public: uint32_t mme_ue_s1ap_id, std::vector erabs_to_release, struct sctp_sndrcvinfo enb_sri); + virtual bool send_erab_modify_request(uint32_t enb_ue_s1ap_id, + uint32_t mme_ue_s1ap_id, + std::map erabs_to_be_modified, + srslte::byte_buffer_t* nas_msg, + struct sctp_sndrcvinfo enb_sri); virtual bool send_downlink_nas_transport(uint32_t enb_ue_s1ap_id, uint32_t mme_ue_s1ap_id, srslte::byte_buffer_t* nas_msg, diff --git a/srsepc/hdr/mme/s1ap_erab_mngmt_proc.h b/srsepc/hdr/mme/s1ap_erab_mngmt_proc.h index 9541ca083..10ba7ef2e 100644 --- a/srsepc/hdr/mme/s1ap_erab_mngmt_proc.h +++ b/srsepc/hdr/mme/s1ap_erab_mngmt_proc.h @@ -37,6 +37,11 @@ public: uint32_t mme_ue_s1ap_id, std::vector erabs_to_release, struct sctp_sndrcvinfo enb_sri); + bool send_erab_modify_request(uint32_t enb_ue_s1ap_id, + uint32_t mme_ue_s1ap_id, + std::map erabs_to_modify, + srslte::byte_buffer_t* nas_msg, + struct sctp_sndrcvinfo enb_sri); bool handle_erab_release_response(const asn1::s1ap::init_context_setup_resp_s& in_ctxt_resp); private: diff --git a/srsepc/src/mme/s1ap.cc b/srsepc/src/mme/s1ap.cc index d4ff52323..42d807033 100644 --- a/srsepc/src/mme/s1ap.cc +++ b/srsepc/src/mme/s1ap.cc @@ -630,6 +630,16 @@ bool s1ap::send_erab_release_command(uint32_t enb_ue_s1ap_id, enb_ue_s1ap_id, mme_ue_s1ap_id, erabs_to_be_released, enb_sri); } +bool s1ap::send_erab_modify_request(uint32_t enb_ue_s1ap_id, + uint32_t mme_ue_s1ap_id, + std::map erabs_to_be_modified, + srslte::byte_buffer_t* nas_msg, + struct sctp_sndrcvinfo enb_sri) +{ + return m_s1ap_erab_mngmt_proc->send_erab_modify_request( + enb_ue_s1ap_id, mme_ue_s1ap_id, erabs_to_be_modified, nas_msg, enb_sri); +} + bool s1ap::send_downlink_nas_transport(uint32_t enb_ue_s1ap_id, uint32_t mme_ue_s1ap_id, srslte::byte_buffer_t* nas_msg, diff --git a/srsepc/src/mme/s1ap_erab_mngmt_proc.cc b/srsepc/src/mme/s1ap_erab_mngmt_proc.cc index c32aa8836..01d282d43 100644 --- a/srsepc/src/mme/s1ap_erab_mngmt_proc.cc +++ b/srsepc/src/mme/s1ap_erab_mngmt_proc.cc @@ -96,4 +96,51 @@ bool s1ap_erab_mngmt_proc::send_erab_release_command(uint32_t enb_ return true; } +bool s1ap_erab_mngmt_proc::send_erab_modify_request(uint32_t enb_ue_s1ap_id, + uint32_t mme_ue_s1ap_id, + std::map erabs_to_modify, + srslte::byte_buffer_t* nas_msg, + struct sctp_sndrcvinfo enb_sri) +{ + m_s1ap_log->info("Preparing to send E-RAB Modify Command\n"); + + // Prepare reply PDU + s1ap_pdu_t tx_pdu; + tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ERAB_MODIFY); + + asn1::s1ap::erab_modify_request_ies_container& erab_mod_req = + tx_pdu.init_msg().value.erab_modify_request().protocol_ies; + + // Add MME and eNB S1AP Ids + erab_mod_req.enb_ue_s1ap_id.value = enb_ue_s1ap_id; + erab_mod_req.mme_ue_s1ap_id.value = mme_ue_s1ap_id; + + // Number of E-RABs to be setup + erab_mod_req.erab_to_be_modified_list_bearer_mod_req.value.resize(erabs_to_modify.size()); + uint32_t i = 0; + for (auto erab_it = erabs_to_modify.begin(); erab_it != erabs_to_modify.end(); erab_it++) { + erab_mod_req.erab_to_be_modified_list_bearer_mod_req.value[i].load_info_obj( + ASN1_S1AP_ID_ERAB_TO_BE_MODIFIED_ITEM_BEARER_MOD_REQ); + asn1::s1ap::erab_to_be_modified_item_bearer_mod_req_s& erab_to_mod = + erab_mod_req.erab_to_be_modified_list_bearer_mod_req.value[i].value.erab_to_be_modified_item_bearer_mod_req(); + erab_to_mod.erab_id = erab_it->first; + erab_to_mod.erab_level_qos_params.qci = erab_it->second; + erab_to_mod.erab_level_qos_params.alloc_retention_prio.prio_level = 15; // lowest + erab_to_mod.erab_level_qos_params.alloc_retention_prio.pre_emption_cap = + asn1::s1ap::pre_emption_cap_opts::shall_not_trigger_pre_emption; + erab_to_mod.erab_level_qos_params.alloc_retention_prio.pre_emption_vulnerability = + asn1::s1ap::pre_emption_vulnerability_opts::not_pre_emptable; + erab_to_mod.nas_pdu.resize(nas_msg->N_bytes); + memcpy(erab_to_mod.nas_pdu.data(), nas_msg->msg, nas_msg->N_bytes); + m_s1ap_log->info("Sending release comman to E-RAB Id %d\n", erab_it->first); + i++; + } + + if (!m_s1ap->s1ap_tx_pdu(tx_pdu, &enb_sri)) { + m_s1ap_log->error("Error sending Initial Context Setup Request.\n"); + return false; + } + return true; +} + } // namespace srsepc From 0ad0e9acac2fe3a3d10e4a4658984708d005e932 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Thu, 17 Dec 2020 20:24:34 +0000 Subject: [PATCH 50/59] Make sure that RLC entity is only re-created if it switches modes. --- lib/src/upper/rlc.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/upper/rlc.cc b/lib/src/upper/rlc.cc index 188cb94b0..e7a6890d4 100644 --- a/lib/src/upper/rlc.cc +++ b/lib/src/upper/rlc.cc @@ -392,8 +392,10 @@ void rlc::add_bearer(uint32_t lcid, const rlc_config_t& cnfg) rlc_common* rlc_entity = nullptr; if (cnfg.rlc_mode != rlc_mode_t::tm and rlc_array.find(lcid) != rlc_array.end()) { - // RLC entity already exists. Recreating it. - rlc_array.erase(lcid); + if (rlc_array[lcid]->get_mode() != cnfg.rlc_mode) { + rlc_log->info("Switching RLC entity type. Recreating it.\n"); + rlc_array.erase(lcid); + } } if (not valid_lcid(lcid)) { From c5514d7f803c521a0df4186af5672819270e36ed Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 18 Dec 2020 11:19:43 +0100 Subject: [PATCH 51/59] pdu: fix to_string() for TA command the get_ta_cmd() is returning uint8_t which stringstream interprets as ASCII character by default. So the log message is bogus. --- lib/src/mac/pdu.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/mac/pdu.cc b/lib/src/mac/pdu.cc index b31e5ac0e..8ff97ea3f 100644 --- a/lib/src/mac/pdu.cc +++ b/lib/src/mac/pdu.cc @@ -956,7 +956,7 @@ std::string sch_subh::to_string() ss << "CON_RES: id=0x" << std::hex << get_con_res_id() << std::dec; break; case dl_sch_lcid::TA_CMD: - ss << "TA: ta=" << get_ta_cmd(); + ss << "TA: ta=" << std::to_string(get_ta_cmd()); break; case dl_sch_lcid::SCELL_ACTIVATION_4_OCTET: case dl_sch_lcid::SCELL_ACTIVATION: From d5daf60773e3e47ed8b4806e76b1214e69d4a06f Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 18 Dec 2020 11:21:36 +0100 Subject: [PATCH 52/59] pdu_test: add unpacking test for DL-SCH PDU containing TA command --- lib/test/mac/pdu_test.cc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/test/mac/pdu_test.cc b/lib/test/mac/pdu_test.cc index a2b2bad7a..f7f348363 100644 --- a/lib/test/mac/pdu_test.cc +++ b/lib/test/mac/pdu_test.cc @@ -984,6 +984,31 @@ int mac_sch_pdu_unpack_test2() return SRSLTE_SUCCESS; } +// Unpacking of PDU containing Timing Advance (TA) CE +int mac_sch_pdu_unpack_test3() +{ + static uint8_t tv[] = {0x3d, 0x1f, 0x1f, 0x00}; + + srslte::sch_pdu pdu(20, srslte::log_ref{"MAC"}); + pdu.init_rx(sizeof(tv), false); + pdu.parse_packet(tv); + + TESTASSERT(pdu.nof_subh() == 2); + while (pdu.next()) { + if (!pdu.get()->is_sdu() && pdu.get()->dl_sch_ce_type() == srslte::dl_sch_lcid::TA_CMD) { + TESTASSERT(pdu.get()->get_ta_cmd() == 31); + } + } + + std::cout << pdu.to_string() << std::endl; + +#if HAVE_PCAP + pcap_handle->write_dl_crnti(tv, sizeof(tv), 0x1001, true, 1, 0); +#endif + + return SRSLTE_SUCCESS; +} + int mac_slsch_pdu_unpack_test1() { // SL-SCH PDU captures from UXM 5G CV2X @@ -1040,6 +1065,7 @@ int main(int argc, char** argv) TESTASSERT(mac_sch_pdu_unpack_test1() == SRSLTE_SUCCESS); TESTASSERT(mac_sch_pdu_unpack_test2() == SRSLTE_SUCCESS); + TESTASSERT(mac_sch_pdu_unpack_test3() == SRSLTE_SUCCESS); TESTASSERT(mac_slsch_pdu_unpack_test1() == SRSLTE_SUCCESS); From 66aa34d173f09f1c6f1329abf5728a345d7a9aa0 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 17 Dec 2020 18:12:40 +0000 Subject: [PATCH 53/59] update RRC NR ASN1 to 2020-09 v15.11 --- lib/include/srslte/asn1/rrc_nr.h | 28487 +++++++------- lib/src/asn1/rrc_nr.cc | 57163 ++++++++++++++++------------- lib/test/asn1/CMakeLists.txt | 4 + lib/test/asn1/rrc_nr_test.cc | 154 + srsenb/src/stack/rrc/rrc_nr.cc | 4 +- 5 files changed, 45894 insertions(+), 39918 deletions(-) create mode 100644 lib/test/asn1/rrc_nr_test.cc diff --git a/lib/include/srslte/asn1/rrc_nr.h b/lib/include/srslte/asn1/rrc_nr.h index 9fe07451e..b71ea9f06 100644 --- a/lib/include/srslte/asn1/rrc_nr.h +++ b/lib/include/srslte/asn1/rrc_nr.h @@ -12,7 +12,7 @@ /******************************************************************************* * - * 3GPP TS ASN1 RRC NR v15.5.0 (2019-03) + * 3GPP TS ASN1 RRC NR v15.11.0 (2020-10) * ******************************************************************************/ @@ -143,7 +143,6 @@ namespace rrc_nr { #define ASN1_RRC_NR_MAX_DRB 29 #define ASN1_RRC_NR_MAX_FREQ 8 #define ASN1_RRC_NR_MAX_FREQ_IDC_MRDC 32 -#define ASN1_RRC_NR_MAX_NROF_CSI_RS 64 #define ASN1_RRC_NR_MAX_NROF_CANDIDATE_BEAMS 16 #define ASN1_RRC_NR_MAX_NROF_PCIS_PER_SMTC 64 #define ASN1_RRC_NR_MAX_NROF_QFIS 64 @@ -153,7 +152,6 @@ namespace rrc_nr { #define ASN1_RRC_NR_MAX_NROF_SPATIAL_RELATION_INFOS 8 #define ASN1_RRC_NR_MAX_NROF_IDXES_TO_REPORT 32 #define ASN1_RRC_NR_MAX_NROF_IDXES_TO_REPORT2 64 -#define ASN1_RRC_NR_MAX_NROF_SSBS 64 #define ASN1_RRC_NR_MAX_NROF_SSBS_MINUS1 63 #define ASN1_RRC_NR_MAX_NROF_S_NSSAI 8 #define ASN1_RRC_NR_MAX_NROF_TCI_STATES_PDCCH 64 @@ -434,7 +432,7 @@ struct eutra_freq_neigh_cell_info_s { bool q_rx_lev_min_offset_cell_present = false; bool q_qual_min_offset_cell_present = false; uint16_t pci = 0; - eutra_q_offset_range_e q_offset_cell; + eutra_q_offset_range_e dummy; uint8_t q_rx_lev_min_offset_cell = 1; uint8_t q_qual_min_offset_cell = 1; @@ -2371,8 +2369,8 @@ struct scs_specific_carrier_s { uint16_t carrier_bw = 1; // ... // group 0 - bool tx_direct_current_location_v1530_present = false; - uint16_t tx_direct_current_location_v1530 = 0; + bool tx_direct_current_location_present = false; + uint16_t tx_direct_current_location = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -3999,7 +3997,7 @@ struct sib1_s { struct sys_info_s { struct crit_exts_c_ { struct types_opts { - enum options { sys_info_r15, crit_exts_future, nulltype } value; + enum options { sys_info, crit_exts_future, nulltype } value; std::string to_string() const; }; @@ -4016,19 +4014,19 @@ struct sys_info_s { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - sys_info_ies_s& sys_info_r15() + sys_info_ies_s& sys_info() { - assert_choice_type("systemInformation-r15", type_.to_string(), "criticalExtensions"); + assert_choice_type("systemInformation", type_.to_string(), "criticalExtensions"); return c.get(); } - const sys_info_ies_s& sys_info_r15() const + const sys_info_ies_s& sys_info() const { - assert_choice_type("systemInformation-r15", type_.to_string(), "criticalExtensions"); + assert_choice_type("systemInformation", type_.to_string(), "criticalExtensions"); return c.get(); } - sys_info_ies_s& set_sys_info_r15() + sys_info_ies_s& set_sys_info() { - set(types::sys_info_r15); + set(types::sys_info); return c.get(); } @@ -4161,167 +4159,315 @@ struct bcch_dl_sch_msg_s { void to_json(json_writer& j) const; }; -// Alpha ::= ENUMERATED -struct alpha_opts { - enum options { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, nulltype } value; - typedef float number_type; +// UL-DataSplitThreshold ::= ENUMERATED +struct ul_data_split_thres_opts { + enum 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, + nulltype + } value; + typedef int32_t number_type; std::string to_string() const; - float to_number() const; - std::string to_number_string() const; -}; -typedef enumerated alpha_e; - -// BFR-CSIRS-Resource ::= SEQUENCE -struct bfr_csirs_res_s { - using ra_occasion_list_l_ = dyn_array; - - // member variables - bool ext = false; - bool ra_occasion_list_present = false; - bool ra_preamb_idx_present = false; - uint8_t csi_rs = 0; - ra_occasion_list_l_ ra_occasion_list; - uint8_t ra_preamb_idx = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BFR-SSB-Resource ::= SEQUENCE -struct bfr_ssb_res_s { - bool ext = false; - uint8_t ssb = 0; - uint8_t ra_preamb_idx = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BetaOffsets ::= SEQUENCE -struct beta_offsets_s { - bool beta_offset_ack_idx1_present = false; - bool beta_offset_ack_idx2_present = false; - bool beta_offset_ack_idx3_present = false; - bool beta_offset_csi_part1_idx1_present = false; - bool beta_offset_csi_part1_idx2_present = false; - bool beta_offset_csi_part2_idx1_present = false; - bool beta_offset_csi_part2_idx2_present = false; - uint8_t beta_offset_ack_idx1 = 0; - uint8_t beta_offset_ack_idx2 = 0; - uint8_t beta_offset_ack_idx3 = 0; - uint8_t beta_offset_csi_part1_idx1 = 0; - uint8_t beta_offset_csi_part1_idx2 = 0; - uint8_t beta_offset_csi_part2_idx1 = 0; - uint8_t beta_offset_csi_part2_idx2 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + int32_t to_number() const; }; +typedef enumerated ul_data_split_thres_e; -// CSI-FrequencyOccupation ::= SEQUENCE -struct csi_freq_occupation_s { - bool ext = false; - uint16_t start_rb = 0; - uint16_t nrof_rbs = 24; - // ... +// CipheringAlgorithm ::= ENUMERATED +struct ciphering_algorithm_opts { + enum options { nea0, nea1, nea2, nea3, spare4, spare3, spare2, spare1, /*...*/ nulltype } value; + typedef uint8_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + std::string to_string() const; + uint8_t to_number() const; }; +typedef enumerated ciphering_algorithm_e; -// P0-PUCCH ::= SEQUENCE -struct p0_pucch_s { - uint8_t p0_pucch_id = 1; - int8_t p0_pucch_value = -16; +// IntegrityProtAlgorithm ::= ENUMERATED +struct integrity_prot_algorithm_opts { + enum options { nia0, nia1, nia2, nia3, spare4, spare3, spare2, spare1, /*...*/ nulltype } value; + typedef uint8_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + std::string to_string() const; + uint8_t to_number() const; }; +typedef enumerated integrity_prot_algorithm_e; -// P0-PUSCH-AlphaSet ::= SEQUENCE -struct p0_pusch_alpha_set_s { - bool p0_present = false; - bool alpha_present = false; - uint8_t p0_pusch_alpha_set_id = 0; - int8_t p0 = -16; - alpha_e alpha; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// PDCP-Config ::= SEQUENCE +struct pdcp_cfg_s { + struct drb_s_ { + struct discard_timer_opts { + enum options { + ms10, + ms20, + ms30, + ms40, + ms50, + ms60, + ms75, + ms100, + ms150, + ms200, + ms250, + ms300, + ms500, + ms750, + ms1500, + infinity, + nulltype + } value; + typedef int16_t number_type; -// PTRS-UplinkConfig ::= SEQUENCE -struct ptrs_ul_cfg_s { - struct transform_precoder_disabled_s_ { - using freq_density_l_ = std::array; - using time_density_l_ = std::array; - struct max_nrof_ports_opts { - enum options { n1, n2, nulltype } value; + std::string to_string() const; + int16_t to_number() const; + }; + typedef enumerated discard_timer_e_; + struct pdcp_sn_size_ul_opts { + enum options { len12bits, len18bits, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated max_nrof_ports_e_; - struct res_elem_offset_opts { - enum options { offset01, offset10, offset11, nulltype } value; - typedef float number_type; + typedef enumerated pdcp_sn_size_ul_e_; + struct pdcp_sn_size_dl_opts { + enum options { len12bits, len18bits, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; - float to_number() const; - std::string to_number_string() const; + uint8_t to_number() const; }; - typedef enumerated res_elem_offset_e_; - struct ptrs_pwr_opts { - enum options { p00, p01, p10, p11, nulltype } value; - typedef float number_type; + typedef enumerated pdcp_sn_size_dl_e_; + struct hdr_compress_c_ { + struct rohc_s_ { + struct profiles_s_ { + bool profile0x0001 = false; + bool profile0x0002 = false; + bool profile0x0003 = false; + bool profile0x0004 = false; + bool profile0x0006 = false; + bool profile0x0101 = false; + bool profile0x0102 = false; + bool profile0x0103 = false; + bool profile0x0104 = false; + }; - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated ptrs_pwr_e_; + // member variables + bool max_cid_present = false; + bool drb_continue_rohc_present = false; + uint16_t max_cid = 1; + profiles_s_ profiles; + }; + struct ul_only_rohc_s_ { + struct profiles_s_ { + bool profile0x0006 = false; + }; - // member variables - bool freq_density_present = false; - bool time_density_present = false; - bool res_elem_offset_present = false; - freq_density_l_ freq_density; - time_density_l_ time_density; - max_nrof_ports_e_ max_nrof_ports; - res_elem_offset_e_ res_elem_offset; - ptrs_pwr_e_ ptrs_pwr; - }; - struct transform_precoder_enabled_s_ { - using sample_density_l_ = std::array; + // member variables + bool max_cid_present = false; + bool drb_continue_rohc_present = false; + uint16_t max_cid = 1; + profiles_s_ profiles; + }; + struct types_opts { + enum options { not_used, rohc, ul_only_rohc, /*...*/ nulltype } value; - // member variables - bool time_density_transform_precoding_present = false; - sample_density_l_ sample_density; - }; + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + hdr_compress_c_() = default; + hdr_compress_c_(const hdr_compress_c_& other); + hdr_compress_c_& operator=(const hdr_compress_c_& other); + ~hdr_compress_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 + rohc_s_& rohc() + { + assert_choice_type("rohc", type_.to_string(), "headerCompression"); + return c.get(); + } + ul_only_rohc_s_& ul_only_rohc() + { + assert_choice_type("uplinkOnlyROHC", type_.to_string(), "headerCompression"); + return c.get(); + } + const rohc_s_& rohc() const + { + assert_choice_type("rohc", type_.to_string(), "headerCompression"); + return c.get(); + } + const ul_only_rohc_s_& ul_only_rohc() const + { + assert_choice_type("uplinkOnlyROHC", type_.to_string(), "headerCompression"); + return c.get(); + } + rohc_s_& set_rohc() + { + set(types::rohc); + return c.get(); + } + ul_only_rohc_s_& set_ul_only_rohc() + { + set(types::ul_only_rohc); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool discard_timer_present = false; + bool pdcp_sn_size_ul_present = false; + bool pdcp_sn_size_dl_present = false; + bool integrity_protection_present = false; + bool status_report_required_present = false; + bool out_of_order_delivery_present = false; + discard_timer_e_ discard_timer; + pdcp_sn_size_ul_e_ pdcp_sn_size_ul; + pdcp_sn_size_dl_e_ pdcp_sn_size_dl; + hdr_compress_c_ hdr_compress; + }; + struct more_than_one_rlc_s_ { + struct primary_path_s_ { + bool cell_group_present = false; + bool lc_ch_present = false; + uint8_t cell_group = 0; + uint8_t lc_ch = 1; + }; + + // member variables + bool ul_data_split_thres_present = false; + bool pdcp_dupl_present = false; + primary_path_s_ primary_path; + ul_data_split_thres_e ul_data_split_thres; + bool pdcp_dupl = false; + }; + struct t_reordering_opts { + enum 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, + ms1750, + ms2000, + ms2250, + ms2500, + ms2750, + ms3000, + spare28, + spare27, + spare26, + spare25, + spare24, + spare23, + spare22, + spare21, + spare20, + spare19, + spare18, + spare17, + spare16, + spare15, + spare14, + spare13, + spare12, + spare11, + spare10, + spare09, + spare08, + spare07, + spare06, + spare05, + spare04, + spare03, + spare02, + spare01, + nulltype + } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated t_reordering_e_; // member variables - bool ext = false; - bool transform_precoder_disabled_present = false; - bool transform_precoder_enabled_present = false; - transform_precoder_disabled_s_ transform_precoder_disabled; - transform_precoder_enabled_s_ transform_precoder_enabled; + bool ext = false; + bool drb_present = false; + bool more_than_one_rlc_present = false; + bool t_reordering_present = false; + drb_s_ drb; + more_than_one_rlc_s_ more_than_one_rlc; + t_reordering_e_ t_reordering; // ... + // group 0 + bool ciphering_disabled_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4329,79 +4475,110 @@ struct ptrs_ul_cfg_s { void to_json(json_writer& j) const; }; -// PUCCH-MaxCodeRate ::= ENUMERATED -struct pucch_max_code_rate_opts { - enum options { zero_dot08, zero_dot15, zero_dot25, zero_dot35, zero_dot45, zero_dot60, zero_dot80, nulltype } value; - typedef float number_type; +// SDAP-Config ::= SEQUENCE +struct sdap_cfg_s { + struct sdap_hdr_dl_opts { + enum options { present, absent, nulltype } value; - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; + std::string to_string() const; + }; + typedef enumerated sdap_hdr_dl_e_; + struct sdap_hdr_ul_opts { + enum options { present, absent, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated sdap_hdr_ul_e_; + using mapped_qos_flows_to_add_l_ = dyn_array; + using mapped_qos_flows_to_release_l_ = dyn_array; + + // member variables + bool ext = false; + bool mapped_qos_flows_to_add_present = false; + bool mapped_qos_flows_to_release_present = false; + uint16_t pdu_session = 0; + sdap_hdr_dl_e_ sdap_hdr_dl; + sdap_hdr_ul_e_ sdap_hdr_ul; + bool default_drb = false; + mapped_qos_flows_to_add_l_ mapped_qos_flows_to_add; + mapped_qos_flows_to_release_l_ mapped_qos_flows_to_release; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated pucch_max_code_rate_e; -// PUCCH-PathlossReferenceRS ::= SEQUENCE -struct pucch_pathloss_ref_rs_s { - struct ref_sig_c_ { +// DRB-ToAddMod ::= SEQUENCE +struct drb_to_add_mod_s { + struct cn_assoc_c_ { struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; + enum options { eps_bearer_id, sdap_cfg, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - ref_sig_c_() = default; - ref_sig_c_(const ref_sig_c_& other); - ref_sig_c_& operator=(const ref_sig_c_& other); - ~ref_sig_c_() { destroy_(); } + cn_assoc_c_() = default; + cn_assoc_c_(const cn_assoc_c_& other); + cn_assoc_c_& operator=(const cn_assoc_c_& other); + ~cn_assoc_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 - uint8_t& ssb_idx() + uint8_t& eps_bearer_id() { - assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + assert_choice_type("eps-BearerIdentity", type_.to_string(), "cnAssociation"); return c.get(); } - uint8_t& csi_rs_idx() + sdap_cfg_s& sdap_cfg() { - assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); - return c.get(); + assert_choice_type("sdap-Config", type_.to_string(), "cnAssociation"); + return c.get(); } - const uint8_t& ssb_idx() const + const uint8_t& eps_bearer_id() const { - assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + assert_choice_type("eps-BearerIdentity", type_.to_string(), "cnAssociation"); return c.get(); } - const uint8_t& csi_rs_idx() const + const sdap_cfg_s& sdap_cfg() const { - assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); - return c.get(); + assert_choice_type("sdap-Config", type_.to_string(), "cnAssociation"); + return c.get(); } - uint8_t& set_ssb_idx() + uint8_t& set_eps_bearer_id() { - set(types::ssb_idx); + set(types::eps_bearer_id); return c.get(); } - uint8_t& set_csi_rs_idx() + sdap_cfg_s& set_sdap_cfg() { - set(types::csi_rs_idx); - return c.get(); + set(types::sdap_cfg); + return c.get(); } private: - types type_; - pod_choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; // member variables - uint8_t pucch_pathloss_ref_rs_id = 0; - ref_sig_c_ ref_sig; + bool ext = false; + bool cn_assoc_present = false; + bool reestablish_pdcp_present = false; + bool recover_pdcp_present = false; + bool pdcp_cfg_present = false; + cn_assoc_c_ cn_assoc; + uint8_t drb_id = 1; + pdcp_cfg_s pdcp_cfg; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4409,11 +4586,15 @@ struct pucch_pathloss_ref_rs_s { void to_json(json_writer& j) const; }; -// PUCCH-format0 ::= SEQUENCE -struct pucch_format0_s { - uint8_t init_cyclic_shift = 0; - uint8_t nrof_symbols = 1; - uint8_t start_symbol_idx = 0; +// SRB-ToAddMod ::= SEQUENCE +struct srb_to_add_mod_s { + bool ext = false; + bool reestablish_pdcp_present = false; + bool discard_on_pdcp_present = false; + bool pdcp_cfg_present = false; + uint8_t srb_id = 1; + pdcp_cfg_s pdcp_cfg; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4421,12 +4602,13 @@ struct pucch_format0_s { void to_json(json_writer& j) const; }; -// PUCCH-format1 ::= SEQUENCE -struct pucch_format1_s { - uint8_t init_cyclic_shift = 0; - uint8_t nrof_symbols = 4; - uint8_t start_symbol_idx = 0; - uint8_t time_domain_occ = 0; +// SecurityAlgorithmConfig ::= SEQUENCE +struct security_algorithm_cfg_s { + bool ext = false; + bool integrity_prot_algorithm_present = false; + ciphering_algorithm_e ciphering_algorithm; + integrity_prot_algorithm_e integrity_prot_algorithm; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4434,11 +4616,31 @@ struct pucch_format1_s { void to_json(json_writer& j) const; }; -// PUCCH-format2 ::= SEQUENCE -struct pucch_format2_s { - uint8_t nrof_prbs = 1; - uint8_t nrof_symbols = 1; - uint8_t start_symbol_idx = 0; +// DRB-ToAddModList ::= SEQUENCE (SIZE (1..29)) OF DRB-ToAddMod +using drb_to_add_mod_list_l = dyn_array; + +// DRB-ToReleaseList ::= SEQUENCE (SIZE (1..29)) OF INTEGER (1..32) +using drb_to_release_list_l = bounded_array; + +// SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod +using srb_to_add_mod_list_l = dyn_array; + +// SecurityConfig ::= SEQUENCE +struct security_cfg_s { + struct key_to_use_opts { + enum options { master, secondary, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated key_to_use_e_; + + // member variables + bool ext = false; + bool security_algorithm_cfg_present = false; + bool key_to_use_present = false; + security_algorithm_cfg_s security_algorithm_cfg; + key_to_use_e_ key_to_use; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4446,11 +4648,19 @@ struct pucch_format2_s { void to_json(json_writer& j) const; }; -// PUCCH-format3 ::= SEQUENCE -struct pucch_format3_s { - uint8_t nrof_prbs = 1; - uint8_t nrof_symbols = 4; - uint8_t start_symbol_idx = 0; +// RadioBearerConfig ::= SEQUENCE +struct radio_bearer_cfg_s { + bool ext = false; + bool srb_to_add_mod_list_present = false; + bool srb3_to_release_present = false; + bool drb_to_add_mod_list_present = false; + bool drb_to_release_list_present = false; + bool security_cfg_present = false; + srb_to_add_mod_list_l srb_to_add_mod_list; + drb_to_add_mod_list_l drb_to_add_mod_list; + drb_to_release_list_l drb_to_release_list; + security_cfg_s security_cfg; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4458,30 +4668,27 @@ struct pucch_format3_s { void to_json(json_writer& j) const; }; -// PUCCH-format4 ::= SEQUENCE -struct pucch_format4_s { - struct occ_len_opts { - enum options { n2, n4, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated occ_len_e_; - struct occ_idx_opts { - enum options { n0, n1, n2, n3, nulltype } value; - typedef uint8_t number_type; +// RRCReject-IEs ::= SEQUENCE +struct rrc_reject_ies_s { + bool wait_time_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + uint8_t wait_time = 1; + dyn_octstring late_non_crit_ext; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated occ_idx_e_; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - uint8_t nrof_symbols = 4; - occ_len_e_ occ_len; - occ_idx_e_ occ_idx; - uint8_t start_symbol_idx = 0; +// RRCSetup-IEs ::= SEQUENCE +struct rrc_setup_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + radio_bearer_cfg_s radio_bearer_cfg; + dyn_octstring master_cell_group; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4489,68 +4696,52 @@ struct pucch_format4_s { void to_json(json_writer& j) const; }; -// PUSCH-PathlossReferenceRS ::= SEQUENCE -struct pusch_pathloss_ref_rs_s { - struct ref_sig_c_ { +// RRCReject ::= SEQUENCE +struct rrc_reject_s { + struct crit_exts_c_ { struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; + enum options { rrc_reject, crit_exts_future, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - ref_sig_c_() = default; - ref_sig_c_(const ref_sig_c_& other); - ref_sig_c_& operator=(const ref_sig_c_& other); - ~ref_sig_c_() { destroy_(); } + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 - uint8_t& ssb_idx() - { - assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); - return c.get(); - } - const uint8_t& csi_rs_idx() const + rrc_reject_ies_s& rrc_reject() { - assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); - return c.get(); + assert_choice_type("rrcReject", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& set_ssb_idx() + const rrc_reject_ies_s& rrc_reject() const { - set(types::ssb_idx); - return c.get(); + assert_choice_type("rrcReject", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& set_csi_rs_idx() + rrc_reject_ies_s& set_rrc_reject() { - set(types::csi_rs_idx); - return c.get(); + set(types::rrc_reject); + return c.get(); } private: - types type_; - pod_choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; // member variables - uint8_t pusch_pathloss_ref_rs_id = 0; - ref_sig_c_ ref_sig; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4558,22 +4749,53 @@ struct pusch_pathloss_ref_rs_s { void to_json(json_writer& j) const; }; -// SRI-PUSCH-PowerControl ::= SEQUENCE -struct sri_pusch_pwr_ctrl_s { - struct sri_pusch_closed_loop_idx_opts { - enum options { i0, i1, nulltype } value; - typedef uint8_t number_type; +// RRCSetup ::= SEQUENCE +struct rrc_setup_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_setup, crit_exts_future, nulltype } value; - std::string to_string() const; - uint8_t to_number() const; + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + rrc_setup_ies_s& rrc_setup() + { + assert_choice_type("rrcSetup", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_setup_ies_s& rrc_setup() const + { + assert_choice_type("rrcSetup", type_.to_string(), "criticalExtensions"); + return c.get(); + } + rrc_setup_ies_s& set_rrc_setup() + { + set(types::rrc_setup); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); }; - typedef enumerated sri_pusch_closed_loop_idx_e_; // member variables - uint8_t sri_pusch_pwr_ctrl_id = 0; - uint8_t sri_pusch_pathloss_ref_rs_id = 0; - uint8_t sri_p0_pusch_alpha_set_id = 0; - sri_pusch_closed_loop_idx_e_ sri_pusch_closed_loop_idx; + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4581,448 +4803,229 @@ struct sri_pusch_pwr_ctrl_s { void to_json(json_writer& j) const; }; -// SRS-PeriodicityAndOffset ::= CHOICE -struct srs_periodicity_and_offset_c { - struct types_opts { - enum options { - sl1, - sl2, - sl4, - sl5, - sl8, - sl10, - sl16, - sl20, - sl32, - sl40, - sl64, - sl80, - sl160, - sl320, - sl640, - sl1280, - sl2560, - nulltype - } value; - typedef uint16_t number_type; +// DL-CCCH-MessageType ::= CHOICE +struct dl_ccch_msg_type_c { + struct c1_c_ { + struct types_opts { + enum options { rrc_reject, rrc_setup, spare2, spare1, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + c1_c_() = default; + c1_c_(const c1_c_& other); + c1_c_& operator=(const c1_c_& other); + ~c1_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 + rrc_reject_s& rrc_reject() + { + assert_choice_type("rrcReject", type_.to_string(), "c1"); + return c.get(); + } + rrc_setup_s& rrc_setup() + { + assert_choice_type("rrcSetup", type_.to_string(), "c1"); + return c.get(); + } + const rrc_reject_s& rrc_reject() const + { + assert_choice_type("rrcReject", type_.to_string(), "c1"); + return c.get(); + } + const rrc_setup_s& rrc_setup() const + { + assert_choice_type("rrcSetup", type_.to_string(), "c1"); + return c.get(); + } + rrc_reject_s& set_rrc_reject() + { + set(types::rrc_reject); + return c.get(); + } + rrc_setup_s& set_rrc_setup() + { + set(types::rrc_setup); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; - uint16_t to_number() const; + uint8_t to_number() const; }; typedef enumerated types; // choice methods - srs_periodicity_and_offset_c() = default; - srs_periodicity_and_offset_c(const srs_periodicity_and_offset_c& other); - srs_periodicity_and_offset_c& operator=(const srs_periodicity_and_offset_c& other); - ~srs_periodicity_and_offset_c() { destroy_(); } + dl_ccch_msg_type_c() = default; + dl_ccch_msg_type_c(const dl_ccch_msg_type_c& other); + dl_ccch_msg_type_c& operator=(const dl_ccch_msg_type_c& other); + ~dl_ccch_msg_type_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 - uint8_t& sl2() - { - assert_choice_type("sl2", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl4() - { - assert_choice_type("sl4", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl5() - { - assert_choice_type("sl5", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl8() - { - assert_choice_type("sl8", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl10() - { - assert_choice_type("sl10", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl16() - { - assert_choice_type("sl16", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl20() - { - assert_choice_type("sl20", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl32() - { - assert_choice_type("sl32", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl40() - { - assert_choice_type("sl40", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl64() - { - assert_choice_type("sl64", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl80() - { - assert_choice_type("sl80", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl160() - { - assert_choice_type("sl160", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint16_t& sl320() - { - assert_choice_type("sl320", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint16_t& sl640() - { - assert_choice_type("sl640", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint16_t& sl1280() - { - assert_choice_type("sl1280", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint16_t& sl2560() - { - assert_choice_type("sl2560", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl2() const - { - assert_choice_type("sl2", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl4() const - { - assert_choice_type("sl4", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl5() const - { - assert_choice_type("sl5", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl8() const - { - assert_choice_type("sl8", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl10() const - { - assert_choice_type("sl10", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl16() const - { - assert_choice_type("sl16", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl20() const - { - assert_choice_type("sl20", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl32() const - { - assert_choice_type("sl32", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl40() const - { - assert_choice_type("sl40", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl64() const - { - assert_choice_type("sl64", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl80() const - { - assert_choice_type("sl80", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl160() const - { - assert_choice_type("sl160", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint16_t& sl320() const - { - assert_choice_type("sl320", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint16_t& sl640() const - { - assert_choice_type("sl640", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint16_t& sl1280() const - { - assert_choice_type("sl1280", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - const uint16_t& sl2560() const - { - assert_choice_type("sl2560", type_.to_string(), "SRS-PeriodicityAndOffset"); - return c.get(); - } - uint8_t& set_sl2() + c1_c_& c1() { - set(types::sl2); - return c.get(); + assert_choice_type("c1", type_.to_string(), "DL-CCCH-MessageType"); + return c.get(); } - uint8_t& set_sl4() + const c1_c_& c1() const { - set(types::sl4); - return c.get(); + assert_choice_type("c1", type_.to_string(), "DL-CCCH-MessageType"); + return c.get(); } - uint8_t& set_sl5() + c1_c_& set_c1() { - set(types::sl5); - return c.get(); - } - uint8_t& set_sl8() - { - set(types::sl8); - return c.get(); - } - uint8_t& set_sl10() - { - set(types::sl10); - return c.get(); - } - uint8_t& set_sl16() - { - set(types::sl16); - return c.get(); - } - uint8_t& set_sl20() - { - set(types::sl20); - return c.get(); - } - uint8_t& set_sl32() - { - set(types::sl32); - return c.get(); - } - uint8_t& set_sl40() - { - set(types::sl40); - return c.get(); - } - uint8_t& set_sl64() - { - set(types::sl64); - return c.get(); - } - uint8_t& set_sl80() - { - set(types::sl80); - return c.get(); - } - uint8_t& set_sl160() - { - set(types::sl160); - return c.get(); - } - uint16_t& set_sl320() - { - set(types::sl320); - return c.get(); - } - uint16_t& set_sl640() - { - set(types::sl640); - return c.get(); - } - uint16_t& set_sl1280() - { - set(types::sl1280); - return c.get(); - } - uint16_t& set_sl2560() - { - set(types::sl2560); - return c.get(); + set(types::c1); + return c.get(); } private: - types type_; - pod_choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; -// SRS-SpatialRelationInfo ::= SEQUENCE -struct srs_spatial_relation_info_s { - struct ref_sig_c_ { - struct srs_s_ { - uint8_t res_id = 0; - uint8_t ul_bwp = 0; - }; +// DL-CCCH-Message ::= SEQUENCE +struct dl_ccch_msg_s { + dl_ccch_msg_type_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-Resource-Mobility ::= SEQUENCE +struct csi_rs_res_mob_s { + struct slot_cfg_c_ { struct types_opts { - enum options { ssb_idx, csi_rs_idx, srs, nulltype } value; + enum options { ms4, ms5, ms10, ms20, ms40, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; typedef enumerated types; // choice methods - ref_sig_c_() = default; - ref_sig_c_(const ref_sig_c_& other); - ref_sig_c_& operator=(const ref_sig_c_& other); - ~ref_sig_c_() { destroy_(); } + slot_cfg_c_() = default; + slot_cfg_c_(const slot_cfg_c_& other); + slot_cfg_c_& operator=(const slot_cfg_c_& other); + ~slot_cfg_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 - uint8_t& ssb_idx() + uint8_t& ms4() { - assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + assert_choice_type("ms4", type_.to_string(), "slotConfig"); return c.get(); } - uint8_t& csi_rs_idx() + uint8_t& ms5() { - assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + assert_choice_type("ms5", type_.to_string(), "slotConfig"); return c.get(); } - srs_s_& srs() + uint8_t& ms10() { - assert_choice_type("srs", type_.to_string(), "referenceSignal"); - return c.get(); + assert_choice_type("ms10", type_.to_string(), "slotConfig"); + return c.get(); } - const uint8_t& ssb_idx() const + uint8_t& ms20() { - assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + assert_choice_type("ms20", type_.to_string(), "slotConfig"); return c.get(); } - const uint8_t& csi_rs_idx() const + uint16_t& ms40() { - assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + assert_choice_type("ms40", type_.to_string(), "slotConfig"); + return c.get(); + } + const uint8_t& ms4() const + { + assert_choice_type("ms4", type_.to_string(), "slotConfig"); return c.get(); } - const srs_s_& srs() const + const uint8_t& ms5() const { - assert_choice_type("srs", type_.to_string(), "referenceSignal"); - return c.get(); + assert_choice_type("ms5", type_.to_string(), "slotConfig"); + return c.get(); } - uint8_t& set_ssb_idx() + const uint8_t& ms10() const { - set(types::ssb_idx); + assert_choice_type("ms10", type_.to_string(), "slotConfig"); return c.get(); } - uint8_t& set_csi_rs_idx() + const uint8_t& ms20() const { - set(types::csi_rs_idx); + assert_choice_type("ms20", type_.to_string(), "slotConfig"); return c.get(); } - srs_s_& set_srs() + const uint16_t& ms40() const { - set(types::srs); - return c.get(); + assert_choice_type("ms40", type_.to_string(), "slotConfig"); + return c.get(); + } + uint8_t& set_ms4() + { + set(types::ms4); + return c.get(); + } + uint8_t& set_ms5() + { + set(types::ms5); + return c.get(); + } + uint8_t& set_ms10() + { + set(types::ms10); + return c.get(); + } + uint8_t& set_ms20() + { + set(types::ms20); + return c.get(); + } + uint16_t& set_ms40() + { + set(types::ms40); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; - - // member variables - bool serving_cell_id_present = false; - uint8_t serving_cell_id = 0; - ref_sig_c_ ref_sig; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-UCI-OnPUSCH ::= CHOICE -struct cg_uci_on_pusch_c { - using dynamic_l_ = dyn_array; - struct types_opts { - enum options { dynamic_type, semi_static, nulltype } value; - - std::string to_string() const; + struct associated_ssb_s_ { + uint8_t ssb_idx = 0; + bool is_quasi_colocated = false; }; - typedef enumerated types; - - // choice methods - cg_uci_on_pusch_c() = default; - cg_uci_on_pusch_c(const cg_uci_on_pusch_c& other); - cg_uci_on_pusch_c& operator=(const cg_uci_on_pusch_c& other); - ~cg_uci_on_pusch_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 - dynamic_l_& dynamic_type() - { - assert_choice_type("dynamic", type_.to_string(), "CG-UCI-OnPUSCH"); - return c.get(); - } - beta_offsets_s& semi_static() - { - assert_choice_type("semiStatic", type_.to_string(), "CG-UCI-OnPUSCH"); - return c.get(); - } - const dynamic_l_& dynamic_type() const - { - assert_choice_type("dynamic", type_.to_string(), "CG-UCI-OnPUSCH"); - return c.get(); - } - const beta_offsets_s& semi_static() const - { - assert_choice_type("semiStatic", type_.to_string(), "CG-UCI-OnPUSCH"); - return c.get(); - } - dynamic_l_& set_dynamic_type() - { - set(types::dynamic_type); - return c.get(); - } - beta_offsets_s& set_semi_static() - { - set(types::semi_static); - return c.get(); - } - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// CSI-RS-ResourceMapping ::= SEQUENCE -struct csi_rs_res_map_s { struct freq_domain_alloc_c_ { struct types_opts { - enum options { row1, row2, row4, other, nulltype } value; + enum options { row1, row2, nulltype } value; typedef uint8_t number_type; std::string to_string() const; @@ -5051,17 +5054,7 @@ struct csi_rs_res_map_s { assert_choice_type("row2", type_.to_string(), "frequencyDomainAllocation"); return c.get >(); } - fixed_bitstring<3>& row4() - { - assert_choice_type("row4", type_.to_string(), "frequencyDomainAllocation"); - return c.get >(); - } - fixed_bitstring<6>& other() - { - assert_choice_type("other", type_.to_string(), "frequencyDomainAllocation"); - return c.get >(); - } - const fixed_bitstring<4>& row1() const + const fixed_bitstring<4>& row1() const { assert_choice_type("row1", type_.to_string(), "frequencyDomainAllocation"); return c.get >(); @@ -5071,16 +5064,6 @@ struct csi_rs_res_map_s { assert_choice_type("row2", type_.to_string(), "frequencyDomainAllocation"); return c.get >(); } - const fixed_bitstring<3>& row4() const - { - assert_choice_type("row4", type_.to_string(), "frequencyDomainAllocation"); - return c.get >(); - } - const fixed_bitstring<6>& other() const - { - assert_choice_type("other", type_.to_string(), "frequencyDomainAllocation"); - return c.get >(); - } fixed_bitstring<4>& set_row1() { set(types::row1); @@ -5091,16 +5074,6 @@ struct csi_rs_res_map_s { set(types::row2); return c.get >(); } - fixed_bitstring<3>& set_row4() - { - set(types::row4); - return c.get >(); - } - fixed_bitstring<6>& set_other() - { - set(types::other); - return c.get >(); - } private: types type_; @@ -5108,78 +5081,96 @@ struct csi_rs_res_map_s { void destroy_(); }; - struct nrof_ports_opts { - enum options { p1, p2, p4, p8, p12, p16, p24, p32, nulltype } value; - typedef uint8_t number_type; - std::string to_string() const; - uint8_t to_number() const; + // member variables + bool ext = false; + bool associated_ssb_present = false; + uint8_t csi_rs_idx = 0; + slot_cfg_c_ slot_cfg; + associated_ssb_s_ associated_ssb; + freq_domain_alloc_c_ freq_domain_alloc; + uint8_t first_ofdm_symbol_in_time_domain = 0; + uint16_t seq_generation_cfg = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-CellMobility ::= SEQUENCE +struct csi_rs_cell_mob_s { + struct csi_rs_meas_bw_s_ { + struct nrof_prbs_opts { + enum options { size24, size48, size96, size192, size264, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated nrof_prbs_e_; + + // member variables + nrof_prbs_e_ nrof_prbs; + uint16_t start_prb = 0; }; - typedef enumerated nrof_ports_e_; - struct cdm_type_opts { - enum options { no_cdm, fd_cdm2, cdm4_fd2_td2, cdm8_fd2_td4, nulltype } value; + struct density_opts { + enum options { d1, d3, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated cdm_type_e_; - struct density_c_ { - struct dot5_opts { - enum options { even_prbs, odd_prbs, nulltype } value; + typedef enumerated density_e_; + using csi_rs_res_list_mob_l_ = dyn_array; - std::string to_string() const; - }; - typedef enumerated dot5_e_; - struct types_opts { - enum options { dot5, one, three, spare, nulltype } value; - typedef uint8_t number_type; + // member variables + bool density_present = false; + uint16_t cell_id = 0; + csi_rs_meas_bw_s_ csi_rs_meas_bw; + density_e_ density; + csi_rs_res_list_mob_l_ csi_rs_res_list_mob; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // choice methods - density_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; - // getters - dot5_e_& dot5() - { - assert_choice_type("dot5", type_.to_string(), "density"); - return c; - } - const dot5_e_& dot5() const - { - assert_choice_type("dot5", type_.to_string(), "density"); - return c; - } - dot5_e_& set_dot5() - { - set(types::dot5); - return c; - } +// Q-OffsetRangeList ::= SEQUENCE +struct q_offset_range_list_s { + bool rsrp_offset_ssb_present = false; + bool rsrq_offset_ssb_present = false; + bool sinr_offset_ssb_present = false; + bool rsrp_offset_csi_rs_present = false; + bool rsrq_offset_csi_rs_present = false; + bool sinr_offset_csi_rs_present = false; + q_offset_range_e rsrp_offset_ssb; + q_offset_range_e rsrq_offset_ssb; + q_offset_range_e sinr_offset_ssb; + q_offset_range_e rsrp_offset_csi_rs; + q_offset_range_e rsrq_offset_csi_rs; + q_offset_range_e sinr_offset_csi_rs; - private: - types type_; - dot5_e_ c; - }; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ResourceConfigMobility ::= SEQUENCE +struct csi_rs_res_cfg_mob_s { + using csi_rs_cell_list_mob_l_ = dyn_array; // member variables - bool ext = false; - bool first_ofdm_symbol_in_time_domain2_present = false; - freq_domain_alloc_c_ freq_domain_alloc; - nrof_ports_e_ nrof_ports; - uint8_t first_ofdm_symbol_in_time_domain = 0; - uint8_t first_ofdm_symbol_in_time_domain2 = 2; - cdm_type_e_ cdm_type; - density_c_ density; - csi_freq_occupation_s freq_band; + bool ext = false; + subcarrier_spacing_e subcarrier_spacing; + csi_rs_cell_list_mob_l_ csi_rs_cell_list_mob; // ... + // group 0 + bool ref_serv_cell_idx_present = false; + uint8_t ref_serv_cell_idx = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -5187,237 +5178,267 @@ struct csi_rs_res_map_s { void to_json(json_writer& j) const; }; -// CSI-ResourcePeriodicityAndOffset ::= CHOICE -struct csi_res_periodicity_and_offset_c { +// CellsToAddMod ::= SEQUENCE +struct cells_to_add_mod_s { + uint16_t pci = 0; + q_offset_range_list_s cell_individual_offset; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FilterCoefficient ::= ENUMERATED +struct filt_coef_opts { + enum options { + fc0, + fc1, + fc2, + fc3, + fc4, + fc5, + fc6, + fc7, + fc8, + fc9, + fc11, + fc13, + fc15, + fc17, + fc19, + spare1, + /*...*/ nulltype + } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated filt_coef_e; + +// MeasReportQuantity ::= SEQUENCE +struct meas_report_quant_s { + bool rsrp = false; + bool rsrq = false; + bool sinr = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasTriggerQuantity ::= CHOICE +struct meas_trigger_quant_c { struct types_opts { - enum options { - slots4, - slots5, - slots8, - slots10, - slots16, - slots20, - slots32, - slots40, - slots64, - slots80, - slots160, - slots320, - slots640, - nulltype - } value; - typedef uint16_t number_type; + enum options { rsrp, rsrq, sinr, nulltype } value; std::string to_string() const; - uint16_t to_number() const; }; typedef enumerated types; // choice methods - csi_res_periodicity_and_offset_c() = default; - csi_res_periodicity_and_offset_c(const csi_res_periodicity_and_offset_c& other); - csi_res_periodicity_and_offset_c& operator=(const csi_res_periodicity_and_offset_c& other); - ~csi_res_periodicity_and_offset_c() { destroy_(); } + meas_trigger_quant_c() = default; + meas_trigger_quant_c(const meas_trigger_quant_c& other); + meas_trigger_quant_c& operator=(const meas_trigger_quant_c& other); + ~meas_trigger_quant_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 - uint8_t& slots4() + uint8_t& rsrp() { - assert_choice_type("slots4", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantity"); return c.get(); } - uint8_t& slots5() + uint8_t& rsrq() { - assert_choice_type("slots5", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantity"); return c.get(); } - uint8_t& slots8() + uint8_t& sinr() { - assert_choice_type("slots8", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantity"); return c.get(); } - uint8_t& slots10() + const uint8_t& rsrp() const { - assert_choice_type("slots10", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots16() - { - assert_choice_type("slots16", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots20() - { - assert_choice_type("slots20", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots32() - { - assert_choice_type("slots32", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots40() - { - assert_choice_type("slots40", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots64() - { - assert_choice_type("slots64", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots80() - { - assert_choice_type("slots80", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots160() - { - assert_choice_type("slots160", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint16_t& slots320() - { - assert_choice_type("slots320", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint16_t& slots640() - { - assert_choice_type("slots640", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots4() const - { - assert_choice_type("slots4", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantity"); return c.get(); } - const uint8_t& slots5() const + const uint8_t& rsrq() const { - assert_choice_type("slots5", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantity"); return c.get(); } - const uint8_t& slots8() const + const uint8_t& sinr() const { - assert_choice_type("slots8", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantity"); return c.get(); } - const uint8_t& slots10() const + uint8_t& set_rsrp() { - assert_choice_type("slots10", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + set(types::rsrp); return c.get(); } - const uint8_t& slots16() const + uint8_t& set_rsrq() { - assert_choice_type("slots16", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + set(types::rsrq); return c.get(); } - const uint8_t& slots20() const + uint8_t& set_sinr() { - assert_choice_type("slots20", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + set(types::sinr); return c.get(); } - const uint8_t& slots32() const + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// MeasTriggerQuantityEUTRA ::= CHOICE +struct meas_trigger_quant_eutra_c { + struct types_opts { + enum options { rsrp, rsrq, sinr, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + meas_trigger_quant_eutra_c() = default; + meas_trigger_quant_eutra_c(const meas_trigger_quant_eutra_c& other); + meas_trigger_quant_eutra_c& operator=(const meas_trigger_quant_eutra_c& other); + ~meas_trigger_quant_eutra_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 + uint8_t& rsrp() { - assert_choice_type("slots32", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantityEUTRA"); return c.get(); } - const uint8_t& slots40() const + uint8_t& rsrq() { - assert_choice_type("slots40", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantityEUTRA"); return c.get(); } - const uint8_t& slots64() const + uint8_t& sinr() { - assert_choice_type("slots64", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantityEUTRA"); return c.get(); } - const uint8_t& slots80() const + const uint8_t& rsrp() const { - assert_choice_type("slots80", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantityEUTRA"); return c.get(); } - const uint8_t& slots160() const + const uint8_t& rsrq() const { - assert_choice_type("slots160", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantityEUTRA"); return c.get(); } - const uint16_t& slots320() const - { - assert_choice_type("slots320", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint16_t& slots640() const - { - assert_choice_type("slots640", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& set_slots4() + const uint8_t& sinr() const { - set(types::slots4); + assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantityEUTRA"); return c.get(); } - uint8_t& set_slots5() + uint8_t& set_rsrp() { - set(types::slots5); + set(types::rsrp); return c.get(); } - uint8_t& set_slots8() + uint8_t& set_rsrq() { - set(types::slots8); + set(types::rsrq); return c.get(); } - uint8_t& set_slots10() + uint8_t& set_sinr() { - set(types::slots10); + set(types::sinr); return c.get(); } - uint8_t& set_slots16() + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// MeasTriggerQuantityOffset ::= CHOICE +struct meas_trigger_quant_offset_c { + struct types_opts { + enum options { rsrp, rsrq, sinr, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + meas_trigger_quant_offset_c() = default; + meas_trigger_quant_offset_c(const meas_trigger_quant_offset_c& other); + meas_trigger_quant_offset_c& operator=(const meas_trigger_quant_offset_c& other); + ~meas_trigger_quant_offset_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 + int8_t& rsrp() { - set(types::slots16); - return c.get(); + assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantityOffset"); + return c.get(); } - uint8_t& set_slots20() + int8_t& rsrq() { - set(types::slots20); - return c.get(); + assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantityOffset"); + return c.get(); } - uint8_t& set_slots32() + int8_t& sinr() { - set(types::slots32); - return c.get(); + assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantityOffset"); + return c.get(); } - uint8_t& set_slots40() + const int8_t& rsrp() const { - set(types::slots40); - return c.get(); + assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantityOffset"); + return c.get(); } - uint8_t& set_slots64() + const int8_t& rsrq() const { - set(types::slots64); - return c.get(); + assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantityOffset"); + return c.get(); } - uint8_t& set_slots80() + const int8_t& sinr() const { - set(types::slots80); - return c.get(); + assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantityOffset"); + return c.get(); } - uint8_t& set_slots160() + int8_t& set_rsrp() { - set(types::slots160); - return c.get(); + set(types::rsrp); + return c.get(); } - uint16_t& set_slots320() + int8_t& set_rsrq() { - set(types::slots320); - return c.get(); + set(types::rsrq); + return c.get(); } - uint16_t& set_slots640() + int8_t& set_sinr() { - set(types::slots640); - return c.get(); + set(types::sinr); + return c.get(); } private: @@ -5427,146 +5448,48 @@ private: void destroy_(); }; -// DMRS-UplinkConfig ::= SEQUENCE -struct dmrs_ul_cfg_s { - struct dmrs_add_position_opts { - enum options { pos0, pos1, pos3, nulltype } value; - typedef uint8_t number_type; +// NR-RS-Type ::= ENUMERATED +struct nr_rs_type_opts { + enum options { ssb, csi_rs, nulltype } value; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated dmrs_add_position_e_; - struct transform_precoding_disabled_s_ { - bool ext = false; - bool scrambling_id0_present = false; - bool scrambling_id1_present = false; - uint32_t scrambling_id0 = 0; - uint32_t scrambling_id1 = 0; - // ... - }; - struct transform_precoding_enabled_s_ { - bool ext = false; - bool npusch_id_present = false; - bool seq_group_hop_present = false; - bool seq_hop_present = false; - uint16_t npusch_id = 0; - // ... - }; - - // member variables - bool ext = false; - bool dmrs_type_present = false; - bool dmrs_add_position_present = false; - bool phase_tracking_rs_present = false; - bool max_len_present = false; - bool transform_precoding_disabled_present = false; - bool transform_precoding_enabled_present = false; - dmrs_add_position_e_ dmrs_add_position; - setup_release_c phase_tracking_rs; - transform_precoding_disabled_s_ transform_precoding_disabled; - transform_precoding_enabled_s_ transform_precoding_enabled; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// INT-ConfigurationPerServingCell ::= SEQUENCE -struct int_cfg_per_serving_cell_s { - uint8_t serving_cell_id = 0; - uint8_t position_in_dci = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + std::string to_string() const; }; +typedef enumerated nr_rs_type_e; -// PRACH-ResourceDedicatedBFR ::= CHOICE -struct prach_res_ded_bfr_c { - struct types_opts { - enum options { ssb, csi_rs, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - prach_res_ded_bfr_c() = default; - prach_res_ded_bfr_c(const prach_res_ded_bfr_c& other); - prach_res_ded_bfr_c& operator=(const prach_res_ded_bfr_c& other); - ~prach_res_ded_bfr_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 - bfr_ssb_res_s& ssb() - { - assert_choice_type("ssb", type_.to_string(), "PRACH-ResourceDedicatedBFR"); - return c.get(); - } - bfr_csirs_res_s& csi_rs() - { - assert_choice_type("csi-RS", type_.to_string(), "PRACH-ResourceDedicatedBFR"); - return c.get(); - } - const bfr_ssb_res_s& ssb() const - { - assert_choice_type("ssb", type_.to_string(), "PRACH-ResourceDedicatedBFR"); - return c.get(); - } - const bfr_csirs_res_s& csi_rs() const - { - assert_choice_type("csi-RS", type_.to_string(), "PRACH-ResourceDedicatedBFR"); - return c.get(); - } - bfr_ssb_res_s& set_ssb() - { - set(types::ssb); - return c.get(); - } - bfr_csirs_res_s& set_csi_rs() - { - set(types::csi_rs); - return c.get(); - } - -private: - types type_; - choice_buffer_t c; +// ReportInterval ::= ENUMERATED +struct report_interv_opts { + enum options { + ms120, + ms240, + ms480, + ms640, + ms1024, + ms2048, + ms5120, + ms10240, + ms20480, + ms40960, + min1, + min6, + min12, + min30, + nulltype + } value; + typedef uint16_t number_type; - void destroy_(); + std::string to_string() const; + uint16_t to_number() const; }; +typedef enumerated report_interv_e; -// PTRS-DownlinkConfig ::= SEQUENCE -struct ptrs_dl_cfg_s { - using freq_density_l_ = std::array; - using time_density_l_ = std::array; - struct res_elem_offset_opts { - enum options { offset01, offset10, offset11, nulltype } value; - typedef float number_type; - - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated res_elem_offset_e_; - - // member variables - bool ext = false; - bool freq_density_present = false; - bool time_density_present = false; - bool epre_ratio_present = false; - bool res_elem_offset_present = false; - freq_density_l_ freq_density; - time_density_l_ time_density; - uint8_t epre_ratio = 0; - res_elem_offset_e_ res_elem_offset; +// SSB-ConfigMobility ::= SEQUENCE +struct ssb_cfg_mob_s { + bool ext = false; + bool ssb_to_measure_present = false; + bool ss_rssi_meas_present = false; + setup_release_c ssb_to_measure; + bool derive_ssb_idx_from_cell = false; + ss_rssi_meas_s ss_rssi_meas; // ... // sequence methods @@ -5575,26 +5498,41 @@ struct ptrs_dl_cfg_s { void to_json(json_writer& j) const; }; -// PUCCH-FormatConfig ::= SEQUENCE -struct pucch_format_cfg_s { - struct nrof_slots_opts { - enum options { n2, n4, n8, nulltype } value; - typedef uint8_t number_type; +// TimeToTrigger ::= ENUMERATED +struct time_to_trigger_opts { + enum options { + ms0, + ms40, + ms64, + ms80, + ms100, + ms128, + ms160, + ms256, + ms320, + ms480, + ms512, + ms640, + ms1024, + ms1280, + ms2560, + ms5120, + nulltype + } value; + typedef uint16_t number_type; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated nrof_slots_e_; + std::string to_string() const; + uint16_t to_number() const; +}; +typedef enumerated time_to_trigger_e; - // member variables - bool interslot_freq_hop_present = false; - bool add_dmrs_present = false; - bool max_code_rate_present = false; - bool nrof_slots_present = false; - bool pi2_bpsk_present = false; - bool simul_harq_ack_csi_present = false; - pucch_max_code_rate_e max_code_rate; - nrof_slots_e_ nrof_slots; +// CellsToAddModList ::= SEQUENCE (SIZE (1..32)) OF CellsToAddMod +using cells_to_add_mod_list_l = dyn_array; + +// EUTRA-BlackCell ::= SEQUENCE +struct eutra_black_cell_s { + uint8_t cell_idx_eutra = 1; + eutra_pci_range_s pci_range; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -5602,29 +5540,11 @@ struct pucch_format_cfg_s { void to_json(json_writer& j) const; }; -// PUCCH-PowerControl ::= SEQUENCE -struct pucch_pwr_ctrl_s { - using p0_set_l_ = dyn_array; - using pathloss_ref_rss_l_ = dyn_array; - - // member variables - bool ext = false; - bool delta_f_pucch_f0_present = false; - bool delta_f_pucch_f1_present = false; - bool delta_f_pucch_f2_present = false; - bool delta_f_pucch_f3_present = false; - bool delta_f_pucch_f4_present = false; - bool p0_set_present = false; - bool pathloss_ref_rss_present = false; - bool two_pucch_pc_adjustment_states_present = false; - int8_t delta_f_pucch_f0 = -16; - int8_t delta_f_pucch_f1 = -16; - int8_t delta_f_pucch_f2 = -16; - int8_t delta_f_pucch_f3 = -16; - int8_t delta_f_pucch_f4 = -16; - p0_set_l_ p0_set; - pathloss_ref_rss_l_ pathloss_ref_rss; - // ... +// EUTRA-Cell ::= SEQUENCE +struct eutra_cell_s { + uint8_t cell_idx_eutra = 1; + uint16_t pci = 0; + eutra_q_offset_range_e cell_individual_offset; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -5632,135 +5552,194 @@ struct pucch_pwr_ctrl_s { void to_json(json_writer& j) const; }; -// PUCCH-Resource ::= SEQUENCE -struct pucch_res_s { - struct format_c_ { - struct types_opts { - enum options { format0, format1, format2, format3, format4, nulltype } value; - typedef uint8_t number_type; +// EUTRA-CellIndexList ::= SEQUENCE (SIZE (1..32)) OF INTEGER (1..32) +using eutra_cell_idx_list_l = bounded_array; - std::string to_string() const; - uint8_t to_number() const; +// EventTriggerConfig ::= SEQUENCE +struct event_trigger_cfg_s { + struct event_id_c_ { + struct event_a1_s_ { + meas_trigger_quant_c a1_thres; + bool report_on_leave = false; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; }; - typedef enumerated types; - - // choice methods - format_c_() = default; - format_c_(const format_c_& other); - format_c_& operator=(const format_c_& other); - ~format_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 - pucch_format0_s& format0() - { - assert_choice_type("format0", type_.to_string(), "format"); - return c.get(); + struct event_a2_s_ { + meas_trigger_quant_c a2_thres; + bool report_on_leave = false; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + }; + struct event_a3_s_ { + meas_trigger_quant_offset_c a3_offset; + bool report_on_leave = false; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + bool use_white_cell_list = false; + }; + struct event_a4_s_ { + meas_trigger_quant_c a4_thres; + bool report_on_leave = false; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + bool use_white_cell_list = false; + }; + struct event_a5_s_ { + meas_trigger_quant_c a5_thres1; + meas_trigger_quant_c a5_thres2; + bool report_on_leave = false; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + bool use_white_cell_list = false; + }; + struct event_a6_s_ { + meas_trigger_quant_offset_c a6_offset; + bool report_on_leave = false; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + bool use_white_cell_list = false; + }; + struct types_opts { + enum options { event_a1, event_a2, event_a3, event_a4, event_a5, event_a6, /*...*/ nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + event_id_c_() = default; + event_id_c_(const event_id_c_& other); + event_id_c_& operator=(const event_id_c_& other); + ~event_id_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 + event_a1_s_& event_a1() + { + assert_choice_type("eventA1", type_.to_string(), "eventId"); + return c.get(); } - pucch_format1_s& format1() + event_a2_s_& event_a2() { - assert_choice_type("format1", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA2", type_.to_string(), "eventId"); + return c.get(); } - pucch_format2_s& format2() + event_a3_s_& event_a3() { - assert_choice_type("format2", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA3", type_.to_string(), "eventId"); + return c.get(); } - pucch_format3_s& format3() + event_a4_s_& event_a4() { - assert_choice_type("format3", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA4", type_.to_string(), "eventId"); + return c.get(); } - pucch_format4_s& format4() + event_a5_s_& event_a5() { - assert_choice_type("format4", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA5", type_.to_string(), "eventId"); + return c.get(); } - const pucch_format0_s& format0() const + event_a6_s_& event_a6() { - assert_choice_type("format0", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA6", type_.to_string(), "eventId"); + return c.get(); } - const pucch_format1_s& format1() const + const event_a1_s_& event_a1() const { - assert_choice_type("format1", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA1", type_.to_string(), "eventId"); + return c.get(); } - const pucch_format2_s& format2() const + const event_a2_s_& event_a2() const { - assert_choice_type("format2", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA2", type_.to_string(), "eventId"); + return c.get(); } - const pucch_format3_s& format3() const + const event_a3_s_& event_a3() const { - assert_choice_type("format3", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA3", type_.to_string(), "eventId"); + return c.get(); } - const pucch_format4_s& format4() const + const event_a4_s_& event_a4() const { - assert_choice_type("format4", type_.to_string(), "format"); - return c.get(); + assert_choice_type("eventA4", type_.to_string(), "eventId"); + return c.get(); } - pucch_format0_s& set_format0() + const event_a5_s_& event_a5() const { - set(types::format0); - return c.get(); + assert_choice_type("eventA5", type_.to_string(), "eventId"); + return c.get(); } - pucch_format1_s& set_format1() + const event_a6_s_& event_a6() const { - set(types::format1); - return c.get(); + assert_choice_type("eventA6", type_.to_string(), "eventId"); + return c.get(); } - pucch_format2_s& set_format2() + event_a1_s_& set_event_a1() { - set(types::format2); - return c.get(); + set(types::event_a1); + return c.get(); } - pucch_format3_s& set_format3() + event_a2_s_& set_event_a2() { - set(types::format3); - return c.get(); + set(types::event_a2); + return c.get(); } - pucch_format4_s& set_format4() + event_a3_s_& set_event_a3() { - set(types::format4); - return c.get(); + set(types::event_a3); + return c.get(); + } + event_a4_s_& set_event_a4() + { + set(types::event_a4); + return c.get(); + } + event_a5_s_& set_event_a5() + { + set(types::event_a5); + return c.get(); + } + event_a6_s_& set_event_a6() + { + set(types::event_a6); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; + struct report_amount_opts { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; + typedef int8_t number_type; - // member variables - bool intra_slot_freq_hop_present = false; - bool second_hop_prb_present = false; - uint8_t pucch_res_id = 0; - uint16_t start_prb = 0; - uint16_t second_hop_prb = 0; - format_c_ format; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUCCH-ResourceSet ::= SEQUENCE -struct pucch_res_set_s { - using res_list_l_ = bounded_array; + std::string to_string() const; + int8_t to_number() const; + }; + typedef enumerated report_amount_e_; // member variables - bool max_payload_minus1_present = false; - uint8_t pucch_res_set_id = 0; - res_list_l_ res_list; - uint16_t max_payload_minus1 = 4; + bool ext = false; + bool report_quant_rs_idxes_present = false; + bool max_nrof_rs_idxes_to_report_present = false; + bool report_add_neigh_meas_present = false; + event_id_c_ event_id; + nr_rs_type_e rs_type; + report_interv_e report_interv; + report_amount_e_ report_amount; + meas_report_quant_s report_quant_cell; + uint8_t max_report_cells = 1; + meas_report_quant_s report_quant_rs_idxes; + uint8_t max_nrof_rs_idxes_to_report = 1; + bool include_beam_meass = false; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -5768,100 +5747,101 @@ struct pucch_res_set_s { void to_json(json_writer& j) const; }; -// PUCCH-SpatialRelationInfo ::= SEQUENCE -struct pucch_spatial_relation_info_s { - struct ref_sig_c_ { - struct srs_s_ { - uint8_t res = 0; - uint8_t ul_bwp = 0; +// EventTriggerConfigInterRAT ::= SEQUENCE +struct event_trigger_cfg_inter_rat_s { + struct event_id_c_ { + struct event_b1_s_ { + bool ext = false; + meas_trigger_quant_eutra_c b1_thres_eutra; + bool report_on_leave = false; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + // ... + }; + struct event_b2_s_ { + bool ext = false; + meas_trigger_quant_c b2_thres1; + meas_trigger_quant_eutra_c b2_thres2_eutra; + bool report_on_leave = false; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + // ... }; struct types_opts { - enum options { ssb_idx, csi_rs_idx, srs, nulltype } value; + enum options { event_b1, event_b2, /*...*/ nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - ref_sig_c_() = default; - ref_sig_c_(const ref_sig_c_& other); - ref_sig_c_& operator=(const ref_sig_c_& other); - ~ref_sig_c_() { destroy_(); } + event_id_c_() = default; + event_id_c_(const event_id_c_& other); + event_id_c_& operator=(const event_id_c_& other); + ~event_id_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 - uint8_t& ssb_idx() + event_b1_s_& event_b1() { - assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); - return c.get(); + assert_choice_type("eventB1", type_.to_string(), "eventId"); + return c.get(); } - uint8_t& csi_rs_idx() + event_b2_s_& event_b2() { - assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); - return c.get(); + assert_choice_type("eventB2", type_.to_string(), "eventId"); + return c.get(); } - srs_s_& srs() + const event_b1_s_& event_b1() const { - assert_choice_type("srs", type_.to_string(), "referenceSignal"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); - return c.get(); - } - const srs_s_& srs() const - { - assert_choice_type("srs", type_.to_string(), "referenceSignal"); - return c.get(); + assert_choice_type("eventB1", type_.to_string(), "eventId"); + return c.get(); } - uint8_t& set_ssb_idx() + const event_b2_s_& event_b2() const { - set(types::ssb_idx); - return c.get(); + assert_choice_type("eventB2", type_.to_string(), "eventId"); + return c.get(); } - uint8_t& set_csi_rs_idx() + event_b1_s_& set_event_b1() { - set(types::csi_rs_idx); - return c.get(); + set(types::event_b1); + return c.get(); } - srs_s_& set_srs() + event_b2_s_& set_event_b2() { - set(types::srs); - return c.get(); + set(types::event_b2); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; - struct closed_loop_idx_opts { - enum options { i0, i1, nulltype } value; - typedef uint8_t number_type; + struct report_amount_opts { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; + typedef int8_t number_type; std::string to_string() const; - uint8_t to_number() const; + int8_t to_number() const; }; - typedef enumerated closed_loop_idx_e_; + typedef enumerated report_amount_e_; // member variables - bool serving_cell_id_present = false; - uint8_t pucch_spatial_relation_info_id = 1; - uint8_t serving_cell_id = 0; - ref_sig_c_ ref_sig; - uint8_t pucch_pathloss_ref_rs_id = 0; - uint8_t p0_pucch_id = 1; - closed_loop_idx_e_ closed_loop_idx; + bool ext = false; + event_id_c_ event_id; + nr_rs_type_e rs_type; + report_interv_e report_interv; + report_amount_e_ report_amount; + meas_report_quant_s report_quant; + uint8_t max_report_cells = 1; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -5869,32 +5849,14 @@ struct pucch_spatial_relation_info_s { void to_json(json_writer& j) const; }; -// PUSCH-PowerControl ::= SEQUENCE -struct pusch_pwr_ctrl_s { - using p0_alpha_sets_l_ = dyn_array; - using pathloss_ref_rs_to_add_mod_list_l_ = dyn_array; - using pathloss_ref_rs_to_release_list_l_ = bounded_array; - using sri_pusch_map_to_add_mod_list_l_ = dyn_array; - using sri_pusch_map_to_release_list_l_ = bounded_array; - - // member variables - bool tpc_accumulation_present = false; - bool msg3_alpha_present = false; - bool p0_nominal_without_grant_present = false; - bool p0_alpha_sets_present = false; - bool pathloss_ref_rs_to_add_mod_list_present = false; - bool pathloss_ref_rs_to_release_list_present = false; - bool two_pusch_pc_adjustment_states_present = false; - bool delta_mcs_present = false; - bool sri_pusch_map_to_add_mod_list_present = false; - bool sri_pusch_map_to_release_list_present = false; - alpha_e msg3_alpha; - int16_t p0_nominal_without_grant = -202; - p0_alpha_sets_l_ p0_alpha_sets; - pathloss_ref_rs_to_add_mod_list_l_ pathloss_ref_rs_to_add_mod_list; - pathloss_ref_rs_to_release_list_l_ pathloss_ref_rs_to_release_list; - sri_pusch_map_to_add_mod_list_l_ sri_pusch_map_to_add_mod_list; - sri_pusch_map_to_release_list_l_ sri_pusch_map_to_release_list; +// FilterConfig ::= SEQUENCE +struct filt_cfg_s { + bool filt_coef_rsrp_present = false; + bool filt_coef_rsrq_present = false; + bool filt_coef_rs_sinr_present = false; + filt_coef_e filt_coef_rsrp; + filt_coef_e filt_coef_rsrq; + filt_coef_e filt_coef_rs_sinr; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -5902,79 +5864,47 @@ struct pusch_pwr_ctrl_s { void to_json(json_writer& j) const; }; -// QCL-Info ::= SEQUENCE -struct qcl_info_s { - struct ref_sig_c_ { - struct types_opts { - enum options { csi_rs, ssb, nulltype } value; +// PCI-List ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..1007) +using pci_list_l = bounded_array; - std::string to_string() const; - }; - typedef enumerated types; +// PCI-RangeElement ::= SEQUENCE +struct pci_range_elem_s { + uint8_t pci_range_idx = 1; + pci_range_s pci_range; - // choice methods - ref_sig_c_() = default; - ref_sig_c_(const ref_sig_c_& other); - ref_sig_c_& operator=(const ref_sig_c_& other); - ~ref_sig_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 - uint8_t& csi_rs() - { - assert_choice_type("csi-rs", type_.to_string(), "referenceSignal"); - return c.get(); - } - uint8_t& ssb() - { - assert_choice_type("ssb", type_.to_string(), "referenceSignal"); - return c.get(); - } - const uint8_t& csi_rs() const - { - assert_choice_type("csi-rs", type_.to_string(), "referenceSignal"); - return c.get(); - } - const uint8_t& ssb() const - { - assert_choice_type("ssb", type_.to_string(), "referenceSignal"); - return c.get(); - } - uint8_t& set_csi_rs() - { - set(types::csi_rs); - return c.get(); - } - uint8_t& set_ssb() - { - set(types::ssb); - return c.get(); - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - pod_choice_buffer_t c; +// PCI-RangeIndexList ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8) +using pci_range_idx_list_l = bounded_array; - void destroy_(); - }; - struct qcl_type_opts { - enum options { type_a, type_b, type_c, type_d, nulltype } value; +// PeriodicalReportConfig ::= SEQUENCE +struct periodical_report_cfg_s { + struct report_amount_opts { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; + typedef int8_t number_type; std::string to_string() const; + int8_t to_number() const; }; - typedef enumerated qcl_type_e_; + typedef enumerated report_amount_e_; // member variables - bool ext = false; - bool cell_present = false; - bool bwp_id_present = false; - uint8_t cell = 0; - uint8_t bwp_id = 0; - ref_sig_c_ ref_sig; - qcl_type_e_ qcl_type; + bool ext = false; + bool report_quant_rs_idxes_present = false; + bool max_nrof_rs_idxes_to_report_present = false; + nr_rs_type_e rs_type; + report_interv_e report_interv; + report_amount_e_ report_amount; + meas_report_quant_s report_quant_cell; + uint8_t max_report_cells = 1; + meas_report_quant_s report_quant_rs_idxes; + uint8_t max_nrof_rs_idxes_to_report = 1; + bool include_beam_meass = false; + bool use_white_cell_list = false; // ... // sequence methods @@ -5983,30 +5913,23 @@ struct qcl_info_s { void to_json(json_writer& j) const; }; -// RA-Prioritization ::= SEQUENCE -struct ra_prioritization_s { - struct pwr_ramp_step_high_prio_opts { - enum options { db0, db2, db4, db6, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated pwr_ramp_step_high_prio_e_; - struct scaling_factor_bi_opts { - enum options { zero, dot25, dot5, dot75, nulltype } value; - typedef uint8_t number_type; +// PeriodicalReportConfigInterRAT ::= SEQUENCE +struct periodical_report_cfg_inter_rat_s { + struct report_amount_opts { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; + typedef int8_t number_type; std::string to_string() const; - uint8_t to_number() const; + int8_t to_number() const; }; - typedef enumerated scaling_factor_bi_e_; + typedef enumerated report_amount_e_; // member variables - bool ext = false; - bool scaling_factor_bi_present = false; - pwr_ramp_step_high_prio_e_ pwr_ramp_step_high_prio; - scaling_factor_bi_e_ scaling_factor_bi; + bool ext = false; + report_interv_e report_interv; + report_amount_e_ report_amount; + meas_report_quant_s report_quant; + uint8_t max_report_cells = 1; // ... // sequence methods @@ -6015,227 +5938,176 @@ struct ra_prioritization_s { void to_json(json_writer& j) const; }; -// SRS-Resource ::= SEQUENCE -struct srs_res_s { - struct nrof_srs_ports_opts { - enum options { port1, ports2, ports4, nulltype } value; - typedef uint8_t number_type; +// RAN-AreaConfig ::= SEQUENCE +struct ran_area_cfg_s { + using ran_area_code_list_l_ = bounded_array; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated nrof_srs_ports_e_; - struct ptrs_port_idx_opts { - enum options { n0, n1, nulltype } value; - typedef uint8_t number_type; + // member variables + bool ran_area_code_list_present = false; + fixed_bitstring<24> tac; + ran_area_code_list_l_ ran_area_code_list; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated ptrs_port_idx_e_; - struct tx_comb_c_ { - struct n2_s_ { - uint8_t comb_offset_n2 = 0; - uint8_t cyclic_shift_n2 = 0; - }; - struct n4_s_ { - uint8_t comb_offset_n4 = 0; - uint8_t cyclic_shift_n4 = 0; - }; - struct types_opts { - enum options { n2, n4, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; +// ReferenceSignalConfig ::= SEQUENCE +struct ref_sig_cfg_s { + bool ssb_cfg_mob_present = false; + bool csi_rs_res_cfg_mob_present = false; + ssb_cfg_mob_s ssb_cfg_mob; + setup_release_c csi_rs_res_cfg_mob; - // choice methods - tx_comb_c_() = default; - tx_comb_c_(const tx_comb_c_& other); - tx_comb_c_& operator=(const tx_comb_c_& other); - ~tx_comb_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 - n2_s_& n2() - { - assert_choice_type("n2", type_.to_string(), "transmissionComb"); - return c.get(); - } - n4_s_& n4() - { - assert_choice_type("n4", type_.to_string(), "transmissionComb"); - return c.get(); - } - const n2_s_& n2() const - { - assert_choice_type("n2", type_.to_string(), "transmissionComb"); - return c.get(); - } - const n4_s_& n4() const - { - assert_choice_type("n4", type_.to_string(), "transmissionComb"); - return c.get(); - } - n2_s_& set_n2() - { - set(types::n2); - return c.get(); - } - n4_s_& set_n4() - { - set(types::n4); - return c.get(); - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - choice_buffer_t c; +// ReportCGI ::= SEQUENCE +struct report_cgi_s { + bool ext = false; + uint16_t cell_for_which_to_report_cgi = 0; + // ... - void destroy_(); - }; - struct res_map_s_ { - struct nrof_symbols_opts { - enum options { n1, n2, n4, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated nrof_symbols_e_; - struct repeat_factor_opts { - enum options { n1, n2, n4, nulltype } value; - typedef uint8_t number_type; +// ReportCGI-EUTRA ::= SEQUENCE +struct report_cgi_eutra_s { + bool ext = false; + uint16_t cell_for_which_to_report_cgi = 0; + // ... - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated repeat_factor_e_; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - uint8_t start_position = 0; - nrof_symbols_e_ nrof_symbols; - repeat_factor_e_ repeat_factor; - }; - struct freq_hop_s_ { - uint8_t c_srs = 0; - uint8_t b_srs = 0; - uint8_t b_hop = 0; - }; - struct group_or_seq_hop_opts { - enum options { neither, group_hop, seq_hop, nulltype } value; +// ReportSFTD-EUTRA ::= SEQUENCE +struct report_sftd_eutra_s { + bool ext = false; + bool report_sftd_meas = false; + bool report_rsrp = false; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportSFTD-NR ::= SEQUENCE +struct report_sftd_nr_s { + using cells_for_which_to_report_sftd_l_ = bounded_array; + + // member variables + bool ext = false; + bool report_sftd_meas = false; + bool report_rsrp = false; + // ... + // group 0 + bool report_sftd_neigh_meas_present = false; + bool drx_sftd_neigh_meas_present = false; + copy_ptr cells_for_which_to_report_sftd; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SSB-MTC2 ::= SEQUENCE +struct ssb_mtc2_s { + using pci_list_l_ = dyn_array; + struct periodicity_opts { + enum options { sf5, sf10, sf20, sf40, sf80, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; - typedef enumerated group_or_seq_hop_e_; - struct res_type_c_ { - struct aperiodic_s_ { - bool ext = false; - // ... - }; - struct semi_persistent_s_ { - bool ext = false; - srs_periodicity_and_offset_c periodicity_and_offset_sp; - // ... - }; - struct periodic_s_ { - bool ext = false; - srs_periodicity_and_offset_c periodicity_and_offset_p; - // ... - }; + typedef enumerated periodicity_e_; + + // member variables + bool pci_list_present = false; + pci_list_l_ pci_list; + periodicity_e_ periodicity; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MRDC-SecondaryCellGroupConfig ::= SEQUENCE +struct mrdc_secondary_cell_group_cfg_s { + struct mrdc_secondary_cell_group_c_ { struct types_opts { - enum options { aperiodic, semi_persistent, periodic, nulltype } value; + enum options { nr_scg, eutra_scg, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - res_type_c_() = default; - res_type_c_(const res_type_c_& other); - res_type_c_& operator=(const res_type_c_& other); - ~res_type_c_() { destroy_(); } + mrdc_secondary_cell_group_c_() = default; + mrdc_secondary_cell_group_c_(const mrdc_secondary_cell_group_c_& other); + mrdc_secondary_cell_group_c_& operator=(const mrdc_secondary_cell_group_c_& other); + ~mrdc_secondary_cell_group_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 - aperiodic_s_& aperiodic() - { - assert_choice_type("aperiodic", type_.to_string(), "resourceType"); - return c.get(); - } - semi_persistent_s_& semi_persistent() - { - assert_choice_type("semi-persistent", type_.to_string(), "resourceType"); - return c.get(); - } - periodic_s_& periodic() - { - assert_choice_type("periodic", type_.to_string(), "resourceType"); - return c.get(); - } - const aperiodic_s_& aperiodic() const + dyn_octstring& nr_scg() { - assert_choice_type("aperiodic", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("nr-SCG", type_.to_string(), "mrdc-SecondaryCellGroup"); + return c.get(); } - const semi_persistent_s_& semi_persistent() const + dyn_octstring& eutra_scg() { - assert_choice_type("semi-persistent", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("eutra-SCG", type_.to_string(), "mrdc-SecondaryCellGroup"); + return c.get(); } - const periodic_s_& periodic() const + const dyn_octstring& nr_scg() const { - assert_choice_type("periodic", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("nr-SCG", type_.to_string(), "mrdc-SecondaryCellGroup"); + return c.get(); } - aperiodic_s_& set_aperiodic() + const dyn_octstring& eutra_scg() const { - set(types::aperiodic); - return c.get(); + assert_choice_type("eutra-SCG", type_.to_string(), "mrdc-SecondaryCellGroup"); + return c.get(); } - semi_persistent_s_& set_semi_persistent() + dyn_octstring& set_nr_scg() { - set(types::semi_persistent); - return c.get(); + set(types::nr_scg); + return c.get(); } - periodic_s_& set_periodic() + dyn_octstring& set_eutra_scg() { - set(types::periodic); - return c.get(); + set(types::eutra_scg); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; // member variables - bool ext = false; - bool ptrs_port_idx_present = false; - bool spatial_relation_info_present = false; - uint8_t srs_res_id = 0; - nrof_srs_ports_e_ nrof_srs_ports; - ptrs_port_idx_e_ ptrs_port_idx; - tx_comb_c_ tx_comb; - res_map_s_ res_map; - uint8_t freq_domain_position = 0; - uint16_t freq_domain_shift = 0; - freq_hop_s_ freq_hop; - group_or_seq_hop_e_ group_or_seq_hop; - res_type_c_ res_type; - uint16_t seq_id = 0; - srs_spatial_relation_info_s spatial_relation_info; - // ... + bool mrdc_release_and_add_present = false; + mrdc_secondary_cell_group_c_ mrdc_secondary_cell_group; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6243,198 +6115,449 @@ struct srs_res_s { void to_json(json_writer& j) const; }; -// SRS-ResourceSet ::= SEQUENCE -struct srs_res_set_s { - using srs_res_id_list_l_ = bounded_array; - struct res_type_c_ { - struct aperiodic_s_ { - using aperiodic_srs_res_trigger_list_v1530_l_ = bounded_array; - - // member variables - bool ext = false; - bool csi_rs_present = false; - bool slot_offset_present = false; - uint8_t aperiodic_srs_res_trigger = 1; - uint8_t csi_rs = 0; - uint8_t slot_offset = 1; - // ... - // group 0 - copy_ptr aperiodic_srs_res_trigger_list_v1530; +// MeasObjectEUTRA ::= SEQUENCE +struct meas_obj_eutra_s { + using cells_to_add_mod_list_eutran_l_ = dyn_array; + using black_cells_to_add_mod_list_eutran_l_ = dyn_array; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - }; - struct semi_persistent_s_ { - bool ext = false; - bool associated_csi_rs_present = false; - uint8_t associated_csi_rs = 0; - // ... - }; - struct periodic_s_ { - bool ext = false; - bool associated_csi_rs_present = false; - uint8_t associated_csi_rs = 0; - // ... - }; + // member variables + bool ext = false; + bool cells_to_rem_list_eutran_present = false; + bool cells_to_add_mod_list_eutran_present = false; + bool black_cells_to_rem_list_eutran_present = false; + bool black_cells_to_add_mod_list_eutran_present = false; + bool eutra_q_offset_range_present = false; + uint32_t carrier_freq = 0; + eutra_allowed_meas_bw_e allowed_meas_bw; + eutra_cell_idx_list_l cells_to_rem_list_eutran; + cells_to_add_mod_list_eutran_l_ cells_to_add_mod_list_eutran; + eutra_cell_idx_list_l black_cells_to_rem_list_eutran; + black_cells_to_add_mod_list_eutran_l_ black_cells_to_add_mod_list_eutran; + bool eutra_presence_ant_port1 = false; + eutra_q_offset_range_e eutra_q_offset_range; + bool wideband_rsrq_meas = false; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectNR ::= SEQUENCE +struct meas_obj_nr_s { + using black_cells_to_add_mod_list_l_ = dyn_array; + using white_cells_to_add_mod_list_l_ = dyn_array; + struct meas_cycle_scell_opts { + enum options { sf160, sf256, sf320, sf512, sf640, sf1024, sf1280, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated meas_cycle_scell_e_; + + // member variables + bool ext = false; + bool ssb_freq_present = false; + bool ssb_subcarrier_spacing_present = false; + bool smtc1_present = false; + bool smtc2_present = false; + bool ref_freq_csi_rs_present = false; + bool abs_thresh_ss_blocks_consolidation_present = false; + bool abs_thresh_csi_rs_consolidation_present = false; + bool nrof_ss_blocks_to_average_present = false; + bool nrof_csi_rs_res_to_average_present = false; + bool cells_to_rem_list_present = false; + bool cells_to_add_mod_list_present = false; + bool black_cells_to_rem_list_present = false; + bool black_cells_to_add_mod_list_present = false; + bool white_cells_to_rem_list_present = false; + bool white_cells_to_add_mod_list_present = false; + uint32_t ssb_freq = 0; + subcarrier_spacing_e ssb_subcarrier_spacing; + ssb_mtc_s smtc1; + ssb_mtc2_s smtc2; + uint32_t ref_freq_csi_rs = 0; + ref_sig_cfg_s ref_sig_cfg; + thres_nr_s abs_thresh_ss_blocks_consolidation; + thres_nr_s abs_thresh_csi_rs_consolidation; + uint8_t nrof_ss_blocks_to_average = 2; + uint8_t nrof_csi_rs_res_to_average = 2; + uint8_t quant_cfg_idx = 1; + q_offset_range_list_s offset_mo; + pci_list_l cells_to_rem_list; + cells_to_add_mod_list_l cells_to_add_mod_list; + pci_range_idx_list_l black_cells_to_rem_list; + black_cells_to_add_mod_list_l_ black_cells_to_add_mod_list; + pci_range_idx_list_l white_cells_to_rem_list; + white_cells_to_add_mod_list_l_ white_cells_to_add_mod_list; + // ... + // group 0 + bool freq_band_ind_nr_present = false; + bool meas_cycle_scell_present = false; + uint16_t freq_band_ind_nr = 1; + meas_cycle_scell_e_ meas_cycle_scell; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OverheatingAssistanceConfig ::= SEQUENCE +struct overheat_assist_cfg_s { + struct overheat_ind_prohibit_timer_opts { + enum options { + s0, + s0dot5, + s1, + s2, + s5, + s10, + s20, + s30, + s60, + s90, + s120, + s300, + s600, + spare3, + spare2, + spare1, + nulltype + } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated overheat_ind_prohibit_timer_e_; + + // member variables + overheat_ind_prohibit_timer_e_ overheat_ind_prohibit_timer; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-RAN-AreaCell ::= SEQUENCE +struct plmn_ran_area_cell_s { + using ran_area_cells_l_ = bounded_array, 32>; + + // member variables + bool plmn_id_present = false; + plmn_id_s plmn_id; + ran_area_cells_l_ ran_area_cells; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-RAN-AreaConfig ::= SEQUENCE +struct plmn_ran_area_cfg_s { + using ran_area_l_ = dyn_array; + + // member variables + bool plmn_id_present = false; + plmn_id_s plmn_id; + ran_area_l_ ran_area; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigRS ::= SEQUENCE +struct quant_cfg_rs_s { + filt_cfg_s ssb_filt_cfg; + filt_cfg_s csi_rs_filt_cfg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportConfigInterRAT ::= SEQUENCE +struct report_cfg_inter_rat_s { + struct report_type_c_ { struct types_opts { - enum options { aperiodic, semi_persistent, periodic, nulltype } value; + enum options { periodical, event_triggered, report_cgi, /*...*/ report_sftd, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - res_type_c_() = default; - res_type_c_(const res_type_c_& other); - res_type_c_& operator=(const res_type_c_& other); - ~res_type_c_() { destroy_(); } + report_type_c_() = default; + report_type_c_(const report_type_c_& other); + report_type_c_& operator=(const report_type_c_& other); + ~report_type_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 - aperiodic_s_& aperiodic() + periodical_report_cfg_inter_rat_s& periodical() { - assert_choice_type("aperiodic", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("periodical", type_.to_string(), "reportType"); + return c.get(); } - semi_persistent_s_& semi_persistent() + event_trigger_cfg_inter_rat_s& event_triggered() { - assert_choice_type("semi-persistent", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("eventTriggered", type_.to_string(), "reportType"); + return c.get(); } - periodic_s_& periodic() + report_cgi_eutra_s& report_cgi() { - assert_choice_type("periodic", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("reportCGI", type_.to_string(), "reportType"); + return c.get(); } - const aperiodic_s_& aperiodic() const + report_sftd_eutra_s& report_sftd() { - assert_choice_type("aperiodic", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("reportSFTD", type_.to_string(), "reportType"); + return c.get(); } - const semi_persistent_s_& semi_persistent() const + const periodical_report_cfg_inter_rat_s& periodical() const { - assert_choice_type("semi-persistent", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("periodical", type_.to_string(), "reportType"); + return c.get(); } - const periodic_s_& periodic() const + const event_trigger_cfg_inter_rat_s& event_triggered() const { - assert_choice_type("periodic", type_.to_string(), "resourceType"); - return c.get(); + assert_choice_type("eventTriggered", type_.to_string(), "reportType"); + return c.get(); } - aperiodic_s_& set_aperiodic() + const report_cgi_eutra_s& report_cgi() const { - set(types::aperiodic); - return c.get(); + assert_choice_type("reportCGI", type_.to_string(), "reportType"); + return c.get(); } - semi_persistent_s_& set_semi_persistent() + const report_sftd_eutra_s& report_sftd() const { - set(types::semi_persistent); - return c.get(); + assert_choice_type("reportSFTD", type_.to_string(), "reportType"); + return c.get(); } - periodic_s_& set_periodic() + periodical_report_cfg_inter_rat_s& set_periodical() { - set(types::periodic); - return c.get(); + set(types::periodical); + return c.get(); + } + event_trigger_cfg_inter_rat_s& set_event_triggered() + { + set(types::event_triggered); + return c.get(); + } + report_cgi_eutra_s& set_report_cgi() + { + set(types::report_cgi); + return c.get(); + } + report_sftd_eutra_s& set_report_sftd() + { + set(types::report_sftd); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t + c; void destroy_(); }; - struct usage_opts { - enum options { beam_management, codebook, non_codebook, ant_switching, nulltype } value; - std::string to_string() const; - }; - typedef enumerated usage_e_; - struct pathloss_ref_rs_c_ { - struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; + // member variables + report_type_c_ report_type; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportConfigNR ::= SEQUENCE +struct report_cfg_nr_s { + struct report_type_c_ { + struct types_opts { + enum options { periodical, event_triggered, /*...*/ report_cgi, report_sftd, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - pathloss_ref_rs_c_() = default; - pathloss_ref_rs_c_(const pathloss_ref_rs_c_& other); - pathloss_ref_rs_c_& operator=(const pathloss_ref_rs_c_& other); - ~pathloss_ref_rs_c_() { destroy_(); } + report_type_c_() = default; + report_type_c_(const report_type_c_& other); + report_type_c_& operator=(const report_type_c_& other); + ~report_type_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 - uint8_t& ssb_idx() + periodical_report_cfg_s& periodical() { - assert_choice_type("ssb-Index", type_.to_string(), "pathlossReferenceRS"); - return c.get(); + assert_choice_type("periodical", type_.to_string(), "reportType"); + return c.get(); } - uint8_t& csi_rs_idx() + event_trigger_cfg_s& event_triggered() { - assert_choice_type("csi-RS-Index", type_.to_string(), "pathlossReferenceRS"); - return c.get(); + assert_choice_type("eventTriggered", type_.to_string(), "reportType"); + return c.get(); } - const uint8_t& ssb_idx() const + report_cgi_s& report_cgi() { - assert_choice_type("ssb-Index", type_.to_string(), "pathlossReferenceRS"); - return c.get(); + assert_choice_type("reportCGI", type_.to_string(), "reportType"); + return c.get(); } - const uint8_t& csi_rs_idx() const + report_sftd_nr_s& report_sftd() { - assert_choice_type("csi-RS-Index", type_.to_string(), "pathlossReferenceRS"); - return c.get(); + assert_choice_type("reportSFTD", type_.to_string(), "reportType"); + return c.get(); } - uint8_t& set_ssb_idx() + const periodical_report_cfg_s& periodical() const { - set(types::ssb_idx); - return c.get(); + assert_choice_type("periodical", type_.to_string(), "reportType"); + return c.get(); } - uint8_t& set_csi_rs_idx() + const event_trigger_cfg_s& event_triggered() const { - set(types::csi_rs_idx); - return c.get(); + assert_choice_type("eventTriggered", type_.to_string(), "reportType"); + return c.get(); + } + const report_cgi_s& report_cgi() const + { + assert_choice_type("reportCGI", type_.to_string(), "reportType"); + return c.get(); + } + const report_sftd_nr_s& report_sftd() const + { + assert_choice_type("reportSFTD", type_.to_string(), "reportType"); + return c.get(); + } + periodical_report_cfg_s& set_periodical() + { + set(types::periodical); + return c.get(); + } + event_trigger_cfg_s& set_event_triggered() + { + set(types::event_triggered); + return c.get(); + } + report_cgi_s& set_report_cgi() + { + set(types::report_cgi); + return c.get(); + } + report_sftd_nr_s& set_report_sftd() + { + set(types::report_sftd); + return c.get(); } private: - types type_; - pod_choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; - struct srs_pwr_ctrl_adjustment_states_opts { - enum options { same_as_fci2, separate_closed_loop, nulltype } value; + + // member variables + report_type_c_ report_type; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityEUTRA ::= SEQUENCE +struct freq_prio_eutra_s { + bool cell_resel_sub_prio_present = false; + uint32_t carrier_freq = 0; + uint8_t cell_resel_prio = 0; + cell_resel_sub_prio_e cell_resel_sub_prio; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityNR ::= SEQUENCE +struct freq_prio_nr_s { + bool cell_resel_sub_prio_present = false; + uint32_t carrier_freq = 0; + uint8_t cell_resel_prio = 0; + cell_resel_sub_prio_e cell_resel_sub_prio; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// GapConfig ::= SEQUENCE +struct gap_cfg_s { + struct mgl_opts { + enum options { ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated mgl_e_; + struct mgrp_opts { + enum options { ms20, ms40, ms80, ms160, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated srs_pwr_ctrl_adjustment_states_e_; + typedef enumerated mgrp_e_; + struct mgta_opts { + enum options { ms0, ms0dot25, ms0dot5, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated mgta_e_; + struct ref_serv_cell_ind_opts { + enum options { pcell, pscell, mcg_fr2, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated ref_serv_cell_ind_e_; // member variables - bool ext = false; - bool srs_res_id_list_present = false; - bool alpha_present = false; - bool p0_present = false; - bool pathloss_ref_rs_present = false; - bool srs_pwr_ctrl_adjustment_states_present = false; - uint8_t srs_res_set_id = 0; - srs_res_id_list_l_ srs_res_id_list; - res_type_c_ res_type; - usage_e_ usage; - alpha_e alpha; - int16_t p0 = -202; - pathloss_ref_rs_c_ pathloss_ref_rs; - srs_pwr_ctrl_adjustment_states_e_ srs_pwr_ctrl_adjustment_states; + bool ext = false; + uint8_t gap_offset = 0; + mgl_e_ mgl; + mgrp_e_ mgrp; + mgta_e_ mgta; // ... + // group 0 + bool ref_serv_cell_ind_present = false; + ref_serv_cell_ind_e_ ref_serv_cell_ind; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6442,239 +6565,91 @@ struct srs_res_set_s { void to_json(json_writer& j) const; }; -// SchedulingRequestResourceConfig ::= SEQUENCE -struct sched_request_res_cfg_s { - struct periodicity_and_offset_c_ { +// MeasGapSharingScheme ::= ENUMERATED +struct meas_gap_sharing_scheme_opts { + enum options { scheme00, scheme01, scheme10, scheme11, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; +}; +typedef enumerated meas_gap_sharing_scheme_e; + +// MeasIdToAddMod ::= SEQUENCE +struct meas_id_to_add_mod_s { + uint8_t meas_id = 1; + uint8_t meas_obj_id = 1; + uint8_t report_cfg_id = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectToAddMod ::= SEQUENCE +struct meas_obj_to_add_mod_s { + struct meas_obj_c_ { struct types_opts { - enum options { - sym2, - sym6or7, - sl1, - sl2, - sl4, - sl5, - sl8, - sl10, - sl16, - sl20, - sl40, - sl80, - sl160, - sl320, - sl640, - nulltype - } value; + enum options { meas_obj_nr, /*...*/ meas_obj_eutra, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - periodicity_and_offset_c_() = default; - periodicity_and_offset_c_(const periodicity_and_offset_c_& other); - periodicity_and_offset_c_& operator=(const periodicity_and_offset_c_& other); - ~periodicity_and_offset_c_() { destroy_(); } + meas_obj_c_() = default; + meas_obj_c_(const meas_obj_c_& other); + meas_obj_c_& operator=(const meas_obj_c_& other); + ~meas_obj_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 - uint8_t& sl2() + meas_obj_nr_s& meas_obj_nr() { - assert_choice_type("sl2", type_.to_string(), "periodicityAndOffset"); - return c.get(); + assert_choice_type("measObjectNR", type_.to_string(), "measObject"); + return c.get(); } - uint8_t& sl4() + meas_obj_eutra_s& meas_obj_eutra() { - assert_choice_type("sl4", type_.to_string(), "periodicityAndOffset"); - return c.get(); + assert_choice_type("measObjectEUTRA", type_.to_string(), "measObject"); + return c.get(); } - uint8_t& sl5() + const meas_obj_nr_s& meas_obj_nr() const { - assert_choice_type("sl5", type_.to_string(), "periodicityAndOffset"); - return c.get(); + assert_choice_type("measObjectNR", type_.to_string(), "measObject"); + return c.get(); } - uint8_t& sl8() + const meas_obj_eutra_s& meas_obj_eutra() const { - assert_choice_type("sl8", type_.to_string(), "periodicityAndOffset"); - return c.get(); + assert_choice_type("measObjectEUTRA", type_.to_string(), "measObject"); + return c.get(); } - uint8_t& sl10() + meas_obj_nr_s& set_meas_obj_nr() { - assert_choice_type("sl10", type_.to_string(), "periodicityAndOffset"); - return c.get(); + set(types::meas_obj_nr); + return c.get(); } - uint8_t& sl16() - { - assert_choice_type("sl16", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl20() - { - assert_choice_type("sl20", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl40() - { - assert_choice_type("sl40", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl80() - { - assert_choice_type("sl80", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl160() - { - assert_choice_type("sl160", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - uint16_t& sl320() - { - assert_choice_type("sl320", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - uint16_t& sl640() - { - assert_choice_type("sl640", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl2() const - { - assert_choice_type("sl2", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl4() const - { - assert_choice_type("sl4", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl5() const - { - assert_choice_type("sl5", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl8() const - { - assert_choice_type("sl8", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl10() const - { - assert_choice_type("sl10", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl16() const - { - assert_choice_type("sl16", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl20() const - { - assert_choice_type("sl20", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl40() const - { - assert_choice_type("sl40", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl80() const - { - assert_choice_type("sl80", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl160() const - { - assert_choice_type("sl160", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint16_t& sl320() const - { - assert_choice_type("sl320", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - const uint16_t& sl640() const - { - assert_choice_type("sl640", type_.to_string(), "periodicityAndOffset"); - return c.get(); - } - uint8_t& set_sl2() - { - set(types::sl2); - return c.get(); - } - uint8_t& set_sl4() - { - set(types::sl4); - return c.get(); - } - uint8_t& set_sl5() - { - set(types::sl5); - return c.get(); - } - uint8_t& set_sl8() - { - set(types::sl8); - return c.get(); - } - uint8_t& set_sl10() - { - set(types::sl10); - return c.get(); - } - uint8_t& set_sl16() - { - set(types::sl16); - return c.get(); - } - uint8_t& set_sl20() - { - set(types::sl20); - return c.get(); - } - uint8_t& set_sl40() - { - set(types::sl40); - return c.get(); - } - uint8_t& set_sl80() - { - set(types::sl80); - return c.get(); - } - uint8_t& set_sl160() - { - set(types::sl160); - return c.get(); - } - uint16_t& set_sl320() - { - set(types::sl320); - return c.get(); - } - uint16_t& set_sl640() + meas_obj_eutra_s& set_meas_obj_eutra() { - set(types::sl640); - return c.get(); + set(types::meas_obj_eutra); + return c.get(); } private: - types type_; - pod_choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; // member variables - bool periodicity_and_offset_present = false; - bool res_present = false; - uint8_t sched_request_res_id = 1; - uint8_t sched_request_id = 0; - periodicity_and_offset_c_ periodicity_and_offset; - uint8_t res = 0; + uint8_t meas_obj_id = 1; + meas_obj_c_ meas_obj; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6682,76 +6657,123 @@ struct sched_request_res_cfg_s { void to_json(json_writer& j) const; }; -// UCI-OnPUSCH ::= SEQUENCE -struct uci_on_pusch_s { - struct beta_offsets_c_ { - using dynamic_l_ = std::array; +// OtherConfig-v1540 ::= SEQUENCE +struct other_cfg_v1540_s { + bool ext = false; + bool overheat_assist_cfg_present = false; + setup_release_c overheat_assist_cfg; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-RAN-AreaCellList ::= SEQUENCE (SIZE (1..8)) OF PLMN-RAN-AreaCell +using plmn_ran_area_cell_list_l = dyn_array; + +// PLMN-RAN-AreaConfigList ::= SEQUENCE (SIZE (1..8)) OF PLMN-RAN-AreaConfig +using plmn_ran_area_cfg_list_l = dyn_array; + +// QuantityConfigNR ::= SEQUENCE +struct quant_cfg_nr_s { + bool quant_cfg_rs_idx_present = false; + quant_cfg_rs_s quant_cfg_cell; + quant_cfg_rs_s quant_cfg_rs_idx; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RAT-Type ::= ENUMERATED +struct rat_type_opts { + enum options { nr, eutra_nr, eutra, spare1, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated rat_type_e; + +// RRCReconfiguration-v1560-IEs ::= SEQUENCE +struct rrc_recfg_v1560_ies_s { + bool mrdc_secondary_cell_group_cfg_present = false; + bool radio_bearer_cfg2_present = false; + bool sk_counter_present = false; + bool non_crit_ext_present = false; + setup_release_c mrdc_secondary_cell_group_cfg; + dyn_octstring radio_bearer_cfg2; + uint32_t sk_counter = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportConfigToAddMod ::= SEQUENCE +struct report_cfg_to_add_mod_s { + struct report_cfg_c_ { struct types_opts { - enum options { dynamic_type, semi_static, nulltype } value; + enum options { report_cfg_nr, /*...*/ report_cfg_inter_rat, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - beta_offsets_c_() = default; - beta_offsets_c_(const beta_offsets_c_& other); - beta_offsets_c_& operator=(const beta_offsets_c_& other); - ~beta_offsets_c_() { destroy_(); } + report_cfg_c_() = default; + report_cfg_c_(const report_cfg_c_& other); + report_cfg_c_& operator=(const report_cfg_c_& other); + ~report_cfg_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 - dynamic_l_& dynamic_type() + report_cfg_nr_s& report_cfg_nr() { - assert_choice_type("dynamic", type_.to_string(), "betaOffsets"); - return c.get(); + assert_choice_type("reportConfigNR", type_.to_string(), "reportConfig"); + return c.get(); } - beta_offsets_s& semi_static() + report_cfg_inter_rat_s& report_cfg_inter_rat() { - assert_choice_type("semiStatic", type_.to_string(), "betaOffsets"); - return c.get(); + assert_choice_type("reportConfigInterRAT", type_.to_string(), "reportConfig"); + return c.get(); } - const dynamic_l_& dynamic_type() const + const report_cfg_nr_s& report_cfg_nr() const { - assert_choice_type("dynamic", type_.to_string(), "betaOffsets"); - return c.get(); + assert_choice_type("reportConfigNR", type_.to_string(), "reportConfig"); + return c.get(); } - const beta_offsets_s& semi_static() const + const report_cfg_inter_rat_s& report_cfg_inter_rat() const { - assert_choice_type("semiStatic", type_.to_string(), "betaOffsets"); - return c.get(); + assert_choice_type("reportConfigInterRAT", type_.to_string(), "reportConfig"); + return c.get(); } - dynamic_l_& set_dynamic_type() + report_cfg_nr_s& set_report_cfg_nr() { - set(types::dynamic_type); - return c.get(); + set(types::report_cfg_nr); + return c.get(); } - beta_offsets_s& set_semi_static() + report_cfg_inter_rat_s& set_report_cfg_inter_rat() { - set(types::semi_static); - return c.get(); + set(types::report_cfg_inter_rat); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; - struct scaling_opts { - enum options { f0p5, f0p65, f0p8, f1, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated scaling_e_; // member variables - bool beta_offsets_present = false; - beta_offsets_c_ beta_offsets; - scaling_e_ scaling; + uint8_t report_cfg_id = 1; + report_cfg_c_ report_cfg; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6759,51 +6781,63 @@ struct uci_on_pusch_s { void to_json(json_writer& j) const; }; -// BeamFailureRecoveryConfig ::= SEQUENCE -struct beam_fail_recovery_cfg_s { - using candidate_beam_rs_list_l_ = dyn_array; - struct ssb_per_rach_occasion_opts { - enum options { one_eighth, one_fourth, one_half, one, two, four, eight, sixteen, nulltype } value; - typedef float number_type; +// CarrierInfoNR ::= SEQUENCE +struct carrier_info_nr_s { + bool ext = false; + bool smtc_present = false; + uint32_t carrier_freq = 0; + subcarrier_spacing_e ssb_subcarrier_spacing; + ssb_mtc_s smtc; + // ... - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated ssb_per_rach_occasion_e_; - struct beam_fail_recovery_timer_opts { - enum options { ms10, ms20, ms40, ms60, ms80, ms100, ms150, ms200, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated beam_fail_recovery_timer_e_; +// DRB-CountMSB-Info ::= SEQUENCE +struct drb_count_msb_info_s { + uint8_t drb_id = 1; + uint32_t count_msb_ul = 0; + uint32_t count_msb_dl = 0; - // member variables - bool ext = false; - bool root_seq_idx_bfr_present = false; - bool rach_cfg_bfr_present = false; - bool rsrp_thres_ssb_present = false; - bool candidate_beam_rs_list_present = false; - bool ssb_per_rach_occasion_present = false; - bool ra_ssb_occasion_mask_idx_present = false; - bool recovery_search_space_id_present = false; - bool ra_prioritization_present = false; - bool beam_fail_recovery_timer_present = false; - uint8_t root_seq_idx_bfr = 0; - rach_cfg_generic_s rach_cfg_bfr; - uint8_t rsrp_thres_ssb = 0; - candidate_beam_rs_list_l_ candidate_beam_rs_list; - ssb_per_rach_occasion_e_ ssb_per_rach_occasion; - uint8_t ra_ssb_occasion_mask_idx = 0; - uint8_t recovery_search_space_id = 0; - ra_prioritization_s ra_prioritization; - beam_fail_recovery_timer_e_ beam_fail_recovery_timer; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityListEUTRA ::= SEQUENCE (SIZE (1..8)) OF FreqPriorityEUTRA +using freq_prio_list_eutra_l = dyn_array; + +// FreqPriorityListNR ::= SEQUENCE (SIZE (1..8)) OF FreqPriorityNR +using freq_prio_list_nr_l = dyn_array; + +// MasterKeyUpdate ::= SEQUENCE +struct master_key_upd_s { + bool ext = false; + bool nas_container_present = false; + bool key_set_change_ind = false; + uint8_t next_hop_chaining_count = 0; + dyn_octstring nas_container; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasGapConfig ::= SEQUENCE +struct meas_gap_cfg_s { + bool ext = false; + bool gap_fr2_present = false; + setup_release_c gap_fr2; // ... // group 0 - bool msg1_subcarrier_spacing_v1530_present = false; - subcarrier_spacing_e msg1_subcarrier_spacing_v1530; + copy_ptr > gap_fr1; + copy_ptr > gap_ue; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6811,82 +6845,90 @@ struct beam_fail_recovery_cfg_s { void to_json(json_writer& j) const; }; -// CSI-AssociatedReportConfigInfo ::= SEQUENCE -struct csi_associated_report_cfg_info_s { - struct res_for_ch_c_ { - struct nzp_csi_rs_s_ { - using qcl_info_l_ = bounded_array; +// MeasGapSharingConfig ::= SEQUENCE +struct meas_gap_sharing_cfg_s { + bool ext = false; + bool gap_sharing_fr2_present = false; + setup_release_c gap_sharing_fr2; + // ... + // group 0 + copy_ptr > gap_sharing_fr1; + copy_ptr > gap_sharing_ue; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasIdToAddModList ::= SEQUENCE (SIZE (1..64)) OF MeasIdToAddMod +using meas_id_to_add_mod_list_l = dyn_array; + +// MeasIdToRemoveList ::= SEQUENCE (SIZE (1..64)) OF INTEGER (1..64) +using meas_id_to_rem_list_l = dyn_array; + +// MeasObjectToAddModList ::= SEQUENCE (SIZE (1..64)) OF MeasObjectToAddMod +using meas_obj_to_add_mod_list_l = dyn_array; + +// MeasObjectToRemoveList ::= SEQUENCE (SIZE (1..64)) OF INTEGER (1..64) +using meas_obj_to_rem_list_l = dyn_array; + +// OtherConfig ::= SEQUENCE +struct other_cfg_s { + struct delay_budget_report_cfg_c_ { + struct setup_s_ { + struct delay_budget_report_prohibit_timer_opts { + enum options { s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated delay_budget_report_prohibit_timer_e_; // member variables - bool qcl_info_present = false; - uint8_t res_set = 1; - qcl_info_l_ qcl_info; + delay_budget_report_prohibit_timer_e_ delay_budget_report_prohibit_timer; }; struct types_opts { - enum options { nzp_csi_rs, csi_ssb_res_set, nulltype } value; + enum options { release, setup, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - res_for_ch_c_() = default; - res_for_ch_c_(const res_for_ch_c_& other); - res_for_ch_c_& operator=(const res_for_ch_c_& other); - ~res_for_ch_c_() { destroy_(); } + delay_budget_report_cfg_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; // getters - nzp_csi_rs_s_& nzp_csi_rs() - { - assert_choice_type("nzp-CSI-RS", type_.to_string(), "resourcesForChannel"); - return c.get(); - } - uint8_t& csi_ssb_res_set() - { - assert_choice_type("csi-SSB-ResourceSet", type_.to_string(), "resourcesForChannel"); - return c.get(); - } - const nzp_csi_rs_s_& nzp_csi_rs() const - { - assert_choice_type("nzp-CSI-RS", type_.to_string(), "resourcesForChannel"); - return c.get(); - } - const uint8_t& csi_ssb_res_set() const + setup_s_& setup() { - assert_choice_type("csi-SSB-ResourceSet", type_.to_string(), "resourcesForChannel"); - return c.get(); + assert_choice_type("setup", type_.to_string(), "delayBudgetReportingConfig"); + return c; } - nzp_csi_rs_s_& set_nzp_csi_rs() + const setup_s_& setup() const { - set(types::nzp_csi_rs); - return c.get(); + assert_choice_type("setup", type_.to_string(), "delayBudgetReportingConfig"); + return c; } - uint8_t& set_csi_ssb_res_set() + setup_s_& set_setup() { - set(types::csi_ssb_res_set); - return c.get(); + set(types::setup); + return c; } private: - types type_; - choice_buffer_t c; - - void destroy_(); + types type_; + setup_s_ c; }; // member variables - bool ext = false; - bool csi_im_res_for_interference_present = false; - bool nzp_csi_rs_res_for_interference_present = false; - uint8_t report_cfg_id = 0; - res_for_ch_c_ res_for_ch; - uint8_t csi_im_res_for_interference = 1; - uint8_t nzp_csi_rs_res_for_interference = 1; - // ... + bool delay_budget_report_cfg_present = false; + delay_budget_report_cfg_c_ delay_budget_report_cfg; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6894,166 +6936,98 @@ struct csi_associated_report_cfg_info_s { void to_json(json_writer& j) const; }; -// ConfiguredGrantConfig ::= SEQUENCE -struct cfgured_grant_cfg_s { - struct freq_hop_opts { - enum options { intra_slot, inter_slot, nulltype } value; +// PeriodicRNAU-TimerValue ::= ENUMERATED +struct periodic_rnau_timer_value_opts { + enum options { min5, min10, min20, min30, min60, min120, min360, min720, nulltype } value; + typedef uint16_t number_type; - std::string to_string() const; - }; - typedef enumerated freq_hop_e_; - struct mcs_table_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; + std::string to_string() const; + uint16_t to_number() const; +}; +typedef enumerated periodic_rnau_timer_value_e; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated mcs_table_e_; - struct mcs_table_transform_precoder_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; +// QuantityConfig ::= SEQUENCE +struct quant_cfg_s { + using quant_cfg_nr_list_l_ = dyn_array; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated mcs_table_transform_precoder_e_; - struct res_alloc_opts { - enum options { res_alloc_type0, res_alloc_type1, dynamic_switch, nulltype } value; - typedef uint8_t number_type; + // member variables + bool ext = false; + bool quant_cfg_nr_list_present = false; + quant_cfg_nr_list_l_ quant_cfg_nr_list; + // ... + // group 0 + copy_ptr quant_cfg_eutra; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated res_alloc_e_; - struct pwr_ctrl_loop_to_use_opts { - enum options { n0, n1, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated pwr_ctrl_loop_to_use_e_; - struct transform_precoder_opts { - enum options { enabled, disabled, nulltype } value; +// RAN-NotificationAreaInfo ::= CHOICE +struct ran_notif_area_info_c { + struct types_opts { + enum options { cell_list, ran_area_cfg_list, /*...*/ nulltype } value; std::string to_string() const; }; - typedef enumerated transform_precoder_e_; - struct rep_k_opts { - enum options { n1, n2, n4, n8, nulltype } value; - typedef uint8_t number_type; + typedef enumerated types; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated rep_k_e_; - struct rep_k_rv_opts { - enum options { s1_minus0231, s2_minus0303, s3_minus0000, nulltype } value; - typedef uint8_t number_type; + // choice methods + ran_notif_area_info_c() = default; + ran_notif_area_info_c(const ran_notif_area_info_c& other); + ran_notif_area_info_c& operator=(const ran_notif_area_info_c& other); + ~ran_notif_area_info_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 + plmn_ran_area_cell_list_l& cell_list() + { + assert_choice_type("cellList", type_.to_string(), "RAN-NotificationAreaInfo"); + return c.get(); + } + plmn_ran_area_cfg_list_l& ran_area_cfg_list() + { + assert_choice_type("ran-AreaConfigList", type_.to_string(), "RAN-NotificationAreaInfo"); + return c.get(); + } + const plmn_ran_area_cell_list_l& cell_list() const + { + assert_choice_type("cellList", type_.to_string(), "RAN-NotificationAreaInfo"); + return c.get(); + } + const plmn_ran_area_cfg_list_l& ran_area_cfg_list() const + { + assert_choice_type("ran-AreaConfigList", type_.to_string(), "RAN-NotificationAreaInfo"); + return c.get(); + } + plmn_ran_area_cell_list_l& set_cell_list() + { + set(types::cell_list); + return c.get(); + } + plmn_ran_area_cfg_list_l& set_ran_area_cfg_list() + { + set(types::ran_area_cfg_list); + return c.get(); + } - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated rep_k_rv_e_; - struct periodicity_opts { - enum 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, - sym6, - sym1x12, - sym2x12, - sym4x12, - sym5x12, - sym8x12, - sym10x12, - sym16x12, - sym20x12, - sym32x12, - sym40x12, - sym64x12, - sym80x12, - sym128x12, - sym160x12, - sym256x12, - sym320x12, - sym512x12, - sym640x12, - sym1280x12, - sym2560x12, - nulltype - } value; +private: + types type_; + choice_buffer_t c; - std::string to_string() const; - }; - typedef enumerated periodicity_e_; - struct rrc_cfgured_ul_grant_s_ { - bool ext = false; - bool dmrs_seq_initization_present = false; - bool srs_res_ind_present = false; - bool freq_hop_offset_present = false; - uint16_t time_domain_offset = 0; - uint8_t time_domain_alloc = 0; - fixed_bitstring<18> freq_domain_alloc; - uint8_t ant_port = 0; - uint8_t dmrs_seq_initization = 0; - uint8_t precoding_and_nof_layers = 0; - uint8_t srs_res_ind = 0; - uint8_t mcs_and_tbs = 0; - uint16_t freq_hop_offset = 1; - uint8_t pathloss_ref_idx = 0; - // ... - }; + void destroy_(); +}; - // member variables - bool ext = false; - bool freq_hop_present = false; - bool mcs_table_present = false; - bool mcs_table_transform_precoder_present = false; - bool uci_on_pusch_present = false; - bool rbg_size_present = false; - bool transform_precoder_present = false; - bool rep_k_rv_present = false; - bool cfgured_grant_timer_present = false; - bool rrc_cfgured_ul_grant_present = false; - freq_hop_e_ freq_hop; - dmrs_ul_cfg_s cg_dmrs_cfg; - mcs_table_e_ mcs_table; - mcs_table_transform_precoder_e_ mcs_table_transform_precoder; - setup_release_c uci_on_pusch; - res_alloc_e_ res_alloc; - pwr_ctrl_loop_to_use_e_ pwr_ctrl_loop_to_use; - uint8_t p0_pusch_alpha = 0; - transform_precoder_e_ transform_precoder; - uint8_t nrof_harq_processes = 1; - rep_k_e_ rep_k; - rep_k_rv_e_ rep_k_rv; - periodicity_e_ periodicity; - uint8_t cfgured_grant_timer = 1; - rrc_cfgured_ul_grant_s_ rrc_cfgured_ul_grant; - // ... +// RRCReconfiguration-v1540-IEs ::= SEQUENCE +struct rrc_recfg_v1540_ies_s { + bool other_cfg_v1540_present = false; + bool non_crit_ext_present = false; + other_cfg_v1540_s other_cfg_v1540; + rrc_recfg_v1560_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7061,30 +7035,21 @@ struct cfgured_grant_cfg_s { void to_json(json_writer& j) const; }; -// DMRS-DownlinkConfig ::= SEQUENCE -struct dmrs_dl_cfg_s { - struct dmrs_add_position_opts { - enum options { pos0, pos1, pos3, nulltype } value; +// RedirectedCarrierInfo-EUTRA ::= SEQUENCE +struct redirected_carrier_info_eutra_s { + struct cn_type_opts { + enum options { epc, five_gc, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated dmrs_add_position_e_; + typedef enumerated cn_type_e_; // member variables - bool ext = false; - bool dmrs_type_present = false; - bool dmrs_add_position_present = false; - bool max_len_present = false; - bool scrambling_id0_present = false; - bool scrambling_id1_present = false; - bool phase_tracking_rs_present = false; - dmrs_add_position_e_ dmrs_add_position; - uint32_t scrambling_id0 = 0; - uint32_t scrambling_id1 = 0; - setup_release_c phase_tracking_rs; - // ... + bool cn_type_present = false; + uint32_t eutra_freq = 0; + cn_type_e_ cn_type; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7092,24 +7057,18 @@ struct dmrs_dl_cfg_s { void to_json(json_writer& j) const; }; -// DownlinkPreemption ::= SEQUENCE -struct dl_preemption_s { - struct time_freq_set_opts { - enum options { set0, set1, nulltype } value; - typedef uint8_t number_type; +// ReportConfigToAddModList ::= SEQUENCE (SIZE (1..64)) OF ReportConfigToAddMod +using report_cfg_to_add_mod_list_l = dyn_array; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated time_freq_set_e_; - using int_cfg_per_serving_cell_l_ = dyn_array; +// ReportConfigToRemoveList ::= SEQUENCE (SIZE (1..64)) OF INTEGER (1..64) +using report_cfg_to_rem_list_l = dyn_array; - // member variables - bool ext = false; - uint32_t int_rnti = 0; - time_freq_set_e_ time_freq_set; - uint8_t dci_payload_size = 0; - int_cfg_per_serving_cell_l_ int_cfg_per_serving_cell; +// UE-CapabilityRAT-Request ::= SEQUENCE +struct ue_cap_rat_request_s { + bool ext = false; + bool cap_request_filt_present = false; + rat_type_e rat_type; + dyn_octstring cap_request_filt; // ... // sequence methods @@ -7118,140 +7077,117 @@ struct dl_preemption_s { void to_json(json_writer& j) const; }; -// EUTRA-MBSFN-SubframeConfig ::= SEQUENCE -struct eutra_mbsfn_sf_cfg_s { - struct radioframe_alloc_period_opts { - enum options { n1, n2, n4, n8, n16, n32, nulltype } value; +// CellReselectionPriorities ::= SEQUENCE +struct cell_resel_priorities_s { + struct t320_opts { + enum options { min5, min10, min20, min30, min60, min120, min180, spare1, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated radioframe_alloc_period_e_; - struct sf_alloc1_c_ { - struct types_opts { - enum options { one_frame, four_frames, nulltype } value; - typedef uint8_t number_type; + typedef enumerated t320_e_; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; + // member variables + bool ext = false; + bool freq_prio_list_eutra_present = false; + bool freq_prio_list_nr_present = false; + bool t320_present = false; + freq_prio_list_eutra_l freq_prio_list_eutra; + freq_prio_list_nr_l freq_prio_list_nr; + t320_e_ t320; + // ... - // choice methods - sf_alloc1_c_() = default; - sf_alloc1_c_(const sf_alloc1_c_& other); - sf_alloc1_c_& operator=(const sf_alloc1_c_& other); - ~sf_alloc1_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 - fixed_bitstring<6>& one_frame() - { - assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation1"); - return c.get >(); - } - fixed_bitstring<24>& four_frames() - { - assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation1"); - return c.get >(); - } - const fixed_bitstring<6>& one_frame() const - { - assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation1"); - return c.get >(); - } - const fixed_bitstring<24>& four_frames() const - { - assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation1"); - return c.get >(); - } - fixed_bitstring<6>& set_one_frame() - { - set(types::one_frame); - return c.get >(); - } - fixed_bitstring<24>& set_four_frames() - { - set(types::four_frames); - return c.get >(); - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - choice_buffer_t > c; +// DRB-CountMSB-InfoList ::= SEQUENCE (SIZE (1..29)) OF DRB-CountMSB-Info +using drb_count_msb_info_list_l = dyn_array; - void destroy_(); - }; - struct sf_alloc2_c_ { +// MeasConfig ::= SEQUENCE +struct meas_cfg_s { + struct s_measure_cfg_c_ { struct types_opts { - enum options { one_frame, four_frames, nulltype } value; - typedef uint8_t number_type; + enum options { ssb_rsrp, csi_rsrp, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; typedef enumerated types; // choice methods - sf_alloc2_c_() = default; - sf_alloc2_c_(const sf_alloc2_c_& other); - sf_alloc2_c_& operator=(const sf_alloc2_c_& other); - ~sf_alloc2_c_() { destroy_(); } + s_measure_cfg_c_() = default; + s_measure_cfg_c_(const s_measure_cfg_c_& other); + s_measure_cfg_c_& operator=(const s_measure_cfg_c_& other); + ~s_measure_cfg_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 - fixed_bitstring<2>& one_frame() + uint8_t& ssb_rsrp() { - assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation2"); - return c.get >(); + assert_choice_type("ssb-RSRP", type_.to_string(), "s-MeasureConfig"); + return c.get(); } - fixed_bitstring<8>& four_frames() + uint8_t& csi_rsrp() { - assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation2"); - return c.get >(); + assert_choice_type("csi-RSRP", type_.to_string(), "s-MeasureConfig"); + return c.get(); } - const fixed_bitstring<2>& one_frame() const + const uint8_t& ssb_rsrp() const { - assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation2"); - return c.get >(); + assert_choice_type("ssb-RSRP", type_.to_string(), "s-MeasureConfig"); + return c.get(); } - const fixed_bitstring<8>& four_frames() const + const uint8_t& csi_rsrp() const { - assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation2"); - return c.get >(); + assert_choice_type("csi-RSRP", type_.to_string(), "s-MeasureConfig"); + return c.get(); } - fixed_bitstring<2>& set_one_frame() + uint8_t& set_ssb_rsrp() { - set(types::one_frame); - return c.get >(); + set(types::ssb_rsrp); + return c.get(); } - fixed_bitstring<8>& set_four_frames() + uint8_t& set_csi_rsrp() { - set(types::four_frames); - return c.get >(); + set(types::csi_rsrp); + return c.get(); } private: - types type_; - choice_buffer_t > c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; // member variables - bool ext = false; - bool sf_alloc2_present = false; - radioframe_alloc_period_e_ radioframe_alloc_period; - uint8_t radioframe_alloc_offset = 0; - sf_alloc1_c_ sf_alloc1; - sf_alloc2_c_ sf_alloc2; + bool ext = false; + bool meas_obj_to_rem_list_present = false; + bool meas_obj_to_add_mod_list_present = false; + bool report_cfg_to_rem_list_present = false; + bool report_cfg_to_add_mod_list_present = false; + bool meas_id_to_rem_list_present = false; + bool meas_id_to_add_mod_list_present = false; + bool s_measure_cfg_present = false; + bool quant_cfg_present = false; + bool meas_gap_cfg_present = false; + bool meas_gap_sharing_cfg_present = false; + meas_obj_to_rem_list_l meas_obj_to_rem_list; + meas_obj_to_add_mod_list_l meas_obj_to_add_mod_list; + report_cfg_to_rem_list_l report_cfg_to_rem_list; + report_cfg_to_add_mod_list_l report_cfg_to_add_mod_list; + meas_id_to_rem_list_l meas_id_to_rem_list; + meas_id_to_add_mod_list_l meas_id_to_add_mod_list; + s_measure_cfg_c_ s_measure_cfg; + quant_cfg_s quant_cfg; + meas_gap_cfg_s meas_gap_cfg; + meas_gap_sharing_cfg_s meas_gap_sharing_cfg; // ... // sequence methods @@ -7260,55 +7196,26 @@ struct eutra_mbsfn_sf_cfg_s { void to_json(json_writer& j) const; }; -// MultiFrequencyBandListNR ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..1024) -using multi_freq_band_list_nr_l = bounded_array; - -// PUCCH-Config ::= SEQUENCE -struct pucch_cfg_s { - using res_set_to_add_mod_list_l_ = dyn_array; - using res_set_to_release_list_l_ = bounded_array; - using res_to_add_mod_list_l_ = dyn_array; - using res_to_release_list_l_ = dyn_array; - using sched_request_res_to_add_mod_list_l_ = dyn_array; - using sched_request_res_to_release_list_l_ = bounded_array; - using multi_csi_pucch_res_list_l_ = bounded_array; - using dl_data_to_ul_ack_l_ = bounded_array; - using spatial_relation_info_to_add_mod_list_l_ = dyn_array; - using spatial_relation_info_to_release_list_l_ = bounded_array; +// RRCReconfiguration-v1530-IEs ::= SEQUENCE +struct rrc_recfg_v1530_ies_s { + using ded_nas_msg_list_l_ = bounded_array; // member variables - bool ext = false; - bool res_set_to_add_mod_list_present = false; - bool res_set_to_release_list_present = false; - bool res_to_add_mod_list_present = false; - bool res_to_release_list_present = false; - bool format1_present = false; - bool format2_present = false; - bool format3_present = false; - bool format4_present = false; - bool sched_request_res_to_add_mod_list_present = false; - bool sched_request_res_to_release_list_present = false; - bool multi_csi_pucch_res_list_present = false; - bool dl_data_to_ul_ack_present = false; - bool spatial_relation_info_to_add_mod_list_present = false; - bool spatial_relation_info_to_release_list_present = false; - bool pucch_pwr_ctrl_present = false; - res_set_to_add_mod_list_l_ res_set_to_add_mod_list; - res_set_to_release_list_l_ res_set_to_release_list; - res_to_add_mod_list_l_ res_to_add_mod_list; - res_to_release_list_l_ res_to_release_list; - setup_release_c format1; - setup_release_c format2; - setup_release_c format3; - setup_release_c format4; - sched_request_res_to_add_mod_list_l_ sched_request_res_to_add_mod_list; - sched_request_res_to_release_list_l_ sched_request_res_to_release_list; - multi_csi_pucch_res_list_l_ multi_csi_pucch_res_list; - dl_data_to_ul_ack_l_ dl_data_to_ul_ack; - spatial_relation_info_to_add_mod_list_l_ spatial_relation_info_to_add_mod_list; - spatial_relation_info_to_release_list_l_ spatial_relation_info_to_release_list; - pucch_pwr_ctrl_s pucch_pwr_ctrl; - // ... + bool master_cell_group_present = false; + bool full_cfg_present = false; + bool ded_nas_msg_list_present = false; + bool master_key_upd_present = false; + bool ded_sib1_delivery_present = false; + bool ded_sys_info_delivery_present = false; + bool other_cfg_present = false; + bool non_crit_ext_present = false; + dyn_octstring master_cell_group; + ded_nas_msg_list_l_ ded_nas_msg_list; + master_key_upd_s master_key_upd; + dyn_octstring ded_sib1_delivery; + dyn_octstring ded_sys_info_delivery; + other_cfg_s other_cfg; + rrc_recfg_v1540_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7316,14 +7223,11 @@ struct pucch_cfg_s { void to_json(json_writer& j) const; }; -// PUCCH-TPC-CommandConfig ::= SEQUENCE -struct pucch_tpc_cmd_cfg_s { - bool ext = false; - bool tpc_idx_pcell_present = false; - bool tpc_idx_pucch_scell_present = false; - uint8_t tpc_idx_pcell = 1; - uint8_t tpc_idx_pucch_scell = 1; - // ... +// RRCRelease-v1540-IEs ::= SEQUENCE +struct rrc_release_v1540_ies_s { + bool wait_time_present = false; + bool non_crit_ext_present = false; + uint8_t wait_time = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7331,101 +7235,82 @@ struct pucch_tpc_cmd_cfg_s { void to_json(json_writer& j) const; }; -// PUSCH-Config ::= SEQUENCE -struct pusch_cfg_s { - struct tx_cfg_opts { - enum options { codebook, non_codebook, nulltype } value; +// RRCResume-v1560-IEs ::= SEQUENCE +struct rrc_resume_v1560_ies_s { + bool radio_bearer_cfg2_present = false; + bool sk_counter_present = false; + bool non_crit_ext_present = false; + dyn_octstring radio_bearer_cfg2; + uint32_t sk_counter = 0; - std::string to_string() const; - }; - typedef enumerated tx_cfg_e_; - struct freq_hop_opts { - enum options { intra_slot, inter_slot, nulltype } value; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - }; - typedef enumerated freq_hop_e_; - using freq_hop_offset_lists_l_ = bounded_array; - struct res_alloc_opts { - enum options { res_alloc_type0, res_alloc_type1, dynamic_switch, nulltype } value; - typedef uint8_t number_type; +// RedirectedCarrierInfo ::= CHOICE +struct redirected_carrier_info_c { + struct types_opts { + enum options { nr, eutra, /*...*/ nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; - typedef enumerated res_alloc_e_; - struct pusch_aggregation_factor_opts { - enum options { n2, n4, n8, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated pusch_aggregation_factor_e_; - struct mcs_table_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated mcs_table_e_; - struct mcs_table_transform_precoder_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; + typedef enumerated types; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated mcs_table_transform_precoder_e_; - struct transform_precoder_opts { - enum options { enabled, disabled, nulltype } value; + // choice methods + redirected_carrier_info_c() = default; + redirected_carrier_info_c(const redirected_carrier_info_c& other); + redirected_carrier_info_c& operator=(const redirected_carrier_info_c& other); + ~redirected_carrier_info_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 + carrier_info_nr_s& nr() + { + assert_choice_type("nr", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + redirected_carrier_info_eutra_s& eutra() + { + assert_choice_type("eutra", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const carrier_info_nr_s& nr() const + { + assert_choice_type("nr", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const redirected_carrier_info_eutra_s& eutra() const + { + assert_choice_type("eutra", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + carrier_info_nr_s& set_nr() + { + set(types::nr); + return c.get(); + } + redirected_carrier_info_eutra_s& set_eutra() + { + set(types::eutra); + return c.get(); + } - std::string to_string() const; - }; - typedef enumerated transform_precoder_e_; - struct codebook_subset_opts { - enum options { fully_and_partial_and_non_coherent, partial_and_non_coherent, non_coherent, nulltype } value; +private: + types type_; + choice_buffer_t c; - std::string to_string() const; - }; - typedef enumerated codebook_subset_e_; + void destroy_(); +}; - // member variables - bool ext = false; - bool data_scrambling_id_pusch_present = false; - bool tx_cfg_present = false; - bool dmrs_ul_for_pusch_map_type_a_present = false; - bool dmrs_ul_for_pusch_map_type_b_present = false; - bool pusch_pwr_ctrl_present = false; - bool freq_hop_present = false; - bool freq_hop_offset_lists_present = false; - bool pusch_time_domain_alloc_list_present = false; - bool pusch_aggregation_factor_present = false; - bool mcs_table_present = false; - bool mcs_table_transform_precoder_present = false; - bool transform_precoder_present = false; - bool codebook_subset_present = false; - bool max_rank_present = false; - bool rbg_size_present = false; - bool uci_on_pusch_present = false; - bool tp_pi2_bpsk_present = false; - uint16_t data_scrambling_id_pusch = 0; - tx_cfg_e_ tx_cfg; - setup_release_c dmrs_ul_for_pusch_map_type_a; - setup_release_c dmrs_ul_for_pusch_map_type_b; - pusch_pwr_ctrl_s pusch_pwr_ctrl; - freq_hop_e_ freq_hop; - freq_hop_offset_lists_l_ freq_hop_offset_lists; - res_alloc_e_ res_alloc; - setup_release_c > pusch_time_domain_alloc_list; - pusch_aggregation_factor_e_ pusch_aggregation_factor; - mcs_table_e_ mcs_table; - mcs_table_transform_precoder_e_ mcs_table_transform_precoder; - transform_precoder_e_ transform_precoder; - codebook_subset_e_ codebook_subset; - uint8_t max_rank = 1; - setup_release_c uci_on_pusch; +// SecurityConfigSMC ::= SEQUENCE +struct security_cfg_smc_s { + bool ext = false; + security_algorithm_cfg_s security_algorithm_cfg; // ... // sequence methods @@ -7434,15 +7319,17 @@ struct pusch_cfg_s { void to_json(json_writer& j) const; }; -// PUSCH-TPC-CommandConfig ::= SEQUENCE -struct pusch_tpc_cmd_cfg_s { - bool ext = false; - bool tpc_idx_present = false; - bool tpc_idx_sul_present = false; - bool target_cell_present = false; - uint8_t tpc_idx = 1; - uint8_t tpc_idx_sul = 1; - uint8_t target_cell = 0; +// SuspendConfig ::= SEQUENCE +struct suspend_cfg_s { + bool ext = false; + bool ran_notif_area_info_present = false; + bool t380_present = false; + fixed_bitstring<40> full_i_rnti; + fixed_bitstring<24> short_i_rnti; + paging_cycle_e ran_paging_cycle; + ran_notif_area_info_c ran_notif_area_info; + periodic_rnau_timer_value_e t380; + uint8_t next_hop_chaining_count = 0; // ... // sequence methods @@ -7451,77 +7338,53 @@ struct pusch_tpc_cmd_cfg_s { void to_json(json_writer& j) const; }; -// RadioLinkMonitoringRS ::= SEQUENCE -struct radio_link_monitoring_rs_s { - struct purpose_opts { - enum options { beam_fail, rlf, both, nulltype } value; +// UE-CapabilityRAT-RequestList ::= SEQUENCE (SIZE (1..8)) OF UE-CapabilityRAT-Request +using ue_cap_rat_request_list_l = dyn_array; - std::string to_string() const; - }; - typedef enumerated purpose_e_; - struct detection_res_c_ { - struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; +// CounterCheck-IEs ::= SEQUENCE +struct counter_check_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + drb_count_msb_info_list_l drb_count_msb_info_list; + dyn_octstring late_non_crit_ext; - std::string to_string() const; - }; - typedef enumerated types; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // choice methods - detection_res_c_() = default; - detection_res_c_(const detection_res_c_& other); - detection_res_c_& operator=(const detection_res_c_& other); - ~detection_res_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 - uint8_t& ssb_idx() - { - assert_choice_type("ssb-Index", type_.to_string(), "detectionResource"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type("csi-RS-Index", type_.to_string(), "detectionResource"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type("ssb-Index", type_.to_string(), "detectionResource"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type("csi-RS-Index", type_.to_string(), "detectionResource"); - return c.get(); - } - uint8_t& set_ssb_idx() - { - set(types::ssb_idx); - return c.get(); - } - uint8_t& set_csi_rs_idx() - { - set(types::csi_rs_idx); - return c.get(); - } +// DLInformationTransfer-IEs ::= SEQUENCE +struct dl_info_transfer_ies_s { + bool ded_nas_msg_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring ded_nas_msg; + dyn_octstring late_non_crit_ext; - private: - types type_; - pod_choice_buffer_t c; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - void destroy_(); +// MobilityFromNRCommand-IEs ::= SEQUENCE +struct mob_from_nr_cmd_ies_s { + struct target_rat_type_opts { + enum options { eutra, spare3, spare2, spare1, /*...*/ nulltype } value; + + std::string to_string() const; }; + typedef enumerated target_rat_type_e_; // member variables - bool ext = false; - uint8_t radio_link_monitoring_rs_id = 0; - purpose_e_ purpose; - detection_res_c_ detection_res; - // ... + bool nas_security_param_from_nr_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + target_rat_type_e_ target_rat_type; + dyn_octstring target_rat_msg_container; + dyn_octstring nas_security_param_from_nr; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7529,280 +7392,74 @@ struct radio_link_monitoring_rs_s { void to_json(json_writer& j) const; }; -// RateMatchPattern ::= SEQUENCE -struct rate_match_pattern_s { - struct pattern_type_c_ { - struct bitmaps_s_ { - struct symbols_in_res_block_c_ { - struct types_opts { - enum options { one_slot, two_slots, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - symbols_in_res_block_c_() = default; - symbols_in_res_block_c_(const symbols_in_res_block_c_& other); - symbols_in_res_block_c_& operator=(const symbols_in_res_block_c_& other); - ~symbols_in_res_block_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 - fixed_bitstring<14>& one_slot() - { - assert_choice_type("oneSlot", type_.to_string(), "symbolsInResourceBlock"); - return c.get >(); - } - fixed_bitstring<28>& two_slots() - { - assert_choice_type("twoSlots", type_.to_string(), "symbolsInResourceBlock"); - return c.get >(); - } - const fixed_bitstring<14>& one_slot() const - { - assert_choice_type("oneSlot", type_.to_string(), "symbolsInResourceBlock"); - return c.get >(); - } - const fixed_bitstring<28>& two_slots() const - { - assert_choice_type("twoSlots", type_.to_string(), "symbolsInResourceBlock"); - return c.get >(); - } - fixed_bitstring<14>& set_one_slot() - { - set(types::one_slot); - return c.get >(); - } - fixed_bitstring<28>& set_two_slots() - { - set(types::two_slots); - return c.get >(); - } - - private: - types type_; - choice_buffer_t > c; - - void destroy_(); - }; - struct periodicity_and_pattern_c_ { - struct types_opts { - enum options { n2, n4, n5, n8, n10, n20, n40, nulltype } value; - typedef uint8_t number_type; +// RRCReconfiguration-IEs ::= SEQUENCE +struct rrc_recfg_ies_s { + bool radio_bearer_cfg_present = false; + bool secondary_cell_group_present = false; + bool meas_cfg_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + radio_bearer_cfg_s radio_bearer_cfg; + dyn_octstring secondary_cell_group; + meas_cfg_s meas_cfg; + dyn_octstring late_non_crit_ext; + rrc_recfg_v1530_ies_s non_crit_ext; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // choice methods - periodicity_and_pattern_c_() = default; - periodicity_and_pattern_c_(const periodicity_and_pattern_c_& other); - periodicity_and_pattern_c_& operator=(const periodicity_and_pattern_c_& other); - ~periodicity_and_pattern_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 - fixed_bitstring<2>& n2() - { - assert_choice_type("n2", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - fixed_bitstring<4>& n4() - { - assert_choice_type("n4", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - fixed_bitstring<5>& n5() - { - assert_choice_type("n5", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - fixed_bitstring<8>& n8() - { - assert_choice_type("n8", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - fixed_bitstring<10>& n10() - { - assert_choice_type("n10", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - fixed_bitstring<20>& n20() - { - assert_choice_type("n20", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - fixed_bitstring<40>& n40() - { - assert_choice_type("n40", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - const fixed_bitstring<2>& n2() const - { - assert_choice_type("n2", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - const fixed_bitstring<4>& n4() const - { - assert_choice_type("n4", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - const fixed_bitstring<5>& n5() const - { - assert_choice_type("n5", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - const fixed_bitstring<8>& n8() const - { - assert_choice_type("n8", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - const fixed_bitstring<10>& n10() const - { - assert_choice_type("n10", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - const fixed_bitstring<20>& n20() const - { - assert_choice_type("n20", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - const fixed_bitstring<40>& n40() const - { - assert_choice_type("n40", type_.to_string(), "periodicityAndPattern"); - return c.get >(); - } - fixed_bitstring<2>& set_n2() - { - set(types::n2); - return c.get >(); - } - fixed_bitstring<4>& set_n4() - { - set(types::n4); - return c.get >(); - } - fixed_bitstring<5>& set_n5() - { - set(types::n5); - return c.get >(); - } - fixed_bitstring<8>& set_n8() - { - set(types::n8); - return c.get >(); - } - fixed_bitstring<10>& set_n10() - { - set(types::n10); - return c.get >(); - } - fixed_bitstring<20>& set_n20() - { - set(types::n20); - return c.get >(); - } - fixed_bitstring<40>& set_n40() - { - set(types::n40); - return c.get >(); - } +// RRCReestablishment-IEs ::= SEQUENCE +struct rrc_reest_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + uint8_t next_hop_chaining_count = 0; + dyn_octstring late_non_crit_ext; - private: - types type_; - choice_buffer_t > c; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - void destroy_(); - }; +// RRCRelease-IEs ::= SEQUENCE +struct rrc_release_ies_s { + struct depriorit_req_s_ { + struct depriorit_type_opts { + enum options { freq, nr, nulltype } value; - // member variables - bool ext = false; - bool periodicity_and_pattern_present = false; - fixed_bitstring<275> res_blocks; - symbols_in_res_block_c_ symbols_in_res_block; - periodicity_and_pattern_c_ periodicity_and_pattern; - // ... + std::string to_string() const; }; - struct types_opts { - enum options { bitmaps, ctrl_res_set, nulltype } value; + typedef enumerated depriorit_type_e_; + struct depriorit_timer_opts { + enum options { min5, min10, min15, min30, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; - typedef enumerated types; + typedef enumerated depriorit_timer_e_; - // choice methods - pattern_type_c_() = default; - pattern_type_c_(const pattern_type_c_& other); - pattern_type_c_& operator=(const pattern_type_c_& other); - ~pattern_type_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 - bitmaps_s_& bitmaps() - { - assert_choice_type("bitmaps", type_.to_string(), "patternType"); - return c.get(); - } - uint8_t& ctrl_res_set() - { - assert_choice_type("controlResourceSet", type_.to_string(), "patternType"); - return c.get(); - } - const bitmaps_s_& bitmaps() const - { - assert_choice_type("bitmaps", type_.to_string(), "patternType"); - return c.get(); - } - const uint8_t& ctrl_res_set() const - { - assert_choice_type("controlResourceSet", type_.to_string(), "patternType"); - return c.get(); - } - bitmaps_s_& set_bitmaps() - { - set(types::bitmaps); - return c.get(); - } - uint8_t& set_ctrl_res_set() - { - set(types::ctrl_res_set); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct dummy_opts { - enum options { dynamic_value, semi_static, nulltype } value; - - std::string to_string() const; + // member variables + depriorit_type_e_ depriorit_type; + depriorit_timer_e_ depriorit_timer; }; - typedef enumerated dummy_e_; // member variables - bool ext = false; - bool subcarrier_spacing_present = false; - uint8_t rate_match_pattern_id = 0; - pattern_type_c_ pattern_type; - subcarrier_spacing_e subcarrier_spacing; - dummy_e_ dummy; - // ... + bool redirected_carrier_info_present = false; + bool cell_resel_priorities_present = false; + bool suspend_cfg_present = false; + bool depriorit_req_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + redirected_carrier_info_c redirected_carrier_info; + cell_resel_priorities_s cell_resel_priorities; + suspend_cfg_s suspend_cfg; + depriorit_req_s_ depriorit_req; + dyn_octstring late_non_crit_ext; + rrc_release_v1540_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7810,72 +7467,32 @@ struct rate_match_pattern_s { void to_json(json_writer& j) const; }; -struct rate_match_pattern_group_item_c_ { - struct types_opts { - enum options { cell_level, bwp_level, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; +// RRCResume-IEs ::= SEQUENCE +struct rrc_resume_ies_s { + bool radio_bearer_cfg_present = false; + bool master_cell_group_present = false; + bool meas_cfg_present = false; + bool full_cfg_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + radio_bearer_cfg_s radio_bearer_cfg; + dyn_octstring master_cell_group; + meas_cfg_s meas_cfg; + dyn_octstring late_non_crit_ext; + rrc_resume_v1560_ies_s non_crit_ext; - // choice methods - rate_match_pattern_group_item_c_() = default; - rate_match_pattern_group_item_c_(const rate_match_pattern_group_item_c_& other); - rate_match_pattern_group_item_c_& operator=(const rate_match_pattern_group_item_c_& other); - ~rate_match_pattern_group_item_c_() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } + // sequence methods SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; - // getters - uint8_t& cell_level() - { - assert_choice_type("cellLevel", type_.to_string(), "RateMatchPatternGroup-item"); - return c.get(); - } - uint8_t& bwp_level() - { - assert_choice_type("bwpLevel", type_.to_string(), "RateMatchPatternGroup-item"); - return c.get(); - } - const uint8_t& cell_level() const - { - assert_choice_type("cellLevel", type_.to_string(), "RateMatchPatternGroup-item"); - return c.get(); - } - const uint8_t& bwp_level() const - { - assert_choice_type("bwpLevel", type_.to_string(), "RateMatchPatternGroup-item"); - return c.get(); - } - uint8_t& set_cell_level() - { - set(types::cell_level); - return c.get(); - } - uint8_t& set_bwp_level() - { - set(types::bwp_level); - return c.get(); - } - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); }; -// RateMatchPatternGroup ::= SEQUENCE (SIZE (1..8)) OF RateMatchPatternGroup-item -using rate_match_pattern_group_l = dyn_array; - -// SRS-CC-SetIndex ::= SEQUENCE -struct srs_cc_set_idx_s { - bool cc_set_idx_present = false; - bool cc_idx_in_one_cc_set_present = false; - uint8_t cc_set_idx = 0; - uint8_t cc_idx_in_one_cc_set = 0; +// SecurityModeCommand-IEs ::= SEQUENCE +struct security_mode_cmd_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + security_cfg_smc_s security_cfg_smc; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7883,25 +7500,13 @@ struct srs_cc_set_idx_s { void to_json(json_writer& j) const; }; -// SRS-Config ::= SEQUENCE -struct srs_cfg_s { - using srs_res_set_to_release_list_l_ = bounded_array; - using srs_res_set_to_add_mod_list_l_ = dyn_array; - using srs_res_to_release_list_l_ = dyn_array; - using srs_res_to_add_mod_list_l_ = dyn_array; - - // member variables - bool ext = false; - bool srs_res_set_to_release_list_present = false; - bool srs_res_set_to_add_mod_list_present = false; - bool srs_res_to_release_list_present = false; - bool srs_res_to_add_mod_list_present = false; - bool tpc_accumulation_present = false; - srs_res_set_to_release_list_l_ srs_res_set_to_release_list; - srs_res_set_to_add_mod_list_l_ srs_res_set_to_add_mod_list; - srs_res_to_release_list_l_ srs_res_to_release_list; - srs_res_to_add_mod_list_l_ srs_res_to_add_mod_list; - // ... +// UECapabilityEnquiry-IEs ::= SEQUENCE +struct ue_cap_enquiry_ies_s { + bool late_non_crit_ext_present = false; + bool ue_cap_enquiry_ext_present = false; + ue_cap_rat_request_list_l ue_cap_rat_request_list; + dyn_octstring late_non_crit_ext; + dyn_octstring ue_cap_enquiry_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7909,31 +7514,53 @@ struct srs_cfg_s { void to_json(json_writer& j) const; }; -// SRS-TPC-CommandConfig ::= SEQUENCE -struct srs_tpc_cmd_cfg_s { - bool ext = false; - bool start_bit_of_format2_minus3_present = false; - bool field_type_format2_minus3_present = false; - uint8_t start_bit_of_format2_minus3 = 1; - uint8_t field_type_format2_minus3 = 0; - // ... - // group 0 - bool start_bit_of_format2_minus3_sul_v1530_present = false; - uint8_t start_bit_of_format2_minus3_sul_v1530 = 1; +// CounterCheck ::= SEQUENCE +struct counter_check_s { + struct crit_exts_c_ { + struct types_opts { + enum options { counter_check, crit_exts_future, nulltype } value; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + }; + typedef enumerated types; -// SlotFormatCombination ::= SEQUENCE -struct slot_format_combination_s { - using slot_formats_l_ = dyn_array; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + counter_check_ies_s& counter_check() + { + assert_choice_type("counterCheck", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const counter_check_ies_s& counter_check() const + { + assert_choice_type("counterCheck", type_.to_string(), "criticalExtensions"); + return c.get(); + } + counter_check_ies_s& set_counter_check() + { + set(types::counter_check); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; // member variables - uint16_t slot_format_combination_id = 0; - slot_formats_l_ slot_formats; + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7941,14 +7568,53 @@ struct slot_format_combination_s { void to_json(json_writer& j) const; }; -// TCI-State ::= SEQUENCE -struct tci_state_s { - bool ext = false; - bool qcl_type2_present = false; - uint8_t tci_state_id = 0; - qcl_info_s qcl_type1; - qcl_info_s qcl_type2; - // ... +// DLInformationTransfer ::= SEQUENCE +struct dl_info_transfer_s { + struct crit_exts_c_ { + struct types_opts { + enum options { dl_info_transfer, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + dl_info_transfer_ies_s& dl_info_transfer() + { + assert_choice_type("dlInformationTransfer", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const dl_info_transfer_ies_s& dl_info_transfer() const + { + assert_choice_type("dlInformationTransfer", type_.to_string(), "criticalExtensions"); + return c.get(); + } + dl_info_transfer_ies_s& set_dl_info_transfer() + { + set(types::dl_info_transfer); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7956,30 +7622,53 @@ struct tci_state_s { void to_json(json_writer& j) const; }; -// ZP-CSI-RS-Resource ::= SEQUENCE -struct zp_csi_rs_res_s { - bool ext = false; - bool periodicity_and_offset_present = false; - uint8_t zp_csi_rs_res_id = 0; - csi_rs_res_map_s res_map; - csi_res_periodicity_and_offset_c periodicity_and_offset; - // ... +// MobilityFromNRCommand ::= SEQUENCE +struct mob_from_nr_cmd_s { + struct crit_exts_c_ { + struct types_opts { + enum options { mob_from_nr_cmd, crit_exts_future, nulltype } value; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + }; + typedef enumerated types; -// ZP-CSI-RS-ResourceSet ::= SEQUENCE -struct zp_csi_rs_res_set_s { - using zp_csi_rs_res_id_list_l_ = bounded_array; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + mob_from_nr_cmd_ies_s& mob_from_nr_cmd() + { + assert_choice_type("mobilityFromNRCommand", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const mob_from_nr_cmd_ies_s& mob_from_nr_cmd() const + { + assert_choice_type("mobilityFromNRCommand", type_.to_string(), "criticalExtensions"); + return c.get(); + } + mob_from_nr_cmd_ies_s& set_mob_from_nr_cmd() + { + set(types::mob_from_nr_cmd); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; // member variables - bool ext = false; - uint8_t zp_csi_rs_res_set_id = 0; - zp_csi_rs_res_id_list_l_ zp_csi_rs_res_id_list; - // ... + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7987,37 +7676,53 @@ struct zp_csi_rs_res_set_s { void to_json(json_writer& j) const; }; -// BWP-UplinkDedicated ::= SEQUENCE -struct bwp_ul_ded_s { - bool ext = false; - bool pucch_cfg_present = false; - bool pusch_cfg_present = false; - bool cfgured_grant_cfg_present = false; - bool srs_cfg_present = false; - bool beam_fail_recovery_cfg_present = false; - setup_release_c pucch_cfg; - setup_release_c pusch_cfg; - setup_release_c cfgured_grant_cfg; - setup_release_c srs_cfg; - setup_release_c beam_fail_recovery_cfg; - // ... +// RRCReconfiguration ::= SEQUENCE +struct rrc_recfg_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_recfg, crit_exts_future, nulltype } value; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + }; + typedef enumerated types; -// CFRA-CSIRS-Resource ::= SEQUENCE -struct cfra_csirs_res_s { - using ra_occasion_list_l_ = dyn_array; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + rrc_recfg_ies_s& rrc_recfg() + { + assert_choice_type("rrcReconfiguration", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_recfg_ies_s& rrc_recfg() const + { + assert_choice_type("rrcReconfiguration", type_.to_string(), "criticalExtensions"); + return c.get(); + } + rrc_recfg_ies_s& set_rrc_recfg() + { + set(types::rrc_recfg); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; // member variables - bool ext = false; - uint8_t csi_rs = 0; - ra_occasion_list_l_ ra_occasion_list; - uint8_t ra_preamb_idx = 0; - // ... + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -8025,12 +7730,53 @@ struct cfra_csirs_res_s { void to_json(json_writer& j) const; }; -// CFRA-SSB-Resource ::= SEQUENCE -struct cfra_ssb_res_s { - bool ext = false; - uint8_t ssb = 0; - uint8_t ra_preamb_idx = 0; - // ... +// RRCReestablishment ::= SEQUENCE +struct rrc_reest_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_reest, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + rrc_reest_ies_s& rrc_reest() + { + assert_choice_type("rrcReestablishment", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_reest_ies_s& rrc_reest() const + { + assert_choice_type("rrcReestablishment", type_.to_string(), "criticalExtensions"); + return c.get(); + } + rrc_reest_ies_s& set_rrc_reest() + { + set(types::rrc_reest); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -8038,14 +7784,53 @@ struct cfra_ssb_res_s { void to_json(json_writer& j) const; }; -// CSI-AperiodicTriggerState ::= SEQUENCE -struct csi_aperiodic_trigger_state_s { - using associated_report_cfg_info_list_l_ = dyn_array; +// RRCRelease ::= SEQUENCE +struct rrc_release_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_release, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + rrc_release_ies_s& rrc_release() + { + assert_choice_type("rrcRelease", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_release_ies_s& rrc_release() const + { + assert_choice_type("rrcRelease", type_.to_string(), "criticalExtensions"); + return c.get(); + } + rrc_release_ies_s& set_rrc_release() + { + set(types::rrc_release); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; // member variables - bool ext = false; - associated_report_cfg_info_list_l_ associated_report_cfg_info_list; - // ... + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -8053,203 +7838,53 @@ struct csi_aperiodic_trigger_state_s { void to_json(json_writer& j) const; }; -// CSI-ReportPeriodicityAndOffset ::= CHOICE -struct csi_report_periodicity_and_offset_c { - struct types_opts { - enum options { - slots4, - slots5, - slots8, - slots10, - slots16, - slots20, - slots40, - slots80, - slots160, - slots320, - nulltype - } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated types; +// RRCResume ::= SEQUENCE +struct rrc_resume_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_resume, crit_exts_future, nulltype } value; - // choice methods - csi_report_periodicity_and_offset_c() = default; - csi_report_periodicity_and_offset_c(const csi_report_periodicity_and_offset_c& other); - csi_report_periodicity_and_offset_c& operator=(const csi_report_periodicity_and_offset_c& other); - ~csi_report_periodicity_and_offset_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 - uint8_t& slots4() - { - assert_choice_type("slots4", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots5() - { - assert_choice_type("slots5", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots8() - { - assert_choice_type("slots8", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots10() - { - assert_choice_type("slots10", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots16() - { - assert_choice_type("slots16", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots20() - { - assert_choice_type("slots20", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots40() - { - assert_choice_type("slots40", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots80() - { - assert_choice_type("slots80", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots160() - { - assert_choice_type("slots160", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint16_t& slots320() - { - assert_choice_type("slots320", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots4() const - { - assert_choice_type("slots4", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots5() const - { - assert_choice_type("slots5", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots8() const - { - assert_choice_type("slots8", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots10() const - { - assert_choice_type("slots10", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots16() const - { - assert_choice_type("slots16", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots20() const - { - assert_choice_type("slots20", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots40() const - { - assert_choice_type("slots40", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots80() const - { - assert_choice_type("slots80", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots160() const - { - assert_choice_type("slots160", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - const uint16_t& slots320() const - { - assert_choice_type("slots320", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); - return c.get(); - } - uint8_t& set_slots4() - { - set(types::slots4); - return c.get(); - } - uint8_t& set_slots5() - { - set(types::slots5); - return c.get(); - } - uint8_t& set_slots8() - { - set(types::slots8); - return c.get(); - } - uint8_t& set_slots10() - { - set(types::slots10); - return c.get(); - } - uint8_t& set_slots16() - { - set(types::slots16); - return c.get(); - } - uint8_t& set_slots20() - { - set(types::slots20); - return c.get(); - } - uint8_t& set_slots40() - { - set(types::slots40); - return c.get(); - } - uint8_t& set_slots80() - { - set(types::slots80); - return c.get(); - } - uint8_t& set_slots160() - { - set(types::slots160); - return c.get(); - } - uint16_t& set_slots320() - { - set(types::slots320); - return c.get(); - } + std::string to_string() const; + }; + typedef enumerated types; -private: - types type_; - pod_choice_buffer_t c; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + rrc_resume_ies_s& rrc_resume() + { + assert_choice_type("rrcResume", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_resume_ies_s& rrc_resume() const + { + assert_choice_type("rrcResume", type_.to_string(), "criticalExtensions"); + return c.get(); + } + rrc_resume_ies_s& set_rrc_resume() + { + set(types::rrc_resume); + return c.get(); + } - void destroy_(); -}; + private: + types type_; + choice_buffer_t c; -// CSI-SemiPersistentOnPUSCH-TriggerState ::= SEQUENCE -struct csi_semi_persistent_on_pusch_trigger_state_s { - bool ext = false; - uint8_t associated_report_cfg_info = 0; - // ... + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -8257,962 +7892,531 @@ struct csi_semi_persistent_on_pusch_trigger_state_s { void to_json(json_writer& j) const; }; -// CodebookConfig ::= SEQUENCE -struct codebook_cfg_s { - struct codebook_type_c_ { - struct type1_s_ { - struct sub_type_c_ { - struct type_i_single_panel_s_ { - struct nr_of_ant_ports_c_ { - struct two_s_ { - fixed_bitstring<6> two_tx_codebook_subset_restrict; - }; - struct more_than_two_s_ { - struct n1_n2_c_ { - struct types_opts { - enum options { - two_one_type_i_single_panel_restrict, - two_two_type_i_single_panel_restrict, - four_one_type_i_single_panel_restrict, - three_two_type_i_single_panel_restrict, - six_one_type_i_single_panel_restrict, - four_two_type_i_single_panel_restrict, - eight_one_type_i_single_panel_restrict, - four_three_type_i_single_panel_restrict, - six_two_type_i_single_panel_restrict, - twelve_one_type_i_single_panel_restrict, - four_four_type_i_single_panel_restrict, - eight_two_type_i_single_panel_restrict, - sixteen_one_type_i_single_panel_restrict, - nulltype - } value; +// SecurityModeCommand ::= SEQUENCE +struct security_mode_cmd_s { + struct crit_exts_c_ { + struct types_opts { + enum options { security_mode_cmd, crit_exts_future, nulltype } value; - std::string to_string() const; - }; - typedef enumerated types; + std::string to_string() const; + }; + typedef enumerated types; - // choice methods - n1_n2_c_() = default; - n1_n2_c_(const n1_n2_c_& other); - n1_n2_c_& operator=(const n1_n2_c_& other); - ~n1_n2_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 - fixed_bitstring<8>& two_one_type_i_single_panel_restrict() - { - assert_choice_type("two-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<64>& two_two_type_i_single_panel_restrict() - { - assert_choice_type("two-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<16>& four_one_type_i_single_panel_restrict() - { - assert_choice_type("four-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<96>& three_two_type_i_single_panel_restrict() - { - assert_choice_type("three-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<24>& six_one_type_i_single_panel_restrict() - { - assert_choice_type("six-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<128>& four_two_type_i_single_panel_restrict() - { - assert_choice_type("four-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<32>& eight_one_type_i_single_panel_restrict() - { - assert_choice_type("eight-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<192>& four_three_type_i_single_panel_restrict() - { - assert_choice_type("four-three-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<192>& six_two_type_i_single_panel_restrict() - { - assert_choice_type("six-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<48>& twelve_one_type_i_single_panel_restrict() - { - assert_choice_type("twelve-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<256>& four_four_type_i_single_panel_restrict() - { - assert_choice_type("four-four-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<256>& eight_two_type_i_single_panel_restrict() - { - assert_choice_type("eight-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<64>& sixteen_one_type_i_single_panel_restrict() - { - assert_choice_type("sixteen-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<8>& two_one_type_i_single_panel_restrict() const - { - assert_choice_type("two-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<64>& two_two_type_i_single_panel_restrict() const - { - assert_choice_type("two-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<16>& four_one_type_i_single_panel_restrict() const - { - assert_choice_type("four-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<96>& three_two_type_i_single_panel_restrict() const - { - assert_choice_type("three-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<24>& six_one_type_i_single_panel_restrict() const - { - assert_choice_type("six-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<128>& four_two_type_i_single_panel_restrict() const - { - assert_choice_type("four-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<32>& eight_one_type_i_single_panel_restrict() const - { - assert_choice_type("eight-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<192>& four_three_type_i_single_panel_restrict() const - { - assert_choice_type("four-three-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<192>& six_two_type_i_single_panel_restrict() const - { - assert_choice_type("six-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<48>& twelve_one_type_i_single_panel_restrict() const - { - assert_choice_type("twelve-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<256>& four_four_type_i_single_panel_restrict() const - { - assert_choice_type("four-four-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<256>& eight_two_type_i_single_panel_restrict() const - { - assert_choice_type("eight-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - const fixed_bitstring<64>& sixteen_one_type_i_single_panel_restrict() const - { - assert_choice_type("sixteen-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); - return c.get >(); - } - fixed_bitstring<8>& set_two_one_type_i_single_panel_restrict() - { - set(types::two_one_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<64>& set_two_two_type_i_single_panel_restrict() - { - set(types::two_two_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<16>& set_four_one_type_i_single_panel_restrict() - { - set(types::four_one_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<96>& set_three_two_type_i_single_panel_restrict() - { - set(types::three_two_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<24>& set_six_one_type_i_single_panel_restrict() - { - set(types::six_one_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<128>& set_four_two_type_i_single_panel_restrict() - { - set(types::four_two_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<32>& set_eight_one_type_i_single_panel_restrict() - { - set(types::eight_one_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<192>& set_four_three_type_i_single_panel_restrict() - { - set(types::four_three_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<192>& set_six_two_type_i_single_panel_restrict() - { - set(types::six_two_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<48>& set_twelve_one_type_i_single_panel_restrict() - { - set(types::twelve_one_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<256>& set_four_four_type_i_single_panel_restrict() - { - set(types::four_four_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<256>& set_eight_two_type_i_single_panel_restrict() - { - set(types::eight_two_type_i_single_panel_restrict); - return c.get >(); - } - fixed_bitstring<64>& set_sixteen_one_type_i_single_panel_restrict() - { - set(types::sixteen_one_type_i_single_panel_restrict); - return c.get >(); - } + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + security_mode_cmd_ies_s& security_mode_cmd() + { + assert_choice_type("securityModeCommand", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const security_mode_cmd_ies_s& security_mode_cmd() const + { + assert_choice_type("securityModeCommand", type_.to_string(), "criticalExtensions"); + return c.get(); + } + security_mode_cmd_ies_s& set_security_mode_cmd() + { + set(types::security_mode_cmd); + return c.get(); + } - private: - types type_; - choice_buffer_t > c; + private: + types type_; + choice_buffer_t c; - void destroy_(); - }; + void destroy_(); + }; - // member variables - bool type_i_single_panel_codebook_subset_restrict_i2_present = false; - n1_n2_c_ n1_n2; - fixed_bitstring<16> type_i_single_panel_codebook_subset_restrict_i2; - }; - struct types_opts { - enum options { two, more_than_two, nulltype } value; - typedef uint8_t number_type; + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - nr_of_ant_ports_c_() = default; - nr_of_ant_ports_c_(const nr_of_ant_ports_c_& other); - nr_of_ant_ports_c_& operator=(const nr_of_ant_ports_c_& other); - ~nr_of_ant_ports_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 - two_s_& two() - { - assert_choice_type("two", type_.to_string(), "nrOfAntennaPorts"); - return c.get(); - } - more_than_two_s_& more_than_two() - { - assert_choice_type("moreThanTwo", type_.to_string(), "nrOfAntennaPorts"); - return c.get(); - } - const two_s_& two() const - { - assert_choice_type("two", type_.to_string(), "nrOfAntennaPorts"); - return c.get(); - } - const more_than_two_s_& more_than_two() const - { - assert_choice_type("moreThanTwo", type_.to_string(), "nrOfAntennaPorts"); - return c.get(); - } - two_s_& set_two() - { - set(types::two); - return c.get(); - } - more_than_two_s_& set_more_than_two() - { - set(types::more_than_two); - return c.get(); - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - choice_buffer_t c; +// UECapabilityEnquiry ::= SEQUENCE +struct ue_cap_enquiry_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ue_cap_enquiry, crit_exts_future, nulltype } value; - void destroy_(); - }; + std::string to_string() const; + }; + typedef enumerated types; - // member variables - nr_of_ant_ports_c_ nr_of_ant_ports; - fixed_bitstring<8> type_i_single_panel_ri_restrict; - }; - struct type_i_multi_panel_s_ { - struct ng_n1_n2_c_ { - struct types_opts { - enum options { - two_two_one_type_i_multi_panel_restrict, - two_four_one_type_i_multi_panel_restrict, - four_two_one_type_i_multi_panel_restrict, - two_two_two_type_i_multi_panel_restrict, - two_eight_one_type_i_multi_panel_restrict, - four_four_one_type_i_multi_panel_restrict, - two_four_two_type_i_multi_panel_restrict, - four_two_two_type_i_multi_panel_restrict, - nulltype - } value; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + ue_cap_enquiry_ies_s& ue_cap_enquiry() + { + assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const ue_cap_enquiry_ies_s& ue_cap_enquiry() const + { + assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "criticalExtensions"); + return c.get(); + } + ue_cap_enquiry_ies_s& set_ue_cap_enquiry() + { + set(types::ue_cap_enquiry); + return c.get(); + } - std::string to_string() const; - }; - typedef enumerated types; + private: + types type_; + choice_buffer_t c; - // choice methods - ng_n1_n2_c_() = default; - ng_n1_n2_c_(const ng_n1_n2_c_& other); - ng_n1_n2_c_& operator=(const ng_n1_n2_c_& other); - ~ng_n1_n2_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 - fixed_bitstring<8>& two_two_one_type_i_multi_panel_restrict() - { - assert_choice_type("two-two-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - fixed_bitstring<16>& two_four_one_type_i_multi_panel_restrict() - { - assert_choice_type("two-four-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - fixed_bitstring<8>& four_two_one_type_i_multi_panel_restrict() - { - assert_choice_type("four-two-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - fixed_bitstring<64>& two_two_two_type_i_multi_panel_restrict() - { - assert_choice_type("two-two-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - fixed_bitstring<32>& two_eight_one_type_i_multi_panel_restrict() - { - assert_choice_type("two-eight-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - fixed_bitstring<16>& four_four_one_type_i_multi_panel_restrict() - { - assert_choice_type("four-four-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - fixed_bitstring<128>& two_four_two_type_i_multi_panel_restrict() - { - assert_choice_type("two-four-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - fixed_bitstring<64>& four_two_two_type_i_multi_panel_restrict() - { - assert_choice_type("four-two-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - const fixed_bitstring<8>& two_two_one_type_i_multi_panel_restrict() const - { - assert_choice_type("two-two-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - const fixed_bitstring<16>& two_four_one_type_i_multi_panel_restrict() const - { - assert_choice_type("two-four-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - const fixed_bitstring<8>& four_two_one_type_i_multi_panel_restrict() const - { - assert_choice_type("four-two-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - const fixed_bitstring<64>& two_two_two_type_i_multi_panel_restrict() const - { - assert_choice_type("two-two-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - const fixed_bitstring<32>& two_eight_one_type_i_multi_panel_restrict() const - { - assert_choice_type("two-eight-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - const fixed_bitstring<16>& four_four_one_type_i_multi_panel_restrict() const - { - assert_choice_type("four-four-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - const fixed_bitstring<128>& two_four_two_type_i_multi_panel_restrict() const - { - assert_choice_type("two-four-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - const fixed_bitstring<64>& four_two_two_type_i_multi_panel_restrict() const - { - assert_choice_type("four-two-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); - return c.get >(); - } - fixed_bitstring<8>& set_two_two_one_type_i_multi_panel_restrict() - { - set(types::two_two_one_type_i_multi_panel_restrict); - return c.get >(); - } - fixed_bitstring<16>& set_two_four_one_type_i_multi_panel_restrict() - { - set(types::two_four_one_type_i_multi_panel_restrict); - return c.get >(); - } - fixed_bitstring<8>& set_four_two_one_type_i_multi_panel_restrict() - { - set(types::four_two_one_type_i_multi_panel_restrict); - return c.get >(); - } - fixed_bitstring<64>& set_two_two_two_type_i_multi_panel_restrict() - { - set(types::two_two_two_type_i_multi_panel_restrict); - return c.get >(); - } - fixed_bitstring<32>& set_two_eight_one_type_i_multi_panel_restrict() - { - set(types::two_eight_one_type_i_multi_panel_restrict); - return c.get >(); - } - fixed_bitstring<16>& set_four_four_one_type_i_multi_panel_restrict() - { - set(types::four_four_one_type_i_multi_panel_restrict); - return c.get >(); - } - fixed_bitstring<128>& set_two_four_two_type_i_multi_panel_restrict() - { - set(types::two_four_two_type_i_multi_panel_restrict); - return c.get >(); - } - fixed_bitstring<64>& set_four_two_two_type_i_multi_panel_restrict() - { - set(types::four_two_two_type_i_multi_panel_restrict); - return c.get >(); - } + void destroy_(); + }; - private: - types type_; - choice_buffer_t > c; + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; - void destroy_(); - }; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - ng_n1_n2_c_ ng_n1_n2; - fixed_bitstring<4> ri_restrict; - }; - struct types_opts { - enum options { type_i_single_panel, type_i_multi_panel, nulltype } value; +// DL-DCCH-MessageType ::= CHOICE +struct dl_dcch_msg_type_c { + struct c1_c_ { + struct types_opts { + enum options { + rrc_recfg, + rrc_resume, + rrc_release, + rrc_reest, + security_mode_cmd, + dl_info_transfer, + ue_cap_enquiry, + counter_check, + mob_from_nr_cmd, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; - std::string to_string() const; - }; - typedef enumerated types; + std::string to_string() const; + }; + typedef enumerated types; - // choice methods - sub_type_c_() = default; - sub_type_c_(const sub_type_c_& other); - sub_type_c_& operator=(const sub_type_c_& other); - ~sub_type_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 - type_i_single_panel_s_& type_i_single_panel() - { - assert_choice_type("typeI-SinglePanel", type_.to_string(), "subType"); - return c.get(); - } - type_i_multi_panel_s_& type_i_multi_panel() - { - assert_choice_type("typeI-MultiPanel", type_.to_string(), "subType"); - return c.get(); - } - const type_i_single_panel_s_& type_i_single_panel() const - { - assert_choice_type("typeI-SinglePanel", type_.to_string(), "subType"); - return c.get(); - } - const type_i_multi_panel_s_& type_i_multi_panel() const - { - assert_choice_type("typeI-MultiPanel", type_.to_string(), "subType"); - return c.get(); - } - type_i_single_panel_s_& set_type_i_single_panel() - { - set(types::type_i_single_panel); - return c.get(); - } - type_i_multi_panel_s_& set_type_i_multi_panel() - { - set(types::type_i_multi_panel); - return c.get(); - } + // choice methods + c1_c_() = default; + c1_c_(const c1_c_& other); + c1_c_& operator=(const c1_c_& other); + ~c1_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 + rrc_recfg_s& rrc_recfg() + { + assert_choice_type("rrcReconfiguration", type_.to_string(), "c1"); + return c.get(); + } + rrc_resume_s& rrc_resume() + { + assert_choice_type("rrcResume", type_.to_string(), "c1"); + return c.get(); + } + rrc_release_s& rrc_release() + { + assert_choice_type("rrcRelease", type_.to_string(), "c1"); + return c.get(); + } + rrc_reest_s& rrc_reest() + { + assert_choice_type("rrcReestablishment", type_.to_string(), "c1"); + return c.get(); + } + security_mode_cmd_s& security_mode_cmd() + { + assert_choice_type("securityModeCommand", type_.to_string(), "c1"); + return c.get(); + } + dl_info_transfer_s& dl_info_transfer() + { + assert_choice_type("dlInformationTransfer", type_.to_string(), "c1"); + return c.get(); + } + ue_cap_enquiry_s& ue_cap_enquiry() + { + assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "c1"); + return c.get(); + } + counter_check_s& counter_check() + { + assert_choice_type("counterCheck", type_.to_string(), "c1"); + return c.get(); + } + mob_from_nr_cmd_s& mob_from_nr_cmd() + { + assert_choice_type("mobilityFromNRCommand", type_.to_string(), "c1"); + return c.get(); + } + const rrc_recfg_s& rrc_recfg() const + { + assert_choice_type("rrcReconfiguration", type_.to_string(), "c1"); + return c.get(); + } + const rrc_resume_s& rrc_resume() const + { + assert_choice_type("rrcResume", type_.to_string(), "c1"); + return c.get(); + } + const rrc_release_s& rrc_release() const + { + assert_choice_type("rrcRelease", type_.to_string(), "c1"); + return c.get(); + } + const rrc_reest_s& rrc_reest() const + { + assert_choice_type("rrcReestablishment", type_.to_string(), "c1"); + return c.get(); + } + const security_mode_cmd_s& security_mode_cmd() const + { + assert_choice_type("securityModeCommand", type_.to_string(), "c1"); + return c.get(); + } + const dl_info_transfer_s& dl_info_transfer() const + { + assert_choice_type("dlInformationTransfer", type_.to_string(), "c1"); + return c.get(); + } + const ue_cap_enquiry_s& ue_cap_enquiry() const + { + assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "c1"); + return c.get(); + } + const counter_check_s& counter_check() const + { + assert_choice_type("counterCheck", type_.to_string(), "c1"); + return c.get(); + } + const mob_from_nr_cmd_s& mob_from_nr_cmd() const + { + assert_choice_type("mobilityFromNRCommand", type_.to_string(), "c1"); + return c.get(); + } + rrc_recfg_s& set_rrc_recfg() + { + set(types::rrc_recfg); + return c.get(); + } + rrc_resume_s& set_rrc_resume() + { + set(types::rrc_resume); + return c.get(); + } + rrc_release_s& set_rrc_release() + { + set(types::rrc_release); + return c.get(); + } + rrc_reest_s& set_rrc_reest() + { + set(types::rrc_reest); + return c.get(); + } + security_mode_cmd_s& set_security_mode_cmd() + { + set(types::security_mode_cmd); + return c.get(); + } + dl_info_transfer_s& set_dl_info_transfer() + { + set(types::dl_info_transfer); + return c.get(); + } + ue_cap_enquiry_s& set_ue_cap_enquiry() + { + set(types::ue_cap_enquiry); + return c.get(); + } + counter_check_s& set_counter_check() + { + set(types::counter_check); + return c.get(); + } + mob_from_nr_cmd_s& set_mob_from_nr_cmd() + { + set(types::mob_from_nr_cmd); + return c.get(); + } - private: - types type_; - choice_buffer_t c; + private: + types type_; + choice_buffer_t + c; - void destroy_(); - }; + void destroy_(); + }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; - // member variables - sub_type_c_ sub_type; - uint8_t codebook_mode = 1; - }; - struct type2_s_ { - struct sub_type_c_ { - struct type_ii_s_ { - struct n1_n2_codebook_subset_restrict_c_ { - struct types_opts { - enum 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, - nulltype - } value; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; - std::string to_string() const; - }; - typedef enumerated types; + // choice methods + dl_dcch_msg_type_c() = default; + dl_dcch_msg_type_c(const dl_dcch_msg_type_c& other); + dl_dcch_msg_type_c& operator=(const dl_dcch_msg_type_c& other); + ~dl_dcch_msg_type_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 + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "DL-DCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "DL-DCCH-MessageType"); + return c.get(); + } + c1_c_& set_c1() + { + set(types::c1); + return c.get(); + } - // choice methods - n1_n2_codebook_subset_restrict_c_() = default; - n1_n2_codebook_subset_restrict_c_(const n1_n2_codebook_subset_restrict_c_& other); - n1_n2_codebook_subset_restrict_c_& operator=(const n1_n2_codebook_subset_restrict_c_& other); - ~n1_n2_codebook_subset_restrict_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 - fixed_bitstring<16>& two_one() - { - assert_choice_type("two-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<43>& two_two() - { - assert_choice_type("two-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<32>& four_one() - { - assert_choice_type("four-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<59>& three_two() - { - assert_choice_type("three-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<48>& six_one() - { - assert_choice_type("six-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<75>& four_two() - { - assert_choice_type("four-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<64>& eight_one() - { - assert_choice_type("eight-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<107>& four_three() - { - assert_choice_type("four-three", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<107>& six_two() - { - assert_choice_type("six-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<96>& twelve_one() - { - assert_choice_type("twelve-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<139>& four_four() - { - assert_choice_type("four-four", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<139>& eight_two() - { - assert_choice_type("eight-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<128>& sixteen_one() - { - assert_choice_type("sixteen-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<16>& two_one() const - { - assert_choice_type("two-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<43>& two_two() const - { - assert_choice_type("two-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<32>& four_one() const - { - assert_choice_type("four-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<59>& three_two() const - { - assert_choice_type("three-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<48>& six_one() const - { - assert_choice_type("six-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<75>& four_two() const - { - assert_choice_type("four-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<64>& eight_one() const - { - assert_choice_type("eight-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<107>& four_three() const - { - assert_choice_type("four-three", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<107>& six_two() const - { - assert_choice_type("six-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<96>& twelve_one() const - { - assert_choice_type("twelve-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<139>& four_four() const - { - assert_choice_type("four-four", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<139>& eight_two() const - { - assert_choice_type("eight-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - const fixed_bitstring<128>& sixteen_one() const - { - assert_choice_type("sixteen-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); - return c.get >(); - } - fixed_bitstring<16>& set_two_one() - { - set(types::two_one); - return c.get >(); - } - fixed_bitstring<43>& set_two_two() - { - set(types::two_two); - return c.get >(); - } - fixed_bitstring<32>& set_four_one() - { - set(types::four_one); - return c.get >(); - } - fixed_bitstring<59>& set_three_two() - { - set(types::three_two); - return c.get >(); - } - fixed_bitstring<48>& set_six_one() - { - set(types::six_one); - return c.get >(); - } - fixed_bitstring<75>& set_four_two() - { - set(types::four_two); - return c.get >(); - } - fixed_bitstring<64>& set_eight_one() - { - set(types::eight_one); - return c.get >(); - } - fixed_bitstring<107>& set_four_three() - { - set(types::four_three); - return c.get >(); - } - fixed_bitstring<107>& set_six_two() - { - set(types::six_two); - return c.get >(); - } - fixed_bitstring<96>& set_twelve_one() - { - set(types::twelve_one); - return c.get >(); - } - fixed_bitstring<139>& set_four_four() - { - set(types::four_four); - return c.get >(); - } - fixed_bitstring<139>& set_eight_two() - { - set(types::eight_two); - return c.get >(); - } - fixed_bitstring<128>& set_sixteen_one() - { - set(types::sixteen_one); - return c.get >(); - } +private: + types type_; + choice_buffer_t c; - private: - types type_; - choice_buffer_t > c; + void destroy_(); +}; - void destroy_(); - }; +// DL-DCCH-Message ::= SEQUENCE +struct dl_dcch_msg_s { + dl_dcch_msg_type_c msg; - // member variables - n1_n2_codebook_subset_restrict_c_ n1_n2_codebook_subset_restrict; - fixed_bitstring<2> type_ii_ri_restrict; - }; - struct type_ii_port_sel_s_ { - struct port_sel_sampling_size_opts { - enum options { n1, n2, n3, n4, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated port_sel_sampling_size_e_; +// PagingUE-Identity ::= CHOICE +struct paging_ue_id_c { + struct types_opts { + enum options { ng_minus5_g_s_tmsi, full_i_rnti, /*...*/ nulltype } value; + typedef int8_t number_type; - // member variables - bool port_sel_sampling_size_present = false; - port_sel_sampling_size_e_ port_sel_sampling_size; - fixed_bitstring<2> type_ii_port_sel_ri_restrict; - }; - struct types_opts { - enum options { type_ii, type_ii_port_sel, nulltype } value; + std::string to_string() const; + int8_t to_number() const; + }; + typedef enumerated types; - std::string to_string() const; - }; - typedef enumerated types; + // choice methods + paging_ue_id_c() = default; + paging_ue_id_c(const paging_ue_id_c& other); + paging_ue_id_c& operator=(const paging_ue_id_c& other); + ~paging_ue_id_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 + fixed_bitstring<48>& ng_minus5_g_s_tmsi() + { + assert_choice_type("ng-5G-S-TMSI", type_.to_string(), "PagingUE-Identity"); + return c.get >(); + } + fixed_bitstring<40>& full_i_rnti() + { + assert_choice_type("fullI-RNTI", type_.to_string(), "PagingUE-Identity"); + return c.get >(); + } + const fixed_bitstring<48>& ng_minus5_g_s_tmsi() const + { + assert_choice_type("ng-5G-S-TMSI", type_.to_string(), "PagingUE-Identity"); + return c.get >(); + } + const fixed_bitstring<40>& full_i_rnti() const + { + assert_choice_type("fullI-RNTI", type_.to_string(), "PagingUE-Identity"); + return c.get >(); + } + fixed_bitstring<48>& set_ng_minus5_g_s_tmsi() + { + set(types::ng_minus5_g_s_tmsi); + return c.get >(); + } + fixed_bitstring<40>& set_full_i_rnti() + { + set(types::full_i_rnti); + return c.get >(); + } - // choice methods - sub_type_c_() = default; - sub_type_c_(const sub_type_c_& other); - sub_type_c_& operator=(const sub_type_c_& other); - ~sub_type_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 - type_ii_s_& type_ii() - { - assert_choice_type("typeII", type_.to_string(), "subType"); - return c.get(); - } - type_ii_port_sel_s_& type_ii_port_sel() - { - assert_choice_type("typeII-PortSelection", type_.to_string(), "subType"); - return c.get(); - } - const type_ii_s_& type_ii() const - { - assert_choice_type("typeII", type_.to_string(), "subType"); - return c.get(); - } - const type_ii_port_sel_s_& type_ii_port_sel() const - { - assert_choice_type("typeII-PortSelection", type_.to_string(), "subType"); - return c.get(); - } - type_ii_s_& set_type_ii() - { - set(types::type_ii); - return c.get(); - } - type_ii_port_sel_s_& set_type_ii_port_sel() - { - set(types::type_ii_port_sel); - return c.get(); - } +private: + types type_; + choice_buffer_t > c; - private: - types type_; - choice_buffer_t c; + void destroy_(); +}; - void destroy_(); - }; - struct phase_alphabet_size_opts { - enum options { n4, n8, nulltype } value; - typedef uint8_t number_type; +// PagingRecord ::= SEQUENCE +struct paging_record_s { + bool ext = false; + bool access_type_present = false; + paging_ue_id_c ue_id; + // ... - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated phase_alphabet_size_e_; - struct nof_beams_opts { - enum options { two, three, four, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated nof_beams_e_; +// PagingRecordList ::= SEQUENCE (SIZE (1..32)) OF PagingRecord +using paging_record_list_l = dyn_array; - // member variables - sub_type_c_ sub_type; - phase_alphabet_size_e_ phase_alphabet_size; - bool subband_amplitude = false; - nof_beams_e_ nof_beams; - }; +// Paging ::= SEQUENCE +struct paging_s { + bool paging_record_list_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + paging_record_list_l paging_record_list; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PCCH-MessageType ::= CHOICE +struct pcch_msg_type_c { + struct c1_c_ { struct types_opts { - enum options { type1, type2, nulltype } value; - typedef uint8_t number_type; + enum options { paging, spare1, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; typedef enumerated types; // choice methods - codebook_type_c_() = default; - codebook_type_c_(const codebook_type_c_& other); - codebook_type_c_& operator=(const codebook_type_c_& other); - ~codebook_type_c_() { destroy_(); } + c1_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; // getters - type1_s_& type1() - { - assert_choice_type("type1", type_.to_string(), "codebookType"); - return c.get(); - } - type2_s_& type2() - { - assert_choice_type("type2", type_.to_string(), "codebookType"); - return c.get(); - } - const type1_s_& type1() const - { - assert_choice_type("type1", type_.to_string(), "codebookType"); - return c.get(); - } - const type2_s_& type2() const + paging_s& paging() { - assert_choice_type("type2", type_.to_string(), "codebookType"); - return c.get(); + assert_choice_type("paging", type_.to_string(), "c1"); + return c; } - type1_s_& set_type1() + const paging_s& paging() const { - set(types::type1); - return c.get(); + assert_choice_type("paging", type_.to_string(), "c1"); + return c; } - type2_s_& set_type2() + paging_s& set_paging() { - set(types::type2); - return c.get(); + set(types::paging); + return c; } private: - types type_; - choice_buffer_t c; - - void destroy_(); + types type_; + paging_s c; }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; - // member variables - codebook_type_c_ codebook_type; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; - // sequence methods + // choice methods + pcch_msg_type_c() = default; + pcch_msg_type_c(const pcch_msg_type_c& other); + pcch_msg_type_c& operator=(const pcch_msg_type_c& other); + ~pcch_msg_type_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; -}; - -// EUTRA-MBSFN-SubframeConfigList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-MBSFN-SubframeConfig -using eutra_mbsfn_sf_cfg_list_l = dyn_array; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "PCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "PCCH-MessageType"); + return c.get(); + } + c1_c_& set_c1() + { + set(types::c1); + return c.get(); + } -// FrequencyInfoDL ::= SEQUENCE -struct freq_info_dl_s { - using scs_specific_carrier_list_l_ = dyn_array; +private: + types type_; + choice_buffer_t c; - // member variables - bool ext = false; - bool absolute_freq_ssb_present = false; - uint32_t absolute_freq_ssb = 0; - multi_freq_band_list_nr_l freq_band_list; - uint32_t absolute_freq_point_a = 0; - scs_specific_carrier_list_l_ scs_specific_carrier_list; - // ... + void destroy_(); +}; + +// PCCH-Message ::= SEQUENCE +struct pcch_msg_s { + pcch_msg_type_c msg; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -9220,56 +8424,97 @@ struct freq_info_dl_s { void to_json(json_writer& j) const; }; -// FrequencyInfoUL ::= SEQUENCE -struct freq_info_ul_s { - using scs_specific_carrier_list_l_ = dyn_array; +// EstablishmentCause ::= ENUMERATED +struct establishment_cause_opts { + enum options { + emergency, + high_prio_access, + mt_access, + mo_sig, + mo_data, + mo_voice_call, + mo_video_call, + mo_sms, + mps_prio_access, + mcs_prio_access, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; - // member variables - bool ext = false; - bool freq_band_list_present = false; - bool absolute_freq_point_a_present = false; - bool add_spec_emission_present = false; - bool p_max_present = false; - bool freq_shift7p5khz_present = false; - multi_freq_band_list_nr_l freq_band_list; - uint32_t absolute_freq_point_a = 0; - scs_specific_carrier_list_l_ scs_specific_carrier_list; - uint8_t add_spec_emission = 0; - int8_t p_max = -30; - // ... + std::string to_string() const; +}; +typedef enumerated establishment_cause_e; - // sequence methods +// InitialUE-Identity ::= CHOICE +struct init_ue_id_c { + struct types_opts { + enum options { ng_minus5_g_s_tmsi_part1, random_value, nulltype } value; + typedef int8_t number_type; + + std::string to_string() const; + int8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + init_ue_id_c() = default; + init_ue_id_c(const init_ue_id_c& other); + init_ue_id_c& operator=(const init_ue_id_c& other); + ~init_ue_id_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 + fixed_bitstring<39>& ng_minus5_g_s_tmsi_part1() + { + assert_choice_type("ng-5G-S-TMSI-Part1", type_.to_string(), "InitialUE-Identity"); + return c.get >(); + } + fixed_bitstring<39>& random_value() + { + assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity"); + return c.get >(); + } + const fixed_bitstring<39>& ng_minus5_g_s_tmsi_part1() const + { + assert_choice_type("ng-5G-S-TMSI-Part1", type_.to_string(), "InitialUE-Identity"); + return c.get >(); + } + const fixed_bitstring<39>& random_value() const + { + assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity"); + return c.get >(); + } + fixed_bitstring<39>& set_ng_minus5_g_s_tmsi_part1() + { + set(types::ng_minus5_g_s_tmsi_part1); + return c.get >(); + } + fixed_bitstring<39>& set_random_value() + { + set(types::random_value); + return c.get >(); + } -// PDCCH-Config ::= SEQUENCE -struct pdcch_cfg_s { - using ctrl_res_set_to_add_mod_list_l_ = dyn_array; - using ctrl_res_set_to_release_list_l_ = bounded_array; - using search_spaces_to_add_mod_list_l_ = dyn_array; - using search_spaces_to_release_list_l_ = bounded_array; +private: + types type_; + choice_buffer_t > c; - // member variables - bool ext = false; - bool ctrl_res_set_to_add_mod_list_present = false; - bool ctrl_res_set_to_release_list_present = false; - bool search_spaces_to_add_mod_list_present = false; - bool search_spaces_to_release_list_present = false; - bool dl_preemption_present = false; - bool tpc_pusch_present = false; - bool tpc_pucch_present = false; - bool tpc_srs_present = false; - ctrl_res_set_to_add_mod_list_l_ ctrl_res_set_to_add_mod_list; - ctrl_res_set_to_release_list_l_ ctrl_res_set_to_release_list; - search_spaces_to_add_mod_list_l_ search_spaces_to_add_mod_list; - search_spaces_to_release_list_l_ search_spaces_to_release_list; - setup_release_c dl_preemption; - setup_release_c tpc_pusch; - setup_release_c tpc_pucch; - setup_release_c tpc_srs; - // ... + void destroy_(); +}; + +// ReestabUE-Identity ::= SEQUENCE +struct reestab_ue_id_s { + uint32_t c_rnti = 0; + uint16_t pci = 0; + fixed_bitstring<16> short_mac_i; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -9277,240 +8522,164 @@ struct pdcch_cfg_s { void to_json(json_writer& j) const; }; -// PDSCH-Config ::= SEQUENCE -struct pdsch_cfg_s { - using tci_states_to_add_mod_list_l_ = dyn_array; - using tci_states_to_release_list_l_ = dyn_array; - struct vrb_to_prb_interleaver_opts { - enum options { n2, n4, nulltype } value; - typedef uint8_t number_type; +// ReestablishmentCause ::= ENUMERATED +struct reest_cause_opts { + enum options { recfg_fail, ho_fail, other_fail, spare1, nulltype } value; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated vrb_to_prb_interleaver_e_; - struct res_alloc_opts { - enum options { res_alloc_type0, res_alloc_type1, dynamic_switch, nulltype } value; - typedef uint8_t number_type; + std::string to_string() const; +}; +typedef enumerated reest_cause_e; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated res_alloc_e_; - struct pdsch_aggregation_factor_opts { - enum options { n2, n4, n8, nulltype } value; - typedef uint8_t number_type; +// ResumeCause ::= ENUMERATED +struct resume_cause_opts { + enum options { + emergency, + high_prio_access, + mt_access, + mo_sig, + mo_data, + mo_voice_call, + mo_video_call, + mo_sms, + rna_upd, + mps_prio_access, + mcs_prio_access, + spare1, + spare2, + spare3, + spare4, + spare5, + nulltype + } value; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated pdsch_aggregation_factor_e_; - using rate_match_pattern_to_add_mod_list_l_ = dyn_array; - using rate_match_pattern_to_release_list_l_ = bounded_array; - struct rbg_size_opts { - enum options { cfg1, cfg2, nulltype } value; - typedef uint8_t number_type; + std::string to_string() const; +}; +typedef enumerated resume_cause_e; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated rbg_size_e_; - struct mcs_table_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; +// RRCReestablishmentRequest-IEs ::= SEQUENCE +struct rrc_reest_request_ies_s { + reestab_ue_id_s ue_id; + reest_cause_e reest_cause; + fixed_bitstring<1> spare; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated mcs_table_e_; - struct max_nrof_code_words_sched_by_dci_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_nrof_code_words_sched_by_dci_e_; - struct prb_bundling_type_c_ { - struct static_bundling_s_ { - struct bundle_size_opts { - enum options { n4, wideband, nulltype } value; - typedef uint8_t number_type; +// RRCResumeRequest-IEs ::= SEQUENCE +struct rrc_resume_request_ies_s { + fixed_bitstring<24> resume_id; + fixed_bitstring<16> resume_mac_i; + resume_cause_e resume_cause; + fixed_bitstring<1> spare; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated bundle_size_e_; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - bool bundle_size_present = false; - bundle_size_e_ bundle_size; - }; - struct dynamic_bundling_s_ { - struct bundle_size_set1_opts { - enum options { n4, wideband, n2_wideband, n4_wideband, nulltype } value; +// RRCSetupRequest-IEs ::= SEQUENCE +struct rrc_setup_request_ies_s { + init_ue_id_c ue_id; + establishment_cause_e establishment_cause; + fixed_bitstring<1> spare; - std::string to_string() const; - }; - typedef enumerated bundle_size_set1_e_; - struct bundle_size_set2_opts { - enum options { n4, wideband, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated bundle_size_set2_e_; +// RRCSystemInfoRequest-IEs ::= SEQUENCE +struct rrc_sys_info_request_ies_s { + fixed_bitstring<32> requested_si_list; + fixed_bitstring<12> spare; - // member variables - bool bundle_size_set1_present = false; - bool bundle_size_set2_present = false; - bundle_size_set1_e_ bundle_size_set1; - bundle_size_set2_e_ bundle_size_set2; - }; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCReestablishmentRequest ::= SEQUENCE +struct rrc_reest_request_s { + rrc_reest_request_ies_s rrc_reest_request; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCResumeRequest ::= SEQUENCE +struct rrc_resume_request_s { + rrc_resume_request_ies_s rrc_resume_request; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCSetupRequest ::= SEQUENCE +struct rrc_setup_request_s { + rrc_setup_request_ies_s rrc_setup_request; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCSystemInfoRequest ::= SEQUENCE +struct rrc_sys_info_request_s { + struct crit_exts_c_ { struct types_opts { - enum options { static_bundling, dynamic_bundling, nulltype } value; + enum options { rrc_sys_info_request, crit_exts_future, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - prb_bundling_type_c_() = default; - prb_bundling_type_c_(const prb_bundling_type_c_& other); - prb_bundling_type_c_& operator=(const prb_bundling_type_c_& other); - ~prb_bundling_type_c_() { destroy_(); } + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 - static_bundling_s_& static_bundling() - { - assert_choice_type("staticBundling", type_.to_string(), "prb-BundlingType"); - return c.get(); - } - dynamic_bundling_s_& dynamic_bundling() - { - assert_choice_type("dynamicBundling", type_.to_string(), "prb-BundlingType"); - return c.get(); - } - const static_bundling_s_& static_bundling() const - { - assert_choice_type("staticBundling", type_.to_string(), "prb-BundlingType"); - return c.get(); - } - const dynamic_bundling_s_& dynamic_bundling() const + rrc_sys_info_request_ies_s& rrc_sys_info_request() { - assert_choice_type("dynamicBundling", type_.to_string(), "prb-BundlingType"); - return c.get(); + assert_choice_type("rrcSystemInfoRequest", type_.to_string(), "criticalExtensions"); + return c.get(); } - static_bundling_s_& set_static_bundling() + const rrc_sys_info_request_ies_s& rrc_sys_info_request() const { - set(types::static_bundling); - return c.get(); + assert_choice_type("rrcSystemInfoRequest", type_.to_string(), "criticalExtensions"); + return c.get(); } - dynamic_bundling_s_& set_dynamic_bundling() + rrc_sys_info_request_ies_s& set_rrc_sys_info_request() { - set(types::dynamic_bundling); - return c.get(); + set(types::rrc_sys_info_request); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; - using zp_csi_rs_res_to_add_mod_list_l_ = dyn_array; - using zp_csi_rs_res_to_release_list_l_ = bounded_array; - using aperiodic_zp_csi_rs_res_sets_to_add_mod_list_l_ = dyn_array; - using aperiodic_zp_csi_rs_res_sets_to_release_list_l_ = bounded_array; - using sp_zp_csi_rs_res_sets_to_add_mod_list_l_ = dyn_array; - using sp_zp_csi_rs_res_sets_to_release_list_l_ = bounded_array; - - // member variables - bool ext = false; - bool data_scrambling_id_pdsch_present = false; - bool dmrs_dl_for_pdsch_map_type_a_present = false; - bool dmrs_dl_for_pdsch_map_type_b_present = false; - bool tci_states_to_add_mod_list_present = false; - bool tci_states_to_release_list_present = false; - bool vrb_to_prb_interleaver_present = false; - bool pdsch_time_domain_alloc_list_present = false; - bool pdsch_aggregation_factor_present = false; - bool rate_match_pattern_to_add_mod_list_present = false; - bool rate_match_pattern_to_release_list_present = false; - bool rate_match_pattern_group1_present = false; - bool rate_match_pattern_group2_present = false; - bool mcs_table_present = false; - bool max_nrof_code_words_sched_by_dci_present = false; - bool zp_csi_rs_res_to_add_mod_list_present = false; - bool zp_csi_rs_res_to_release_list_present = false; - bool aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present = false; - bool aperiodic_zp_csi_rs_res_sets_to_release_list_present = false; - bool sp_zp_csi_rs_res_sets_to_add_mod_list_present = false; - bool sp_zp_csi_rs_res_sets_to_release_list_present = false; - bool p_zp_csi_rs_res_set_present = false; - uint16_t data_scrambling_id_pdsch = 0; - setup_release_c dmrs_dl_for_pdsch_map_type_a; - setup_release_c dmrs_dl_for_pdsch_map_type_b; - tci_states_to_add_mod_list_l_ tci_states_to_add_mod_list; - tci_states_to_release_list_l_ tci_states_to_release_list; - vrb_to_prb_interleaver_e_ vrb_to_prb_interleaver; - res_alloc_e_ res_alloc; - setup_release_c > pdsch_time_domain_alloc_list; - pdsch_aggregation_factor_e_ pdsch_aggregation_factor; - rate_match_pattern_to_add_mod_list_l_ rate_match_pattern_to_add_mod_list; - rate_match_pattern_to_release_list_l_ rate_match_pattern_to_release_list; - rate_match_pattern_group_l rate_match_pattern_group1; - rate_match_pattern_group_l rate_match_pattern_group2; - rbg_size_e_ rbg_size; - mcs_table_e_ mcs_table; - max_nrof_code_words_sched_by_dci_e_ max_nrof_code_words_sched_by_dci; - prb_bundling_type_c_ prb_bundling_type; - zp_csi_rs_res_to_add_mod_list_l_ zp_csi_rs_res_to_add_mod_list; - zp_csi_rs_res_to_release_list_l_ zp_csi_rs_res_to_release_list; - aperiodic_zp_csi_rs_res_sets_to_add_mod_list_l_ aperiodic_zp_csi_rs_res_sets_to_add_mod_list; - aperiodic_zp_csi_rs_res_sets_to_release_list_l_ aperiodic_zp_csi_rs_res_sets_to_release_list; - sp_zp_csi_rs_res_sets_to_add_mod_list_l_ sp_zp_csi_rs_res_sets_to_add_mod_list; - sp_zp_csi_rs_res_sets_to_release_list_l_ sp_zp_csi_rs_res_sets_to_release_list; - setup_release_c p_zp_csi_rs_res_set; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUCCH-CSI-Resource ::= SEQUENCE -struct pucch_csi_res_s { - uint8_t ul_bw_part_id = 0; - uint8_t pucch_res = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUSCH-CodeBlockGroupTransmission ::= SEQUENCE -struct pusch_code_block_group_tx_s { - struct max_code_block_groups_per_transport_block_opts { - enum options { n2, n4, n6, n8, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_code_block_groups_per_transport_block_e_; // member variables - bool ext = false; - max_code_block_groups_per_transport_block_e_ max_code_block_groups_per_transport_block; - // ... + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -9518,61 +8687,96 @@ struct pusch_code_block_group_tx_s { void to_json(json_writer& j) const; }; -// PortIndexFor8Ranks ::= CHOICE -struct port_idx_for8_ranks_c { - struct port_idx8_s_ { - using rank2_minus8_l_ = std::array; - using rank3_minus8_l_ = std::array; - using rank4_minus8_l_ = std::array; - using rank5_minus8_l_ = std::array; - using rank6_minus8_l_ = std::array; - using rank7_minus8_l_ = std::array; - using rank8_minus8_l_ = std::array; +// UL-CCCH-MessageType ::= CHOICE +struct ul_ccch_msg_type_c { + struct c1_c_ { + struct types_opts { + enum options { rrc_setup_request, rrc_resume_request, rrc_reest_request, rrc_sys_info_request, nulltype } value; - // member variables - bool rank1_minus8_present = false; - bool rank2_minus8_present = false; - bool rank3_minus8_present = false; - bool rank4_minus8_present = false; - bool rank5_minus8_present = false; - bool rank6_minus8_present = false; - bool rank7_minus8_present = false; - bool rank8_minus8_present = false; - uint8_t rank1_minus8 = 0; - rank2_minus8_l_ rank2_minus8; - rank3_minus8_l_ rank3_minus8; - rank4_minus8_l_ rank4_minus8; - rank5_minus8_l_ rank5_minus8; - rank6_minus8_l_ rank6_minus8; - rank7_minus8_l_ rank7_minus8; - rank8_minus8_l_ rank8_minus8; - }; - struct port_idx4_s_ { - using rank2_minus4_l_ = std::array; - using rank3_minus4_l_ = std::array; - using rank4_minus4_l_ = std::array; + std::string to_string() const; + }; + typedef enumerated types; - // member variables - bool rank1_minus4_present = false; - bool rank2_minus4_present = false; - bool rank3_minus4_present = false; - bool rank4_minus4_present = false; - uint8_t rank1_minus4 = 0; - rank2_minus4_l_ rank2_minus4; - rank3_minus4_l_ rank3_minus4; - rank4_minus4_l_ rank4_minus4; - }; - struct port_idx2_s_ { - using rank2_minus2_l_ = std::array; + // choice methods + c1_c_() = default; + c1_c_(const c1_c_& other); + c1_c_& operator=(const c1_c_& other); + ~c1_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 + rrc_setup_request_s& rrc_setup_request() + { + assert_choice_type("rrcSetupRequest", type_.to_string(), "c1"); + return c.get(); + } + rrc_resume_request_s& rrc_resume_request() + { + assert_choice_type("rrcResumeRequest", type_.to_string(), "c1"); + return c.get(); + } + rrc_reest_request_s& rrc_reest_request() + { + assert_choice_type("rrcReestablishmentRequest", type_.to_string(), "c1"); + return c.get(); + } + rrc_sys_info_request_s& rrc_sys_info_request() + { + assert_choice_type("rrcSystemInfoRequest", type_.to_string(), "c1"); + return c.get(); + } + const rrc_setup_request_s& rrc_setup_request() const + { + assert_choice_type("rrcSetupRequest", type_.to_string(), "c1"); + return c.get(); + } + const rrc_resume_request_s& rrc_resume_request() const + { + assert_choice_type("rrcResumeRequest", type_.to_string(), "c1"); + return c.get(); + } + const rrc_reest_request_s& rrc_reest_request() const + { + assert_choice_type("rrcReestablishmentRequest", type_.to_string(), "c1"); + return c.get(); + } + const rrc_sys_info_request_s& rrc_sys_info_request() const + { + assert_choice_type("rrcSystemInfoRequest", type_.to_string(), "c1"); + return c.get(); + } + rrc_setup_request_s& set_rrc_setup_request() + { + set(types::rrc_setup_request); + return c.get(); + } + rrc_resume_request_s& set_rrc_resume_request() + { + set(types::rrc_resume_request); + return c.get(); + } + rrc_reest_request_s& set_rrc_reest_request() + { + set(types::rrc_reest_request); + return c.get(); + } + rrc_sys_info_request_s& set_rrc_sys_info_request() + { + set(types::rrc_sys_info_request); + return c.get(); + } - // member variables - bool rank1_minus2_present = false; - bool rank2_minus2_present = false; - uint8_t rank1_minus2 = 0; - rank2_minus2_l_ rank2_minus2; + private: + types type_; + choice_buffer_t c; + + void destroy_(); }; struct types_opts { - enum options { port_idx8, port_idx4, port_idx2, port_idx1, nulltype } value; + enum options { c1, msg_class_ext, nulltype } value; typedef uint8_t number_type; std::string to_string() const; @@ -9581,101 +8785,42 @@ struct port_idx_for8_ranks_c { typedef enumerated types; // choice methods - port_idx_for8_ranks_c() = default; - port_idx_for8_ranks_c(const port_idx_for8_ranks_c& other); - port_idx_for8_ranks_c& operator=(const port_idx_for8_ranks_c& other); - ~port_idx_for8_ranks_c() { destroy_(); } + ul_ccch_msg_type_c() = default; + ul_ccch_msg_type_c(const ul_ccch_msg_type_c& other); + ul_ccch_msg_type_c& operator=(const ul_ccch_msg_type_c& other); + ~ul_ccch_msg_type_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 - port_idx8_s_& port_idx8() - { - assert_choice_type("portIndex8", type_.to_string(), "PortIndexFor8Ranks"); - return c.get(); - } - port_idx4_s_& port_idx4() - { - assert_choice_type("portIndex4", type_.to_string(), "PortIndexFor8Ranks"); - return c.get(); - } - port_idx2_s_& port_idx2() - { - assert_choice_type("portIndex2", type_.to_string(), "PortIndexFor8Ranks"); - return c.get(); - } - const port_idx8_s_& port_idx8() const - { - assert_choice_type("portIndex8", type_.to_string(), "PortIndexFor8Ranks"); - return c.get(); - } - const port_idx4_s_& port_idx4() const - { - assert_choice_type("portIndex4", type_.to_string(), "PortIndexFor8Ranks"); - return c.get(); - } - const port_idx2_s_& port_idx2() const - { - assert_choice_type("portIndex2", type_.to_string(), "PortIndexFor8Ranks"); - return c.get(); - } - port_idx8_s_& set_port_idx8() + c1_c_& c1() { - set(types::port_idx8); - return c.get(); + assert_choice_type("c1", type_.to_string(), "UL-CCCH-MessageType"); + return c.get(); } - port_idx4_s_& set_port_idx4() + const c1_c_& c1() const { - set(types::port_idx4); - return c.get(); + assert_choice_type("c1", type_.to_string(), "UL-CCCH-MessageType"); + return c.get(); } - port_idx2_s_& set_port_idx2() + c1_c_& set_c1() { - set(types::port_idx2); - return c.get(); + set(types::c1); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; -// RadioLinkMonitoringConfig ::= SEQUENCE -struct radio_link_monitoring_cfg_s { - using fail_detection_res_to_add_mod_list_l_ = dyn_array; - using fail_detection_res_to_release_list_l_ = bounded_array; - struct beam_fail_instance_max_count_opts { - enum options { n1, n2, n3, n4, n5, n6, n8, n10, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated beam_fail_instance_max_count_e_; - struct beam_fail_detection_timer_opts { - enum options { pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated beam_fail_detection_timer_e_; - - // member variables - bool ext = false; - bool fail_detection_res_to_add_mod_list_present = false; - bool fail_detection_res_to_release_list_present = false; - bool beam_fail_instance_max_count_present = false; - bool beam_fail_detection_timer_present = false; - fail_detection_res_to_add_mod_list_l_ fail_detection_res_to_add_mod_list; - fail_detection_res_to_release_list_l_ fail_detection_res_to_release_list; - beam_fail_instance_max_count_e_ beam_fail_instance_max_count; - beam_fail_detection_timer_e_ beam_fail_detection_timer; - // ... +// UL-CCCH-Message ::= SEQUENCE +struct ul_ccch_msg_s { + ul_ccch_msg_type_c msg; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -9683,43 +8828,12 @@ struct radio_link_monitoring_cfg_s { void to_json(json_writer& j) const; }; -// SPS-Config ::= SEQUENCE -struct sps_cfg_s { - struct periodicity_opts { - enum options { - ms10, - ms20, - ms32, - ms40, - ms64, - ms80, - ms128, - ms160, - ms320, - ms640, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated periodicity_e_; - - // member variables - bool ext = false; - bool n1_pucch_an_present = false; - bool mcs_table_present = false; - periodicity_e_ periodicity; - uint8_t nrof_harq_processes = 1; - uint8_t n1_pucch_an = 0; - // ... +// RRCResumeRequest1-IEs ::= SEQUENCE +struct rrc_resume_request1_ies_s { + fixed_bitstring<40> resume_id; + fixed_bitstring<16> resume_mac_i; + resume_cause_e resume_cause; + fixed_bitstring<1> spare; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -9727,13 +8841,9 @@ struct sps_cfg_s { void to_json(json_writer& j) const; }; -// SRS-TPC-PDCCH-Config ::= SEQUENCE -struct srs_tpc_pdcch_cfg_s { - using srs_cc_set_idxlist_l_ = dyn_array; - - // member variables - bool srs_cc_set_idxlist_present = false; - srs_cc_set_idxlist_l_ srs_cc_set_idxlist; +// RRCResumeRequest1 ::= SEQUENCE +struct rrc_resume_request1_s { + rrc_resume_request1_ies_s rrc_resume_request1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -9741,270 +8851,246 @@ struct srs_tpc_pdcch_cfg_s { void to_json(json_writer& j) const; }; -// SlotFormatCombinationsPerCell ::= SEQUENCE -struct slot_format_combinations_per_cell_s { - using slot_format_combinations_l_ = dyn_array; - - // member variables - bool ext = false; - bool subcarrier_spacing2_present = false; - bool slot_format_combinations_present = false; - bool position_in_dci_present = false; - uint8_t serving_cell_id = 0; - subcarrier_spacing_e subcarrier_spacing; - subcarrier_spacing_e subcarrier_spacing2; - slot_format_combinations_l_ slot_format_combinations; - uint8_t position_in_dci = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BWP-DownlinkDedicated ::= SEQUENCE -struct bwp_dl_ded_s { - bool ext = false; - bool pdcch_cfg_present = false; - bool pdsch_cfg_present = false; - bool sps_cfg_present = false; - bool radio_link_monitoring_cfg_present = false; - setup_release_c pdcch_cfg; - setup_release_c pdsch_cfg; - setup_release_c sps_cfg; - setup_release_c radio_link_monitoring_cfg; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BWP-Uplink ::= SEQUENCE -struct bwp_ul_s { - bool ext = false; - bool bwp_common_present = false; - bool bwp_ded_present = false; - uint8_t bwp_id = 0; - bwp_ul_common_s bwp_common; - bwp_ul_ded_s bwp_ded; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CFRA ::= SEQUENCE -struct cfra_s { - struct occasions_s_ { - struct ssb_per_rach_occasion_opts { - enum options { one_eighth, one_fourth, one_half, one, two, four, eight, sixteen, nulltype } value; - typedef float number_type; - - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated ssb_per_rach_occasion_e_; - - // member variables - bool ssb_per_rach_occasion_present = false; - rach_cfg_generic_s rach_cfg_generic; - ssb_per_rach_occasion_e_ ssb_per_rach_occasion; - }; - struct res_c_ { - struct ssb_s_ { - using ssb_res_list_l_ = dyn_array; - - // member variables - ssb_res_list_l_ ssb_res_list; - uint8_t ra_ssb_occasion_mask_idx = 0; - }; - struct csirs_s_ { - using csirs_res_list_l_ = dyn_array; - - // member variables - csirs_res_list_l_ csirs_res_list; - uint8_t rsrp_thres_csi_rs = 0; - }; - struct types_opts { - enum options { ssb, csirs, nulltype } value; +// UL-CCCH1-MessageType ::= CHOICE +struct ul_ccch1_msg_type_c { + struct c1_c_ { + struct types_opts { + enum options { rrc_resume_request1, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; typedef enumerated types; // choice methods - res_c_() = default; - res_c_(const res_c_& other); - res_c_& operator=(const res_c_& other); - ~res_c_() { destroy_(); } + c1_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; // getters - ssb_s_& ssb() - { - assert_choice_type("ssb", type_.to_string(), "resources"); - return c.get(); - } - csirs_s_& csirs() - { - assert_choice_type("csirs", type_.to_string(), "resources"); - return c.get(); - } - const ssb_s_& ssb() const - { - assert_choice_type("ssb", type_.to_string(), "resources"); - return c.get(); - } - const csirs_s_& csirs() const + rrc_resume_request1_s& rrc_resume_request1() { - assert_choice_type("csirs", type_.to_string(), "resources"); - return c.get(); + assert_choice_type("rrcResumeRequest1", type_.to_string(), "c1"); + return c; } - ssb_s_& set_ssb() + const rrc_resume_request1_s& rrc_resume_request1() const { - set(types::ssb); - return c.get(); + assert_choice_type("rrcResumeRequest1", type_.to_string(), "c1"); + return c; } - csirs_s_& set_csirs() + rrc_resume_request1_s& set_rrc_resume_request1() { - set(types::csirs); - return c.get(); + set(types::rrc_resume_request1); + return c; } private: - types type_; - choice_buffer_t c; - - void destroy_(); + types type_; + rrc_resume_request1_s c; }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; - // member variables - bool ext = false; - bool occasions_present = false; - occasions_s_ occasions; - res_c_ res; - // ... - // group 0 - bool total_nof_ra_preambs_v1530_present = false; - uint8_t total_nof_ra_preambs_v1530 = 1; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; - // sequence methods + // choice methods + ul_ccch1_msg_type_c() = default; + ul_ccch1_msg_type_c(const ul_ccch1_msg_type_c& other); + ul_ccch1_msg_type_c& operator=(const ul_ccch1_msg_type_c& other); + ~ul_ccch1_msg_type_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 + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "UL-CCCH1-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "UL-CCCH1-MessageType"); + return c.get(); + } + c1_c_& set_c1() + { + set(types::c1); + return c.get(); + } -// CSI-AperiodicTriggerStateList ::= SEQUENCE (SIZE (1..128)) OF CSI-AperiodicTriggerState -using csi_aperiodic_trigger_state_list_l = dyn_array; +private: + types type_; + choice_buffer_t c; -// CSI-IM-Resource ::= SEQUENCE -struct csi_im_res_s { - struct csi_im_res_elem_pattern_c_ { - struct pattern0_s_ { - struct subcarrier_location_p0_opts { - enum options { s0, s2, s4, s6, s8, s10, nulltype } value; - typedef uint8_t number_type; + void destroy_(); +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated subcarrier_location_p0_e_; +// UL-CCCH1-Message ::= SEQUENCE +struct ul_ccch1_msg_s { + ul_ccch1_msg_type_c msg; - // member variables - subcarrier_location_p0_e_ subcarrier_location_p0; - uint8_t symbol_location_p0 = 0; - }; - struct pattern1_s_ { - struct subcarrier_location_p1_opts { - enum options { s0, s4, s8, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated subcarrier_location_p1_e_; +// MeasQuantityResults ::= SEQUENCE +struct meas_quant_results_s { + bool rsrp_present = false; + bool rsrq_present = false; + bool sinr_present = false; + uint8_t rsrp = 0; + uint8_t rsrq = 0; + uint8_t sinr = 0; - // member variables - subcarrier_location_p1_e_ subcarrier_location_p1; - uint8_t symbol_location_p1 = 0; - }; - struct types_opts { - enum options { pattern0, pattern1, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; +// PLMN-Identity-EUTRA-5GC ::= CHOICE +struct plmn_id_eutra_minus5_gc_c { + struct types_opts { + enum options { plmn_id_eutra_minus5_gc, plmn_idx, nulltype } value; + typedef int8_t number_type; - // choice methods - csi_im_res_elem_pattern_c_() = default; - csi_im_res_elem_pattern_c_(const csi_im_res_elem_pattern_c_& other); - csi_im_res_elem_pattern_c_& operator=(const csi_im_res_elem_pattern_c_& other); - ~csi_im_res_elem_pattern_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 - pattern0_s_& pattern0() - { - assert_choice_type("pattern0", type_.to_string(), "csi-IM-ResourceElementPattern"); - return c.get(); - } - pattern1_s_& pattern1() - { - assert_choice_type("pattern1", type_.to_string(), "csi-IM-ResourceElementPattern"); - return c.get(); - } - const pattern0_s_& pattern0() const - { - assert_choice_type("pattern0", type_.to_string(), "csi-IM-ResourceElementPattern"); - return c.get(); - } - const pattern1_s_& pattern1() const - { - assert_choice_type("pattern1", type_.to_string(), "csi-IM-ResourceElementPattern"); - return c.get(); - } - pattern0_s_& set_pattern0() - { - set(types::pattern0); - return c.get(); - } - pattern1_s_& set_pattern1() - { - set(types::pattern1); - return c.get(); - } + std::string to_string() const; + int8_t to_number() const; + }; + typedef enumerated types; - private: - types type_; - choice_buffer_t c; + // choice methods + plmn_id_eutra_minus5_gc_c() = default; + plmn_id_eutra_minus5_gc_c(const plmn_id_eutra_minus5_gc_c& other); + plmn_id_eutra_minus5_gc_c& operator=(const plmn_id_eutra_minus5_gc_c& other); + ~plmn_id_eutra_minus5_gc_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 + plmn_id_s& plmn_id_eutra_minus5_gc() + { + assert_choice_type("plmn-Identity-EUTRA-5GC", type_.to_string(), "PLMN-Identity-EUTRA-5GC"); + return c.get(); + } + uint8_t& plmn_idx() + { + assert_choice_type("plmn-index", type_.to_string(), "PLMN-Identity-EUTRA-5GC"); + return c.get(); + } + const plmn_id_s& plmn_id_eutra_minus5_gc() const + { + assert_choice_type("plmn-Identity-EUTRA-5GC", type_.to_string(), "PLMN-Identity-EUTRA-5GC"); + return c.get(); + } + const uint8_t& plmn_idx() const + { + assert_choice_type("plmn-index", type_.to_string(), "PLMN-Identity-EUTRA-5GC"); + return c.get(); + } + plmn_id_s& set_plmn_id_eutra_minus5_gc() + { + set(types::plmn_id_eutra_minus5_gc); + return c.get(); + } + uint8_t& set_plmn_idx() + { + set(types::plmn_idx); + return c.get(); + } - void destroy_(); +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// CellIdentity-EUTRA-5GC ::= CHOICE +struct cell_id_eutra_minus5_gc_c { + struct types_opts { + enum options { cell_id_eutra, cell_id_idx, nulltype } value; + + std::string to_string() const; }; + typedef enumerated types; - // member variables - bool ext = false; - bool csi_im_res_elem_pattern_present = false; - bool freq_band_present = false; - bool periodicity_and_offset_present = false; - uint8_t csi_im_res_id = 0; - csi_im_res_elem_pattern_c_ csi_im_res_elem_pattern; - csi_freq_occupation_s freq_band; - csi_res_periodicity_and_offset_c periodicity_and_offset; - // ... + // choice methods + cell_id_eutra_minus5_gc_c() = default; + cell_id_eutra_minus5_gc_c(const cell_id_eutra_minus5_gc_c& other); + cell_id_eutra_minus5_gc_c& operator=(const cell_id_eutra_minus5_gc_c& other); + ~cell_id_eutra_minus5_gc_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 + fixed_bitstring<28>& cell_id_eutra() + { + assert_choice_type("cellIdentity-EUTRA", type_.to_string(), "CellIdentity-EUTRA-5GC"); + return c.get >(); + } + uint8_t& cell_id_idx() + { + assert_choice_type("cellId-index", type_.to_string(), "CellIdentity-EUTRA-5GC"); + return c.get(); + } + const fixed_bitstring<28>& cell_id_eutra() const + { + assert_choice_type("cellIdentity-EUTRA", type_.to_string(), "CellIdentity-EUTRA-5GC"); + return c.get >(); + } + const uint8_t& cell_id_idx() const + { + assert_choice_type("cellId-index", type_.to_string(), "CellIdentity-EUTRA-5GC"); + return c.get(); + } + fixed_bitstring<28>& set_cell_id_eutra() + { + set(types::cell_id_eutra); + return c.get >(); + } + uint8_t& set_cell_id_idx() + { + set(types::cell_id_idx); + return c.get(); + } + +private: + types type_; + choice_buffer_t > c; + + void destroy_(); +}; + +// MultiFrequencyBandListNR ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..1024) +using multi_freq_band_list_nr_l = bounded_array; + +// PLMN-IdentityList-EUTRA-5GC ::= SEQUENCE (SIZE (1..12)) OF PLMN-Identity-EUTRA-5GC +using plmn_id_list_eutra_minus5_gc_l = dyn_array; + +// PLMN-IdentityList-EUTRA-EPC ::= SEQUENCE (SIZE (1..12)) OF PLMN-Identity +using plmn_id_list_eutra_epc_l = dyn_array; + +// ResultsPerCSI-RS-Index ::= SEQUENCE +struct results_per_csi_rs_idx_s { + bool csi_rs_results_present = false; + uint8_t csi_rs_idx = 0; + meas_quant_results_s csi_rs_results; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10012,14 +9098,33 @@ struct csi_im_res_s { void to_json(json_writer& j) const; }; -// CSI-IM-ResourceSet ::= SEQUENCE -struct csi_im_res_set_s { - using csi_im_res_l_ = bounded_array; +// ResultsPerSSB-Index ::= SEQUENCE +struct results_per_ssb_idx_s { + bool ssb_results_present = false; + uint8_t ssb_idx = 0; + meas_quant_results_s ssb_results; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CGI-InfoNR ::= SEQUENCE +struct cgi_info_nr_s { + struct no_sib1_s_ { + uint8_t ssb_subcarrier_offset = 0; + pdcch_cfg_sib1_s pdcch_cfg_sib1; + }; // member variables - bool ext = false; - uint8_t csi_im_res_set_id = 0; - csi_im_res_l_ csi_im_res; + bool ext = false; + bool plmn_id_info_list_present = false; + bool freq_band_list_present = false; + bool no_sib1_present = false; + plmn_id_info_list_l plmn_id_info_list; + multi_freq_band_list_nr_l freq_band_list; + no_sib1_s_ no_sib1; // ... // sequence methods @@ -10028,645 +9133,157 @@ struct csi_im_res_set_s { void to_json(json_writer& j) const; }; -// CSI-ReportConfig ::= SEQUENCE -struct csi_report_cfg_s { - struct report_cfg_type_c_ { - struct periodic_s_ { - using pucch_csi_res_list_l_ = dyn_array; +// CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE +struct cell_access_related_info_eutra_minus5_gc_s { + bool ranac_minus5gc_present = false; + plmn_id_list_eutra_minus5_gc_l plmn_id_list_eutra_minus5gc; + fixed_bitstring<24> tac_eutra_minus5gc; + uint16_t ranac_minus5gc = 0; + cell_id_eutra_minus5_gc_c cell_id_eutra_minus5gc; - // member variables - csi_report_periodicity_and_offset_c report_slot_cfg; - pucch_csi_res_list_l_ pucch_csi_res_list; - }; - struct semi_persistent_on_pucch_s_ { - using pucch_csi_res_list_l_ = dyn_array; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - csi_report_periodicity_and_offset_c report_slot_cfg; - pucch_csi_res_list_l_ pucch_csi_res_list; - }; - struct semi_persistent_on_pusch_s_ { - struct report_slot_cfg_opts { - enum options { sl5, sl10, sl20, sl40, sl80, sl160, sl320, nulltype } value; - typedef uint16_t number_type; +// CellAccessRelatedInfo-EUTRA-EPC ::= SEQUENCE +struct cell_access_related_info_eutra_epc_s { + plmn_id_list_eutra_epc_l plmn_id_list_eutra_epc; + fixed_bitstring<16> tac_eutra_epc; + fixed_bitstring<28> cell_id_eutra_epc; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated report_slot_cfg_e_; - using report_slot_offset_list_l_ = bounded_array; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - report_slot_cfg_e_ report_slot_cfg; - report_slot_offset_list_l_ report_slot_offset_list; - uint8_t p0alpha = 0; - }; - struct aperiodic_s_ { - using report_slot_offset_list_l_ = bounded_array; +// MultiBandInfoListEUTRA ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..256) +using multi_band_info_list_eutra_l = bounded_array; - // member variables - report_slot_offset_list_l_ report_slot_offset_list; - }; - struct types_opts { - enum options { periodic, semi_persistent_on_pucch, semi_persistent_on_pusch, aperiodic, nulltype } value; +// ResultsPerCSI-RS-IndexList ::= SEQUENCE (SIZE (1..64)) OF ResultsPerCSI-RS-Index +using results_per_csi_rs_idx_list_l = dyn_array; - std::string to_string() const; - }; - typedef enumerated types; +// ResultsPerSSB-IndexList ::= SEQUENCE (SIZE (1..64)) OF ResultsPerSSB-Index +using results_per_ssb_idx_list_l = dyn_array; - // choice methods - report_cfg_type_c_() = default; - report_cfg_type_c_(const report_cfg_type_c_& other); - report_cfg_type_c_& operator=(const report_cfg_type_c_& other); - ~report_cfg_type_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 - periodic_s_& periodic() - { - assert_choice_type("periodic", type_.to_string(), "reportConfigType"); - return c.get(); - } - semi_persistent_on_pucch_s_& semi_persistent_on_pucch() - { - assert_choice_type("semiPersistentOnPUCCH", type_.to_string(), "reportConfigType"); - return c.get(); - } - semi_persistent_on_pusch_s_& semi_persistent_on_pusch() - { - assert_choice_type("semiPersistentOnPUSCH", type_.to_string(), "reportConfigType"); - return c.get(); - } - aperiodic_s_& aperiodic() - { - assert_choice_type("aperiodic", type_.to_string(), "reportConfigType"); - return c.get(); - } - const periodic_s_& periodic() const - { - assert_choice_type("periodic", type_.to_string(), "reportConfigType"); - return c.get(); - } - const semi_persistent_on_pucch_s_& semi_persistent_on_pucch() const - { - assert_choice_type("semiPersistentOnPUCCH", type_.to_string(), "reportConfigType"); - return c.get(); - } - const semi_persistent_on_pusch_s_& semi_persistent_on_pusch() const - { - assert_choice_type("semiPersistentOnPUSCH", type_.to_string(), "reportConfigType"); - return c.get(); - } - const aperiodic_s_& aperiodic() const - { - assert_choice_type("aperiodic", type_.to_string(), "reportConfigType"); - return c.get(); - } - periodic_s_& set_periodic() - { - set(types::periodic); - return c.get(); - } - semi_persistent_on_pucch_s_& set_semi_persistent_on_pucch() - { - set(types::semi_persistent_on_pucch); - return c.get(); - } - semi_persistent_on_pusch_s_& set_semi_persistent_on_pusch() - { - set(types::semi_persistent_on_pusch); - return c.get(); - } - aperiodic_s_& set_aperiodic() - { - set(types::aperiodic); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; +// CGI-InfoEUTRA ::= SEQUENCE +struct cgi_info_eutra_s { + struct cgi_info_epc_s_ { + using cgi_info_epc_list_l_ = dyn_array; - void destroy_(); + // member variables + bool cgi_info_epc_list_present = false; + cell_access_related_info_eutra_epc_s cgi_info_epc_legacy; + cgi_info_epc_list_l_ cgi_info_epc_list; }; - struct report_quant_c_ { - struct cri_ri_i1_cqi_s_ { - struct pdsch_bundle_size_for_csi_opts { - enum options { n2, n4, nulltype } value; - typedef uint8_t number_type; + using cgi_info_minus5_gc_l_ = dyn_array; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated pdsch_bundle_size_for_csi_e_; + // member variables + bool cgi_info_epc_present = false; + bool cgi_info_minus5_gc_present = false; + bool multi_band_info_list_present = false; + bool freq_band_ind_prio_present = false; + cgi_info_epc_s_ cgi_info_epc; + cgi_info_minus5_gc_l_ cgi_info_minus5_gc; + uint16_t freq_band_ind = 1; + multi_band_info_list_eutra_l multi_band_info_list; - // member variables - bool pdsch_bundle_size_for_csi_present = false; - pdsch_bundle_size_for_csi_e_ pdsch_bundle_size_for_csi; - }; - struct types_opts { - enum options { - none, - cri_ri_pmi_cqi, - cri_ri_i1, - cri_ri_i1_cqi, - cri_ri_cqi, - cri_rsrp, - ssb_idx_rsrp, - cri_ri_li_pmi_cqi, - nulltype - } value; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - }; - typedef enumerated types; +// MeasQuantityResultsEUTRA ::= SEQUENCE +struct meas_quant_results_eutra_s { + bool rsrp_present = false; + bool rsrq_present = false; + bool sinr_present = false; + uint8_t rsrp = 0; + uint8_t rsrq = 0; + uint8_t sinr = 0; - // choice methods - report_quant_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; - // getters - cri_ri_i1_cqi_s_& cri_ri_i1_cqi() - { - assert_choice_type("cri-RI-i1-CQI", type_.to_string(), "reportQuantity"); - return c; - } - const cri_ri_i1_cqi_s_& cri_ri_i1_cqi() const - { - assert_choice_type("cri-RI-i1-CQI", type_.to_string(), "reportQuantity"); - return c; - } - cri_ri_i1_cqi_s_& set_cri_ri_i1_cqi() - { - set(types::cri_ri_i1_cqi); - return c; - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - cri_ri_i1_cqi_s_ c; +// MeasResultNR ::= SEQUENCE +struct meas_result_nr_s { + struct meas_result_s_ { + struct cell_results_s_ { + bool results_ssb_cell_present = false; + bool results_csi_rs_cell_present = false; + meas_quant_results_s results_ssb_cell; + meas_quant_results_s results_csi_rs_cell; + }; + struct rs_idx_results_s_ { + bool results_ssb_idxes_present = false; + bool results_csi_rs_idxes_present = false; + results_per_ssb_idx_list_l results_ssb_idxes; + results_per_csi_rs_idx_list_l results_csi_rs_idxes; + }; + + // member variables + bool rs_idx_results_present = false; + cell_results_s_ cell_results; + rs_idx_results_s_ rs_idx_results; }; - struct report_freq_cfg_s_ { - struct cqi_format_ind_opts { - enum options { wideband_cqi, subband_cqi, nulltype } value; - std::string to_string() const; - }; - typedef enumerated cqi_format_ind_e_; - struct pmi_format_ind_opts { - enum options { wideband_pmi, subband_pmi, nulltype } value; + // member variables + bool ext = false; + bool pci_present = false; + uint16_t pci = 0; + meas_result_s_ meas_result; + // ... + // group 0 + copy_ptr cgi_info; - std::string to_string() const; - }; - typedef enumerated pmi_format_ind_e_; - struct csi_report_band_c_ { - struct types_opts { - enum options { - subbands3, - subbands4, - subbands5, - subbands6, - subbands7, - subbands8, - subbands9, - subbands10, - subbands11, - subbands12, - subbands13, - subbands14, - subbands15, - subbands16, - subbands17, - subbands18, - // ... - subbands19_v1530, - nulltype - } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; +// MeasResultEUTRA ::= SEQUENCE +struct meas_result_eutra_s { + bool ext = false; + bool cgi_info_present = false; + uint16_t eutra_pci = 0; + meas_quant_results_eutra_s meas_result; + cgi_info_eutra_s cgi_info; + // ... - // choice methods - csi_report_band_c_() = default; - csi_report_band_c_(const csi_report_band_c_& other); - csi_report_band_c_& operator=(const csi_report_band_c_& other); - ~csi_report_band_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 - fixed_bitstring<3>& subbands3() - { - assert_choice_type("subbands3", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<4>& subbands4() - { - assert_choice_type("subbands4", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<5>& subbands5() - { - assert_choice_type("subbands5", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<6>& subbands6() - { - assert_choice_type("subbands6", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<7>& subbands7() - { - assert_choice_type("subbands7", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<8>& subbands8() - { - assert_choice_type("subbands8", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<9>& subbands9() - { - assert_choice_type("subbands9", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<10>& subbands10() - { - assert_choice_type("subbands10", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<11>& subbands11() - { - assert_choice_type("subbands11", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<12>& subbands12() - { - assert_choice_type("subbands12", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<13>& subbands13() - { - assert_choice_type("subbands13", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<14>& subbands14() - { - assert_choice_type("subbands14", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<15>& subbands15() - { - assert_choice_type("subbands15", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<16>& subbands16() - { - assert_choice_type("subbands16", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<17>& subbands17() - { - assert_choice_type("subbands17", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<18>& subbands18() - { - assert_choice_type("subbands18", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<19>& subbands19_v1530() - { - assert_choice_type("subbands19-v1530", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<3>& subbands3() const - { - assert_choice_type("subbands3", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<4>& subbands4() const - { - assert_choice_type("subbands4", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<5>& subbands5() const - { - assert_choice_type("subbands5", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<6>& subbands6() const - { - assert_choice_type("subbands6", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<7>& subbands7() const - { - assert_choice_type("subbands7", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<8>& subbands8() const - { - assert_choice_type("subbands8", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<9>& subbands9() const - { - assert_choice_type("subbands9", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<10>& subbands10() const - { - assert_choice_type("subbands10", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<11>& subbands11() const - { - assert_choice_type("subbands11", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<12>& subbands12() const - { - assert_choice_type("subbands12", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<13>& subbands13() const - { - assert_choice_type("subbands13", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<14>& subbands14() const - { - assert_choice_type("subbands14", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<15>& subbands15() const - { - assert_choice_type("subbands15", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<16>& subbands16() const - { - assert_choice_type("subbands16", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<17>& subbands17() const - { - assert_choice_type("subbands17", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<18>& subbands18() const - { - assert_choice_type("subbands18", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - const fixed_bitstring<19>& subbands19_v1530() const - { - assert_choice_type("subbands19-v1530", type_.to_string(), "csi-ReportingBand"); - return c.get >(); - } - fixed_bitstring<3>& set_subbands3() - { - set(types::subbands3); - return c.get >(); - } - fixed_bitstring<4>& set_subbands4() - { - set(types::subbands4); - return c.get >(); - } - fixed_bitstring<5>& set_subbands5() - { - set(types::subbands5); - return c.get >(); - } - fixed_bitstring<6>& set_subbands6() - { - set(types::subbands6); - return c.get >(); - } - fixed_bitstring<7>& set_subbands7() - { - set(types::subbands7); - return c.get >(); - } - fixed_bitstring<8>& set_subbands8() - { - set(types::subbands8); - return c.get >(); - } - fixed_bitstring<9>& set_subbands9() - { - set(types::subbands9); - return c.get >(); - } - fixed_bitstring<10>& set_subbands10() - { - set(types::subbands10); - return c.get >(); - } - fixed_bitstring<11>& set_subbands11() - { - set(types::subbands11); - return c.get >(); - } - fixed_bitstring<12>& set_subbands12() - { - set(types::subbands12); - return c.get >(); - } - fixed_bitstring<13>& set_subbands13() - { - set(types::subbands13); - return c.get >(); - } - fixed_bitstring<14>& set_subbands14() - { - set(types::subbands14); - return c.get >(); - } - fixed_bitstring<15>& set_subbands15() - { - set(types::subbands15); - return c.get >(); - } - fixed_bitstring<16>& set_subbands16() - { - set(types::subbands16); - return c.get >(); - } - fixed_bitstring<17>& set_subbands17() - { - set(types::subbands17); - return c.get >(); - } - fixed_bitstring<18>& set_subbands18() - { - set(types::subbands18); - return c.get >(); - } - fixed_bitstring<19>& set_subbands19_v1530() - { - set(types::subbands19_v1530); - return c.get >(); - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - choice_buffer_t > c; +// MeasResultListNR ::= SEQUENCE (SIZE (1..8)) OF MeasResultNR +using meas_result_list_nr_l = dyn_array; - void destroy_(); - }; +// UplinkTxDirectCurrentBWP ::= SEQUENCE +struct ul_tx_direct_current_bwp_s { + uint8_t bwp_id = 0; + bool shift7dot5k_hz = false; + uint16_t tx_direct_current_location = 0; - // member variables - bool cqi_format_ind_present = false; - bool pmi_format_ind_present = false; - bool csi_report_band_present = false; - cqi_format_ind_e_ cqi_format_ind; - pmi_format_ind_e_ pmi_format_ind; - csi_report_band_c_ csi_report_band; - }; - struct time_restrict_for_ch_meass_opts { - enum options { cfgured, not_cfgured, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated time_restrict_for_ch_meass_e_; - struct time_restrict_for_interference_meass_opts { - enum options { cfgured, not_cfgured, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated time_restrict_for_interference_meass_e_; - struct dummy_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated dummy_e_; - struct group_based_beam_report_c_ { - struct disabled_s_ { - struct nrof_reported_rs_opts { - enum options { n1, n2, n3, n4, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated nrof_reported_rs_e_; - - // member variables - bool nrof_reported_rs_present = false; - nrof_reported_rs_e_ nrof_reported_rs; - }; - struct types_opts { - enum options { enabled, disabled, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - group_based_beam_report_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; - // getters - disabled_s_& disabled() - { - assert_choice_type("disabled", type_.to_string(), "groupBasedBeamReporting"); - return c; - } - const disabled_s_& disabled() const - { - assert_choice_type("disabled", type_.to_string(), "groupBasedBeamReporting"); - return c; - } - disabled_s_& set_disabled() - { - set(types::disabled); - return c; - } - - private: - types type_; - disabled_s_ c; - }; - struct cqi_table_opts { - enum options { table1, table2, table3, spare1, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated cqi_table_e_; - struct subband_size_opts { - enum options { value1, value2, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated subband_size_e_; - using non_pmi_port_ind_l_ = dyn_array; - struct semi_persistent_on_pusch_v1530_s_ { - struct report_slot_cfg_v1530_opts { - enum options { sl4, sl8, sl16, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated report_slot_cfg_v1530_e_; - - // member variables - report_slot_cfg_v1530_e_ report_slot_cfg_v1530; - }; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - bool ext = false; - bool carrier_present = false; - bool csi_im_res_for_interference_present = false; - bool nzp_csi_rs_res_for_interference_present = false; - bool report_freq_cfg_present = false; - bool codebook_cfg_present = false; - bool dummy_present = false; - bool cqi_table_present = false; - bool non_pmi_port_ind_present = false; - uint8_t report_cfg_id = 0; - uint8_t carrier = 0; - uint8_t res_for_ch_meas = 0; - uint8_t csi_im_res_for_interference = 0; - uint8_t nzp_csi_rs_res_for_interference = 0; - report_cfg_type_c_ report_cfg_type; - report_quant_c_ report_quant; - report_freq_cfg_s_ report_freq_cfg; - time_restrict_for_ch_meass_e_ time_restrict_for_ch_meass; - time_restrict_for_interference_meass_e_ time_restrict_for_interference_meass; - codebook_cfg_s codebook_cfg; - dummy_e_ dummy; - group_based_beam_report_c_ group_based_beam_report; - cqi_table_e_ cqi_table; - subband_size_e_ subband_size; - non_pmi_port_ind_l_ non_pmi_port_ind; +// EUTRA-RSTD-Info ::= SEQUENCE +struct eutra_rstd_info_s { + bool ext = false; + uint32_t carrier_freq = 0; + uint8_t meas_prs_offset = 0; // ... - // group 0 - copy_ptr semi_persistent_on_pusch_v1530; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10674,88 +9291,34 @@ struct csi_report_cfg_s { void to_json(json_writer& j) const; }; -// CSI-ResourceConfig ::= SEQUENCE -struct csi_res_cfg_s { - struct csi_rs_res_set_list_c_ { - struct nzp_csi_rs_ssb_s_ { - using nzp_csi_rs_res_set_list_l_ = bounded_array; - using csi_ssb_res_set_list_l_ = std::array; - - // member variables - bool nzp_csi_rs_res_set_list_present = false; - bool csi_ssb_res_set_list_present = false; - nzp_csi_rs_res_set_list_l_ nzp_csi_rs_res_set_list; - csi_ssb_res_set_list_l_ csi_ssb_res_set_list; - }; - using csi_im_res_set_list_l_ = bounded_array; - struct types_opts { - enum options { nzp_csi_rs_ssb, csi_im_res_set_list, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - csi_rs_res_set_list_c_() = default; - csi_rs_res_set_list_c_(const csi_rs_res_set_list_c_& other); - csi_rs_res_set_list_c_& operator=(const csi_rs_res_set_list_c_& other); - ~csi_rs_res_set_list_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 - nzp_csi_rs_ssb_s_& nzp_csi_rs_ssb() - { - assert_choice_type("nzp-CSI-RS-SSB", type_.to_string(), "csi-RS-ResourceSetList"); - return c.get(); - } - csi_im_res_set_list_l_& csi_im_res_set_list() - { - assert_choice_type("csi-IM-ResourceSetList", type_.to_string(), "csi-RS-ResourceSetList"); - return c.get(); - } - const nzp_csi_rs_ssb_s_& nzp_csi_rs_ssb() const - { - assert_choice_type("nzp-CSI-RS-SSB", type_.to_string(), "csi-RS-ResourceSetList"); - return c.get(); - } - const csi_im_res_set_list_l_& csi_im_res_set_list() const - { - assert_choice_type("csi-IM-ResourceSetList", type_.to_string(), "csi-RS-ResourceSetList"); - return c.get(); - } - nzp_csi_rs_ssb_s_& set_nzp_csi_rs_ssb() - { - set(types::nzp_csi_rs_ssb); - return c.get(); - } - csi_im_res_set_list_l_& set_csi_im_res_set_list() - { - set(types::csi_im_res_set_list); - return c.get(); - } +// MIMO-LayersDL ::= ENUMERATED +struct mimo_layers_dl_opts { + enum options { two_layers, four_layers, eight_layers, nulltype } value; + typedef uint8_t number_type; - private: - types type_; - choice_buffer_t c; + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated mimo_layers_dl_e; - void destroy_(); - }; - struct res_type_opts { - enum options { aperiodic, semi_persistent, periodic, nulltype } value; +// MIMO-LayersUL ::= ENUMERATED +struct mimo_layers_ul_opts { + enum options { one_layer, two_layers, four_layers, nulltype } value; + typedef uint8_t number_type; - std::string to_string() const; - }; - typedef enumerated res_type_e_; + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated mimo_layers_ul_e; - // member variables - bool ext = false; - uint8_t csi_res_cfg_id = 0; - csi_rs_res_set_list_c_ csi_rs_res_set_list; - uint8_t bwp_id = 0; - res_type_e_ res_type; +// MeasResult2EUTRA ::= SEQUENCE +struct meas_result2_eutra_s { + bool ext = false; + bool meas_result_serving_cell_present = false; + bool meas_result_best_neigh_cell_present = false; + uint32_t carrier_freq = 0; + meas_result_eutra_s meas_result_serving_cell; + meas_result_eutra_s meas_result_best_neigh_cell; // ... // sequence methods @@ -10764,14 +9327,17 @@ struct csi_res_cfg_s { void to_json(json_writer& j) const; }; -// CSI-SSB-ResourceSet ::= SEQUENCE -struct csi_ssb_res_set_s { - using csi_ssb_res_list_l_ = dyn_array; - - // member variables - bool ext = false; - uint8_t csi_ssb_res_set_id = 0; - csi_ssb_res_list_l_ csi_ssb_res_list; +// MeasResult2NR ::= SEQUENCE +struct meas_result2_nr_s { + bool ext = false; + bool ssb_freq_present = false; + bool ref_freq_csi_rs_present = false; + bool meas_result_serving_cell_present = false; + bool meas_result_neigh_cell_list_nr_present = false; + uint32_t ssb_freq = 0; + uint32_t ref_freq_csi_rs = 0; + meas_result_nr_s meas_result_serving_cell; + meas_result_list_nr_l meas_result_neigh_cell_list_nr; // ... // sequence methods @@ -10780,16 +9346,27 @@ struct csi_ssb_res_set_s { void to_json(json_writer& j) const; }; -// CSI-SemiPersistentOnPUSCH-TriggerStateList ::= SEQUENCE (SIZE (1..64)) OF CSI-SemiPersistentOnPUSCH-TriggerState -using csi_semi_persistent_on_pusch_trigger_state_list_l = dyn_array; - -// DownlinkConfigCommon ::= SEQUENCE -struct dl_cfg_common_s { - bool ext = false; - bool freq_info_dl_present = false; - bool init_dl_bwp_present = false; - freq_info_dl_s freq_info_dl; - bwp_dl_common_s init_dl_bwp; +// MeasResultCellSFTD-NR ::= SEQUENCE +struct meas_result_cell_sftd_nr_s { + bool rsrp_result_present = false; + uint16_t pci = 0; + uint16_t sfn_offset_result = 0; + int16_t frame_boundary_offset_result = -30720; + uint8_t rsrp_result = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultServMO ::= SEQUENCE +struct meas_result_serv_mo_s { + bool ext = false; + bool meas_result_best_neigh_cell_present = false; + uint8_t serv_cell_id = 0; + meas_result_nr_s meas_result_serving_cell; + meas_result_nr_s meas_result_best_neigh_cell; // ... // sequence methods @@ -10798,30 +9375,42 @@ struct dl_cfg_common_s { void to_json(json_writer& j) const; }; -// NZP-CSI-RS-Resource ::= SEQUENCE -struct nzp_csi_rs_res_s { - struct pwr_ctrl_offset_ss_opts { - enum options { db_minus3, db0, db3, db6, nulltype } value; - typedef int8_t number_type; +// ReducedAggregatedBandwidth ::= ENUMERATED +struct reduced_aggregated_bw_opts { + enum options { + mhz0, + mhz10, + mhz20, + mhz30, + mhz40, + mhz50, + mhz60, + mhz80, + mhz100, + mhz200, + mhz300, + mhz400, + nulltype + } value; + typedef uint16_t number_type; - std::string to_string() const; - int8_t to_number() const; - }; - typedef enumerated pwr_ctrl_offset_ss_e_; + std::string to_string() const; + uint16_t to_number() const; +}; +typedef enumerated reduced_aggregated_bw_e; + +// UplinkTxDirectCurrentCell ::= SEQUENCE +struct ul_tx_direct_current_cell_s { + using ul_direct_current_bwp_l_ = dyn_array; + using ul_direct_current_bwp_sul_l_ = dyn_array; // member variables - bool ext = false; - bool pwr_ctrl_offset_ss_present = false; - bool periodicity_and_offset_present = false; - bool qcl_info_periodic_csi_rs_present = false; - uint8_t nzp_csi_rs_res_id = 0; - csi_rs_res_map_s res_map; - int8_t pwr_ctrl_offset = -8; - pwr_ctrl_offset_ss_e_ pwr_ctrl_offset_ss; - uint16_t scrambling_id = 0; - csi_res_periodicity_and_offset_c periodicity_and_offset; - uint8_t qcl_info_periodic_csi_rs = 0; + bool ext = false; + uint8_t serv_cell_idx = 0; + ul_direct_current_bwp_l_ ul_direct_current_bwp; // ... + // group 0 + copy_ptr ul_direct_current_bwp_sul; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10829,26 +9418,40 @@ struct nzp_csi_rs_res_s { void to_json(json_writer& j) const; }; -// NZP-CSI-RS-ResourceSet ::= SEQUENCE -struct nzp_csi_rs_res_set_s { - using nzp_csi_rs_res_l_ = dyn_array; - struct repeat_opts { - enum options { on, off, nulltype } value; +// DRB-CountInfo ::= SEQUENCE +struct drb_count_info_s { + uint8_t drb_id = 1; + uint64_t count_ul = 0; + uint64_t count_dl = 0; - std::string to_string() const; - }; - typedef enumerated repeat_e_; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - bool ext = false; - bool repeat_present = false; - bool aperiodic_trigger_offset_present = false; - bool trs_info_present = false; - uint8_t nzp_csi_res_set_id = 0; - nzp_csi_rs_res_l_ nzp_csi_rs_res; - repeat_e_ repeat; - uint8_t aperiodic_trigger_offset = 0; - // ... +// EUTRA-RSTD-InfoList ::= SEQUENCE (SIZE (1..3)) OF EUTRA-RSTD-Info +using eutra_rstd_info_list_l = dyn_array; + +// MeasResultCellListSFTD-NR ::= SEQUENCE (SIZE (1..3)) OF MeasResultCellSFTD-NR +using meas_result_cell_list_sftd_nr_l = dyn_array; + +// MeasResultFreqList ::= SEQUENCE (SIZE (1..8)) OF MeasResult2NR +using meas_result_freq_list_l = dyn_array; + +// MeasResultFreqListFailMRDC ::= SEQUENCE (SIZE (1..8)) OF MeasResult2EUTRA +using meas_result_freq_list_fail_mrdc_l = dyn_array; + +// MeasResultListEUTRA ::= SEQUENCE (SIZE (1..8)) OF MeasResultEUTRA +using meas_result_list_eutra_l = dyn_array; + +// MeasResultSFTD-EUTRA ::= SEQUENCE +struct meas_result_sftd_eutra_s { + bool rsrp_result_present = false; + uint16_t eutra_pci = 0; + uint16_t sfn_offset_result = 0; + int16_t frame_boundary_offset_result = -30720; + uint8_t rsrp_result = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10856,22 +9459,49 @@ struct nzp_csi_rs_res_set_s { void to_json(json_writer& j) const; }; -// PDSCH-CodeBlockGroupTransmission ::= SEQUENCE -struct pdsch_code_block_group_tx_s { - struct max_code_block_groups_per_transport_block_opts { - enum options { n2, n4, n6, n8, nulltype } value; - typedef uint8_t number_type; +// MeasResultServFreqListEUTRA-SCG ::= SEQUENCE (SIZE (1..32)) OF MeasResult2EUTRA +using meas_result_serv_freq_list_eutra_scg_l = dyn_array; - std::string to_string() const; - uint8_t to_number() const; +// MeasResultServFreqListNR-SCG ::= SEQUENCE (SIZE (1..32)) OF MeasResult2NR +using meas_result_serv_freq_list_nr_scg_l = dyn_array; + +// MeasResultServMOList ::= SEQUENCE (SIZE (1..32)) OF MeasResultServMO +using meas_result_serv_mo_list_l = dyn_array; + +// OverheatingAssistance ::= SEQUENCE +struct overheat_assist_s { + struct reduced_max_ccs_s_ { + uint8_t reduced_ccs_dl = 0; + uint8_t reduced_ccs_ul = 0; + }; + struct reduced_max_bw_fr1_s_ { + reduced_aggregated_bw_e reduced_bw_fr1_dl; + reduced_aggregated_bw_e reduced_bw_fr1_ul; + }; + struct reduced_max_bw_fr2_s_ { + reduced_aggregated_bw_e reduced_bw_fr2_dl; + reduced_aggregated_bw_e reduced_bw_fr2_ul; + }; + struct reduced_max_mimo_layers_fr1_s_ { + mimo_layers_dl_e reduced_mimo_layers_fr1_dl; + mimo_layers_ul_e reduced_mimo_layers_fr1_ul; + }; + struct reduced_max_mimo_layers_fr2_s_ { + mimo_layers_dl_e reduced_mimo_layers_fr2_dl; + mimo_layers_ul_e reduced_mimo_layers_fr2_ul; }; - typedef enumerated max_code_block_groups_per_transport_block_e_; // member variables - bool ext = false; - max_code_block_groups_per_transport_block_e_ max_code_block_groups_per_transport_block; - bool code_block_group_flush_ind = false; - // ... + bool reduced_max_ccs_present = false; + bool reduced_max_bw_fr1_present = false; + bool reduced_max_bw_fr2_present = false; + bool reduced_max_mimo_layers_fr1_present = false; + bool reduced_max_mimo_layers_fr2_present = false; + reduced_max_ccs_s_ reduced_max_ccs; + reduced_max_bw_fr1_s_ reduced_max_bw_fr1; + reduced_max_bw_fr2_s_ reduced_max_bw_fr2; + reduced_max_mimo_layers_fr1_s_ reduced_max_mimo_layers_fr1; + reduced_max_mimo_layers_fr2_s_ reduced_max_mimo_layers_fr2; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10879,30 +9509,69 @@ struct pdsch_code_block_group_tx_s { void to_json(json_writer& j) const; }; -// PUSCH-ServingCellConfig ::= SEQUENCE -struct pusch_serving_cell_cfg_s { - struct xoverhead_opts { - enum options { xoh6, xoh12, xoh18, nulltype } value; - typedef uint8_t number_type; +// RRCReconfigurationComplete-v1560-IEs ::= SEQUENCE +struct rrc_recfg_complete_v1560_ies_s { + struct scg_resp_c_ { + struct types_opts { + enum options { nr_scg_resp, eutra_scg_resp, nulltype } value; - std::string to_string() const; - uint8_t to_number() const; + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + scg_resp_c_() = default; + scg_resp_c_(const scg_resp_c_& other); + scg_resp_c_& operator=(const scg_resp_c_& other); + ~scg_resp_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 + dyn_octstring& nr_scg_resp() + { + assert_choice_type("nr-SCG-Response", type_.to_string(), "scg-Response"); + return c.get(); + } + dyn_octstring& eutra_scg_resp() + { + assert_choice_type("eutra-SCG-Response", type_.to_string(), "scg-Response"); + return c.get(); + } + const dyn_octstring& nr_scg_resp() const + { + assert_choice_type("nr-SCG-Response", type_.to_string(), "scg-Response"); + return c.get(); + } + const dyn_octstring& eutra_scg_resp() const + { + assert_choice_type("eutra-SCG-Response", type_.to_string(), "scg-Response"); + return c.get(); + } + dyn_octstring& set_nr_scg_resp() + { + set(types::nr_scg_resp); + return c.get(); + } + dyn_octstring& set_eutra_scg_resp() + { + set(types::eutra_scg_resp); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); }; - typedef enumerated xoverhead_e_; // member variables - bool ext = false; - bool code_block_group_tx_present = false; - bool rate_matching_present = false; - bool xoverhead_present = false; - setup_release_c code_block_group_tx; - xoverhead_e_ xoverhead; - // ... - // group 0 - bool max_mimo_layers_present = false; - bool processing_type2_enabled_present = false; - uint8_t max_mimo_layers = 1; - bool processing_type2_enabled = false; + bool scg_resp_present = false; + bool non_crit_ext_present = false; + scg_resp_c_ scg_resp; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10910,158 +9579,87 @@ struct pusch_serving_cell_cfg_s { void to_json(json_writer& j) const; }; -// PollByte ::= ENUMERATED -struct poll_byte_opts { - enum 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, - mb10, - mb11, - mb12, - mb13, - mb14, - mb15, - mb16, - mb17, - mb18, - mb20, - mb25, - mb30, - mb40, - infinity, - spare20, - spare19, - spare18, - spare17, - spare16, - spare15, - spare14, - spare13, - spare12, - spare11, - spare10, - spare9, - spare8, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; +// UE-CapabilityRAT-Container ::= SEQUENCE +struct ue_cap_rat_container_s { + rat_type_e rat_type; + dyn_octstring ue_cap_rat_container; - std::string to_string() const; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated poll_byte_e; -// PollPDU ::= ENUMERATED -struct poll_pdu_opts { - enum 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, - nulltype - } value; - typedef int32_t number_type; +// UplinkTxDirectCurrentList ::= SEQUENCE (SIZE (1..32)) OF UplinkTxDirectCurrentCell +using ul_tx_direct_current_list_l = dyn_array; - std::string to_string() const; - int32_t to_number() const; -}; -typedef enumerated poll_pdu_e; +// DRB-CountInfoList ::= SEQUENCE (SIZE (0..29)) OF DRB-CountInfo +using drb_count_info_list_l = dyn_array; -// RateMatchPatternLTE-CRS ::= SEQUENCE -struct rate_match_pattern_lte_crs_s { - struct carrier_bw_dl_opts { - enum options { n6, n15, n25, n50, n75, n100, spare2, spare1, nulltype } value; - typedef uint8_t number_type; +// DelayBudgetReport ::= CHOICE +struct delay_budget_report_c { + struct type1_opts { + enum options { + ms_minus1280, + ms_minus640, + ms_minus320, + ms_minus160, + ms_minus80, + ms_minus60, + ms_minus40, + ms_minus20, + ms0, + ms20, + ms40, + ms60, + ms80, + ms160, + ms320, + ms640, + ms1280, + nulltype + } value; + typedef int16_t number_type; std::string to_string() const; - uint8_t to_number() const; + int16_t to_number() const; }; - typedef enumerated carrier_bw_dl_e_; - struct nrof_crs_ports_opts { - enum options { n1, n2, n4, nulltype } value; + typedef enumerated type1_e_; + struct types_opts { + enum options { type1, /*...*/ nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated nrof_crs_ports_e_; - struct v_shift_opts { - enum options { n0, n1, n2, n3, n4, n5, nulltype } value; - typedef uint8_t number_type; + typedef enumerated types; + + // choice methods + types type() const { return types::type1; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + type1_e_& type1() { return c; } + const type1_e_& type1() const { return c; } + +private: + type1_e_ c; +}; + +// FailureInfoRLC-Bearer ::= SEQUENCE +struct fail_info_rlc_bearer_s { + struct fail_type_opts { + enum options { rlc_fail, spare3, spare2, spare1, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; - typedef enumerated v_shift_e_; + typedef enumerated fail_type_e_; // member variables - bool mbsfn_sf_cfg_list_present = false; - uint16_t carrier_freq_dl = 0; - carrier_bw_dl_e_ carrier_bw_dl; - eutra_mbsfn_sf_cfg_list_l mbsfn_sf_cfg_list; - nrof_crs_ports_e_ nrof_crs_ports; - v_shift_e_ v_shift; + uint8_t cell_group_id = 0; + uint8_t lc_ch_id = 1; + fail_type_e_ fail_type; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11069,103 +9667,189 @@ struct rate_match_pattern_lte_crs_s { void to_json(json_writer& j) const; }; -// SN-FieldLengthAM ::= ENUMERATED -struct sn_field_len_am_opts { - enum options { size12, size18, nulltype } value; - typedef uint8_t number_type; +// FailureReportSCG ::= SEQUENCE +struct fail_report_scg_s { + struct fail_type_opts { + enum options { + t310_expiry, + random_access_problem, + rlc_max_num_retx, + synch_recfg_fail_scg, + scg_recfg_fail, + srb3_integrity_fail, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; - std::string to_string() const; - uint8_t to_number() const; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated fail_type_e_; + + // member variables + bool ext = false; + bool meas_result_freq_list_present = false; + bool meas_result_scg_fail_present = false; + fail_type_e_ fail_type; + meas_result_freq_list_l meas_result_freq_list; + dyn_octstring meas_result_scg_fail; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated sn_field_len_am_e; -// SN-FieldLengthUM ::= ENUMERATED -struct sn_field_len_um_opts { - enum options { size6, size12, nulltype } value; - typedef uint8_t number_type; +// FailureReportSCG-EUTRA ::= SEQUENCE +struct fail_report_scg_eutra_s { + struct fail_type_opts { + enum options { + t313_expiry, + random_access_problem, + rlc_max_num_retx, + scg_change_fail, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; - std::string to_string() const; - uint8_t to_number() const; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated fail_type_e_; + + // member variables + bool ext = false; + bool meas_result_freq_list_mrdc_present = false; + bool meas_result_scg_fail_mrdc_present = false; + fail_type_e_ fail_type; + meas_result_freq_list_fail_mrdc_l meas_result_freq_list_mrdc; + dyn_octstring meas_result_scg_fail_mrdc; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated sn_field_len_um_e; -// SRS-CarrierSwitching ::= SEQUENCE -struct srs_carrier_switching_s { - struct srs_switch_from_carrier_opts { - enum options { sul, nul, nulltype } value; +// LocationMeasurementInfo ::= CHOICE +struct location_meas_info_c { + struct types_opts { + enum options { eutra_rstd, /*...*/ eutra_fine_timing_detection, nulltype } value; std::string to_string() const; }; - typedef enumerated srs_switch_from_carrier_e_; - struct srs_tpc_pdcch_group_c_ { - using type_a_l_ = dyn_array; + typedef enumerated types; + + // choice methods + location_meas_info_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; + // getters + eutra_rstd_info_list_l& eutra_rstd() + { + assert_choice_type("eutra-RSTD", type_.to_string(), "LocationMeasurementInfo"); + return c; + } + const eutra_rstd_info_list_l& eutra_rstd() const + { + assert_choice_type("eutra-RSTD", type_.to_string(), "LocationMeasurementInfo"); + return c; + } + eutra_rstd_info_list_l& set_eutra_rstd() + { + set(types::eutra_rstd); + return c; + } + +private: + types type_; + eutra_rstd_info_list_l c; +}; + +// MeasResults ::= SEQUENCE +struct meas_results_s { + struct meas_result_neigh_cells_c_ { struct types_opts { - enum options { type_a, type_b, nulltype } value; + enum options { meas_result_list_nr, /*...*/ meas_result_list_eutra, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - srs_tpc_pdcch_group_c_() = default; - srs_tpc_pdcch_group_c_(const srs_tpc_pdcch_group_c_& other); - srs_tpc_pdcch_group_c_& operator=(const srs_tpc_pdcch_group_c_& other); - ~srs_tpc_pdcch_group_c_() { destroy_(); } + meas_result_neigh_cells_c_() = default; + meas_result_neigh_cells_c_(const meas_result_neigh_cells_c_& other); + meas_result_neigh_cells_c_& operator=(const meas_result_neigh_cells_c_& other); + ~meas_result_neigh_cells_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 - type_a_l_& type_a() + meas_result_list_nr_l& meas_result_list_nr() { - assert_choice_type("typeA", type_.to_string(), "srs-TPC-PDCCH-Group"); - return c.get(); + assert_choice_type("measResultListNR", type_.to_string(), "measResultNeighCells"); + return c.get(); } - srs_tpc_pdcch_cfg_s& type_b() + meas_result_list_eutra_l& meas_result_list_eutra() { - assert_choice_type("typeB", type_.to_string(), "srs-TPC-PDCCH-Group"); - return c.get(); + assert_choice_type("measResultListEUTRA", type_.to_string(), "measResultNeighCells"); + return c.get(); } - const type_a_l_& type_a() const + const meas_result_list_nr_l& meas_result_list_nr() const { - assert_choice_type("typeA", type_.to_string(), "srs-TPC-PDCCH-Group"); - return c.get(); + assert_choice_type("measResultListNR", type_.to_string(), "measResultNeighCells"); + return c.get(); } - const srs_tpc_pdcch_cfg_s& type_b() const + const meas_result_list_eutra_l& meas_result_list_eutra() const { - assert_choice_type("typeB", type_.to_string(), "srs-TPC-PDCCH-Group"); - return c.get(); + assert_choice_type("measResultListEUTRA", type_.to_string(), "measResultNeighCells"); + return c.get(); } - type_a_l_& set_type_a() + meas_result_list_nr_l& set_meas_result_list_nr() { - set(types::type_a); - return c.get(); + set(types::meas_result_list_nr); + return c.get(); } - srs_tpc_pdcch_cfg_s& set_type_b() + meas_result_list_eutra_l& set_meas_result_list_eutra() { - set(types::type_b); - return c.get(); + set(types::meas_result_list_eutra); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; - using monitoring_cells_l_ = bounded_array; // member variables - bool ext = false; - bool srs_switch_from_serv_cell_idx_present = false; - bool srs_tpc_pdcch_group_present = false; - bool monitoring_cells_present = false; - uint8_t srs_switch_from_serv_cell_idx = 0; - srs_switch_from_carrier_e_ srs_switch_from_carrier; - srs_tpc_pdcch_group_c_ srs_tpc_pdcch_group; - monitoring_cells_l_ monitoring_cells; + bool ext = false; + bool meas_result_neigh_cells_present = false; + uint8_t meas_id = 1; + meas_result_serv_mo_list_l meas_result_serving_mo_list; + meas_result_neigh_cells_c_ meas_result_neigh_cells; // ... + // group 0 + copy_ptr meas_result_serv_freq_list_eutra_scg; + copy_ptr meas_result_serv_freq_list_nr_scg; + copy_ptr meas_result_sftd_eutra; + copy_ptr meas_result_sftd_nr; + // group 1 + copy_ptr meas_result_cell_list_sftd_nr; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11173,20 +9857,12 @@ struct srs_carrier_switching_s { void to_json(json_writer& j) const; }; -// SlotFormatIndicator ::= SEQUENCE -struct slot_format_ind_s { - using slot_format_comb_to_add_mod_list_l_ = dyn_array; - using slot_format_comb_to_release_list_l_ = bounded_array; - - // member variables - bool ext = false; - bool slot_format_comb_to_add_mod_list_present = false; - bool slot_format_comb_to_release_list_present = false; - uint32_t sfi_rnti = 0; - uint8_t dci_payload_size = 1; - slot_format_comb_to_add_mod_list_l_ slot_format_comb_to_add_mod_list; - slot_format_comb_to_release_list_l_ slot_format_comb_to_release_list; - // ... +// RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE +struct rrc_recfg_complete_v1530_ies_s { + bool ul_tx_direct_current_list_present = false; + bool non_crit_ext_present = false; + ul_tx_direct_current_list_l ul_tx_direct_current_list; + rrc_recfg_complete_v1560_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11194,250 +9870,108 @@ struct slot_format_ind_s { void to_json(json_writer& j) const; }; -// T-PollRetransmit ::= ENUMERATED -struct t_poll_retx_opts { - enum 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, - ms170, - ms175, - ms180, - ms185, - ms190, - ms195, - ms200, - ms205, - ms210, - ms215, - ms220, - ms225, - ms230, - ms235, - ms240, - ms245, - ms250, - ms300, - ms350, - ms400, - ms450, - ms500, - ms800, - ms1000, - ms2000, - ms4000, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; +// RegisteredAMF ::= SEQUENCE +struct registered_amf_s { + bool plmn_id_present = false; + plmn_id_s plmn_id; + fixed_bitstring<24> amf_id; - std::string to_string() const; - uint16_t to_number() const; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated t_poll_retx_e; -// T-Reassembly ::= ENUMERATED -struct t_reassembly_opts { - enum 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, - nulltype - } value; - typedef uint8_t number_type; +// S-NSSAI ::= CHOICE +struct s_nssai_c { + struct types_opts { + enum options { sst, sst_sd, nulltype } value; - std::string to_string() const; - uint8_t to_number() const; -}; -typedef enumerated t_reassembly_e; + std::string to_string() const; + }; + typedef enumerated types; -// T-StatusProhibit ::= ENUMERATED -struct t_status_prohibit_opts { - enum 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, - ms165, - ms170, - ms175, - ms180, - ms185, - ms190, - ms195, - ms200, - ms205, - ms210, - ms215, - ms220, - ms225, - ms230, - ms235, - ms240, - ms245, - ms250, - ms300, - ms350, - ms400, - ms450, - ms500, - ms800, - ms1000, - ms1200, - ms1600, - ms2000, - ms2400, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; + // choice methods + s_nssai_c() = default; + s_nssai_c(const s_nssai_c& other); + s_nssai_c& operator=(const s_nssai_c& other); + ~s_nssai_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 + fixed_bitstring<8>& sst() + { + assert_choice_type("sst", type_.to_string(), "S-NSSAI"); + return c.get >(); + } + fixed_bitstring<32>& sst_sd() + { + assert_choice_type("sst-SD", type_.to_string(), "S-NSSAI"); + return c.get >(); + } + const fixed_bitstring<8>& sst() const + { + assert_choice_type("sst", type_.to_string(), "S-NSSAI"); + return c.get >(); + } + const fixed_bitstring<32>& sst_sd() const + { + assert_choice_type("sst-SD", type_.to_string(), "S-NSSAI"); + return c.get >(); + } + fixed_bitstring<8>& set_sst() + { + set(types::sst); + return c.get >(); + } + fixed_bitstring<32>& set_sst_sd() + { + set(types::sst_sd); + return c.get >(); + } - std::string to_string() const; - uint16_t to_number() const; +private: + types type_; + choice_buffer_t > c; + + void destroy_(); }; -typedef enumerated t_status_prohibit_e; -// TDD-UL-DL-SlotConfig ::= SEQUENCE -struct tdd_ul_dl_slot_cfg_s { - struct symbols_c_ { - struct explicit_s_ { - bool nrof_dl_symbols_present = false; - bool nrof_ul_symbols_present = false; - uint8_t nrof_dl_symbols = 1; - uint8_t nrof_ul_symbols = 1; - }; - struct types_opts { - enum options { all_dl, all_ul, explicit_type, nulltype } value; +// SCGFailureInformation-v1590-IEs ::= SEQUENCE +struct scg_fail_info_v1590_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; - std::string to_string() const; - }; - typedef enumerated types; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // choice methods - symbols_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; - // getters - explicit_s_& explicit_type() - { - assert_choice_type("explicit", type_.to_string(), "symbols"); - return c; - } - const explicit_s_& explicit_type() const - { - assert_choice_type("explicit", type_.to_string(), "symbols"); - return c; - } - explicit_s_& set_explicit_type() - { - set(types::explicit_type); - return c; - } +// SCGFailureInformationEUTRA-v1590-IEs ::= SEQUENCE +struct scg_fail_info_eutra_v1590_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; - private: - types type_; - explicit_s_ c; - }; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - uint16_t slot_idx = 0; - symbols_c_ symbols; +// UE-CapabilityRAT-ContainerList ::= SEQUENCE (SIZE (0..8)) OF UE-CapabilityRAT-Container +using ue_cap_rat_container_list_l = dyn_array; + +// UEAssistanceInformation-v1540-IEs ::= SEQUENCE +struct ueassist_info_v1540_ies_s { + bool overheat_assist_present = false; + bool non_crit_ext_present = false; + overheat_assist_s overheat_assist; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11445,57 +9979,26 @@ struct tdd_ul_dl_slot_cfg_s { void to_json(json_writer& j) const; }; -// UL-DataSplitThreshold ::= ENUMERATED -struct ul_data_split_thres_opts { - enum 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, - nulltype - } value; - typedef int32_t number_type; +// CounterCheckResponse-IEs ::= SEQUENCE +struct counter_check_resp_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + drb_count_info_list_l drb_count_info_list; + dyn_octstring late_non_crit_ext; - std::string to_string() const; - int32_t to_number() const; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated ul_data_split_thres_e; -// UplinkConfigCommon ::= SEQUENCE -struct ul_cfg_common_s { - bool freq_info_ul_present = false; - bool init_ul_bwp_present = false; - freq_info_ul_s freq_info_ul; - bwp_ul_common_s init_ul_bwp; - time_align_timer_e dummy; +// FailureInformation-IEs ::= SEQUENCE +struct fail_info_ies_s { + bool fail_info_rlc_bearer_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + fail_info_rlc_bearer_s fail_info_rlc_bearer; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11503,15 +10006,12 @@ struct ul_cfg_common_s { void to_json(json_writer& j) const; }; -// BWP-Downlink ::= SEQUENCE -struct bwp_dl_s { - bool ext = false; - bool bwp_common_present = false; - bool bwp_ded_present = false; - uint8_t bwp_id = 0; - bwp_dl_common_s bwp_common; - bwp_dl_ded_s bwp_ded; - // ... +// LocationMeasurementIndication-IEs ::= SEQUENCE +struct location_meas_ind_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + setup_release_c meas_ind; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11519,61 +10019,12 @@ struct bwp_dl_s { void to_json(json_writer& j) const; }; -// CSI-MeasConfig ::= SEQUENCE -struct csi_meas_cfg_s { - using nzp_csi_rs_res_to_add_mod_list_l_ = dyn_array; - using nzp_csi_rs_res_to_release_list_l_ = dyn_array; - using nzp_csi_rs_res_set_to_add_mod_list_l_ = dyn_array; - using nzp_csi_rs_res_set_to_release_list_l_ = dyn_array; - using csi_im_res_to_add_mod_list_l_ = dyn_array; - using csi_im_res_to_release_list_l_ = bounded_array; - using csi_im_res_set_to_add_mod_list_l_ = dyn_array; - using csi_im_res_set_to_release_list_l_ = dyn_array; - using csi_ssb_res_set_to_add_mod_list_l_ = dyn_array; - using csi_ssb_res_set_to_add_release_list_l_ = dyn_array; - using csi_res_cfg_to_add_mod_list_l_ = dyn_array; - using csi_res_cfg_to_release_list_l_ = dyn_array; - using csi_report_cfg_to_add_mod_list_l_ = dyn_array; - using csi_report_cfg_to_release_list_l_ = dyn_array; - - // member variables - bool ext = false; - bool nzp_csi_rs_res_to_add_mod_list_present = false; - bool nzp_csi_rs_res_to_release_list_present = false; - bool nzp_csi_rs_res_set_to_add_mod_list_present = false; - bool nzp_csi_rs_res_set_to_release_list_present = false; - bool csi_im_res_to_add_mod_list_present = false; - bool csi_im_res_to_release_list_present = false; - bool csi_im_res_set_to_add_mod_list_present = false; - bool csi_im_res_set_to_release_list_present = false; - bool csi_ssb_res_set_to_add_mod_list_present = false; - bool csi_ssb_res_set_to_add_release_list_present = false; - bool csi_res_cfg_to_add_mod_list_present = false; - bool csi_res_cfg_to_release_list_present = false; - bool csi_report_cfg_to_add_mod_list_present = false; - bool csi_report_cfg_to_release_list_present = false; - bool report_trigger_size_present = false; - bool aperiodic_trigger_state_list_present = false; - bool semi_persistent_on_pusch_trigger_state_list_present = false; - nzp_csi_rs_res_to_add_mod_list_l_ nzp_csi_rs_res_to_add_mod_list; - nzp_csi_rs_res_to_release_list_l_ nzp_csi_rs_res_to_release_list; - nzp_csi_rs_res_set_to_add_mod_list_l_ nzp_csi_rs_res_set_to_add_mod_list; - nzp_csi_rs_res_set_to_release_list_l_ nzp_csi_rs_res_set_to_release_list; - csi_im_res_to_add_mod_list_l_ csi_im_res_to_add_mod_list; - csi_im_res_to_release_list_l_ csi_im_res_to_release_list; - csi_im_res_set_to_add_mod_list_l_ csi_im_res_set_to_add_mod_list; - csi_im_res_set_to_release_list_l_ csi_im_res_set_to_release_list; - csi_ssb_res_set_to_add_mod_list_l_ csi_ssb_res_set_to_add_mod_list; - csi_ssb_res_set_to_add_release_list_l_ csi_ssb_res_set_to_add_release_list; - csi_res_cfg_to_add_mod_list_l_ csi_res_cfg_to_add_mod_list; - csi_res_cfg_to_release_list_l_ csi_res_cfg_to_release_list; - csi_report_cfg_to_add_mod_list_l_ csi_report_cfg_to_add_mod_list; - csi_report_cfg_to_release_list_l_ csi_report_cfg_to_release_list; - uint8_t report_trigger_size = 0; - setup_release_c > aperiodic_trigger_state_list; - setup_release_c > - semi_persistent_on_pusch_trigger_state_list; - // ... +// MeasurementReport-IEs ::= SEQUENCE +struct meas_report_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + meas_results_s meas_results; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11581,86 +10032,129 @@ struct csi_meas_cfg_s { void to_json(json_writer& j) const; }; -// CipheringAlgorithm ::= ENUMERATED -struct ciphering_algorithm_opts { - enum options { nea0, nea1, nea2, nea3, spare4, spare3, spare2, spare1, /*...*/ nulltype } value; - typedef uint8_t number_type; +// RRCReconfigurationComplete-IEs ::= SEQUENCE +struct rrc_recfg_complete_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + rrc_recfg_complete_v1530_ies_s non_crit_ext; - std::string to_string() const; - uint8_t to_number() const; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated ciphering_algorithm_e; -// CrossCarrierSchedulingConfig ::= SEQUENCE -struct cross_carrier_sched_cfg_s { - struct sched_cell_info_c_ { - struct own_s_ { - bool cif_presence = false; - }; - struct other_s_ { - uint8_t sched_cell_id = 0; - uint8_t cif_in_sched_cell = 1; - }; +// RRCReestablishmentComplete-IEs ::= SEQUENCE +struct rrc_reest_complete_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCResumeComplete-IEs ::= SEQUENCE +struct rrc_resume_complete_ies_s { + bool ded_nas_msg_present = false; + bool sel_plmn_id_present = false; + bool ul_tx_direct_current_list_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring ded_nas_msg; + uint8_t sel_plmn_id = 1; + ul_tx_direct_current_list_l ul_tx_direct_current_list; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCSetupComplete-IEs ::= SEQUENCE +struct rrc_setup_complete_ies_s { + struct guami_type_opts { + enum options { native, mapped, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated guami_type_e_; + using s_nssai_list_l_ = dyn_array; + struct ng_minus5_g_s_tmsi_value_c_ { struct types_opts { - enum options { own, other, nulltype } value; + enum options { ng_minus5_g_s_tmsi, ng_minus5_g_s_tmsi_part2, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - sched_cell_info_c_() = default; - sched_cell_info_c_(const sched_cell_info_c_& other); - sched_cell_info_c_& operator=(const sched_cell_info_c_& other); - ~sched_cell_info_c_() { destroy_(); } + ng_minus5_g_s_tmsi_value_c_() = default; + ng_minus5_g_s_tmsi_value_c_(const ng_minus5_g_s_tmsi_value_c_& other); + ng_minus5_g_s_tmsi_value_c_& operator=(const ng_minus5_g_s_tmsi_value_c_& other); + ~ng_minus5_g_s_tmsi_value_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 - own_s_& own() + fixed_bitstring<48>& ng_minus5_g_s_tmsi() { - assert_choice_type("own", type_.to_string(), "schedulingCellInfo"); - return c.get(); + assert_choice_type("ng-5G-S-TMSI", type_.to_string(), "ng-5G-S-TMSI-Value"); + return c.get >(); } - other_s_& other() + fixed_bitstring<9>& ng_minus5_g_s_tmsi_part2() { - assert_choice_type("other", type_.to_string(), "schedulingCellInfo"); - return c.get(); + assert_choice_type("ng-5G-S-TMSI-Part2", type_.to_string(), "ng-5G-S-TMSI-Value"); + return c.get >(); } - const own_s_& own() const + const fixed_bitstring<48>& ng_minus5_g_s_tmsi() const { - assert_choice_type("own", type_.to_string(), "schedulingCellInfo"); - return c.get(); + assert_choice_type("ng-5G-S-TMSI", type_.to_string(), "ng-5G-S-TMSI-Value"); + return c.get >(); } - const other_s_& other() const + const fixed_bitstring<9>& ng_minus5_g_s_tmsi_part2() const { - assert_choice_type("other", type_.to_string(), "schedulingCellInfo"); - return c.get(); + assert_choice_type("ng-5G-S-TMSI-Part2", type_.to_string(), "ng-5G-S-TMSI-Value"); + return c.get >(); } - own_s_& set_own() + fixed_bitstring<48>& set_ng_minus5_g_s_tmsi() { - set(types::own); - return c.get(); + set(types::ng_minus5_g_s_tmsi); + return c.get >(); } - other_s_& set_other() + fixed_bitstring<9>& set_ng_minus5_g_s_tmsi_part2() { - set(types::other); - return c.get(); + set(types::ng_minus5_g_s_tmsi_part2); + return c.get >(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t > c; void destroy_(); }; // member variables - bool ext = false; - sched_cell_info_c_ sched_cell_info; - // ... + bool registered_amf_present = false; + bool guami_type_present = false; + bool s_nssai_list_present = false; + bool ng_minus5_g_s_tmsi_value_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + uint8_t sel_plmn_id = 1; + registered_amf_s registered_amf; + guami_type_e_ guami_type; + s_nssai_list_l_ s_nssai_list; + dyn_octstring ded_nas_msg; + ng_minus5_g_s_tmsi_value_c_ ng_minus5_g_s_tmsi_value; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11668,12 +10162,12 @@ struct cross_carrier_sched_cfg_s { void to_json(json_writer& j) const; }; -// DL-AM-RLC ::= SEQUENCE -struct dl_am_rlc_s { - bool sn_field_len_present = false; - sn_field_len_am_e sn_field_len; - t_reassembly_e t_reassembly; - t_status_prohibit_e t_status_prohibit; +// SCGFailureInformation-IEs ::= SEQUENCE +struct scg_fail_info_ies_s { + bool fail_report_scg_present = false; + bool non_crit_ext_present = false; + fail_report_scg_s fail_report_scg; + scg_fail_info_v1590_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11681,11 +10175,12 @@ struct dl_am_rlc_s { void to_json(json_writer& j) const; }; -// DL-UM-RLC ::= SEQUENCE -struct dl_um_rlc_s { - bool sn_field_len_present = false; - sn_field_len_um_e sn_field_len; - t_reassembly_e t_reassembly; +// SCGFailureInformationEUTRA-IEs ::= SEQUENCE +struct scg_fail_info_eutra_ies_s { + bool fail_report_scg_eutra_present = false; + bool non_crit_ext_present = false; + fail_report_scg_eutra_s fail_report_scg_eutra; + scg_fail_info_eutra_v1590_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11693,22 +10188,23 @@ struct dl_um_rlc_s { void to_json(json_writer& j) const; }; -// IntegrityProtAlgorithm ::= ENUMERATED -struct integrity_prot_algorithm_opts { - enum options { nia0, nia1, nia2, nia3, spare4, spare3, spare2, spare1, /*...*/ nulltype } value; - typedef uint8_t number_type; +// SecurityModeComplete-IEs ::= SEQUENCE +struct security_mode_complete_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; - std::string to_string() const; - uint8_t to_number() const; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated integrity_prot_algorithm_e; -// PDCCH-ServingCellConfig ::= SEQUENCE -struct pdcch_serving_cell_cfg_s { - bool ext = false; - bool slot_format_ind_present = false; - setup_release_c slot_format_ind; - // ... +// SecurityModeFailure-IEs ::= SEQUENCE +struct security_mode_fail_ies_s { + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11716,251 +10212,58 @@ struct pdcch_serving_cell_cfg_s { void to_json(json_writer& j) const; }; -// PDCP-Config ::= SEQUENCE -struct pdcp_cfg_s { - struct drb_s_ { - struct discard_timer_opts { - enum options { - ms10, - ms20, - ms30, - ms40, - ms50, - ms60, - ms75, - ms100, - ms150, - ms200, - ms250, - ms300, - ms500, - ms750, - ms1500, - infinity, - nulltype - } value; - typedef int16_t number_type; - - std::string to_string() const; - int16_t to_number() const; - }; - typedef enumerated discard_timer_e_; - struct pdcp_sn_size_ul_opts { - enum options { len12bits, len18bits, nulltype } value; - typedef uint8_t number_type; +// UEAssistanceInformation-IEs ::= SEQUENCE +struct ueassist_info_ies_s { + bool delay_budget_report_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + delay_budget_report_c delay_budget_report; + dyn_octstring late_non_crit_ext; + ueassist_info_v1540_ies_s non_crit_ext; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated pdcp_sn_size_ul_e_; - struct pdcp_sn_size_dl_opts { - enum options { len12bits, len18bits, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated pdcp_sn_size_dl_e_; - struct hdr_compress_c_ { - struct rohc_s_ { - struct profiles_s_ { - bool profile0x0001 = false; - bool profile0x0002 = false; - bool profile0x0003 = false; - bool profile0x0004 = false; - bool profile0x0006 = false; - bool profile0x0101 = false; - bool profile0x0102 = false; - bool profile0x0103 = false; - bool profile0x0104 = false; - }; +// UECapabilityInformation-IEs ::= SEQUENCE +struct ue_cap_info_ies_s { + bool ue_cap_rat_container_list_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + ue_cap_rat_container_list_l ue_cap_rat_container_list; + dyn_octstring late_non_crit_ext; - // member variables - bool max_cid_present = false; - bool drb_continue_rohc_present = false; - uint16_t max_cid = 1; - profiles_s_ profiles; - }; - struct ul_only_rohc_s_ { - struct profiles_s_ { - bool profile0x0006 = false; - }; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - bool max_cid_present = false; - bool drb_continue_rohc_present = false; - uint16_t max_cid = 1; - profiles_s_ profiles; - }; - struct types_opts { - enum options { not_used, rohc, ul_only_rohc, /*...*/ nulltype } value; +// ULInformationTransfer-IEs ::= SEQUENCE +struct ul_info_transfer_ies_s { + bool ded_nas_msg_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring ded_nas_msg; + dyn_octstring late_non_crit_ext; - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - hdr_compress_c_() = default; - hdr_compress_c_(const hdr_compress_c_& other); - hdr_compress_c_& operator=(const hdr_compress_c_& other); - ~hdr_compress_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 - rohc_s_& rohc() - { - assert_choice_type("rohc", type_.to_string(), "headerCompression"); - return c.get(); - } - ul_only_rohc_s_& ul_only_rohc() - { - assert_choice_type("uplinkOnlyROHC", type_.to_string(), "headerCompression"); - return c.get(); - } - const rohc_s_& rohc() const - { - assert_choice_type("rohc", type_.to_string(), "headerCompression"); - return c.get(); - } - const ul_only_rohc_s_& ul_only_rohc() const - { - assert_choice_type("uplinkOnlyROHC", type_.to_string(), "headerCompression"); - return c.get(); - } - rohc_s_& set_rohc() - { - set(types::rohc); - return c.get(); - } - ul_only_rohc_s_& set_ul_only_rohc() - { - set(types::ul_only_rohc); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool discard_timer_present = false; - bool pdcp_sn_size_ul_present = false; - bool pdcp_sn_size_dl_present = false; - bool integrity_protection_present = false; - bool status_report_required_present = false; - bool out_of_order_delivery_present = false; - discard_timer_e_ discard_timer; - pdcp_sn_size_ul_e_ pdcp_sn_size_ul; - pdcp_sn_size_dl_e_ pdcp_sn_size_dl; - hdr_compress_c_ hdr_compress; - }; - struct more_than_one_rlc_s_ { - struct primary_path_s_ { - bool cell_group_present = false; - bool lc_ch_present = false; - uint8_t cell_group = 0; - uint8_t lc_ch = 1; - }; - - // member variables - bool ul_data_split_thres_present = false; - bool pdcp_dupl_present = false; - primary_path_s_ primary_path; - ul_data_split_thres_e ul_data_split_thres; - bool pdcp_dupl = false; - }; - struct t_reordering_opts { - enum 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, - ms1750, - ms2000, - ms2250, - ms2500, - ms2750, - ms3000, - spare28, - spare27, - spare26, - spare25, - spare24, - spare23, - spare22, - spare21, - spare20, - spare19, - spare18, - spare17, - spare16, - spare15, - spare14, - spare13, - spare12, - spare11, - spare10, - spare09, - spare08, - spare07, - spare06, - spare05, - spare04, - spare03, - spare02, - spare01, - nulltype - } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated t_reordering_e_; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - bool ext = false; - bool drb_present = false; - bool more_than_one_rlc_present = false; - bool t_reordering_present = false; - drb_s_ drb; - more_than_one_rlc_s_ more_than_one_rlc; - t_reordering_e_ t_reordering; - // ... - // group 0 - bool ciphering_disabled_present = false; +// ULInformationTransferMRDC-IEs ::= SEQUENCE +struct ul_info_transfer_mrdc_ies_s { + bool ul_dcch_msg_nr_present = false; + bool ul_dcch_msg_eutra_present = false; + bool late_non_crit_ext_present = false; + bool non_crit_ext_present = false; + dyn_octstring ul_dcch_msg_nr; + dyn_octstring ul_dcch_msg_eutra; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11968,41 +10271,53 @@ struct pdcp_cfg_s { void to_json(json_writer& j) const; }; -// PDSCH-ServingCellConfig ::= SEQUENCE -struct pdsch_serving_cell_cfg_s { - struct xoverhead_opts { - enum options { xoh6, xoh12, xoh18, nulltype } value; - typedef uint8_t number_type; +// CounterCheckResponse ::= SEQUENCE +struct counter_check_resp_s { + struct crit_exts_c_ { + struct types_opts { + enum options { counter_check_resp, crit_exts_future, nulltype } value; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated xoverhead_e_; - struct nrof_harq_processes_for_pdsch_opts { - enum options { n2, n4, n6, n10, n12, n16, nulltype } value; - typedef uint8_t number_type; + std::string to_string() const; + }; + typedef enumerated types; - std::string to_string() const; - uint8_t to_number() const; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + counter_check_resp_ies_s& counter_check_resp() + { + assert_choice_type("counterCheckResponse", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const counter_check_resp_ies_s& counter_check_resp() const + { + assert_choice_type("counterCheckResponse", type_.to_string(), "criticalExtensions"); + return c.get(); + } + counter_check_resp_ies_s& set_counter_check_resp() + { + set(types::counter_check_resp); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); }; - typedef enumerated nrof_harq_processes_for_pdsch_e_; // member variables - bool ext = false; - bool code_block_group_tx_present = false; - bool xoverhead_present = false; - bool nrof_harq_processes_for_pdsch_present = false; - bool pucch_cell_present = false; - setup_release_c code_block_group_tx; - xoverhead_e_ xoverhead; - nrof_harq_processes_for_pdsch_e_ nrof_harq_processes_for_pdsch; - uint8_t pucch_cell = 0; - // ... - // group 0 - bool max_mimo_layers_present = false; - bool processing_type2_enabled_present = false; - uint8_t max_mimo_layers = 1; - bool processing_type2_enabled = false; + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -12010,49 +10325,52 @@ struct pdsch_serving_cell_cfg_s { void to_json(json_writer& j) const; }; -// RACH-ConfigDedicated ::= SEQUENCE -struct rach_cfg_ded_s { - bool ext = false; - bool cfra_present = false; - bool ra_prioritization_present = false; - cfra_s cfra; - ra_prioritization_s ra_prioritization; - // ... +// FailureInformation ::= SEQUENCE +struct fail_info_s { + struct crit_exts_c_ { + struct types_opts { + enum options { fail_info, crit_exts_future, nulltype } value; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + }; + typedef enumerated types; -// SDAP-Config ::= SEQUENCE -struct sdap_cfg_s { - struct sdap_hdr_dl_opts { - enum options { present, absent, nulltype } value; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + fail_info_ies_s& fail_info() + { + assert_choice_type("failureInformation", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const fail_info_ies_s& fail_info() const + { + assert_choice_type("failureInformation", type_.to_string(), "criticalExtensions"); + return c.get(); + } + fail_info_ies_s& set_fail_info() + { + set(types::fail_info); + return c.get(); + } - std::string to_string() const; - }; - typedef enumerated sdap_hdr_dl_e_; - struct sdap_hdr_ul_opts { - enum options { present, absent, nulltype } value; + private: + types type_; + choice_buffer_t c; - std::string to_string() const; + void destroy_(); }; - typedef enumerated sdap_hdr_ul_e_; - using mapped_qos_flows_to_add_l_ = dyn_array; - using mapped_qos_flows_to_release_l_ = dyn_array; // member variables - bool ext = false; - bool mapped_qos_flows_to_add_present = false; - bool mapped_qos_flows_to_release_present = false; - uint16_t pdu_session = 0; - sdap_hdr_dl_e_ sdap_hdr_dl; - sdap_hdr_ul_e_ sdap_hdr_ul; - bool default_drb = false; - mapped_qos_flows_to_add_l_ mapped_qos_flows_to_add; - mapped_qos_flows_to_release_l_ mapped_qos_flows_to_release; - // ... + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -12060,30 +10378,52 @@ struct sdap_cfg_s { void to_json(json_writer& j) const; }; -// SchedulingRequestToAddMod ::= SEQUENCE -struct sched_request_to_add_mod_s { - struct sr_prohibit_timer_opts { - enum options { ms1, ms2, ms4, ms8, ms16, ms32, ms64, ms128, nulltype } value; - typedef uint8_t number_type; +// LocationMeasurementIndication ::= SEQUENCE +struct location_meas_ind_s { + struct crit_exts_c_ { + struct types_opts { + enum options { location_meas_ind, crit_exts_future, nulltype } value; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated sr_prohibit_timer_e_; - struct sr_trans_max_opts { - enum options { n4, n8, n16, n32, n64, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; + std::string to_string() const; + }; + typedef enumerated types; - std::string to_string() const; - uint8_t to_number() const; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + location_meas_ind_ies_s& location_meas_ind() + { + assert_choice_type("locationMeasurementIndication", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const location_meas_ind_ies_s& location_meas_ind() const + { + assert_choice_type("locationMeasurementIndication", type_.to_string(), "criticalExtensions"); + return c.get(); + } + location_meas_ind_ies_s& set_location_meas_ind() + { + set(types::location_meas_ind); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); }; - typedef enumerated sr_trans_max_e_; // member variables - bool sr_prohibit_timer_present = false; - uint8_t sched_request_id = 0; - sr_prohibit_timer_e_ sr_prohibit_timer; - sr_trans_max_e_ sr_trans_max; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -12091,135 +10431,52 @@ struct sched_request_to_add_mod_s { void to_json(json_writer& j) const; }; -// ServingCellConfigCommon ::= SEQUENCE -struct serving_cell_cfg_common_s { - struct n_timing_advance_offset_opts { - enum options { n0, n25600, n39936, nulltype } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated n_timing_advance_offset_e_; - struct ssb_positions_in_burst_c_ { +// MeasurementReport ::= SEQUENCE +struct meas_report_s { + struct crit_exts_c_ { struct types_opts { - enum options { short_bitmap, medium_bitmap, long_bitmap, nulltype } value; + enum options { meas_report, crit_exts_future, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - ssb_positions_in_burst_c_() = default; - ssb_positions_in_burst_c_(const ssb_positions_in_burst_c_& other); - ssb_positions_in_burst_c_& operator=(const ssb_positions_in_burst_c_& other); - ~ssb_positions_in_burst_c_() { destroy_(); } + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 - fixed_bitstring<4>& short_bitmap() - { - assert_choice_type("shortBitmap", type_.to_string(), "ssb-PositionsInBurst"); - return c.get >(); - } - fixed_bitstring<8>& medium_bitmap() - { - assert_choice_type("mediumBitmap", type_.to_string(), "ssb-PositionsInBurst"); - return c.get >(); - } - fixed_bitstring<64>& long_bitmap() - { - assert_choice_type("longBitmap", type_.to_string(), "ssb-PositionsInBurst"); - return c.get >(); - } - const fixed_bitstring<4>& short_bitmap() const - { - assert_choice_type("shortBitmap", type_.to_string(), "ssb-PositionsInBurst"); - return c.get >(); - } - const fixed_bitstring<8>& medium_bitmap() const - { - assert_choice_type("mediumBitmap", type_.to_string(), "ssb-PositionsInBurst"); - return c.get >(); - } - const fixed_bitstring<64>& long_bitmap() const - { - assert_choice_type("longBitmap", type_.to_string(), "ssb-PositionsInBurst"); - return c.get >(); - } - fixed_bitstring<4>& set_short_bitmap() + meas_report_ies_s& meas_report() { - set(types::short_bitmap); - return c.get >(); + assert_choice_type("measurementReport", type_.to_string(), "criticalExtensions"); + return c.get(); } - fixed_bitstring<8>& set_medium_bitmap() + const meas_report_ies_s& meas_report() const { - set(types::medium_bitmap); - return c.get >(); + assert_choice_type("measurementReport", type_.to_string(), "criticalExtensions"); + return c.get(); } - fixed_bitstring<64>& set_long_bitmap() + meas_report_ies_s& set_meas_report() { - set(types::long_bitmap); - return c.get >(); + set(types::meas_report); + return c.get(); } private: - types type_; - choice_buffer_t > c; + types type_; + choice_buffer_t c; void destroy_(); }; - struct ssb_periodicity_serving_cell_opts { - enum options { ms5, ms10, ms20, ms40, ms80, ms160, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated ssb_periodicity_serving_cell_e_; - struct dmrs_type_a_position_opts { - enum options { pos2, pos3, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated dmrs_type_a_position_e_; - using rate_match_pattern_to_add_mod_list_l_ = dyn_array; - using rate_match_pattern_to_release_list_l_ = bounded_array; // member variables - bool ext = false; - bool pci_present = false; - bool dl_cfg_common_present = false; - bool ul_cfg_common_present = false; - bool supplementary_ul_cfg_present = false; - bool n_timing_advance_offset_present = false; - bool ssb_positions_in_burst_present = false; - bool ssb_periodicity_serving_cell_present = false; - bool lte_crs_to_match_around_present = false; - bool rate_match_pattern_to_add_mod_list_present = false; - bool rate_match_pattern_to_release_list_present = false; - bool ssb_subcarrier_spacing_present = false; - bool tdd_ul_dl_cfg_common_present = false; - uint16_t pci = 0; - dl_cfg_common_s dl_cfg_common; - ul_cfg_common_s ul_cfg_common; - ul_cfg_common_s supplementary_ul_cfg; - n_timing_advance_offset_e_ n_timing_advance_offset; - ssb_positions_in_burst_c_ ssb_positions_in_burst; - ssb_periodicity_serving_cell_e_ ssb_periodicity_serving_cell; - dmrs_type_a_position_e_ dmrs_type_a_position; - setup_release_c lte_crs_to_match_around; - rate_match_pattern_to_add_mod_list_l_ rate_match_pattern_to_add_mod_list; - rate_match_pattern_to_release_list_l_ rate_match_pattern_to_release_list; - subcarrier_spacing_e ssb_subcarrier_spacing; - tdd_ul_dl_cfg_common_s tdd_ul_dl_cfg_common; - int8_t ss_pbch_block_pwr = -60; - // ... + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -12227,176 +10484,53 @@ struct serving_cell_cfg_common_s { void to_json(json_writer& j) const; }; -// TAG ::= SEQUENCE -struct tag_s { - bool ext = false; - uint8_t tag_id = 0; - time_align_timer_e time_align_timer; - // ... +// RRCReconfigurationComplete ::= SEQUENCE +struct rrc_recfg_complete_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_recfg_complete, crit_exts_future, nulltype } value; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// TDD-UL-DL-ConfigDedicated ::= SEQUENCE -struct tdd_ul_dl_cfg_ded_s { - using slot_specific_cfgs_to_add_mod_list_l_ = dyn_array; - using slot_specific_cfgs_torelease_list_l_ = dyn_array; - - // member variables - bool ext = false; - bool slot_specific_cfgs_to_add_mod_list_present = false; - bool slot_specific_cfgs_torelease_list_present = false; - slot_specific_cfgs_to_add_mod_list_l_ slot_specific_cfgs_to_add_mod_list; - slot_specific_cfgs_torelease_list_l_ slot_specific_cfgs_torelease_list; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UL-AM-RLC ::= SEQUENCE -struct ul_am_rlc_s { - struct max_retx_thres_opts { - enum options { t1, t2, t3, t4, t6, t8, t16, t32, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_retx_thres_e_; - - // member variables - bool sn_field_len_present = false; - sn_field_len_am_e sn_field_len; - t_poll_retx_e t_poll_retx; - poll_pdu_e poll_pdu; - poll_byte_e poll_byte; - max_retx_thres_e_ max_retx_thres; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UL-UM-RLC ::= SEQUENCE -struct ul_um_rlc_s { - bool sn_field_len_present = false; - sn_field_len_um_e sn_field_len; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UplinkConfig ::= SEQUENCE -struct ul_cfg_s { - using ul_bwp_to_release_list_l_ = bounded_array; - using ul_bwp_to_add_mod_list_l_ = dyn_array; - using ul_ch_bw_per_scs_list_l_ = dyn_array; - - // member variables - bool ext = false; - bool init_ul_bwp_present = false; - bool ul_bwp_to_release_list_present = false; - bool ul_bwp_to_add_mod_list_present = false; - bool first_active_ul_bwp_id_present = false; - bool pusch_serving_cell_cfg_present = false; - bool carrier_switching_present = false; - bwp_ul_ded_s init_ul_bwp; - ul_bwp_to_release_list_l_ ul_bwp_to_release_list; - ul_bwp_to_add_mod_list_l_ ul_bwp_to_add_mod_list; - uint8_t first_active_ul_bwp_id = 0; - setup_release_c pusch_serving_cell_cfg; - setup_release_c carrier_switching; - // ... - // group 0 - bool pwr_boost_pi2_bpsk_present = false; - bool pwr_boost_pi2_bpsk = false; - copy_ptr ul_ch_bw_per_scs_list; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BSR-Config ::= SEQUENCE -struct bsr_cfg_s { - struct periodic_bsr_timer_opts { - enum options { - sf1, - sf5, - sf10, - sf16, - sf20, - sf32, - sf40, - sf64, - sf80, - sf128, - sf160, - sf320, - sf640, - sf1280, - sf2560, - infinity, - nulltype - } value; - typedef int16_t number_type; + std::string to_string() const; + }; + typedef enumerated types; - std::string to_string() const; - int16_t to_number() const; - }; - typedef enumerated periodic_bsr_timer_e_; - struct retx_bsr_timer_opts { - enum options { - sf10, - sf20, - sf40, - sf80, - sf160, - sf320, - sf640, - sf1280, - sf2560, - sf5120, - sf10240, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + rrc_recfg_complete_ies_s& rrc_recfg_complete() + { + assert_choice_type("rrcReconfigurationComplete", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_recfg_complete_ies_s& rrc_recfg_complete() const + { + assert_choice_type("rrcReconfigurationComplete", type_.to_string(), "criticalExtensions"); + return c.get(); + } + rrc_recfg_complete_ies_s& set_rrc_recfg_complete() + { + set(types::rrc_recfg_complete); + return c.get(); + } - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated retx_bsr_timer_e_; - struct lc_ch_sr_delay_timer_opts { - enum options { sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1, nulltype } value; - typedef uint16_t number_type; + private: + types type_; + choice_buffer_t c; - std::string to_string() const; - uint16_t to_number() const; + void destroy_(); }; - typedef enumerated lc_ch_sr_delay_timer_e_; // member variables - bool ext = false; - bool lc_ch_sr_delay_timer_present = false; - periodic_bsr_timer_e_ periodic_bsr_timer; - retx_bsr_timer_e_ retx_bsr_timer; - lc_ch_sr_delay_timer_e_ lc_ch_sr_delay_timer; - // ... + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -12404,75 +10538,53 @@ struct bsr_cfg_s { void to_json(json_writer& j) const; }; -// DRB-ToAddMod ::= SEQUENCE -struct drb_to_add_mod_s { - struct cn_assoc_c_ { +// RRCReestablishmentComplete ::= SEQUENCE +struct rrc_reest_complete_s { + struct crit_exts_c_ { struct types_opts { - enum options { eps_bearer_id, sdap_cfg, nulltype } value; + enum options { rrc_reest_complete, crit_exts_future, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - cn_assoc_c_() = default; - cn_assoc_c_(const cn_assoc_c_& other); - cn_assoc_c_& operator=(const cn_assoc_c_& other); - ~cn_assoc_c_() { destroy_(); } + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 - uint8_t& eps_bearer_id() - { - assert_choice_type("eps-BearerIdentity", type_.to_string(), "cnAssociation"); - return c.get(); - } - sdap_cfg_s& sdap_cfg() - { - assert_choice_type("sdap-Config", type_.to_string(), "cnAssociation"); - return c.get(); - } - const uint8_t& eps_bearer_id() const - { - assert_choice_type("eps-BearerIdentity", type_.to_string(), "cnAssociation"); - return c.get(); - } - const sdap_cfg_s& sdap_cfg() const + rrc_reest_complete_ies_s& rrc_reest_complete() { - assert_choice_type("sdap-Config", type_.to_string(), "cnAssociation"); - return c.get(); + assert_choice_type("rrcReestablishmentComplete", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& set_eps_bearer_id() + const rrc_reest_complete_ies_s& rrc_reest_complete() const { - set(types::eps_bearer_id); - return c.get(); + assert_choice_type("rrcReestablishmentComplete", type_.to_string(), "criticalExtensions"); + return c.get(); } - sdap_cfg_s& set_sdap_cfg() + rrc_reest_complete_ies_s& set_rrc_reest_complete() { - set(types::sdap_cfg); - return c.get(); + set(types::rrc_reest_complete); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; // member variables - bool ext = false; - bool cn_assoc_present = false; - bool reestablish_pdcp_present = false; - bool recover_pdcp_present = false; - bool pdcp_cfg_present = false; - cn_assoc_c_ cn_assoc; - uint8_t drb_id = 1; - pdcp_cfg_s pdcp_cfg; - // ... + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -12480,764 +10592,971 @@ struct drb_to_add_mod_s { void to_json(json_writer& j) const; }; -// DRX-Config ::= SEQUENCE -struct drx_cfg_s { - struct drx_on_dur_timer_c_ { - struct milli_seconds_opts { - enum 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, - nulltype - } value; - typedef uint16_t number_type; +// RRCResumeComplete ::= SEQUENCE +struct rrc_resume_complete_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_resume_complete, crit_exts_future, nulltype } value; std::string to_string() const; - uint16_t to_number() const; }; - typedef enumerated milli_seconds_e_; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + rrc_resume_complete_ies_s& rrc_resume_complete() + { + assert_choice_type("rrcResumeComplete", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_resume_complete_ies_s& rrc_resume_complete() const + { + assert_choice_type("rrcResumeComplete", type_.to_string(), "criticalExtensions"); + return c.get(); + } + rrc_resume_complete_ies_s& set_rrc_resume_complete() + { + set(types::rrc_resume_complete); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCSetupComplete ::= SEQUENCE +struct rrc_setup_complete_s { + struct crit_exts_c_ { struct types_opts { - enum options { sub_milli_seconds, milli_seconds, nulltype } value; + enum options { rrc_setup_complete, crit_exts_future, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - drx_on_dur_timer_c_() = default; - drx_on_dur_timer_c_(const drx_on_dur_timer_c_& other); - drx_on_dur_timer_c_& operator=(const drx_on_dur_timer_c_& other); - ~drx_on_dur_timer_c_() { destroy_(); } + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 - uint8_t& sub_milli_seconds() + rrc_setup_complete_ies_s& rrc_setup_complete() { - assert_choice_type("subMilliSeconds", type_.to_string(), "drx-onDurationTimer"); - return c.get(); + assert_choice_type("rrcSetupComplete", type_.to_string(), "criticalExtensions"); + return c.get(); } - milli_seconds_e_& milli_seconds() + const rrc_setup_complete_ies_s& rrc_setup_complete() const { - assert_choice_type("milliSeconds", type_.to_string(), "drx-onDurationTimer"); - return c.get(); + assert_choice_type("rrcSetupComplete", type_.to_string(), "criticalExtensions"); + return c.get(); } - const uint8_t& sub_milli_seconds() const + rrc_setup_complete_ies_s& set_rrc_setup_complete() { - assert_choice_type("subMilliSeconds", type_.to_string(), "drx-onDurationTimer"); - return c.get(); + set(types::rrc_setup_complete); + return c.get(); } - const milli_seconds_e_& milli_seconds() const + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformation ::= SEQUENCE +struct scg_fail_info_s { + struct crit_exts_c_ { + struct types_opts { + enum options { scg_fail_info, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + scg_fail_info_ies_s& scg_fail_info() { - assert_choice_type("milliSeconds", type_.to_string(), "drx-onDurationTimer"); - return c.get(); + assert_choice_type("scgFailureInformation", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& set_sub_milli_seconds() + const scg_fail_info_ies_s& scg_fail_info() const { - set(types::sub_milli_seconds); - return c.get(); + assert_choice_type("scgFailureInformation", type_.to_string(), "criticalExtensions"); + return c.get(); } - milli_seconds_e_& set_milli_seconds() + scg_fail_info_ies_s& set_scg_fail_info() { - set(types::milli_seconds); - return c.get(); + set(types::scg_fail_info); + return c.get(); } private: - types type_; - pod_choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; - struct drx_inactivity_timer_opts { - enum 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, - nulltype - } value; - typedef uint16_t number_type; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated drx_inactivity_timer_e_; - struct drx_retx_timer_dl_opts { - enum 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, - nulltype - } value; - typedef uint16_t number_type; + // member variables + crit_exts_c_ crit_exts; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated drx_retx_timer_dl_e_; - struct drx_retx_timer_ul_opts { - enum 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, - nulltype - } value; - typedef uint16_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated drx_retx_timer_ul_e_; - struct drx_long_cycle_start_offset_c_ { +// SCGFailureInformationEUTRA ::= SEQUENCE +struct scg_fail_info_eutra_s { + struct crit_exts_c_ { struct types_opts { - enum options { - ms10, - ms20, - ms32, - ms40, - ms60, - ms64, - ms70, - ms80, - ms128, - ms160, - ms256, - ms320, - ms512, - ms640, - ms1024, - ms1280, - ms2048, - ms2560, - ms5120, - ms10240, - nulltype - } value; - typedef uint16_t number_type; + enum options { scg_fail_info_eutra, crit_exts_future, nulltype } value; std::string to_string() const; - uint16_t to_number() const; }; typedef enumerated types; // choice methods - drx_long_cycle_start_offset_c_() = default; - drx_long_cycle_start_offset_c_(const drx_long_cycle_start_offset_c_& other); - drx_long_cycle_start_offset_c_& operator=(const drx_long_cycle_start_offset_c_& other); - ~drx_long_cycle_start_offset_c_() { destroy_(); } + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 - uint8_t& ms10() + scg_fail_info_eutra_ies_s& scg_fail_info_eutra() { - assert_choice_type("ms10", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("scgFailureInformationEUTRA", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& ms20() + const scg_fail_info_eutra_ies_s& scg_fail_info_eutra() const { - assert_choice_type("ms20", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("scgFailureInformationEUTRA", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& ms32() + scg_fail_info_eutra_ies_s& set_scg_fail_info_eutra() { - assert_choice_type("ms32", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + set(types::scg_fail_info_eutra); + return c.get(); } - uint8_t& ms40() + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeComplete ::= SEQUENCE +struct security_mode_complete_s { + struct crit_exts_c_ { + struct types_opts { + enum options { security_mode_complete, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + security_mode_complete_ies_s& security_mode_complete() { - assert_choice_type("ms40", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("securityModeComplete", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& ms60() + const security_mode_complete_ies_s& security_mode_complete() const { - assert_choice_type("ms60", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("securityModeComplete", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& ms64() + security_mode_complete_ies_s& set_security_mode_complete() { - assert_choice_type("ms64", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + set(types::security_mode_complete); + return c.get(); } - uint8_t& ms70() + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeFailure ::= SEQUENCE +struct security_mode_fail_s { + struct crit_exts_c_ { + struct types_opts { + enum options { security_mode_fail, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + security_mode_fail_ies_s& security_mode_fail() { - assert_choice_type("ms70", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("securityModeFailure", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& ms80() + const security_mode_fail_ies_s& security_mode_fail() const { - assert_choice_type("ms80", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("securityModeFailure", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint8_t& ms128() + security_mode_fail_ies_s& set_security_mode_fail() { - assert_choice_type("ms128", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + set(types::security_mode_fail); + return c.get(); } - uint8_t& ms160() + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEAssistanceInformation ::= SEQUENCE +struct ueassist_info_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ue_assist_info, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + ueassist_info_ies_s& ue_assist_info() { - assert_choice_type("ms160", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ueAssistanceInformation", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint16_t& ms256() + const ueassist_info_ies_s& ue_assist_info() const { - assert_choice_type("ms256", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ueAssistanceInformation", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint16_t& ms320() + ueassist_info_ies_s& set_ue_assist_info() { - assert_choice_type("ms320", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + set(types::ue_assist_info); + return c.get(); } - uint16_t& ms512() + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityInformation ::= SEQUENCE +struct ue_cap_info_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ue_cap_info, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + ue_cap_info_ies_s& ue_cap_info() { - assert_choice_type("ms512", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ueCapabilityInformation", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint16_t& ms640() + const ue_cap_info_ies_s& ue_cap_info() const { - assert_choice_type("ms640", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ueCapabilityInformation", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint16_t& ms1024() + ue_cap_info_ies_s& set_ue_cap_info() { - assert_choice_type("ms1024", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + set(types::ue_cap_info); + return c.get(); } - uint16_t& ms1280() + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id = 0; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULInformationTransfer ::= SEQUENCE +struct ul_info_transfer_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ul_info_transfer, crit_exts_future, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + ul_info_transfer_ies_s& ul_info_transfer() { - assert_choice_type("ms1280", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ulInformationTransfer", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint16_t& ms2048() + const ul_info_transfer_ies_s& ul_info_transfer() const { - assert_choice_type("ms2048", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ulInformationTransfer", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint16_t& ms2560() + ul_info_transfer_ies_s& set_ul_info_transfer() { - assert_choice_type("ms2560", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + set(types::ul_info_transfer); + return c.get(); } - uint16_t& ms5120() + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULInformationTransferMRDC ::= SEQUENCE +struct ul_info_transfer_mrdc_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types_opts { + enum options { ul_info_transfer_mrdc, spare3, spare2, spare1, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + c1_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; + // getters + ul_info_transfer_mrdc_ies_s& ul_info_transfer_mrdc() + { + assert_choice_type("ulInformationTransferMRDC", type_.to_string(), "c1"); + return c; + } + const ul_info_transfer_mrdc_ies_s& ul_info_transfer_mrdc() const + { + assert_choice_type("ulInformationTransferMRDC", type_.to_string(), "c1"); + return c; + } + ul_info_transfer_mrdc_ies_s& set_ul_info_transfer_mrdc() + { + set(types::ul_info_transfer_mrdc); + return c; + } + + private: + types type_; + ul_info_transfer_mrdc_ies_s c; + }; + struct types_opts { + enum options { c1, crit_exts_future, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + crit_exts_c_() = default; + crit_exts_c_(const crit_exts_c_& other); + crit_exts_c_& operator=(const crit_exts_c_& other); + ~crit_exts_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 + c1_c_& c1() { - assert_choice_type("ms5120", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); } - uint16_t& ms10240() + const c1_c_& c1() const { - assert_choice_type("ms10240", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); } - const uint8_t& ms10() const + c1_c_& set_c1() { - assert_choice_type("ms10", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + set(types::c1); + return c.get(); } - const uint8_t& ms20() const + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-DCCH-MessageType ::= CHOICE +struct ul_dcch_msg_type_c { + struct c1_c_ { + struct types_opts { + enum options { + meas_report, + rrc_recfg_complete, + rrc_setup_complete, + rrc_reest_complete, + rrc_resume_complete, + security_mode_complete, + security_mode_fail, + ul_info_transfer, + location_meas_ind, + ue_cap_info, + counter_check_resp, + ue_assist_info, + fail_info, + ul_info_transfer_mrdc, + scg_fail_info, + scg_fail_info_eutra, + nulltype + } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + c1_c_() = default; + c1_c_(const c1_c_& other); + c1_c_& operator=(const c1_c_& other); + ~c1_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 + meas_report_s& meas_report() { - assert_choice_type("ms20", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("measurementReport", type_.to_string(), "c1"); + return c.get(); } - const uint8_t& ms32() const + rrc_recfg_complete_s& rrc_recfg_complete() { - assert_choice_type("ms32", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("rrcReconfigurationComplete", type_.to_string(), "c1"); + return c.get(); } - const uint8_t& ms40() const + rrc_setup_complete_s& rrc_setup_complete() { - assert_choice_type("ms40", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("rrcSetupComplete", type_.to_string(), "c1"); + return c.get(); } - const uint8_t& ms60() const + rrc_reest_complete_s& rrc_reest_complete() { - assert_choice_type("ms60", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("rrcReestablishmentComplete", type_.to_string(), "c1"); + return c.get(); } - const uint8_t& ms64() const + rrc_resume_complete_s& rrc_resume_complete() { - assert_choice_type("ms64", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("rrcResumeComplete", type_.to_string(), "c1"); + return c.get(); } - const uint8_t& ms70() const + security_mode_complete_s& security_mode_complete() { - assert_choice_type("ms70", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("securityModeComplete", type_.to_string(), "c1"); + return c.get(); } - const uint8_t& ms80() const + security_mode_fail_s& security_mode_fail() { - assert_choice_type("ms80", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("securityModeFailure", type_.to_string(), "c1"); + return c.get(); } - const uint8_t& ms128() const + ul_info_transfer_s& ul_info_transfer() { - assert_choice_type("ms128", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ulInformationTransfer", type_.to_string(), "c1"); + return c.get(); } - const uint8_t& ms160() const + location_meas_ind_s& location_meas_ind() { - assert_choice_type("ms160", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("locationMeasurementIndication", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms256() const + ue_cap_info_s& ue_cap_info() { - assert_choice_type("ms256", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ueCapabilityInformation", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms320() const + counter_check_resp_s& counter_check_resp() { - assert_choice_type("ms320", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("counterCheckResponse", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms512() const + ueassist_info_s& ue_assist_info() { - assert_choice_type("ms512", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ueAssistanceInformation", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms640() const + fail_info_s& fail_info() { - assert_choice_type("ms640", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("failureInformation", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms1024() const + ul_info_transfer_mrdc_s& ul_info_transfer_mrdc() { - assert_choice_type("ms1024", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("ulInformationTransferMRDC", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms1280() const + scg_fail_info_s& scg_fail_info() { - assert_choice_type("ms1280", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("scgFailureInformation", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms2048() const + scg_fail_info_eutra_s& scg_fail_info_eutra() { - assert_choice_type("ms2048", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("scgFailureInformationEUTRA", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms2560() const + const meas_report_s& meas_report() const { - assert_choice_type("ms2560", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("measurementReport", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms5120() const + const rrc_recfg_complete_s& rrc_recfg_complete() const { - assert_choice_type("ms5120", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("rrcReconfigurationComplete", type_.to_string(), "c1"); + return c.get(); } - const uint16_t& ms10240() const + const rrc_setup_complete_s& rrc_setup_complete() const { - assert_choice_type("ms10240", type_.to_string(), "drx-LongCycleStartOffset"); - return c.get(); + assert_choice_type("rrcSetupComplete", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms10() + const rrc_reest_complete_s& rrc_reest_complete() const { - set(types::ms10); - return c.get(); + assert_choice_type("rrcReestablishmentComplete", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms20() + const rrc_resume_complete_s& rrc_resume_complete() const { - set(types::ms20); - return c.get(); + assert_choice_type("rrcResumeComplete", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms32() + const security_mode_complete_s& security_mode_complete() const { - set(types::ms32); - return c.get(); + assert_choice_type("securityModeComplete", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms40() + const security_mode_fail_s& security_mode_fail() const { - set(types::ms40); - return c.get(); + assert_choice_type("securityModeFailure", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms60() + const ul_info_transfer_s& ul_info_transfer() const { - set(types::ms60); - return c.get(); + assert_choice_type("ulInformationTransfer", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms64() + const location_meas_ind_s& location_meas_ind() const { - set(types::ms64); - return c.get(); + assert_choice_type("locationMeasurementIndication", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms70() + const ue_cap_info_s& ue_cap_info() const { - set(types::ms70); - return c.get(); + assert_choice_type("ueCapabilityInformation", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms80() + const counter_check_resp_s& counter_check_resp() const { - set(types::ms80); - return c.get(); + assert_choice_type("counterCheckResponse", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms128() + const ueassist_info_s& ue_assist_info() const { - set(types::ms128); - return c.get(); + assert_choice_type("ueAssistanceInformation", type_.to_string(), "c1"); + return c.get(); } - uint8_t& set_ms160() + const fail_info_s& fail_info() const { - set(types::ms160); - return c.get(); + assert_choice_type("failureInformation", type_.to_string(), "c1"); + return c.get(); } - uint16_t& set_ms256() + const ul_info_transfer_mrdc_s& ul_info_transfer_mrdc() const { - set(types::ms256); - return c.get(); + assert_choice_type("ulInformationTransferMRDC", type_.to_string(), "c1"); + return c.get(); } - uint16_t& set_ms320() + const scg_fail_info_s& scg_fail_info() const { - set(types::ms320); - return c.get(); + assert_choice_type("scgFailureInformation", type_.to_string(), "c1"); + return c.get(); } - uint16_t& set_ms512() + const scg_fail_info_eutra_s& scg_fail_info_eutra() const { - set(types::ms512); - return c.get(); + assert_choice_type("scgFailureInformationEUTRA", type_.to_string(), "c1"); + return c.get(); } - uint16_t& set_ms640() + meas_report_s& set_meas_report() { - set(types::ms640); - return c.get(); + set(types::meas_report); + return c.get(); } - uint16_t& set_ms1024() + rrc_recfg_complete_s& set_rrc_recfg_complete() { - set(types::ms1024); - return c.get(); + set(types::rrc_recfg_complete); + return c.get(); } - uint16_t& set_ms1280() + rrc_setup_complete_s& set_rrc_setup_complete() { - set(types::ms1280); - return c.get(); + set(types::rrc_setup_complete); + return c.get(); } - uint16_t& set_ms2048() + rrc_reest_complete_s& set_rrc_reest_complete() { - set(types::ms2048); - return c.get(); + set(types::rrc_reest_complete); + return c.get(); } - uint16_t& set_ms2560() + rrc_resume_complete_s& set_rrc_resume_complete() { - set(types::ms2560); - return c.get(); + set(types::rrc_resume_complete); + return c.get(); } - uint16_t& set_ms5120() + security_mode_complete_s& set_security_mode_complete() { - set(types::ms5120); - return c.get(); + set(types::security_mode_complete); + return c.get(); } - uint16_t& set_ms10240() + security_mode_fail_s& set_security_mode_fail() { - set(types::ms10240); - return c.get(); + set(types::security_mode_fail); + return c.get(); + } + ul_info_transfer_s& set_ul_info_transfer() + { + set(types::ul_info_transfer); + return c.get(); + } + location_meas_ind_s& set_location_meas_ind() + { + set(types::location_meas_ind); + return c.get(); + } + ue_cap_info_s& set_ue_cap_info() + { + set(types::ue_cap_info); + return c.get(); + } + counter_check_resp_s& set_counter_check_resp() + { + set(types::counter_check_resp); + return c.get(); + } + ueassist_info_s& set_ue_assist_info() + { + set(types::ue_assist_info); + return c.get(); + } + fail_info_s& set_fail_info() + { + set(types::fail_info); + return c.get(); + } + ul_info_transfer_mrdc_s& set_ul_info_transfer_mrdc() + { + set(types::ul_info_transfer_mrdc); + return c.get(); + } + scg_fail_info_s& set_scg_fail_info() + { + set(types::scg_fail_info); + return c.get(); + } + scg_fail_info_eutra_s& set_scg_fail_info_eutra() + { + set(types::scg_fail_info_eutra); + return c.get(); } private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct short_drx_s_ { - struct drx_short_cycle_opts { - enum 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, - nulltype - } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated drx_short_cycle_e_; + types type_; + choice_buffer_t + c; - // member variables - drx_short_cycle_e_ drx_short_cycle; - uint8_t drx_short_cycle_timer = 1; + void destroy_(); }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; - // member variables - bool short_drx_present = false; - drx_on_dur_timer_c_ drx_on_dur_timer; - drx_inactivity_timer_e_ drx_inactivity_timer; - uint8_t drx_harq_rtt_timer_dl = 0; - uint8_t drx_harq_rtt_timer_ul = 0; - drx_retx_timer_dl_e_ drx_retx_timer_dl; - drx_retx_timer_ul_e_ drx_retx_timer_ul; - drx_long_cycle_start_offset_c_ drx_long_cycle_start_offset; - short_drx_s_ short_drx; - uint8_t drx_slot_offset = 0; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; - // sequence methods + // choice methods + ul_dcch_msg_type_c() = default; + ul_dcch_msg_type_c(const ul_dcch_msg_type_c& other); + ul_dcch_msg_type_c& operator=(const ul_dcch_msg_type_c& other); + ~ul_dcch_msg_type_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 + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "UL-DCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "UL-DCCH-MessageType"); + return c.get(); + } + c1_c_& set_c1() + { + set(types::c1); + return c.get(); + } -// DataInactivityTimer ::= ENUMERATED -struct data_inactivity_timer_opts { - enum options { s1, s2, s3, s5, s7, s10, s15, s20, s40, s50, s60, s80, s100, s120, s150, s180, nulltype } value; - typedef uint8_t number_type; +private: + types type_; + choice_buffer_t c; - std::string to_string() const; - uint8_t to_number() const; + void destroy_(); }; -typedef enumerated data_inactivity_timer_e; -// LogicalChannelConfig ::= SEQUENCE -struct lc_ch_cfg_s { - struct ul_specific_params_s_ { - struct prioritised_bit_rate_opts { - enum options { - kbps0, - kbps8, - kbps16, - kbps32, - kbps64, - kbps128, - kbps256, - kbps512, - kbps1024, - kbps2048, - kbps4096, - kbps8192, - kbps16384, - kbps32768, - kbps65536, - infinity, - nulltype - } value; - typedef int32_t number_type; +// UL-DCCH-Message ::= SEQUENCE +struct ul_dcch_msg_s { + ul_dcch_msg_type_c msg; - std::string to_string() const; - int32_t to_number() const; - }; - typedef enumerated prioritised_bit_rate_e_; - struct bucket_size_dur_opts { - enum options { - ms5, - ms10, - ms20, - ms50, - ms100, - ms150, - ms300, - ms500, - ms1000, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated bucket_size_dur_e_; - using allowed_serving_cells_l_ = bounded_array; - using allowed_scs_list_l_ = bounded_array; - struct max_pusch_dur_opts { - enum options { ms0p02, ms0p04, ms0p0625, ms0p125, ms0p25, ms0p5, spare2, spare1, nulltype } value; +// BFR-CSIRS-Resource ::= SEQUENCE +struct bfr_csirs_res_s { + using ra_occasion_list_l_ = dyn_array; - std::string to_string() const; - }; - typedef enumerated max_pusch_dur_e_; - struct bit_rate_query_prohibit_timer_opts { - enum options { s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30, nulltype } value; - typedef float number_type; + // member variables + bool ext = false; + bool ra_occasion_list_present = false; + bool ra_preamb_idx_present = false; + uint8_t csi_rs = 0; + ra_occasion_list_l_ ra_occasion_list; + uint8_t ra_preamb_idx = 0; + // ... - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated bit_rate_query_prohibit_timer_e_; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - bool ext = false; - bool allowed_serving_cells_present = false; - bool allowed_scs_list_present = false; - bool max_pusch_dur_present = false; - bool cfgured_grant_type1_allowed_present = false; - bool lc_ch_group_present = false; - bool sched_request_id_present = false; - uint8_t prio = 1; - prioritised_bit_rate_e_ prioritised_bit_rate; - bucket_size_dur_e_ bucket_size_dur; - allowed_serving_cells_l_ allowed_serving_cells; - allowed_scs_list_l_ allowed_scs_list; - max_pusch_dur_e_ max_pusch_dur; - uint8_t lc_ch_group = 0; - uint8_t sched_request_id = 0; - bool lc_ch_sr_mask = false; - bool lc_ch_sr_delay_timer_applied = false; - // ... - bool bit_rate_query_prohibit_timer_present = false; - bit_rate_query_prohibit_timer_e_ bit_rate_query_prohibit_timer; +// BFR-SSB-Resource ::= SEQUENCE +struct bfr_ssb_res_s { + bool ext = false; + uint8_t ssb = 0; + uint8_t ra_preamb_idx = 0; + // ... - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - }; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - bool ext = false; - bool ul_specific_params_present = false; - ul_specific_params_s_ ul_specific_params; +// CSI-FrequencyOccupation ::= SEQUENCE +struct csi_freq_occupation_s { + bool ext = false; + uint16_t start_rb = 0; + uint16_t nrof_rbs = 24; // ... // sequence methods @@ -13246,48 +11565,167 @@ struct lc_ch_cfg_s { void to_json(json_writer& j) const; }; -// PHR-Config ::= SEQUENCE -struct phr_cfg_s { - struct phr_periodic_timer_opts { - enum options { sf10, sf20, sf50, sf100, sf200, sf500, sf1000, infinity, nulltype } value; - typedef int16_t number_type; - - std::string to_string() const; - int16_t to_number() const; +// CSI-RS-ResourceMapping ::= SEQUENCE +struct csi_rs_res_map_s { + struct freq_domain_alloc_c_ { + struct types_opts { + enum options { row1, row2, row4, other, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + freq_domain_alloc_c_() = default; + freq_domain_alloc_c_(const freq_domain_alloc_c_& other); + freq_domain_alloc_c_& operator=(const freq_domain_alloc_c_& other); + ~freq_domain_alloc_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 + fixed_bitstring<4>& row1() + { + assert_choice_type("row1", type_.to_string(), "frequencyDomainAllocation"); + return c.get >(); + } + fixed_bitstring<12>& row2() + { + assert_choice_type("row2", type_.to_string(), "frequencyDomainAllocation"); + return c.get >(); + } + fixed_bitstring<3>& row4() + { + assert_choice_type("row4", type_.to_string(), "frequencyDomainAllocation"); + return c.get >(); + } + fixed_bitstring<6>& other() + { + assert_choice_type("other", type_.to_string(), "frequencyDomainAllocation"); + return c.get >(); + } + const fixed_bitstring<4>& row1() const + { + assert_choice_type("row1", type_.to_string(), "frequencyDomainAllocation"); + return c.get >(); + } + const fixed_bitstring<12>& row2() const + { + assert_choice_type("row2", type_.to_string(), "frequencyDomainAllocation"); + return c.get >(); + } + const fixed_bitstring<3>& row4() const + { + assert_choice_type("row4", type_.to_string(), "frequencyDomainAllocation"); + return c.get >(); + } + const fixed_bitstring<6>& other() const + { + assert_choice_type("other", type_.to_string(), "frequencyDomainAllocation"); + return c.get >(); + } + fixed_bitstring<4>& set_row1() + { + set(types::row1); + return c.get >(); + } + fixed_bitstring<12>& set_row2() + { + set(types::row2); + return c.get >(); + } + fixed_bitstring<3>& set_row4() + { + set(types::row4); + return c.get >(); + } + fixed_bitstring<6>& set_other() + { + set(types::other); + return c.get >(); + } + + private: + types type_; + choice_buffer_t > c; + + void destroy_(); }; - typedef enumerated phr_periodic_timer_e_; - struct phr_prohibit_timer_opts { - enum options { sf0, sf10, sf20, sf50, sf100, sf200, sf500, sf1000, nulltype } value; - typedef uint16_t number_type; + struct nrof_ports_opts { + enum options { p1, p2, p4, p8, p12, p16, p24, p32, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; - uint16_t to_number() const; + uint8_t to_number() const; }; - typedef enumerated phr_prohibit_timer_e_; - struct phr_tx_pwr_factor_change_opts { - enum options { db1, db3, db6, infinity, nulltype } value; - typedef int8_t number_type; + typedef enumerated nrof_ports_e_; + struct cdm_type_opts { + enum options { no_cdm, fd_cdm2, cdm4_fd2_td2, cdm8_fd2_td4, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; - int8_t to_number() const; + uint8_t to_number() const; }; - typedef enumerated phr_tx_pwr_factor_change_e_; - struct phr_mode_other_cg_opts { - enum options { real, virtual_value, nulltype } value; + typedef enumerated cdm_type_e_; + struct density_c_ { + struct dot5_opts { + enum options { even_prbs, odd_prbs, nulltype } value; - std::string to_string() const; + std::string to_string() const; + }; + typedef enumerated dot5_e_; + struct types_opts { + enum options { dot5, one, three, spare, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + density_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; + // getters + dot5_e_& dot5() + { + assert_choice_type("dot5", type_.to_string(), "density"); + return c; + } + const dot5_e_& dot5() const + { + assert_choice_type("dot5", type_.to_string(), "density"); + return c; + } + dot5_e_& set_dot5() + { + set(types::dot5); + return c; + } + + private: + types type_; + dot5_e_ c; }; - typedef enumerated phr_mode_other_cg_e_; // member variables - bool ext = false; - phr_periodic_timer_e_ phr_periodic_timer; - phr_prohibit_timer_e_ phr_prohibit_timer; - phr_tx_pwr_factor_change_e_ phr_tx_pwr_factor_change; - bool multiple_phr = false; - bool dummy = false; - bool phr_type2_other_cell = false; - phr_mode_other_cg_e_ phr_mode_other_cg; + bool ext = false; + bool first_ofdm_symbol_in_time_domain2_present = false; + freq_domain_alloc_c_ freq_domain_alloc; + nrof_ports_e_ nrof_ports; + uint8_t first_ofdm_symbol_in_time_domain = 0; + uint8_t first_ofdm_symbol_in_time_domain2 = 2; + cdm_type_e_ cdm_type; + density_c_ density; + csi_freq_occupation_s freq_band; // ... // sequence methods @@ -13296,151 +11734,282 @@ struct phr_cfg_s { void to_json(json_writer& j) const; }; -// RLC-Config ::= CHOICE -struct rlc_cfg_c { - struct am_s_ { - ul_am_rlc_s ul_am_rlc; - dl_am_rlc_s dl_am_rlc; - }; - struct um_bi_dir_s_ { - ul_um_rlc_s ul_um_rlc; - dl_um_rlc_s dl_um_rlc; - }; - struct um_uni_dir_ul_s_ { - ul_um_rlc_s ul_um_rlc; - }; - struct um_uni_dir_dl_s_ { - dl_um_rlc_s dl_um_rlc; - }; +// CSI-ResourcePeriodicityAndOffset ::= CHOICE +struct csi_res_periodicity_and_offset_c { struct types_opts { - enum options { am, um_bi_dir, um_uni_dir_ul, um_uni_dir_dl, /*...*/ nulltype } value; + enum options { + slots4, + slots5, + slots8, + slots10, + slots16, + slots20, + slots32, + slots40, + slots64, + slots80, + slots160, + slots320, + slots640, + nulltype + } value; + typedef uint16_t number_type; std::string to_string() const; + uint16_t to_number() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - rlc_cfg_c() = default; - rlc_cfg_c(const rlc_cfg_c& other); - rlc_cfg_c& operator=(const rlc_cfg_c& other); - ~rlc_cfg_c() { destroy_(); } + csi_res_periodicity_and_offset_c() = default; + csi_res_periodicity_and_offset_c(const csi_res_periodicity_and_offset_c& other); + csi_res_periodicity_and_offset_c& operator=(const csi_res_periodicity_and_offset_c& other); + ~csi_res_periodicity_and_offset_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 - am_s_& am() + uint8_t& slots4() { - assert_choice_type("am", type_.to_string(), "RLC-Config"); - return c.get(); + assert_choice_type("slots4", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - um_bi_dir_s_& um_bi_dir() + uint8_t& slots5() { - assert_choice_type("um-Bi-Directional", type_.to_string(), "RLC-Config"); - return c.get(); + assert_choice_type("slots5", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - um_uni_dir_ul_s_& um_uni_dir_ul() + uint8_t& slots8() { - assert_choice_type("um-Uni-Directional-UL", type_.to_string(), "RLC-Config"); - return c.get(); + assert_choice_type("slots8", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - um_uni_dir_dl_s_& um_uni_dir_dl() + uint8_t& slots10() { - assert_choice_type("um-Uni-Directional-DL", type_.to_string(), "RLC-Config"); - return c.get(); + assert_choice_type("slots10", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - const am_s_& am() const + uint8_t& slots16() { - assert_choice_type("am", type_.to_string(), "RLC-Config"); - return c.get(); + assert_choice_type("slots16", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - const um_bi_dir_s_& um_bi_dir() const + uint8_t& slots20() { - assert_choice_type("um-Bi-Directional", type_.to_string(), "RLC-Config"); - return c.get(); + assert_choice_type("slots20", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - const um_uni_dir_ul_s_& um_uni_dir_ul() const + uint8_t& slots32() { - assert_choice_type("um-Uni-Directional-UL", type_.to_string(), "RLC-Config"); - return c.get(); + assert_choice_type("slots32", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - const um_uni_dir_dl_s_& um_uni_dir_dl() const + uint8_t& slots40() { - assert_choice_type("um-Uni-Directional-DL", type_.to_string(), "RLC-Config"); - return c.get(); + assert_choice_type("slots40", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - am_s_& set_am() + uint8_t& slots64() { - set(types::am); - return c.get(); + assert_choice_type("slots64", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - um_bi_dir_s_& set_um_bi_dir() + uint8_t& slots80() { - set(types::um_bi_dir); - return c.get(); + assert_choice_type("slots80", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - um_uni_dir_ul_s_& set_um_uni_dir_ul() + uint8_t& slots160() { - set(types::um_uni_dir_ul); - return c.get(); + assert_choice_type("slots160", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); } - um_uni_dir_dl_s_& set_um_uni_dir_dl() + uint16_t& slots320() { - set(types::um_uni_dir_dl); - return c.get(); + assert_choice_type("slots320", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint16_t& slots640() + { + assert_choice_type("slots640", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots4() const + { + assert_choice_type("slots4", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots5() const + { + assert_choice_type("slots5", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots8() const + { + assert_choice_type("slots8", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots10() const + { + assert_choice_type("slots10", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots16() const + { + assert_choice_type("slots16", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots20() const + { + assert_choice_type("slots20", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots32() const + { + assert_choice_type("slots32", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots40() const + { + assert_choice_type("slots40", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots64() const + { + assert_choice_type("slots64", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots80() const + { + assert_choice_type("slots80", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots160() const + { + assert_choice_type("slots160", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint16_t& slots320() const + { + assert_choice_type("slots320", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint16_t& slots640() const + { + assert_choice_type("slots640", type_.to_string(), "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& set_slots4() + { + set(types::slots4); + return c.get(); + } + uint8_t& set_slots5() + { + set(types::slots5); + return c.get(); + } + uint8_t& set_slots8() + { + set(types::slots8); + return c.get(); + } + uint8_t& set_slots10() + { + set(types::slots10); + return c.get(); + } + uint8_t& set_slots16() + { + set(types::slots16); + return c.get(); + } + uint8_t& set_slots20() + { + set(types::slots20); + return c.get(); + } + uint8_t& set_slots32() + { + set(types::slots32); + return c.get(); + } + uint8_t& set_slots40() + { + set(types::slots40); + return c.get(); + } + uint8_t& set_slots64() + { + set(types::slots64); + return c.get(); + } + uint8_t& set_slots80() + { + set(types::slots80); + return c.get(); + } + uint8_t& set_slots160() + { + set(types::slots160); + return c.get(); + } + uint16_t& set_slots320() + { + set(types::slots320); + return c.get(); + } + uint16_t& set_slots640() + { + set(types::slots640); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; -// RLF-TimersAndConstants ::= SEQUENCE -struct rlf_timers_and_consts_s { - struct t310_opts { - enum options { ms0, ms50, ms100, ms200, ms500, ms1000, ms2000, ms4000, ms6000, nulltype } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated t310_e_; - struct n310_opts { - enum options { n1, n2, n3, n4, n6, n8, n10, n20, nulltype } value; - typedef uint8_t number_type; +// INT-ConfigurationPerServingCell ::= SEQUENCE +struct int_cfg_per_serving_cell_s { + uint8_t serving_cell_id = 0; + uint8_t position_in_dci = 0; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated n310_e_; - struct n311_opts { - enum options { n1, n2, n3, n4, n5, n6, n8, n10, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated n311_e_; - struct t311_v1530_opts { - enum options { ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000, nulltype } value; - typedef uint16_t number_type; +// PTRS-DownlinkConfig ::= SEQUENCE +struct ptrs_dl_cfg_s { + using freq_density_l_ = std::array; + using time_density_l_ = std::array; + struct res_elem_offset_opts { + enum options { offset01, offset10, offset11, nulltype } value; + typedef float number_type; std::string to_string() const; - uint16_t to_number() const; + float to_number() const; + std::string to_number_string() const; }; - typedef enumerated t311_v1530_e_; + typedef enumerated res_elem_offset_e_; // member variables - bool ext = false; - t310_e_ t310; - n310_e_ n310; - n311_e_ n311; + bool ext = false; + bool freq_density_present = false; + bool time_density_present = false; + bool epre_ratio_present = false; + bool res_elem_offset_present = false; + freq_density_l_ freq_density; + time_density_l_ time_density; + uint8_t epre_ratio = 0; + res_elem_offset_e_ res_elem_offset; // ... - // group 0 - t311_v1530_e_ t311_v1530; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -13448,84 +12017,80 @@ struct rlf_timers_and_consts_s { void to_json(json_writer& j) const; }; -// ReconfigurationWithSync ::= SEQUENCE -struct recfg_with_sync_s { - struct t304_opts { - enum options { ms50, ms100, ms150, ms200, ms500, ms1000, ms2000, ms10000, nulltype } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated t304_e_; - struct rach_cfg_ded_c_ { +// QCL-Info ::= SEQUENCE +struct qcl_info_s { + struct ref_sig_c_ { struct types_opts { - enum options { ul, supplementary_ul, nulltype } value; + enum options { csi_rs, ssb, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - rach_cfg_ded_c_() = default; - rach_cfg_ded_c_(const rach_cfg_ded_c_& other); - rach_cfg_ded_c_& operator=(const rach_cfg_ded_c_& other); - ~rach_cfg_ded_c_() { destroy_(); } - void set(types::options e = types::nulltype); + ref_sig_c_() = default; + ref_sig_c_(const ref_sig_c_& other); + ref_sig_c_& operator=(const ref_sig_c_& other); + ~ref_sig_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 - rach_cfg_ded_s& ul() + uint8_t& csi_rs() { - assert_choice_type("uplink", type_.to_string(), "rach-ConfigDedicated"); - return c.get(); + assert_choice_type("csi-rs", type_.to_string(), "referenceSignal"); + return c.get(); } - rach_cfg_ded_s& supplementary_ul() + uint8_t& ssb() { - assert_choice_type("supplementaryUplink", type_.to_string(), "rach-ConfigDedicated"); - return c.get(); + assert_choice_type("ssb", type_.to_string(), "referenceSignal"); + return c.get(); } - const rach_cfg_ded_s& ul() const + const uint8_t& csi_rs() const { - assert_choice_type("uplink", type_.to_string(), "rach-ConfigDedicated"); - return c.get(); + assert_choice_type("csi-rs", type_.to_string(), "referenceSignal"); + return c.get(); } - const rach_cfg_ded_s& supplementary_ul() const + const uint8_t& ssb() const { - assert_choice_type("supplementaryUplink", type_.to_string(), "rach-ConfigDedicated"); - return c.get(); + assert_choice_type("ssb", type_.to_string(), "referenceSignal"); + return c.get(); } - rach_cfg_ded_s& set_ul() + uint8_t& set_csi_rs() { - set(types::ul); - return c.get(); + set(types::csi_rs); + return c.get(); } - rach_cfg_ded_s& set_supplementary_ul() + uint8_t& set_ssb() { - set(types::supplementary_ul); - return c.get(); + set(types::ssb); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; + struct qcl_type_opts { + enum options { type_a, type_b, type_c, type_d, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated qcl_type_e_; // member variables - bool ext = false; - bool sp_cell_cfg_common_present = false; - bool rach_cfg_ded_present = false; - serving_cell_cfg_common_s sp_cell_cfg_common; - uint32_t new_ue_id = 0; - t304_e_ t304; - rach_cfg_ded_c_ rach_cfg_ded; + bool ext = false; + bool cell_present = false; + bool bwp_id_present = false; + uint8_t cell = 0; + uint8_t bwp_id = 0; + ref_sig_c_ ref_sig; + qcl_type_e_ qcl_type; // ... - // group 0 - copy_ptr smtc; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -13533,14 +12098,29 @@ struct recfg_with_sync_s { void to_json(json_writer& j) const; }; -// SRB-ToAddMod ::= SEQUENCE -struct srb_to_add_mod_s { - bool ext = false; - bool reestablish_pdcp_present = false; - bool discard_on_pdcp_present = false; - bool pdcp_cfg_present = false; - uint8_t srb_id = 1; - pdcp_cfg_s pdcp_cfg; +// DMRS-DownlinkConfig ::= SEQUENCE +struct dmrs_dl_cfg_s { + struct dmrs_add_position_opts { + enum options { pos0, pos1, pos3, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated dmrs_add_position_e_; + + // member variables + bool ext = false; + bool dmrs_type_present = false; + bool dmrs_add_position_present = false; + bool max_len_present = false; + bool scrambling_id0_present = false; + bool scrambling_id1_present = false; + bool phase_tracking_rs_present = false; + dmrs_add_position_e_ dmrs_add_position; + uint32_t scrambling_id0 = 0; + uint32_t scrambling_id1 = 0; + setup_release_c phase_tracking_rs; // ... // sequence methods @@ -13549,16 +12129,25 @@ struct srb_to_add_mod_s { void to_json(json_writer& j) const; }; -// SchedulingRequestConfig ::= SEQUENCE -struct sched_request_cfg_s { - using sched_request_to_add_mod_list_l_ = dyn_array; - using sched_request_to_release_list_l_ = bounded_array; +// DownlinkPreemption ::= SEQUENCE +struct dl_preemption_s { + struct time_freq_set_opts { + enum options { set0, set1, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated time_freq_set_e_; + using int_cfg_per_serving_cell_l_ = dyn_array; // member variables - bool sched_request_to_add_mod_list_present = false; - bool sched_request_to_release_list_present = false; - sched_request_to_add_mod_list_l_ sched_request_to_add_mod_list; - sched_request_to_release_list_l_ sched_request_to_release_list; + bool ext = false; + uint32_t int_rnti = 0; + time_freq_set_e_ time_freq_set; + uint8_t dci_payload_size = 0; + int_cfg_per_serving_cell_l_ int_cfg_per_serving_cell; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -13566,12 +12155,13 @@ struct sched_request_cfg_s { void to_json(json_writer& j) const; }; -// SecurityAlgorithmConfig ::= SEQUENCE -struct security_algorithm_cfg_s { - bool ext = false; - bool integrity_prot_algorithm_present = false; - ciphering_algorithm_e ciphering_algorithm; - integrity_prot_algorithm_e integrity_prot_algorithm; +// PUCCH-TPC-CommandConfig ::= SEQUENCE +struct pucch_tpc_cmd_cfg_s { + bool ext = false; + bool tpc_idx_pcell_present = false; + bool tpc_idx_pucch_scell_present = false; + uint8_t tpc_idx_pcell = 1; + uint8_t tpc_idx_pucch_scell = 1; // ... // sequence methods @@ -13580,284 +12170,78 @@ struct security_algorithm_cfg_s { void to_json(json_writer& j) const; }; -// ServingCellConfig ::= SEQUENCE -struct serving_cell_cfg_s { - using dl_bwp_to_release_list_l_ = bounded_array; - using dl_bwp_to_add_mod_list_l_ = dyn_array; - struct bwp_inactivity_timer_opts { - enum 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, - nulltype - } value; - typedef uint16_t number_type; +// PUSCH-TPC-CommandConfig ::= SEQUENCE +struct pusch_tpc_cmd_cfg_s { + bool ext = false; + bool tpc_idx_present = false; + bool tpc_idx_sul_present = false; + bool target_cell_present = false; + uint8_t tpc_idx = 1; + uint8_t tpc_idx_sul = 1; + uint8_t target_cell = 0; + // ... - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated bwp_inactivity_timer_e_; - struct scell_deactivation_timer_opts { - enum options { - ms20, - ms40, - ms80, - ms160, - ms200, - ms240, - ms320, - ms400, - ms480, - ms520, - ms640, - ms720, - ms840, - ms1280, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated scell_deactivation_timer_e_; - struct pathloss_ref_linking_opts { - enum options { pcell, scell, nulltype } value; +// RadioLinkMonitoringRS ::= SEQUENCE +struct radio_link_monitoring_rs_s { + struct purpose_opts { + enum options { beam_fail, rlf, both, nulltype } value; std::string to_string() const; }; - typedef enumerated pathloss_ref_linking_e_; - using rate_match_pattern_to_add_mod_list_l_ = dyn_array; - using rate_match_pattern_to_release_list_l_ = bounded_array; - using dl_ch_bw_per_scs_list_l_ = dyn_array; - - // member variables - bool ext = false; - bool tdd_ul_dl_cfg_ded_present = false; - bool init_dl_bwp_present = false; - bool dl_bwp_to_release_list_present = false; - bool dl_bwp_to_add_mod_list_present = false; - bool first_active_dl_bwp_id_present = false; - bool bwp_inactivity_timer_present = false; - bool default_dl_bwp_id_present = false; - bool ul_cfg_present = false; - bool supplementary_ul_present = false; - bool pdcch_serving_cell_cfg_present = false; - bool pdsch_serving_cell_cfg_present = false; - bool csi_meas_cfg_present = false; - bool scell_deactivation_timer_present = false; - bool cross_carrier_sched_cfg_present = false; - bool dummy_present = false; - bool pathloss_ref_linking_present = false; - bool serving_cell_mo_present = false; - tdd_ul_dl_cfg_ded_s tdd_ul_dl_cfg_ded; - bwp_dl_ded_s init_dl_bwp; - dl_bwp_to_release_list_l_ dl_bwp_to_release_list; - dl_bwp_to_add_mod_list_l_ dl_bwp_to_add_mod_list; - uint8_t first_active_dl_bwp_id = 0; - bwp_inactivity_timer_e_ bwp_inactivity_timer; - uint8_t default_dl_bwp_id = 0; - ul_cfg_s ul_cfg; - ul_cfg_s supplementary_ul; - setup_release_c pdcch_serving_cell_cfg; - setup_release_c pdsch_serving_cell_cfg; - setup_release_c csi_meas_cfg; - scell_deactivation_timer_e_ scell_deactivation_timer; - cross_carrier_sched_cfg_s cross_carrier_sched_cfg; - uint8_t tag_id = 0; - pathloss_ref_linking_e_ pathloss_ref_linking; - uint8_t serving_cell_mo = 1; - // ... - // group 0 - copy_ptr > lte_crs_to_match_around; - copy_ptr rate_match_pattern_to_add_mod_list; - copy_ptr rate_match_pattern_to_release_list; - copy_ptr dl_ch_bw_per_scs_list; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// TAG-Config ::= SEQUENCE -struct tag_cfg_s { - using tag_to_release_list_l_ = bounded_array; - using tag_to_add_mod_list_l_ = dyn_array; - - // member variables - bool tag_to_release_list_present = false; - bool tag_to_add_mod_list_present = false; - tag_to_release_list_l_ tag_to_release_list; - tag_to_add_mod_list_l_ tag_to_add_mod_list; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// DRB-ToAddModList ::= SEQUENCE (SIZE (1..29)) OF DRB-ToAddMod -using drb_to_add_mod_list_l = dyn_array; - -// DRB-ToReleaseList ::= SEQUENCE (SIZE (1..29)) OF INTEGER (1..32) -using drb_to_release_list_l = bounded_array; - -// MAC-CellGroupConfig ::= SEQUENCE -struct mac_cell_group_cfg_s { - bool ext = false; - bool drx_cfg_present = false; - bool sched_request_cfg_present = false; - bool bsr_cfg_present = false; - bool tag_cfg_present = false; - bool phr_cfg_present = false; - setup_release_c drx_cfg; - sched_request_cfg_s sched_request_cfg; - bsr_cfg_s bsr_cfg; - tag_cfg_s tag_cfg; - setup_release_c phr_cfg; - bool skip_ul_tx_dynamic = false; - // ... - // group 0 - bool csi_mask_v1530_present = false; - bool csi_mask_v1530 = false; - copy_ptr > data_inactivity_timer_v1530; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PhysicalCellGroupConfig ::= SEQUENCE -struct phys_cell_group_cfg_s { - struct pdsch_harq_ack_codebook_opts { - enum options { semi_static, dynamic_value, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated pdsch_harq_ack_codebook_e_; - struct xscale_opts { - enum options { db0, db6, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated xscale_e_; - - // member variables - bool ext = false; - bool harq_ack_spatial_bundling_pucch_present = false; - bool harq_ack_spatial_bundling_pusch_present = false; - bool p_nr_fr1_present = false; - bool tpc_srs_rnti_present = false; - bool tpc_pucch_rnti_present = false; - bool tpc_pusch_rnti_present = false; - bool sp_csi_rnti_present = false; - bool cs_rnti_present = false; - int8_t p_nr_fr1 = -30; - pdsch_harq_ack_codebook_e_ pdsch_harq_ack_codebook; - uint32_t tpc_srs_rnti = 0; - uint32_t tpc_pucch_rnti = 0; - uint32_t tpc_pusch_rnti = 0; - uint32_t sp_csi_rnti = 0; - setup_release_c > cs_rnti; - // ... - // group 0 - bool mcs_c_rnti_present = false; - bool p_ue_fr1_present = false; - uint32_t mcs_c_rnti = 0; - int8_t p_ue_fr1 = -30; - // group 1 - bool xscale_present = false; - xscale_e_ xscale; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RLC-BearerConfig ::= SEQUENCE -struct rlc_bearer_cfg_s { - struct served_radio_bearer_c_ { - struct types_opts { - enum options { srb_id, drb_id, nulltype } value; + typedef enumerated purpose_e_; + struct detection_res_c_ { + struct types_opts { + enum options { ssb_idx, csi_rs_idx, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - served_radio_bearer_c_() = default; - served_radio_bearer_c_(const served_radio_bearer_c_& other); - served_radio_bearer_c_& operator=(const served_radio_bearer_c_& other); - ~served_radio_bearer_c_() { destroy_(); } + detection_res_c_() = default; + detection_res_c_(const detection_res_c_& other); + detection_res_c_& operator=(const detection_res_c_& other); + ~detection_res_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 - uint8_t& srb_id() + uint8_t& ssb_idx() { - assert_choice_type("srb-Identity", type_.to_string(), "servedRadioBearer"); + assert_choice_type("ssb-Index", type_.to_string(), "detectionResource"); return c.get(); } - uint8_t& drb_id() + uint8_t& csi_rs_idx() { - assert_choice_type("drb-Identity", type_.to_string(), "servedRadioBearer"); + assert_choice_type("csi-RS-Index", type_.to_string(), "detectionResource"); return c.get(); } - const uint8_t& srb_id() const + const uint8_t& ssb_idx() const { - assert_choice_type("srb-Identity", type_.to_string(), "servedRadioBearer"); + assert_choice_type("ssb-Index", type_.to_string(), "detectionResource"); return c.get(); } - const uint8_t& drb_id() const + const uint8_t& csi_rs_idx() const { - assert_choice_type("drb-Identity", type_.to_string(), "servedRadioBearer"); + assert_choice_type("csi-RS-Index", type_.to_string(), "detectionResource"); return c.get(); } - uint8_t& set_srb_id() + uint8_t& set_ssb_idx() { - set(types::srb_id); + set(types::ssb_idx); return c.get(); } - uint8_t& set_drb_id() + uint8_t& set_csi_rs_idx() { - set(types::drb_id); + set(types::csi_rs_idx); return c.get(); } @@ -13869,15 +12253,10 @@ struct rlc_bearer_cfg_s { }; // member variables - bool ext = false; - bool served_radio_bearer_present = false; - bool reestablish_rlc_present = false; - bool rlc_cfg_present = false; - bool mac_lc_ch_cfg_present = false; - uint8_t lc_ch_id = 1; - served_radio_bearer_c_ served_radio_bearer; - rlc_cfg_c rlc_cfg; - lc_ch_cfg_s mac_lc_ch_cfg; + bool ext = false; + uint8_t radio_link_monitoring_rs_id = 0; + purpose_e_ purpose; + detection_res_c_ detection_res; // ... // sequence methods @@ -13886,252 +12265,280 @@ struct rlc_bearer_cfg_s { void to_json(json_writer& j) const; }; -// SCellConfig ::= SEQUENCE -struct scell_cfg_s { - bool ext = false; - bool scell_cfg_common_present = false; - bool scell_cfg_ded_present = false; - uint8_t scell_idx = 1; - serving_cell_cfg_common_s scell_cfg_common; - serving_cell_cfg_s scell_cfg_ded; - // ... - // group 0 - copy_ptr smtc; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// RateMatchPattern ::= SEQUENCE +struct rate_match_pattern_s { + struct pattern_type_c_ { + struct bitmaps_s_ { + struct symbols_in_res_block_c_ { + struct types_opts { + enum options { one_slot, two_slots, nulltype } value; + typedef uint8_t number_type; -// SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod -using srb_to_add_mod_list_l = dyn_array; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; -// SecurityConfig ::= SEQUENCE -struct security_cfg_s { - struct key_to_use_opts { - enum options { master, secondary, nulltype } value; + // choice methods + symbols_in_res_block_c_() = default; + symbols_in_res_block_c_(const symbols_in_res_block_c_& other); + symbols_in_res_block_c_& operator=(const symbols_in_res_block_c_& other); + ~symbols_in_res_block_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 + fixed_bitstring<14>& one_slot() + { + assert_choice_type("oneSlot", type_.to_string(), "symbolsInResourceBlock"); + return c.get >(); + } + fixed_bitstring<28>& two_slots() + { + assert_choice_type("twoSlots", type_.to_string(), "symbolsInResourceBlock"); + return c.get >(); + } + const fixed_bitstring<14>& one_slot() const + { + assert_choice_type("oneSlot", type_.to_string(), "symbolsInResourceBlock"); + return c.get >(); + } + const fixed_bitstring<28>& two_slots() const + { + assert_choice_type("twoSlots", type_.to_string(), "symbolsInResourceBlock"); + return c.get >(); + } + fixed_bitstring<14>& set_one_slot() + { + set(types::one_slot); + return c.get >(); + } + fixed_bitstring<28>& set_two_slots() + { + set(types::two_slots); + return c.get >(); + } - std::string to_string() const; - }; - typedef enumerated key_to_use_e_; + private: + types type_; + choice_buffer_t > c; - // member variables - bool ext = false; - bool security_algorithm_cfg_present = false; - bool key_to_use_present = false; - security_algorithm_cfg_s security_algorithm_cfg; - key_to_use_e_ key_to_use; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SpCellConfig ::= SEQUENCE -struct sp_cell_cfg_s { - bool ext = false; - bool serv_cell_idx_present = false; - bool recfg_with_sync_present = false; - bool rlf_timers_and_consts_present = false; - bool rlm_in_sync_out_of_sync_thres_present = false; - bool sp_cell_cfg_ded_present = false; - uint8_t serv_cell_idx = 0; - recfg_with_sync_s recfg_with_sync; - setup_release_c rlf_timers_and_consts; - serving_cell_cfg_s sp_cell_cfg_ded; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CellGroupConfig ::= SEQUENCE -struct cell_group_cfg_s { - using rlc_bearer_to_add_mod_list_l_ = dyn_array; - using rlc_bearer_to_release_list_l_ = bounded_array; - using scell_to_add_mod_list_l_ = dyn_array; - using scell_to_release_list_l_ = bounded_array; - - // member variables - bool ext = false; - bool rlc_bearer_to_add_mod_list_present = false; - bool rlc_bearer_to_release_list_present = false; - bool mac_cell_group_cfg_present = false; - bool phys_cell_group_cfg_present = false; - bool sp_cell_cfg_present = false; - bool scell_to_add_mod_list_present = false; - bool scell_to_release_list_present = false; - uint8_t cell_group_id = 0; - rlc_bearer_to_add_mod_list_l_ rlc_bearer_to_add_mod_list; - rlc_bearer_to_release_list_l_ rlc_bearer_to_release_list; - mac_cell_group_cfg_s mac_cell_group_cfg; - phys_cell_group_cfg_s phys_cell_group_cfg; - sp_cell_cfg_s sp_cell_cfg; - scell_to_add_mod_list_l_ scell_to_add_mod_list; - scell_to_release_list_l_ scell_to_release_list; - // ... - // group 0 - bool report_ul_tx_direct_current_v1530_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RadioBearerConfig ::= SEQUENCE -struct radio_bearer_cfg_s { - bool ext = false; - bool srb_to_add_mod_list_present = false; - bool srb3_to_release_present = false; - bool drb_to_add_mod_list_present = false; - bool drb_to_release_list_present = false; - bool security_cfg_present = false; - srb_to_add_mod_list_l srb_to_add_mod_list; - drb_to_add_mod_list_l drb_to_add_mod_list; - drb_to_release_list_l drb_to_release_list; - security_cfg_s security_cfg; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + void destroy_(); + }; + struct periodicity_and_pattern_c_ { + struct types_opts { + enum options { n2, n4, n5, n8, n10, n20, n40, nulltype } value; + typedef uint8_t number_type; -// RRCReject-IEs ::= SEQUENCE -struct rrc_reject_ies_s { - bool wait_time_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - uint8_t wait_time = 1; - dyn_octstring late_non_crit_ext; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // choice methods + periodicity_and_pattern_c_() = default; + periodicity_and_pattern_c_(const periodicity_and_pattern_c_& other); + periodicity_and_pattern_c_& operator=(const periodicity_and_pattern_c_& other); + ~periodicity_and_pattern_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 + fixed_bitstring<2>& n2() + { + assert_choice_type("n2", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + fixed_bitstring<4>& n4() + { + assert_choice_type("n4", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + fixed_bitstring<5>& n5() + { + assert_choice_type("n5", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + fixed_bitstring<8>& n8() + { + assert_choice_type("n8", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + fixed_bitstring<10>& n10() + { + assert_choice_type("n10", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + fixed_bitstring<20>& n20() + { + assert_choice_type("n20", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + fixed_bitstring<40>& n40() + { + assert_choice_type("n40", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + const fixed_bitstring<2>& n2() const + { + assert_choice_type("n2", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + const fixed_bitstring<4>& n4() const + { + assert_choice_type("n4", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + const fixed_bitstring<5>& n5() const + { + assert_choice_type("n5", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + const fixed_bitstring<8>& n8() const + { + assert_choice_type("n8", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + const fixed_bitstring<10>& n10() const + { + assert_choice_type("n10", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + const fixed_bitstring<20>& n20() const + { + assert_choice_type("n20", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + const fixed_bitstring<40>& n40() const + { + assert_choice_type("n40", type_.to_string(), "periodicityAndPattern"); + return c.get >(); + } + fixed_bitstring<2>& set_n2() + { + set(types::n2); + return c.get >(); + } + fixed_bitstring<4>& set_n4() + { + set(types::n4); + return c.get >(); + } + fixed_bitstring<5>& set_n5() + { + set(types::n5); + return c.get >(); + } + fixed_bitstring<8>& set_n8() + { + set(types::n8); + return c.get >(); + } + fixed_bitstring<10>& set_n10() + { + set(types::n10); + return c.get >(); + } + fixed_bitstring<20>& set_n20() + { + set(types::n20); + return c.get >(); + } + fixed_bitstring<40>& set_n40() + { + set(types::n40); + return c.get >(); + } -// RRCSetup-IEs ::= SEQUENCE -struct rrc_setup_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - radio_bearer_cfg_s radio_bearer_cfg; - dyn_octstring master_cell_group; - dyn_octstring late_non_crit_ext; + private: + types type_; + choice_buffer_t > c; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + void destroy_(); + }; -// RRCReject ::= SEQUENCE -struct rrc_reject_s { - struct crit_exts_c_ { + // member variables + bool ext = false; + bool periodicity_and_pattern_present = false; + fixed_bitstring<275> res_blocks; + symbols_in_res_block_c_ symbols_in_res_block; + periodicity_and_pattern_c_ periodicity_and_pattern; + // ... + }; struct types_opts { - enum options { rrc_reject, crit_exts_future, nulltype } value; + enum options { bitmaps, ctrl_res_set, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_c_() { destroy_(); } + pattern_type_c_() = default; + pattern_type_c_(const pattern_type_c_& other); + pattern_type_c_& operator=(const pattern_type_c_& other); + ~pattern_type_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 - rrc_reject_ies_s& rrc_reject() + bitmaps_s_& bitmaps() { - assert_choice_type("rrcReject", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("bitmaps", type_.to_string(), "patternType"); + return c.get(); } - const rrc_reject_ies_s& rrc_reject() const + uint8_t& ctrl_res_set() { - assert_choice_type("rrcReject", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("controlResourceSet", type_.to_string(), "patternType"); + return c.get(); } - rrc_reject_ies_s& set_rrc_reject() + const bitmaps_s_& bitmaps() const { - set(types::rrc_reject); - return c.get(); + assert_choice_type("bitmaps", type_.to_string(), "patternType"); + return c.get(); } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - crit_exts_c_ crit_exts; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCSetup ::= SEQUENCE -struct rrc_setup_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_setup, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_setup_ies_s& rrc_setup() + const uint8_t& ctrl_res_set() const { - assert_choice_type("rrcSetup", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("controlResourceSet", type_.to_string(), "patternType"); + return c.get(); } - const rrc_setup_ies_s& rrc_setup() const + bitmaps_s_& set_bitmaps() { - assert_choice_type("rrcSetup", type_.to_string(), "criticalExtensions"); - return c.get(); + set(types::bitmaps); + return c.get(); } - rrc_setup_ies_s& set_rrc_setup() + uint8_t& set_ctrl_res_set() { - set(types::rrc_setup); - return c.get(); + set(types::ctrl_res_set); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; + struct dummy_opts { + enum options { dynamic_value, semi_static, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated dummy_e_; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool ext = false; + bool subcarrier_spacing_present = false; + uint8_t rate_match_pattern_id = 0; + pattern_type_c_ pattern_type; + subcarrier_spacing_e subcarrier_spacing; + dummy_e_ dummy; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -14139,110 +12546,77 @@ struct rrc_setup_s { void to_json(json_writer& j) const; }; -// DL-CCCH-MessageType ::= CHOICE -struct dl_ccch_msg_type_c { - struct c1_c_ { - struct types_opts { - enum options { rrc_reject, rrc_setup, spare2, spare1, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - c1_c_() = default; - c1_c_(const c1_c_& other); - c1_c_& operator=(const c1_c_& other); - ~c1_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 - rrc_reject_s& rrc_reject() - { - assert_choice_type("rrcReject", type_.to_string(), "c1"); - return c.get(); - } - rrc_setup_s& rrc_setup() - { - assert_choice_type("rrcSetup", type_.to_string(), "c1"); - return c.get(); - } - const rrc_reject_s& rrc_reject() const - { - assert_choice_type("rrcReject", type_.to_string(), "c1"); - return c.get(); - } - const rrc_setup_s& rrc_setup() const - { - assert_choice_type("rrcSetup", type_.to_string(), "c1"); - return c.get(); - } - rrc_reject_s& set_rrc_reject() - { - set(types::rrc_reject); - return c.get(); - } - rrc_setup_s& set_rrc_setup() - { - set(types::rrc_setup); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; +struct rate_match_pattern_group_item_c_ { struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; - typedef uint8_t number_type; + enum options { cell_level, bwp_level, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; typedef enumerated types; // choice methods - dl_ccch_msg_type_c() = default; - dl_ccch_msg_type_c(const dl_ccch_msg_type_c& other); - dl_ccch_msg_type_c& operator=(const dl_ccch_msg_type_c& other); - ~dl_ccch_msg_type_c() { destroy_(); } + rate_match_pattern_group_item_c_() = default; + rate_match_pattern_group_item_c_(const rate_match_pattern_group_item_c_& other); + rate_match_pattern_group_item_c_& operator=(const rate_match_pattern_group_item_c_& other); + ~rate_match_pattern_group_item_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 - c1_c_& c1() + uint8_t& cell_level() { - assert_choice_type("c1", type_.to_string(), "DL-CCCH-MessageType"); - return c.get(); + assert_choice_type("cellLevel", type_.to_string(), "RateMatchPatternGroup-item"); + return c.get(); } - const c1_c_& c1() const + uint8_t& bwp_level() { - assert_choice_type("c1", type_.to_string(), "DL-CCCH-MessageType"); - return c.get(); + assert_choice_type("bwpLevel", type_.to_string(), "RateMatchPatternGroup-item"); + return c.get(); } - c1_c_& set_c1() + const uint8_t& cell_level() const { - set(types::c1); - return c.get(); + assert_choice_type("cellLevel", type_.to_string(), "RateMatchPatternGroup-item"); + return c.get(); + } + const uint8_t& bwp_level() const + { + assert_choice_type("bwpLevel", type_.to_string(), "RateMatchPatternGroup-item"); + return c.get(); + } + uint8_t& set_cell_level() + { + set(types::cell_level); + return c.get(); + } + uint8_t& set_bwp_level() + { + set(types::bwp_level); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; -// DL-CCCH-Message ::= SEQUENCE -struct dl_ccch_msg_s { - dl_ccch_msg_type_c msg; +// RateMatchPatternGroup ::= SEQUENCE (SIZE (1..8)) OF RateMatchPatternGroup-item +using rate_match_pattern_group_l = dyn_array; + +// SRS-TPC-CommandConfig ::= SEQUENCE +struct srs_tpc_cmd_cfg_s { + bool ext = false; + bool start_bit_of_format2_minus3_present = false; + bool field_type_format2_minus3_present = false; + uint8_t start_bit_of_format2_minus3 = 1; + uint8_t field_type_format2_minus3 = 0; + // ... + // group 0 + bool start_bit_of_format2_minus3_sul_present = false; + uint8_t start_bit_of_format2_minus3_sul = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -14250,183 +12624,28 @@ struct dl_ccch_msg_s { void to_json(json_writer& j) const; }; -// CSI-RS-Resource-Mobility ::= SEQUENCE -struct csi_rs_res_mob_s { - struct slot_cfg_c_ { - struct types_opts { - enum options { ms4, ms5, ms10, ms20, ms40, nulltype } value; - typedef uint8_t number_type; +// TCI-State ::= SEQUENCE +struct tci_state_s { + bool ext = false; + bool qcl_type2_present = false; + uint8_t tci_state_id = 0; + qcl_info_s qcl_type1; + qcl_info_s qcl_type2; + // ... - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // choice methods - slot_cfg_c_() = default; - slot_cfg_c_(const slot_cfg_c_& other); - slot_cfg_c_& operator=(const slot_cfg_c_& other); - ~slot_cfg_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 - uint8_t& ms4() - { - assert_choice_type("ms4", type_.to_string(), "slotConfig"); - return c.get(); - } - uint8_t& ms5() - { - assert_choice_type("ms5", type_.to_string(), "slotConfig"); - return c.get(); - } - uint8_t& ms10() - { - assert_choice_type("ms10", type_.to_string(), "slotConfig"); - return c.get(); - } - uint8_t& ms20() - { - assert_choice_type("ms20", type_.to_string(), "slotConfig"); - return c.get(); - } - uint16_t& ms40() - { - assert_choice_type("ms40", type_.to_string(), "slotConfig"); - return c.get(); - } - const uint8_t& ms4() const - { - assert_choice_type("ms4", type_.to_string(), "slotConfig"); - return c.get(); - } - const uint8_t& ms5() const - { - assert_choice_type("ms5", type_.to_string(), "slotConfig"); - return c.get(); - } - const uint8_t& ms10() const - { - assert_choice_type("ms10", type_.to_string(), "slotConfig"); - return c.get(); - } - const uint8_t& ms20() const - { - assert_choice_type("ms20", type_.to_string(), "slotConfig"); - return c.get(); - } - const uint16_t& ms40() const - { - assert_choice_type("ms40", type_.to_string(), "slotConfig"); - return c.get(); - } - uint8_t& set_ms4() - { - set(types::ms4); - return c.get(); - } - uint8_t& set_ms5() - { - set(types::ms5); - return c.get(); - } - uint8_t& set_ms10() - { - set(types::ms10); - return c.get(); - } - uint8_t& set_ms20() - { - set(types::ms20); - return c.get(); - } - uint16_t& set_ms40() - { - set(types::ms40); - return c.get(); - } - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct associated_ssb_s_ { - uint8_t ssb_idx = 0; - bool is_quasi_colocated = false; - }; - struct freq_domain_alloc_c_ { - struct types_opts { - enum options { row1, row2, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - freq_domain_alloc_c_() = default; - freq_domain_alloc_c_(const freq_domain_alloc_c_& other); - freq_domain_alloc_c_& operator=(const freq_domain_alloc_c_& other); - ~freq_domain_alloc_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 - fixed_bitstring<4>& row1() - { - assert_choice_type("row1", type_.to_string(), "frequencyDomainAllocation"); - return c.get >(); - } - fixed_bitstring<12>& row2() - { - assert_choice_type("row2", type_.to_string(), "frequencyDomainAllocation"); - return c.get >(); - } - const fixed_bitstring<4>& row1() const - { - assert_choice_type("row1", type_.to_string(), "frequencyDomainAllocation"); - return c.get >(); - } - const fixed_bitstring<12>& row2() const - { - assert_choice_type("row2", type_.to_string(), "frequencyDomainAllocation"); - return c.get >(); - } - fixed_bitstring<4>& set_row1() - { - set(types::row1); - return c.get >(); - } - fixed_bitstring<12>& set_row2() - { - set(types::row2); - return c.get >(); - } - - private: - types type_; - choice_buffer_t > c; - - void destroy_(); - }; - - // member variables - bool ext = false; - bool associated_ssb_present = false; - uint8_t csi_rs_idx = 0; - slot_cfg_c_ slot_cfg; - associated_ssb_s_ associated_ssb; - freq_domain_alloc_c_ freq_domain_alloc; - uint8_t first_ofdm_symbol_in_time_domain = 0; - uint16_t seq_generation_cfg = 0; +// ZP-CSI-RS-Resource ::= SEQUENCE +struct zp_csi_rs_res_s { + bool ext = false; + bool periodicity_and_offset_present = false; + uint8_t zp_csi_rs_res_id = 0; + csi_rs_res_map_s res_map; + csi_res_periodicity_and_offset_c periodicity_and_offset; // ... // sequence methods @@ -14435,59 +12654,15 @@ struct csi_rs_res_mob_s { void to_json(json_writer& j) const; }; -// CSI-RS-CellMobility ::= SEQUENCE -struct csi_rs_cell_mob_s { - struct csi_rs_meas_bw_s_ { - struct nrof_prbs_opts { - enum options { size24, size48, size96, size192, size264, nulltype } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated nrof_prbs_e_; - - // member variables - nrof_prbs_e_ nrof_prbs; - uint16_t start_prb = 0; - }; - struct density_opts { - enum options { d1, d3, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated density_e_; - using csi_rs_res_list_mob_l_ = dyn_array; +// ZP-CSI-RS-ResourceSet ::= SEQUENCE +struct zp_csi_rs_res_set_s { + using zp_csi_rs_res_id_list_l_ = bounded_array; // member variables - bool density_present = false; - uint16_t cell_id = 0; - csi_rs_meas_bw_s_ csi_rs_meas_bw; - density_e_ density; - csi_rs_res_list_mob_l_ csi_rs_res_list_mob; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Q-OffsetRangeList ::= SEQUENCE -struct q_offset_range_list_s { - bool rsrp_offset_ssb_present = false; - bool rsrq_offset_ssb_present = false; - bool sinr_offset_ssb_present = false; - bool rsrp_offset_csi_rs_present = false; - bool rsrq_offset_csi_rs_present = false; - bool sinr_offset_csi_rs_present = false; - q_offset_range_e rsrp_offset_ssb; - q_offset_range_e rsrq_offset_ssb; - q_offset_range_e sinr_offset_ssb; - q_offset_range_e rsrp_offset_csi_rs; - q_offset_range_e rsrq_offset_csi_rs; - q_offset_range_e sinr_offset_csi_rs; + bool ext = false; + uint8_t zp_csi_rs_res_set_id = 0; + zp_csi_rs_res_id_list_l_ zp_csi_rs_res_id_list; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -14495,18 +12670,32 @@ struct q_offset_range_list_s { void to_json(json_writer& j) const; }; -// CSI-RS-ResourceConfigMobility ::= SEQUENCE -struct csi_rs_res_cfg_mob_s { - using csi_rs_cell_list_mob_l_ = dyn_array; +// PDCCH-Config ::= SEQUENCE +struct pdcch_cfg_s { + using ctrl_res_set_to_add_mod_list_l_ = dyn_array; + using ctrl_res_set_to_release_list_l_ = bounded_array; + using search_spaces_to_add_mod_list_l_ = dyn_array; + using search_spaces_to_release_list_l_ = bounded_array; // member variables - bool ext = false; - subcarrier_spacing_e subcarrier_spacing; - csi_rs_cell_list_mob_l_ csi_rs_cell_list_mob; + bool ext = false; + bool ctrl_res_set_to_add_mod_list_present = false; + bool ctrl_res_set_to_release_list_present = false; + bool search_spaces_to_add_mod_list_present = false; + bool search_spaces_to_release_list_present = false; + bool dl_preemption_present = false; + bool tpc_pusch_present = false; + bool tpc_pucch_present = false; + bool tpc_srs_present = false; + ctrl_res_set_to_add_mod_list_l_ ctrl_res_set_to_add_mod_list; + ctrl_res_set_to_release_list_l_ ctrl_res_set_to_release_list; + search_spaces_to_add_mod_list_l_ search_spaces_to_add_mod_list; + search_spaces_to_release_list_l_ search_spaces_to_release_list; + setup_release_c dl_preemption; + setup_release_c tpc_pusch; + setup_release_c tpc_pucch; + setup_release_c tpc_srs; // ... - // group 0 - bool ref_serv_cell_idx_v1530_present = false; - uint8_t ref_serv_cell_idx_v1530 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -14514,567 +12703,206 @@ struct csi_rs_res_cfg_mob_s { void to_json(json_writer& j) const; }; -// CellsToAddMod ::= SEQUENCE -struct cells_to_add_mod_s { - uint16_t pci = 0; - q_offset_range_list_s cell_individual_offset; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FilterCoefficient ::= ENUMERATED -struct filt_coef_opts { - enum options { - fc0, - fc1, - fc2, - fc3, - fc4, - fc5, - fc6, - fc7, - fc8, - fc9, - fc11, - fc13, - fc15, - fc17, - fc19, - spare1, - /*...*/ nulltype - } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; -}; -typedef enumerated filt_coef_e; - -// MeasReportQuantity ::= SEQUENCE -struct meas_report_quant_s { - bool rsrp = false; - bool rsrq = false; - bool sinr = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasTriggerQuantity ::= CHOICE -struct meas_trigger_quant_c { - struct types_opts { - enum options { rsrp, rsrq, sinr, nulltype } value; +// PDSCH-Config ::= SEQUENCE +struct pdsch_cfg_s { + using tci_states_to_add_mod_list_l_ = dyn_array; + using tci_states_to_release_list_l_ = dyn_array; + struct vrb_to_prb_interleaver_opts { + enum options { n2, n4, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; - typedef enumerated types; - - // choice methods - meas_trigger_quant_c() = default; - meas_trigger_quant_c(const meas_trigger_quant_c& other); - meas_trigger_quant_c& operator=(const meas_trigger_quant_c& other); - ~meas_trigger_quant_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 - uint8_t& rsrp() - { - assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantity"); - return c.get(); - } - uint8_t& rsrq() - { - assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantity"); - return c.get(); - } - uint8_t& sinr() - { - assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantity"); - return c.get(); - } - const uint8_t& rsrp() const - { - assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantity"); - return c.get(); - } - const uint8_t& rsrq() const - { - assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantity"); - return c.get(); - } - const uint8_t& sinr() const - { - assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantity"); - return c.get(); - } - uint8_t& set_rsrp() - { - set(types::rsrp); - return c.get(); - } - uint8_t& set_rsrq() - { - set(types::rsrq); - return c.get(); - } - uint8_t& set_sinr() - { - set(types::sinr); - return c.get(); - } + typedef enumerated vrb_to_prb_interleaver_e_; + struct res_alloc_opts { + enum options { res_alloc_type0, res_alloc_type1, dynamic_switch, nulltype } value; + typedef uint8_t number_type; -private: - types type_; - pod_choice_buffer_t c; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated res_alloc_e_; + struct pdsch_aggregation_factor_opts { + enum options { n2, n4, n8, nulltype } value; + typedef uint8_t number_type; - void destroy_(); -}; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated pdsch_aggregation_factor_e_; + using rate_match_pattern_to_add_mod_list_l_ = dyn_array; + using rate_match_pattern_to_release_list_l_ = bounded_array; + struct rbg_size_opts { + enum options { cfg1, cfg2, nulltype } value; + typedef uint8_t number_type; -// MeasTriggerQuantityEUTRA ::= CHOICE -struct meas_trigger_quant_eutra_c { - struct types_opts { - enum options { rsrp, rsrq, sinr, nulltype } value; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated rbg_size_e_; + struct mcs_table_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; std::string to_string() const; + uint16_t to_number() const; }; - typedef enumerated types; + typedef enumerated mcs_table_e_; + struct max_nrof_code_words_sched_by_dci_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; - // choice methods - meas_trigger_quant_eutra_c() = default; - meas_trigger_quant_eutra_c(const meas_trigger_quant_eutra_c& other); - meas_trigger_quant_eutra_c& operator=(const meas_trigger_quant_eutra_c& other); - ~meas_trigger_quant_eutra_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 - uint8_t& rsrp() - { - assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantityEUTRA"); - return c.get(); - } - uint8_t& rsrq() - { - assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantityEUTRA"); - return c.get(); - } - uint8_t& sinr() - { - assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantityEUTRA"); - return c.get(); - } - const uint8_t& rsrp() const - { - assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantityEUTRA"); - return c.get(); - } - const uint8_t& rsrq() const - { - assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantityEUTRA"); - return c.get(); - } - const uint8_t& sinr() const - { - assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantityEUTRA"); - return c.get(); - } - uint8_t& set_rsrp() - { - set(types::rsrp); - return c.get(); - } - uint8_t& set_rsrq() - { - set(types::rsrq); - return c.get(); - } - uint8_t& set_sinr() - { - set(types::sinr); - return c.get(); - } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_nrof_code_words_sched_by_dci_e_; + struct prb_bundling_type_c_ { + struct static_bundling_s_ { + struct bundle_size_opts { + enum options { n4, wideband, nulltype } value; + typedef uint8_t number_type; -private: - types type_; - pod_choice_buffer_t c; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated bundle_size_e_; - void destroy_(); -}; + // member variables + bool bundle_size_present = false; + bundle_size_e_ bundle_size; + }; + struct dynamic_bundling_s_ { + struct bundle_size_set1_opts { + enum options { n4, wideband, n2_wideband, n4_wideband, nulltype } value; -// MeasTriggerQuantityOffset ::= CHOICE -struct meas_trigger_quant_offset_c { - struct types_opts { - enum options { rsrp, rsrq, sinr, nulltype } value; + std::string to_string() const; + }; + typedef enumerated bundle_size_set1_e_; + struct bundle_size_set2_opts { + enum options { n4, wideband, nulltype } value; + typedef uint8_t number_type; - std::string to_string() const; - }; - typedef enumerated types; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated bundle_size_set2_e_; - // choice methods - meas_trigger_quant_offset_c() = default; - meas_trigger_quant_offset_c(const meas_trigger_quant_offset_c& other); - meas_trigger_quant_offset_c& operator=(const meas_trigger_quant_offset_c& other); - ~meas_trigger_quant_offset_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 - int8_t& rsrp() - { - assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantityOffset"); - return c.get(); - } - int8_t& rsrq() - { - assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantityOffset"); - return c.get(); - } - int8_t& sinr() - { - assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantityOffset"); - return c.get(); - } - const int8_t& rsrp() const - { - assert_choice_type("rsrp", type_.to_string(), "MeasTriggerQuantityOffset"); - return c.get(); - } - const int8_t& rsrq() const - { - assert_choice_type("rsrq", type_.to_string(), "MeasTriggerQuantityOffset"); - return c.get(); - } - const int8_t& sinr() const - { - assert_choice_type("sinr", type_.to_string(), "MeasTriggerQuantityOffset"); - return c.get(); - } - int8_t& set_rsrp() - { - set(types::rsrp); - return c.get(); - } - int8_t& set_rsrq() - { - set(types::rsrq); - return c.get(); - } - int8_t& set_sinr() - { - set(types::sinr); - return c.get(); - } - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); -}; - -// NR-RS-Type ::= ENUMERATED -struct nr_rs_type_opts { - enum options { ssb, csi_rs, nulltype } value; - - std::string to_string() const; -}; -typedef enumerated nr_rs_type_e; - -// ReportInterval ::= ENUMERATED -struct report_interv_opts { - enum options { - ms120, - ms240, - ms480, - ms640, - ms1024, - ms2048, - ms5120, - ms10240, - ms20480, - ms40960, - min1, - min6, - min12, - min30, - nulltype - } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; -}; -typedef enumerated report_interv_e; - -// SSB-ConfigMobility ::= SEQUENCE -struct ssb_cfg_mob_s { - bool ext = false; - bool ssb_to_measure_present = false; - bool ss_rssi_meas_present = false; - setup_release_c ssb_to_measure; - bool derive_ssb_idx_from_cell = false; - ss_rssi_meas_s ss_rssi_meas; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// TimeToTrigger ::= ENUMERATED -struct time_to_trigger_opts { - enum options { - ms0, - ms40, - ms64, - ms80, - ms100, - ms128, - ms160, - ms256, - ms320, - ms480, - ms512, - ms640, - ms1024, - ms1280, - ms2560, - ms5120, - nulltype - } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; -}; -typedef enumerated time_to_trigger_e; - -// CellsToAddModList ::= SEQUENCE (SIZE (1..32)) OF CellsToAddMod -using cells_to_add_mod_list_l = dyn_array; - -// EUTRA-BlackCell ::= SEQUENCE -struct eutra_black_cell_s { - uint8_t cell_idx_eutra = 1; - eutra_pci_range_s pci_range; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// EUTRA-Cell ::= SEQUENCE -struct eutra_cell_s { - uint8_t cell_idx_eutra = 1; - uint16_t pci = 0; - eutra_q_offset_range_e cell_individual_offset; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// EUTRA-CellIndexList ::= SEQUENCE (SIZE (1..32)) OF INTEGER (1..32) -using eutra_cell_idx_list_l = bounded_array; - -// EventTriggerConfig ::= SEQUENCE -struct event_trigger_cfg_s { - struct event_id_c_ { - struct event_a1_s_ { - meas_trigger_quant_c a1_thres; - bool report_on_leave = false; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - }; - struct event_a2_s_ { - meas_trigger_quant_c a2_thres; - bool report_on_leave = false; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - }; - struct event_a3_s_ { - meas_trigger_quant_offset_c a3_offset; - bool report_on_leave = false; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - bool use_white_cell_list = false; - }; - struct event_a4_s_ { - meas_trigger_quant_c a4_thres; - bool report_on_leave = false; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - bool use_white_cell_list = false; - }; - struct event_a5_s_ { - meas_trigger_quant_c a5_thres1; - meas_trigger_quant_c a5_thres2; - bool report_on_leave = false; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - bool use_white_cell_list = false; - }; - struct event_a6_s_ { - meas_trigger_quant_offset_c a6_offset; - bool report_on_leave = false; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - bool use_white_cell_list = false; + // member variables + bool bundle_size_set1_present = false; + bool bundle_size_set2_present = false; + bundle_size_set1_e_ bundle_size_set1; + bundle_size_set2_e_ bundle_size_set2; }; struct types_opts { - enum options { event_a1, event_a2, event_a3, event_a4, event_a5, event_a6, /*...*/ nulltype } value; - typedef uint8_t number_type; + enum options { static_bundling, dynamic_bundling, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - event_id_c_() = default; - event_id_c_(const event_id_c_& other); - event_id_c_& operator=(const event_id_c_& other); - ~event_id_c_() { destroy_(); } + prb_bundling_type_c_() = default; + prb_bundling_type_c_(const prb_bundling_type_c_& other); + prb_bundling_type_c_& operator=(const prb_bundling_type_c_& other); + ~prb_bundling_type_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 - event_a1_s_& event_a1() + static_bundling_s_& static_bundling() { - assert_choice_type("eventA1", type_.to_string(), "eventId"); - return c.get(); + assert_choice_type("staticBundling", type_.to_string(), "prb-BundlingType"); + return c.get(); } - event_a2_s_& event_a2() + dynamic_bundling_s_& dynamic_bundling() { - assert_choice_type("eventA2", type_.to_string(), "eventId"); - return c.get(); + assert_choice_type("dynamicBundling", type_.to_string(), "prb-BundlingType"); + return c.get(); } - event_a3_s_& event_a3() + const static_bundling_s_& static_bundling() const { - assert_choice_type("eventA3", type_.to_string(), "eventId"); - return c.get(); + assert_choice_type("staticBundling", type_.to_string(), "prb-BundlingType"); + return c.get(); } - event_a4_s_& event_a4() + const dynamic_bundling_s_& dynamic_bundling() const { - assert_choice_type("eventA4", type_.to_string(), "eventId"); - return c.get(); + assert_choice_type("dynamicBundling", type_.to_string(), "prb-BundlingType"); + return c.get(); } - event_a5_s_& event_a5() + static_bundling_s_& set_static_bundling() { - assert_choice_type("eventA5", type_.to_string(), "eventId"); - return c.get(); - } - event_a6_s_& event_a6() - { - assert_choice_type("eventA6", type_.to_string(), "eventId"); - return c.get(); - } - const event_a1_s_& event_a1() const - { - assert_choice_type("eventA1", type_.to_string(), "eventId"); - return c.get(); - } - const event_a2_s_& event_a2() const - { - assert_choice_type("eventA2", type_.to_string(), "eventId"); - return c.get(); - } - const event_a3_s_& event_a3() const - { - assert_choice_type("eventA3", type_.to_string(), "eventId"); - return c.get(); - } - const event_a4_s_& event_a4() const - { - assert_choice_type("eventA4", type_.to_string(), "eventId"); - return c.get(); - } - const event_a5_s_& event_a5() const - { - assert_choice_type("eventA5", type_.to_string(), "eventId"); - return c.get(); - } - const event_a6_s_& event_a6() const - { - assert_choice_type("eventA6", type_.to_string(), "eventId"); - return c.get(); - } - event_a1_s_& set_event_a1() - { - set(types::event_a1); - return c.get(); - } - event_a2_s_& set_event_a2() - { - set(types::event_a2); - return c.get(); - } - event_a3_s_& set_event_a3() - { - set(types::event_a3); - return c.get(); - } - event_a4_s_& set_event_a4() - { - set(types::event_a4); - return c.get(); - } - event_a5_s_& set_event_a5() - { - set(types::event_a5); - return c.get(); + set(types::static_bundling); + return c.get(); } - event_a6_s_& set_event_a6() + dynamic_bundling_s_& set_dynamic_bundling() { - set(types::event_a6); - return c.get(); + set(types::dynamic_bundling); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; - struct report_amount_opts { - enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; - typedef int8_t number_type; - - std::string to_string() const; - int8_t to_number() const; - }; - typedef enumerated report_amount_e_; + using zp_csi_rs_res_to_add_mod_list_l_ = dyn_array; + using zp_csi_rs_res_to_release_list_l_ = bounded_array; + using aperiodic_zp_csi_rs_res_sets_to_add_mod_list_l_ = dyn_array; + using aperiodic_zp_csi_rs_res_sets_to_release_list_l_ = bounded_array; + using sp_zp_csi_rs_res_sets_to_add_mod_list_l_ = dyn_array; + using sp_zp_csi_rs_res_sets_to_release_list_l_ = bounded_array; // member variables - bool ext = false; - bool report_quant_rs_idxes_present = false; - bool max_nrof_rs_idxes_to_report_present = false; - bool report_add_neigh_meas_present = false; - event_id_c_ event_id; - nr_rs_type_e rs_type; - report_interv_e report_interv; - report_amount_e_ report_amount; - meas_report_quant_s report_quant_cell; - uint8_t max_report_cells = 1; - meas_report_quant_s report_quant_rs_idxes; - uint8_t max_nrof_rs_idxes_to_report = 1; - bool include_beam_meass = false; + bool ext = false; + bool data_scrambling_id_pdsch_present = false; + bool dmrs_dl_for_pdsch_map_type_a_present = false; + bool dmrs_dl_for_pdsch_map_type_b_present = false; + bool tci_states_to_add_mod_list_present = false; + bool tci_states_to_release_list_present = false; + bool vrb_to_prb_interleaver_present = false; + bool pdsch_time_domain_alloc_list_present = false; + bool pdsch_aggregation_factor_present = false; + bool rate_match_pattern_to_add_mod_list_present = false; + bool rate_match_pattern_to_release_list_present = false; + bool rate_match_pattern_group1_present = false; + bool rate_match_pattern_group2_present = false; + bool mcs_table_present = false; + bool max_nrof_code_words_sched_by_dci_present = false; + bool zp_csi_rs_res_to_add_mod_list_present = false; + bool zp_csi_rs_res_to_release_list_present = false; + bool aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present = false; + bool aperiodic_zp_csi_rs_res_sets_to_release_list_present = false; + bool sp_zp_csi_rs_res_sets_to_add_mod_list_present = false; + bool sp_zp_csi_rs_res_sets_to_release_list_present = false; + bool p_zp_csi_rs_res_set_present = false; + uint16_t data_scrambling_id_pdsch = 0; + setup_release_c dmrs_dl_for_pdsch_map_type_a; + setup_release_c dmrs_dl_for_pdsch_map_type_b; + tci_states_to_add_mod_list_l_ tci_states_to_add_mod_list; + tci_states_to_release_list_l_ tci_states_to_release_list; + vrb_to_prb_interleaver_e_ vrb_to_prb_interleaver; + res_alloc_e_ res_alloc; + setup_release_c > pdsch_time_domain_alloc_list; + pdsch_aggregation_factor_e_ pdsch_aggregation_factor; + rate_match_pattern_to_add_mod_list_l_ rate_match_pattern_to_add_mod_list; + rate_match_pattern_to_release_list_l_ rate_match_pattern_to_release_list; + rate_match_pattern_group_l rate_match_pattern_group1; + rate_match_pattern_group_l rate_match_pattern_group2; + rbg_size_e_ rbg_size; + mcs_table_e_ mcs_table; + max_nrof_code_words_sched_by_dci_e_ max_nrof_code_words_sched_by_dci; + prb_bundling_type_c_ prb_bundling_type; + zp_csi_rs_res_to_add_mod_list_l_ zp_csi_rs_res_to_add_mod_list; + zp_csi_rs_res_to_release_list_l_ zp_csi_rs_res_to_release_list; + aperiodic_zp_csi_rs_res_sets_to_add_mod_list_l_ aperiodic_zp_csi_rs_res_sets_to_add_mod_list; + aperiodic_zp_csi_rs_res_sets_to_release_list_l_ aperiodic_zp_csi_rs_res_sets_to_release_list; + sp_zp_csi_rs_res_sets_to_add_mod_list_l_ sp_zp_csi_rs_res_sets_to_add_mod_list; + sp_zp_csi_rs_res_sets_to_release_list_l_ sp_zp_csi_rs_res_sets_to_release_list; + setup_release_c p_zp_csi_rs_res_set; // ... // sequence methods @@ -15083,130 +12911,38 @@ struct event_trigger_cfg_s { void to_json(json_writer& j) const; }; -// EventTriggerConfigInterRAT ::= SEQUENCE -struct event_trigger_cfg_inter_rat_s { - struct event_id_c_ { - struct event_b1_s_ { - bool ext = false; - meas_trigger_quant_eutra_c b1_thres_eutra; - bool report_on_leave = false; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - // ... - }; - struct event_b2_s_ { - bool ext = false; - meas_trigger_quant_c b2_thres1; - meas_trigger_quant_eutra_c b2_thres2_eutra; - bool report_on_leave = false; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - // ... - }; - struct types_opts { - enum options { event_b1, event_b2, /*...*/ nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - event_id_c_() = default; - event_id_c_(const event_id_c_& other); - event_id_c_& operator=(const event_id_c_& other); - ~event_id_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 - event_b1_s_& event_b1() - { - assert_choice_type("eventB1", type_.to_string(), "eventId"); - return c.get(); - } - event_b2_s_& event_b2() - { - assert_choice_type("eventB2", type_.to_string(), "eventId"); - return c.get(); - } - const event_b1_s_& event_b1() const - { - assert_choice_type("eventB1", type_.to_string(), "eventId"); - return c.get(); - } - const event_b2_s_& event_b2() const - { - assert_choice_type("eventB2", type_.to_string(), "eventId"); - return c.get(); - } - event_b1_s_& set_event_b1() - { - set(types::event_b1); - return c.get(); - } - event_b2_s_& set_event_b2() - { - set(types::event_b2); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; +// RadioLinkMonitoringConfig ::= SEQUENCE +struct radio_link_monitoring_cfg_s { + using fail_detection_res_to_add_mod_list_l_ = dyn_array; + using fail_detection_res_to_release_list_l_ = bounded_array; + struct beam_fail_instance_max_count_opts { + enum options { n1, n2, n3, n4, n5, n6, n8, n10, nulltype } value; + typedef uint8_t number_type; - void destroy_(); + std::string to_string() const; + uint8_t to_number() const; }; - struct report_amount_opts { - enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; - typedef int8_t number_type; + typedef enumerated beam_fail_instance_max_count_e_; + struct beam_fail_detection_timer_opts { + enum options { pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; - int8_t to_number() const; + uint8_t to_number() const; }; - typedef enumerated report_amount_e_; + typedef enumerated beam_fail_detection_timer_e_; // member variables - bool ext = false; - event_id_c_ event_id; - nr_rs_type_e rs_type; - report_interv_e report_interv; - report_amount_e_ report_amount; - meas_report_quant_s report_quant; - uint8_t max_report_cells = 1; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FilterConfig ::= SEQUENCE -struct filt_cfg_s { - bool filt_coef_rsrp_present = false; - bool filt_coef_rsrq_present = false; - bool filt_coef_rs_sinr_present = false; - filt_coef_e filt_coef_rsrp; - filt_coef_e filt_coef_rsrq; - filt_coef_e filt_coef_rs_sinr; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PCI-List ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..1007) -using pci_list_l = bounded_array; - -// PCI-RangeElement ::= SEQUENCE -struct pci_range_elem_s { - uint8_t pci_range_idx = 1; - pci_range_s pci_range; + bool ext = false; + bool fail_detection_res_to_add_mod_list_present = false; + bool fail_detection_res_to_release_list_present = false; + bool beam_fail_instance_max_count_present = false; + bool beam_fail_detection_timer_present = false; + fail_detection_res_to_add_mod_list_l_ fail_detection_res_to_add_mod_list; + fail_detection_res_to_release_list_l_ fail_detection_res_to_release_list; + beam_fail_instance_max_count_e_ beam_fail_instance_max_count; + beam_fail_detection_timer_e_ beam_fail_detection_timer; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15214,33 +12950,42 @@ struct pci_range_elem_s { void to_json(json_writer& j) const; }; -// PCI-RangeIndexList ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8) -using pci_range_idx_list_l = bounded_array; - -// PeriodicalReportConfig ::= SEQUENCE -struct periodical_report_cfg_s { - struct report_amount_opts { - enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; - typedef int8_t number_type; +// SPS-Config ::= SEQUENCE +struct sps_cfg_s { + struct periodicity_opts { + enum options { + ms10, + ms20, + ms32, + ms40, + ms64, + ms80, + ms128, + ms160, + ms320, + ms640, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; std::string to_string() const; - int8_t to_number() const; + uint16_t to_number() const; }; - typedef enumerated report_amount_e_; + typedef enumerated periodicity_e_; // member variables - bool ext = false; - bool report_quant_rs_idxes_present = false; - bool max_nrof_rs_idxes_to_report_present = false; - nr_rs_type_e rs_type; - report_interv_e report_interv; - report_amount_e_ report_amount; - meas_report_quant_s report_quant_cell; - uint8_t max_report_cells = 1; - meas_report_quant_s report_quant_rs_idxes; - uint8_t max_nrof_rs_idxes_to_report = 1; - bool include_beam_meass = false; - bool use_white_cell_list = false; + bool ext = false; + bool n1_pucch_an_present = false; + bool mcs_table_present = false; + periodicity_e_ periodicity; + uint8_t nrof_harq_processes = 1; + uint8_t n1_pucch_an = 0; // ... // sequence methods @@ -15249,23 +12994,17 @@ struct periodical_report_cfg_s { void to_json(json_writer& j) const; }; -// PeriodicalReportConfigInterRAT ::= SEQUENCE -struct periodical_report_cfg_inter_rat_s { - struct report_amount_opts { - enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; - typedef int8_t number_type; - - std::string to_string() const; - int8_t to_number() const; - }; - typedef enumerated report_amount_e_; - - // member variables - bool ext = false; - report_interv_e report_interv; - report_amount_e_ report_amount; - meas_report_quant_s report_quant; - uint8_t max_report_cells = 1; +// BWP-DownlinkDedicated ::= SEQUENCE +struct bwp_dl_ded_s { + bool ext = false; + bool pdcch_cfg_present = false; + bool pdsch_cfg_present = false; + bool sps_cfg_present = false; + bool radio_link_monitoring_cfg_present = false; + setup_release_c pdcch_cfg; + setup_release_c pdsch_cfg; + setup_release_c sps_cfg; + setup_release_c radio_link_monitoring_cfg; // ... // sequence methods @@ -15274,14 +13013,15 @@ struct periodical_report_cfg_inter_rat_s { void to_json(json_writer& j) const; }; -// RAN-AreaConfig ::= SEQUENCE -struct ran_area_cfg_s { - using ran_area_code_list_l_ = bounded_array; - - // member variables - bool ran_area_code_list_present = false; - fixed_bitstring<24> tac; - ran_area_code_list_l_ ran_area_code_list; +// BWP-Downlink ::= SEQUENCE +struct bwp_dl_s { + bool ext = false; + bool bwp_common_present = false; + bool bwp_ded_present = false; + uint8_t bwp_id = 0; + bwp_dl_common_s bwp_common; + bwp_dl_ded_s bwp_ded; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15289,12 +13029,33 @@ struct ran_area_cfg_s { void to_json(json_writer& j) const; }; -// ReferenceSignalConfig ::= SEQUENCE -struct ref_sig_cfg_s { - bool ssb_cfg_mob_present = false; - bool csi_rs_res_cfg_mob_present = false; - ssb_cfg_mob_s ssb_cfg_mob; - setup_release_c csi_rs_res_cfg_mob; +// Alpha ::= ENUMERATED +struct alpha_opts { + enum options { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; +}; +typedef enumerated alpha_e; + +// BetaOffsets ::= SEQUENCE +struct beta_offsets_s { + bool beta_offset_ack_idx1_present = false; + bool beta_offset_ack_idx2_present = false; + bool beta_offset_ack_idx3_present = false; + bool beta_offset_csi_part1_idx1_present = false; + bool beta_offset_csi_part1_idx2_present = false; + bool beta_offset_csi_part2_idx1_present = false; + bool beta_offset_csi_part2_idx2_present = false; + uint8_t beta_offset_ack_idx1 = 0; + uint8_t beta_offset_ack_idx2 = 0; + uint8_t beta_offset_ack_idx3 = 0; + uint8_t beta_offset_csi_part1_idx1 = 0; + uint8_t beta_offset_csi_part1_idx2 = 0; + uint8_t beta_offset_csi_part2_idx1 = 0; + uint8_t beta_offset_csi_part2_idx2 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15302,11 +13063,10 @@ struct ref_sig_cfg_s { void to_json(json_writer& j) const; }; -// ReportCGI ::= SEQUENCE -struct report_cgi_s { - bool ext = false; - uint16_t cell_for_which_to_report_cgi = 0; - // ... +// P0-PUCCH ::= SEQUENCE +struct p0_pucch_s { + uint8_t p0_pucch_id = 1; + int8_t p0_pucch_value = -16; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15314,11 +13074,13 @@ struct report_cgi_s { void to_json(json_writer& j) const; }; -// ReportCGI-EUTRA ::= SEQUENCE -struct report_cgi_eutra_s { - bool ext = false; - uint16_t cell_for_which_to_report_cgi = 0; - // ... +// P0-PUSCH-AlphaSet ::= SEQUENCE +struct p0_pusch_alpha_set_s { + bool p0_present = false; + bool alpha_present = false; + uint8_t p0_pusch_alpha_set_id = 0; + int8_t p0 = -16; + alpha_e alpha; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15326,22 +13088,63 @@ struct report_cgi_eutra_s { void to_json(json_writer& j) const; }; -// SSB-MTC2 ::= SEQUENCE -struct ssb_mtc2_s { - using pci_list_l_ = dyn_array; - struct periodicity_opts { - enum options { sf5, sf10, sf20, sf40, sf80, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; +// PTRS-UplinkConfig ::= SEQUENCE +struct ptrs_ul_cfg_s { + struct transform_precoder_disabled_s_ { + using freq_density_l_ = std::array; + using time_density_l_ = std::array; + struct max_nrof_ports_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; - std::string to_string() const; - uint8_t to_number() const; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_nrof_ports_e_; + struct res_elem_offset_opts { + enum options { offset01, offset10, offset11, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated res_elem_offset_e_; + struct ptrs_pwr_opts { + enum options { p00, p01, p10, p11, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated ptrs_pwr_e_; + + // member variables + bool freq_density_present = false; + bool time_density_present = false; + bool res_elem_offset_present = false; + freq_density_l_ freq_density; + time_density_l_ time_density; + max_nrof_ports_e_ max_nrof_ports; + res_elem_offset_e_ res_elem_offset; + ptrs_pwr_e_ ptrs_pwr; + }; + struct transform_precoder_enabled_s_ { + using sample_density_l_ = std::array; + + // member variables + bool time_density_transform_precoding_present = false; + sample_density_l_ sample_density; }; - typedef enumerated periodicity_e_; // member variables - bool pci_list_present = false; - pci_list_l_ pci_list; - periodicity_e_ periodicity; + bool ext = false; + bool transform_precoder_disabled_present = false; + bool transform_precoder_enabled_present = false; + transform_precoder_disabled_s_ transform_precoder_disabled; + transform_precoder_enabled_s_ transform_precoder_enabled; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15349,89 +13152,79 @@ struct ssb_mtc2_s { void to_json(json_writer& j) const; }; -// MeasObjectEUTRA ::= SEQUENCE -struct meas_obj_eutra_s { - using cells_to_add_mod_list_eutran_l_ = dyn_array; - using black_cells_to_add_mod_list_eutran_l_ = dyn_array; - - // member variables - bool ext = false; - bool cells_to_rem_list_eutran_present = false; - bool cells_to_add_mod_list_eutran_present = false; - bool black_cells_to_rem_list_eutran_present = false; - bool black_cells_to_add_mod_list_eutran_present = false; - bool eutra_q_offset_range_present = false; - uint32_t carrier_freq = 0; - eutra_allowed_meas_bw_e allowed_meas_bw; - eutra_cell_idx_list_l cells_to_rem_list_eutran; - cells_to_add_mod_list_eutran_l_ cells_to_add_mod_list_eutran; - eutra_cell_idx_list_l black_cells_to_rem_list_eutran; - black_cells_to_add_mod_list_eutran_l_ black_cells_to_add_mod_list_eutran; - bool eutra_presence_ant_port1 = false; - eutra_q_offset_range_e eutra_q_offset_range; - bool wideband_rsrq_meas = false; - // ... +// PUCCH-MaxCodeRate ::= ENUMERATED +struct pucch_max_code_rate_opts { + enum options { zero_dot08, zero_dot15, zero_dot25, zero_dot35, zero_dot45, zero_dot60, zero_dot80, nulltype } value; + typedef float number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; }; +typedef enumerated pucch_max_code_rate_e; -// MeasObjectNR ::= SEQUENCE -struct meas_obj_nr_s { - using black_cells_to_add_mod_list_l_ = dyn_array; - using white_cells_to_add_mod_list_l_ = dyn_array; - struct meas_cycle_scell_v1530_opts { - enum options { sf160, sf256, sf320, sf512, sf640, sf1024, sf1280, nulltype } value; - typedef uint16_t number_type; +// PUCCH-PathlossReferenceRS ::= SEQUENCE +struct pucch_pathloss_ref_rs_s { + struct ref_sig_c_ { + struct types_opts { + enum options { ssb_idx, csi_rs_idx, nulltype } value; - std::string to_string() const; - uint16_t to_number() const; + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + ref_sig_c_() = default; + ref_sig_c_(const ref_sig_c_& other); + ref_sig_c_& operator=(const ref_sig_c_& other); + ~ref_sig_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 + uint8_t& ssb_idx() + { + assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + uint8_t& set_ssb_idx() + { + set(types::ssb_idx); + return c.get(); + } + uint8_t& set_csi_rs_idx() + { + set(types::csi_rs_idx); + return c.get(); + } + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); }; - typedef enumerated meas_cycle_scell_v1530_e_; // member variables - bool ext = false; - bool ssb_freq_present = false; - bool ssb_subcarrier_spacing_present = false; - bool smtc1_present = false; - bool smtc2_present = false; - bool ref_freq_csi_rs_present = false; - bool abs_thresh_ss_blocks_consolidation_present = false; - bool abs_thresh_csi_rs_consolidation_present = false; - bool nrof_ss_blocks_to_average_present = false; - bool nrof_csi_rs_res_to_average_present = false; - bool cells_to_rem_list_present = false; - bool cells_to_add_mod_list_present = false; - bool black_cells_to_rem_list_present = false; - bool black_cells_to_add_mod_list_present = false; - bool white_cells_to_rem_list_present = false; - bool white_cells_to_add_mod_list_present = false; - uint32_t ssb_freq = 0; - subcarrier_spacing_e ssb_subcarrier_spacing; - ssb_mtc_s smtc1; - ssb_mtc2_s smtc2; - uint32_t ref_freq_csi_rs = 0; - ref_sig_cfg_s ref_sig_cfg; - thres_nr_s abs_thresh_ss_blocks_consolidation; - thres_nr_s abs_thresh_csi_rs_consolidation; - uint8_t nrof_ss_blocks_to_average = 2; - uint8_t nrof_csi_rs_res_to_average = 2; - uint8_t quant_cfg_idx = 1; - q_offset_range_list_s offset_mo; - pci_list_l cells_to_rem_list; - cells_to_add_mod_list_l cells_to_add_mod_list; - pci_range_idx_list_l black_cells_to_rem_list; - black_cells_to_add_mod_list_l_ black_cells_to_add_mod_list; - pci_range_idx_list_l white_cells_to_rem_list; - white_cells_to_add_mod_list_l_ white_cells_to_add_mod_list; - // ... - // group 0 - bool freq_band_ind_nr_v1530_present = false; - bool meas_cycle_scell_v1530_present = false; - uint16_t freq_band_ind_nr_v1530 = 1; - meas_cycle_scell_v1530_e_ meas_cycle_scell_v1530; + uint8_t pucch_pathloss_ref_rs_id = 0; + ref_sig_c_ ref_sig; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15439,38 +13232,24 @@ struct meas_obj_nr_s { void to_json(json_writer& j) const; }; -// OverheatingAssistanceConfig ::= SEQUENCE -struct overheat_assist_cfg_s { - struct overheat_ind_prohibit_timer_opts { - enum options { - s0, - s0dot5, - s1, - s2, - s5, - s10, - s20, - s30, - s60, - s90, - s120, - s300, - s600, - spare3, - spare2, - spare1, - nulltype - } value; - typedef float number_type; +// PUCCH-format0 ::= SEQUENCE +struct pucch_format0_s { + uint8_t init_cyclic_shift = 0; + uint8_t nrof_symbols = 1; + uint8_t start_symbol_idx = 0; - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated overheat_ind_prohibit_timer_e_; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - overheat_ind_prohibit_timer_e_ overheat_ind_prohibit_timer; +// PUCCH-format1 ::= SEQUENCE +struct pucch_format1_s { + uint8_t init_cyclic_shift = 0; + uint8_t nrof_symbols = 4; + uint8_t start_symbol_idx = 0; + uint8_t time_domain_occ = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15478,14 +13257,11 @@ struct overheat_assist_cfg_s { void to_json(json_writer& j) const; }; -// PLMN-RAN-AreaCell ::= SEQUENCE -struct plmn_ran_area_cell_s { - using ran_area_cells_l_ = bounded_array, 32>; - - // member variables - bool plmn_id_present = false; - plmn_id_s plmn_id; - ran_area_cells_l_ ran_area_cells; +// PUCCH-format2 ::= SEQUENCE +struct pucch_format2_s { + uint8_t nrof_prbs = 1; + uint8_t nrof_symbols = 1; + uint8_t start_symbol_idx = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15493,14 +13269,11 @@ struct plmn_ran_area_cell_s { void to_json(json_writer& j) const; }; -// PLMN-RAN-AreaConfig ::= SEQUENCE -struct plmn_ran_area_cfg_s { - using ran_area_l_ = dyn_array; - - // member variables - bool plmn_id_present = false; - plmn_id_s plmn_id; - ran_area_l_ ran_area; +// PUCCH-format3 ::= SEQUENCE +struct pucch_format3_s { + uint8_t nrof_prbs = 1; + uint8_t nrof_symbols = 4; + uint8_t start_symbol_idx = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15508,10 +13281,30 @@ struct plmn_ran_area_cfg_s { void to_json(json_writer& j) const; }; -// QuantityConfigRS ::= SEQUENCE -struct quant_cfg_rs_s { - filt_cfg_s ssb_filt_cfg; - filt_cfg_s csi_rs_filt_cfg; +// PUCCH-format4 ::= SEQUENCE +struct pucch_format4_s { + struct occ_len_opts { + enum options { n2, n4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated occ_len_e_; + struct occ_idx_opts { + enum options { n0, n1, n2, n3, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated occ_idx_e_; + + // member variables + uint8_t nrof_symbols = 4; + occ_len_e_ occ_len; + occ_idx_e_ occ_idx; + uint8_t start_symbol_idx = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15519,191 +13312,68 @@ struct quant_cfg_rs_s { void to_json(json_writer& j) const; }; -// ReportConfigInterRAT ::= SEQUENCE -struct report_cfg_inter_rat_s { - struct report_type_c_ { +// PUSCH-PathlossReferenceRS ::= SEQUENCE +struct pusch_pathloss_ref_rs_s { + struct ref_sig_c_ { struct types_opts { - enum options { periodical, event_triggered, report_cgi, /*...*/ nulltype } value; + enum options { ssb_idx, csi_rs_idx, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - report_type_c_() = default; - report_type_c_(const report_type_c_& other); - report_type_c_& operator=(const report_type_c_& other); - ~report_type_c_() { destroy_(); } + ref_sig_c_() = default; + ref_sig_c_(const ref_sig_c_& other); + ref_sig_c_& operator=(const ref_sig_c_& other); + ~ref_sig_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 - periodical_report_cfg_inter_rat_s& periodical() + uint8_t& ssb_idx() { - assert_choice_type("periodical", type_.to_string(), "reportType"); - return c.get(); + assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + return c.get(); } - event_trigger_cfg_inter_rat_s& event_triggered() + uint8_t& csi_rs_idx() { - assert_choice_type("eventTriggered", type_.to_string(), "reportType"); - return c.get(); - } - report_cgi_eutra_s& report_cgi() - { - assert_choice_type("reportCGI", type_.to_string(), "reportType"); - return c.get(); - } - const periodical_report_cfg_inter_rat_s& periodical() const - { - assert_choice_type("periodical", type_.to_string(), "reportType"); - return c.get(); - } - const event_trigger_cfg_inter_rat_s& event_triggered() const - { - assert_choice_type("eventTriggered", type_.to_string(), "reportType"); - return c.get(); - } - const report_cgi_eutra_s& report_cgi() const - { - assert_choice_type("reportCGI", type_.to_string(), "reportType"); - return c.get(); - } - periodical_report_cfg_inter_rat_s& set_periodical() - { - set(types::periodical); - return c.get(); - } - event_trigger_cfg_inter_rat_s& set_event_triggered() - { - set(types::event_triggered); - return c.get(); - } - report_cgi_eutra_s& set_report_cgi() - { - set(types::report_cgi); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - report_type_c_ report_type; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ReportConfigNR ::= SEQUENCE -struct report_cfg_nr_s { - struct report_type_c_ { - struct types_opts { - enum options { periodical, event_triggered, /*...*/ report_cgi, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - report_type_c_() = default; - report_type_c_(const report_type_c_& other); - report_type_c_& operator=(const report_type_c_& other); - ~report_type_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 - periodical_report_cfg_s& periodical() - { - assert_choice_type("periodical", type_.to_string(), "reportType"); - return c.get(); - } - event_trigger_cfg_s& event_triggered() - { - assert_choice_type("eventTriggered", type_.to_string(), "reportType"); - return c.get(); - } - report_cgi_s& report_cgi() - { - assert_choice_type("reportCGI", type_.to_string(), "reportType"); - return c.get(); - } - const periodical_report_cfg_s& periodical() const - { - assert_choice_type("periodical", type_.to_string(), "reportType"); - return c.get(); - } - const event_trigger_cfg_s& event_triggered() const - { - assert_choice_type("eventTriggered", type_.to_string(), "reportType"); - return c.get(); + assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + return c.get(); } - const report_cgi_s& report_cgi() const + const uint8_t& ssb_idx() const { - assert_choice_type("reportCGI", type_.to_string(), "reportType"); - return c.get(); + assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + return c.get(); } - periodical_report_cfg_s& set_periodical() + const uint8_t& csi_rs_idx() const { - set(types::periodical); - return c.get(); + assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + return c.get(); } - event_trigger_cfg_s& set_event_triggered() + uint8_t& set_ssb_idx() { - set(types::event_triggered); - return c.get(); + set(types::ssb_idx); + return c.get(); } - report_cgi_s& set_report_cgi() + uint8_t& set_csi_rs_idx() { - set(types::report_cgi); - return c.get(); + set(types::csi_rs_idx); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; // member variables - report_type_c_ report_type; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FreqPriorityEUTRA ::= SEQUENCE -struct freq_prio_eutra_s { - bool cell_resel_sub_prio_present = false; - uint32_t carrier_freq = 0; - uint8_t cell_resel_prio = 0; - cell_resel_sub_prio_e cell_resel_sub_prio; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FreqPriorityNR ::= SEQUENCE -struct freq_prio_nr_s { - bool cell_resel_sub_prio_present = false; - uint32_t carrier_freq = 0; - uint8_t cell_resel_prio = 0; - cell_resel_sub_prio_e cell_resel_sub_prio; + uint8_t pusch_pathloss_ref_rs_id = 0; + ref_sig_c_ ref_sig; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15711,42 +13381,22 @@ struct freq_prio_nr_s { void to_json(json_writer& j) const; }; -// GapConfig ::= SEQUENCE -struct gap_cfg_s { - struct mgl_opts { - enum options { ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6, nulltype } value; - typedef float number_type; - - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated mgl_e_; - struct mgrp_opts { - enum options { ms20, ms40, ms80, ms160, nulltype } value; +// SRI-PUSCH-PowerControl ::= SEQUENCE +struct sri_pusch_pwr_ctrl_s { + struct sri_pusch_closed_loop_idx_opts { + enum options { i0, i1, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated mgrp_e_; - struct mgta_opts { - enum options { ms0, ms0dot25, ms0dot5, nulltype } value; - typedef float number_type; - - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated mgta_e_; + typedef enumerated sri_pusch_closed_loop_idx_e_; // member variables - bool ext = false; - uint8_t gap_offset = 0; - mgl_e_ mgl; - mgrp_e_ mgrp; - mgta_e_ mgta; - // ... + uint8_t sri_pusch_pwr_ctrl_id = 0; + uint8_t sri_pusch_pathloss_ref_rs_id = 0; + uint8_t sri_p0_pusch_alpha_set_id = 0; + sri_pusch_closed_loop_idx_e_ sri_pusch_closed_loop_idx; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15754,122 +13404,1567 @@ struct gap_cfg_s { void to_json(json_writer& j) const; }; -// MeasGapSharingScheme ::= ENUMERATED -struct meas_gap_sharing_scheme_opts { - enum options { scheme00, scheme01, scheme10, scheme11, nulltype } value; - typedef float number_type; - - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; -}; -typedef enumerated meas_gap_sharing_scheme_e; +// SRS-PeriodicityAndOffset ::= CHOICE +struct srs_periodicity_and_offset_c { + struct types_opts { + enum options { + sl1, + sl2, + sl4, + sl5, + sl8, + sl10, + sl16, + sl20, + sl32, + sl40, + sl64, + sl80, + sl160, + sl320, + sl640, + sl1280, + sl2560, + nulltype + } value; + typedef uint16_t number_type; -// MeasIdToAddMod ::= SEQUENCE -struct meas_id_to_add_mod_s { - uint8_t meas_id = 1; - uint8_t meas_obj_id = 1; - uint8_t report_cfg_id = 1; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated types; - // sequence methods + // choice methods + srs_periodicity_and_offset_c() = default; + srs_periodicity_and_offset_c(const srs_periodicity_and_offset_c& other); + srs_periodicity_and_offset_c& operator=(const srs_periodicity_and_offset_c& other); + ~srs_periodicity_and_offset_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; -}; - -// MeasObjectToAddMod ::= SEQUENCE -struct meas_obj_to_add_mod_s { - struct meas_obj_c_ { - struct types_opts { - enum options { meas_obj_nr, /*...*/ meas_obj_eutra, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - meas_obj_c_() = default; - meas_obj_c_(const meas_obj_c_& other); - meas_obj_c_& operator=(const meas_obj_c_& other); - ~meas_obj_c_() { destroy_(); } + // getters + uint8_t& sl2() + { + assert_choice_type("sl2", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl4() + { + assert_choice_type("sl4", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl5() + { + assert_choice_type("sl5", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl8() + { + assert_choice_type("sl8", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl10() + { + assert_choice_type("sl10", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl16() + { + assert_choice_type("sl16", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl20() + { + assert_choice_type("sl20", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl32() + { + assert_choice_type("sl32", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl40() + { + assert_choice_type("sl40", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl64() + { + assert_choice_type("sl64", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl80() + { + assert_choice_type("sl80", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl160() + { + assert_choice_type("sl160", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint16_t& sl320() + { + assert_choice_type("sl320", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint16_t& sl640() + { + assert_choice_type("sl640", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint16_t& sl1280() + { + assert_choice_type("sl1280", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint16_t& sl2560() + { + assert_choice_type("sl2560", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl2() const + { + assert_choice_type("sl2", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl4() const + { + assert_choice_type("sl4", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl5() const + { + assert_choice_type("sl5", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl8() const + { + assert_choice_type("sl8", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl10() const + { + assert_choice_type("sl10", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl16() const + { + assert_choice_type("sl16", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl20() const + { + assert_choice_type("sl20", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl32() const + { + assert_choice_type("sl32", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl40() const + { + assert_choice_type("sl40", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl64() const + { + assert_choice_type("sl64", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl80() const + { + assert_choice_type("sl80", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl160() const + { + assert_choice_type("sl160", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint16_t& sl320() const + { + assert_choice_type("sl320", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint16_t& sl640() const + { + assert_choice_type("sl640", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint16_t& sl1280() const + { + assert_choice_type("sl1280", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + const uint16_t& sl2560() const + { + assert_choice_type("sl2560", type_.to_string(), "SRS-PeriodicityAndOffset"); + return c.get(); + } + uint8_t& set_sl2() + { + set(types::sl2); + return c.get(); + } + uint8_t& set_sl4() + { + set(types::sl4); + return c.get(); + } + uint8_t& set_sl5() + { + set(types::sl5); + return c.get(); + } + uint8_t& set_sl8() + { + set(types::sl8); + return c.get(); + } + uint8_t& set_sl10() + { + set(types::sl10); + return c.get(); + } + uint8_t& set_sl16() + { + set(types::sl16); + return c.get(); + } + uint8_t& set_sl20() + { + set(types::sl20); + return c.get(); + } + uint8_t& set_sl32() + { + set(types::sl32); + return c.get(); + } + uint8_t& set_sl40() + { + set(types::sl40); + return c.get(); + } + uint8_t& set_sl64() + { + set(types::sl64); + return c.get(); + } + uint8_t& set_sl80() + { + set(types::sl80); + return c.get(); + } + uint8_t& set_sl160() + { + set(types::sl160); + return c.get(); + } + uint16_t& set_sl320() + { + set(types::sl320); + return c.get(); + } + uint16_t& set_sl640() + { + set(types::sl640); + return c.get(); + } + uint16_t& set_sl1280() + { + set(types::sl1280); + return c.get(); + } + uint16_t& set_sl2560() + { + set(types::sl2560); + return c.get(); + } + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// SRS-SpatialRelationInfo ::= SEQUENCE +struct srs_spatial_relation_info_s { + struct ref_sig_c_ { + struct srs_s_ { + uint8_t res_id = 0; + uint8_t ul_bwp = 0; + }; + struct types_opts { + enum options { ssb_idx, csi_rs_idx, srs, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + ref_sig_c_() = default; + ref_sig_c_(const ref_sig_c_& other); + ref_sig_c_& operator=(const ref_sig_c_& other); + ~ref_sig_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 + uint8_t& ssb_idx() + { + assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + srs_s_& srs() + { + assert_choice_type("srs", type_.to_string(), "referenceSignal"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + const srs_s_& srs() const + { + assert_choice_type("srs", type_.to_string(), "referenceSignal"); + return c.get(); + } + uint8_t& set_ssb_idx() + { + set(types::ssb_idx); + return c.get(); + } + uint8_t& set_csi_rs_idx() + { + set(types::csi_rs_idx); + return c.get(); + } + srs_s_& set_srs() + { + set(types::srs); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool serving_cell_id_present = false; + uint8_t serving_cell_id = 0; + ref_sig_c_ ref_sig; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CG-UCI-OnPUSCH ::= CHOICE +struct cg_uci_on_pusch_c { + using dynamic_l_ = dyn_array; + struct types_opts { + enum options { dynamic_type, semi_static, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + cg_uci_on_pusch_c() = default; + cg_uci_on_pusch_c(const cg_uci_on_pusch_c& other); + cg_uci_on_pusch_c& operator=(const cg_uci_on_pusch_c& other); + ~cg_uci_on_pusch_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 + dynamic_l_& dynamic_type() + { + assert_choice_type("dynamic", type_.to_string(), "CG-UCI-OnPUSCH"); + return c.get(); + } + beta_offsets_s& semi_static() + { + assert_choice_type("semiStatic", type_.to_string(), "CG-UCI-OnPUSCH"); + return c.get(); + } + const dynamic_l_& dynamic_type() const + { + assert_choice_type("dynamic", type_.to_string(), "CG-UCI-OnPUSCH"); + return c.get(); + } + const beta_offsets_s& semi_static() const + { + assert_choice_type("semiStatic", type_.to_string(), "CG-UCI-OnPUSCH"); + return c.get(); + } + dynamic_l_& set_dynamic_type() + { + set(types::dynamic_type); + return c.get(); + } + beta_offsets_s& set_semi_static() + { + set(types::semi_static); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// DMRS-UplinkConfig ::= SEQUENCE +struct dmrs_ul_cfg_s { + struct dmrs_add_position_opts { + enum options { pos0, pos1, pos3, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated dmrs_add_position_e_; + struct transform_precoding_disabled_s_ { + bool ext = false; + bool scrambling_id0_present = false; + bool scrambling_id1_present = false; + uint32_t scrambling_id0 = 0; + uint32_t scrambling_id1 = 0; + // ... + }; + struct transform_precoding_enabled_s_ { + bool ext = false; + bool npusch_id_present = false; + bool seq_group_hop_present = false; + bool seq_hop_present = false; + uint16_t npusch_id = 0; + // ... + }; + + // member variables + bool ext = false; + bool dmrs_type_present = false; + bool dmrs_add_position_present = false; + bool phase_tracking_rs_present = false; + bool max_len_present = false; + bool transform_precoding_disabled_present = false; + bool transform_precoding_enabled_present = false; + dmrs_add_position_e_ dmrs_add_position; + setup_release_c phase_tracking_rs; + transform_precoding_disabled_s_ transform_precoding_disabled; + transform_precoding_enabled_s_ transform_precoding_enabled; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PRACH-ResourceDedicatedBFR ::= CHOICE +struct prach_res_ded_bfr_c { + struct types_opts { + enum options { ssb, csi_rs, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + prach_res_ded_bfr_c() = default; + prach_res_ded_bfr_c(const prach_res_ded_bfr_c& other); + prach_res_ded_bfr_c& operator=(const prach_res_ded_bfr_c& other); + ~prach_res_ded_bfr_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 + bfr_ssb_res_s& ssb() + { + assert_choice_type("ssb", type_.to_string(), "PRACH-ResourceDedicatedBFR"); + return c.get(); + } + bfr_csirs_res_s& csi_rs() + { + assert_choice_type("csi-RS", type_.to_string(), "PRACH-ResourceDedicatedBFR"); + return c.get(); + } + const bfr_ssb_res_s& ssb() const + { + assert_choice_type("ssb", type_.to_string(), "PRACH-ResourceDedicatedBFR"); + return c.get(); + } + const bfr_csirs_res_s& csi_rs() const + { + assert_choice_type("csi-RS", type_.to_string(), "PRACH-ResourceDedicatedBFR"); + return c.get(); + } + bfr_ssb_res_s& set_ssb() + { + set(types::ssb); + return c.get(); + } + bfr_csirs_res_s& set_csi_rs() + { + set(types::csi_rs); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// PUCCH-FormatConfig ::= SEQUENCE +struct pucch_format_cfg_s { + struct nrof_slots_opts { + enum options { n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated nrof_slots_e_; + + // member variables + bool interslot_freq_hop_present = false; + bool add_dmrs_present = false; + bool max_code_rate_present = false; + bool nrof_slots_present = false; + bool pi2_bpsk_present = false; + bool simul_harq_ack_csi_present = false; + pucch_max_code_rate_e max_code_rate; + nrof_slots_e_ nrof_slots; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-PowerControl ::= SEQUENCE +struct pucch_pwr_ctrl_s { + using p0_set_l_ = dyn_array; + using pathloss_ref_rss_l_ = dyn_array; + + // member variables + bool ext = false; + bool delta_f_pucch_f0_present = false; + bool delta_f_pucch_f1_present = false; + bool delta_f_pucch_f2_present = false; + bool delta_f_pucch_f3_present = false; + bool delta_f_pucch_f4_present = false; + bool p0_set_present = false; + bool pathloss_ref_rss_present = false; + bool two_pucch_pc_adjustment_states_present = false; + int8_t delta_f_pucch_f0 = -16; + int8_t delta_f_pucch_f1 = -16; + int8_t delta_f_pucch_f2 = -16; + int8_t delta_f_pucch_f3 = -16; + int8_t delta_f_pucch_f4 = -16; + p0_set_l_ p0_set; + pathloss_ref_rss_l_ pathloss_ref_rss; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-Resource ::= SEQUENCE +struct pucch_res_s { + struct format_c_ { + struct types_opts { + enum options { format0, format1, format2, format3, format4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + format_c_() = default; + format_c_(const format_c_& other); + format_c_& operator=(const format_c_& other); + ~format_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 + pucch_format0_s& format0() + { + assert_choice_type("format0", type_.to_string(), "format"); + return c.get(); + } + pucch_format1_s& format1() + { + assert_choice_type("format1", type_.to_string(), "format"); + return c.get(); + } + pucch_format2_s& format2() + { + assert_choice_type("format2", type_.to_string(), "format"); + return c.get(); + } + pucch_format3_s& format3() + { + assert_choice_type("format3", type_.to_string(), "format"); + return c.get(); + } + pucch_format4_s& format4() + { + assert_choice_type("format4", type_.to_string(), "format"); + return c.get(); + } + const pucch_format0_s& format0() const + { + assert_choice_type("format0", type_.to_string(), "format"); + return c.get(); + } + const pucch_format1_s& format1() const + { + assert_choice_type("format1", type_.to_string(), "format"); + return c.get(); + } + const pucch_format2_s& format2() const + { + assert_choice_type("format2", type_.to_string(), "format"); + return c.get(); + } + const pucch_format3_s& format3() const + { + assert_choice_type("format3", type_.to_string(), "format"); + return c.get(); + } + const pucch_format4_s& format4() const + { + assert_choice_type("format4", type_.to_string(), "format"); + return c.get(); + } + pucch_format0_s& set_format0() + { + set(types::format0); + return c.get(); + } + pucch_format1_s& set_format1() + { + set(types::format1); + return c.get(); + } + pucch_format2_s& set_format2() + { + set(types::format2); + return c.get(); + } + pucch_format3_s& set_format3() + { + set(types::format3); + return c.get(); + } + pucch_format4_s& set_format4() + { + set(types::format4); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool intra_slot_freq_hop_present = false; + bool second_hop_prb_present = false; + uint8_t pucch_res_id = 0; + uint16_t start_prb = 0; + uint16_t second_hop_prb = 0; + format_c_ format; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ResourceSet ::= SEQUENCE +struct pucch_res_set_s { + using res_list_l_ = bounded_array; + + // member variables + bool max_payload_size_present = false; + uint8_t pucch_res_set_id = 0; + res_list_l_ res_list; + uint16_t max_payload_size = 4; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-SpatialRelationInfo ::= SEQUENCE +struct pucch_spatial_relation_info_s { + struct ref_sig_c_ { + struct srs_s_ { + uint8_t res = 0; + uint8_t ul_bwp = 0; + }; + struct types_opts { + enum options { ssb_idx, csi_rs_idx, srs, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + ref_sig_c_() = default; + ref_sig_c_(const ref_sig_c_& other); + ref_sig_c_& operator=(const ref_sig_c_& other); + ~ref_sig_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 + uint8_t& ssb_idx() + { + assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + srs_s_& srs() + { + assert_choice_type("srs", type_.to_string(), "referenceSignal"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type("ssb-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type("csi-RS-Index", type_.to_string(), "referenceSignal"); + return c.get(); + } + const srs_s_& srs() const + { + assert_choice_type("srs", type_.to_string(), "referenceSignal"); + return c.get(); + } + uint8_t& set_ssb_idx() + { + set(types::ssb_idx); + return c.get(); + } + uint8_t& set_csi_rs_idx() + { + set(types::csi_rs_idx); + return c.get(); + } + srs_s_& set_srs() + { + set(types::srs); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct closed_loop_idx_opts { + enum options { i0, i1, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated closed_loop_idx_e_; + + // member variables + bool serving_cell_id_present = false; + uint8_t pucch_spatial_relation_info_id = 1; + uint8_t serving_cell_id = 0; + ref_sig_c_ ref_sig; + uint8_t pucch_pathloss_ref_rs_id = 0; + uint8_t p0_pucch_id = 1; + closed_loop_idx_e_ closed_loop_idx; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-PowerControl ::= SEQUENCE +struct pusch_pwr_ctrl_s { + using p0_alpha_sets_l_ = dyn_array; + using pathloss_ref_rs_to_add_mod_list_l_ = dyn_array; + using pathloss_ref_rs_to_release_list_l_ = bounded_array; + using sri_pusch_map_to_add_mod_list_l_ = dyn_array; + using sri_pusch_map_to_release_list_l_ = bounded_array; + + // member variables + bool tpc_accumulation_present = false; + bool msg3_alpha_present = false; + bool p0_nominal_without_grant_present = false; + bool p0_alpha_sets_present = false; + bool pathloss_ref_rs_to_add_mod_list_present = false; + bool pathloss_ref_rs_to_release_list_present = false; + bool two_pusch_pc_adjustment_states_present = false; + bool delta_mcs_present = false; + bool sri_pusch_map_to_add_mod_list_present = false; + bool sri_pusch_map_to_release_list_present = false; + alpha_e msg3_alpha; + int16_t p0_nominal_without_grant = -202; + p0_alpha_sets_l_ p0_alpha_sets; + pathloss_ref_rs_to_add_mod_list_l_ pathloss_ref_rs_to_add_mod_list; + pathloss_ref_rs_to_release_list_l_ pathloss_ref_rs_to_release_list; + sri_pusch_map_to_add_mod_list_l_ sri_pusch_map_to_add_mod_list; + sri_pusch_map_to_release_list_l_ sri_pusch_map_to_release_list; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RA-Prioritization ::= SEQUENCE +struct ra_prioritization_s { + struct pwr_ramp_step_high_prio_opts { + enum options { db0, db2, db4, db6, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated pwr_ramp_step_high_prio_e_; + struct scaling_factor_bi_opts { + enum options { zero, dot25, dot5, dot75, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scaling_factor_bi_e_; + + // member variables + bool ext = false; + bool scaling_factor_bi_present = false; + pwr_ramp_step_high_prio_e_ pwr_ramp_step_high_prio; + scaling_factor_bi_e_ scaling_factor_bi; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRS-Resource ::= SEQUENCE +struct srs_res_s { + struct nrof_srs_ports_opts { + enum options { port1, ports2, ports4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated nrof_srs_ports_e_; + struct ptrs_port_idx_opts { + enum options { n0, n1, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated ptrs_port_idx_e_; + struct tx_comb_c_ { + struct n2_s_ { + uint8_t comb_offset_n2 = 0; + uint8_t cyclic_shift_n2 = 0; + }; + struct n4_s_ { + uint8_t comb_offset_n4 = 0; + uint8_t cyclic_shift_n4 = 0; + }; + struct types_opts { + enum options { n2, n4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + tx_comb_c_() = default; + tx_comb_c_(const tx_comb_c_& other); + tx_comb_c_& operator=(const tx_comb_c_& other); + ~tx_comb_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 + n2_s_& n2() + { + assert_choice_type("n2", type_.to_string(), "transmissionComb"); + return c.get(); + } + n4_s_& n4() + { + assert_choice_type("n4", type_.to_string(), "transmissionComb"); + return c.get(); + } + const n2_s_& n2() const + { + assert_choice_type("n2", type_.to_string(), "transmissionComb"); + return c.get(); + } + const n4_s_& n4() const + { + assert_choice_type("n4", type_.to_string(), "transmissionComb"); + return c.get(); + } + n2_s_& set_n2() + { + set(types::n2); + return c.get(); + } + n4_s_& set_n4() + { + set(types::n4); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct res_map_s_ { + struct nrof_symbols_opts { + enum options { n1, n2, n4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated nrof_symbols_e_; + struct repeat_factor_opts { + enum options { n1, n2, n4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated repeat_factor_e_; + + // member variables + uint8_t start_position = 0; + nrof_symbols_e_ nrof_symbols; + repeat_factor_e_ repeat_factor; + }; + struct freq_hop_s_ { + uint8_t c_srs = 0; + uint8_t b_srs = 0; + uint8_t b_hop = 0; + }; + struct group_or_seq_hop_opts { + enum options { neither, group_hop, seq_hop, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated group_or_seq_hop_e_; + struct res_type_c_ { + struct aperiodic_s_ { + bool ext = false; + // ... + }; + struct semi_persistent_s_ { + bool ext = false; + srs_periodicity_and_offset_c periodicity_and_offset_sp; + // ... + }; + struct periodic_s_ { + bool ext = false; + srs_periodicity_and_offset_c periodicity_and_offset_p; + // ... + }; + struct types_opts { + enum options { aperiodic, semi_persistent, periodic, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + res_type_c_() = default; + res_type_c_(const res_type_c_& other); + res_type_c_& operator=(const res_type_c_& other); + ~res_type_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 + aperiodic_s_& aperiodic() + { + assert_choice_type("aperiodic", type_.to_string(), "resourceType"); + return c.get(); + } + semi_persistent_s_& semi_persistent() + { + assert_choice_type("semi-persistent", type_.to_string(), "resourceType"); + return c.get(); + } + periodic_s_& periodic() + { + assert_choice_type("periodic", type_.to_string(), "resourceType"); + return c.get(); + } + const aperiodic_s_& aperiodic() const + { + assert_choice_type("aperiodic", type_.to_string(), "resourceType"); + return c.get(); + } + const semi_persistent_s_& semi_persistent() const + { + assert_choice_type("semi-persistent", type_.to_string(), "resourceType"); + return c.get(); + } + const periodic_s_& periodic() const + { + assert_choice_type("periodic", type_.to_string(), "resourceType"); + return c.get(); + } + aperiodic_s_& set_aperiodic() + { + set(types::aperiodic); + return c.get(); + } + semi_persistent_s_& set_semi_persistent() + { + set(types::semi_persistent); + return c.get(); + } + periodic_s_& set_periodic() + { + set(types::periodic); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + bool ptrs_port_idx_present = false; + bool spatial_relation_info_present = false; + uint8_t srs_res_id = 0; + nrof_srs_ports_e_ nrof_srs_ports; + ptrs_port_idx_e_ ptrs_port_idx; + tx_comb_c_ tx_comb; + res_map_s_ res_map; + uint8_t freq_domain_position = 0; + uint16_t freq_domain_shift = 0; + freq_hop_s_ freq_hop; + group_or_seq_hop_e_ group_or_seq_hop; + res_type_c_ res_type; + uint16_t seq_id = 0; + srs_spatial_relation_info_s spatial_relation_info; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRS-ResourceSet ::= SEQUENCE +struct srs_res_set_s { + using srs_res_id_list_l_ = bounded_array; + struct res_type_c_ { + struct aperiodic_s_ { + using aperiodic_srs_res_trigger_list_l_ = bounded_array; + + // member variables + bool ext = false; + bool csi_rs_present = false; + bool slot_offset_present = false; + uint8_t aperiodic_srs_res_trigger = 1; + uint8_t csi_rs = 0; + uint8_t slot_offset = 1; + // ... + // group 0 + copy_ptr aperiodic_srs_res_trigger_list; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + }; + struct semi_persistent_s_ { + bool ext = false; + bool associated_csi_rs_present = false; + uint8_t associated_csi_rs = 0; + // ... + }; + struct periodic_s_ { + bool ext = false; + bool associated_csi_rs_present = false; + uint8_t associated_csi_rs = 0; + // ... + }; + struct types_opts { + enum options { aperiodic, semi_persistent, periodic, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + res_type_c_() = default; + res_type_c_(const res_type_c_& other); + res_type_c_& operator=(const res_type_c_& other); + ~res_type_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 + aperiodic_s_& aperiodic() + { + assert_choice_type("aperiodic", type_.to_string(), "resourceType"); + return c.get(); + } + semi_persistent_s_& semi_persistent() + { + assert_choice_type("semi-persistent", type_.to_string(), "resourceType"); + return c.get(); + } + periodic_s_& periodic() + { + assert_choice_type("periodic", type_.to_string(), "resourceType"); + return c.get(); + } + const aperiodic_s_& aperiodic() const + { + assert_choice_type("aperiodic", type_.to_string(), "resourceType"); + return c.get(); + } + const semi_persistent_s_& semi_persistent() const + { + assert_choice_type("semi-persistent", type_.to_string(), "resourceType"); + return c.get(); + } + const periodic_s_& periodic() const + { + assert_choice_type("periodic", type_.to_string(), "resourceType"); + return c.get(); + } + aperiodic_s_& set_aperiodic() + { + set(types::aperiodic); + return c.get(); + } + semi_persistent_s_& set_semi_persistent() + { + set(types::semi_persistent); + return c.get(); + } + periodic_s_& set_periodic() + { + set(types::periodic); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct usage_opts { + enum options { beam_management, codebook, non_codebook, ant_switching, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated usage_e_; + struct pathloss_ref_rs_c_ { + struct types_opts { + enum options { ssb_idx, csi_rs_idx, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + pathloss_ref_rs_c_() = default; + pathloss_ref_rs_c_(const pathloss_ref_rs_c_& other); + pathloss_ref_rs_c_& operator=(const pathloss_ref_rs_c_& other); + ~pathloss_ref_rs_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 + uint8_t& ssb_idx() + { + assert_choice_type("ssb-Index", type_.to_string(), "pathlossReferenceRS"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type("csi-RS-Index", type_.to_string(), "pathlossReferenceRS"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type("ssb-Index", type_.to_string(), "pathlossReferenceRS"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type("csi-RS-Index", type_.to_string(), "pathlossReferenceRS"); + return c.get(); + } + uint8_t& set_ssb_idx() + { + set(types::ssb_idx); + return c.get(); + } + uint8_t& set_csi_rs_idx() + { + set(types::csi_rs_idx); + return c.get(); + } + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct srs_pwr_ctrl_adjustment_states_opts { + enum options { same_as_fci2, separate_closed_loop, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated srs_pwr_ctrl_adjustment_states_e_; + + // member variables + bool ext = false; + bool srs_res_id_list_present = false; + bool alpha_present = false; + bool p0_present = false; + bool pathloss_ref_rs_present = false; + bool srs_pwr_ctrl_adjustment_states_present = false; + uint8_t srs_res_set_id = 0; + srs_res_id_list_l_ srs_res_id_list; + res_type_c_ res_type; + usage_e_ usage; + alpha_e alpha; + int16_t p0 = -202; + pathloss_ref_rs_c_ pathloss_ref_rs; + srs_pwr_ctrl_adjustment_states_e_ srs_pwr_ctrl_adjustment_states; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingRequestResourceConfig ::= SEQUENCE +struct sched_request_res_cfg_s { + struct periodicity_and_offset_c_ { + struct types_opts { + enum options { + sym2, + sym6or7, + sl1, + sl2, + sl4, + sl5, + sl8, + sl10, + sl16, + sl20, + sl40, + sl80, + sl160, + sl320, + sl640, + nulltype + } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + periodicity_and_offset_c_() = default; + periodicity_and_offset_c_(const periodicity_and_offset_c_& other); + periodicity_and_offset_c_& operator=(const periodicity_and_offset_c_& other); + ~periodicity_and_offset_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 - meas_obj_nr_s& meas_obj_nr() + uint8_t& sl2() { - assert_choice_type("measObjectNR", type_.to_string(), "measObject"); - return c.get(); + assert_choice_type("sl2", type_.to_string(), "periodicityAndOffset"); + return c.get(); } - meas_obj_eutra_s& meas_obj_eutra() + uint8_t& sl4() { - assert_choice_type("measObjectEUTRA", type_.to_string(), "measObject"); - return c.get(); + assert_choice_type("sl4", type_.to_string(), "periodicityAndOffset"); + return c.get(); } - const meas_obj_nr_s& meas_obj_nr() const + uint8_t& sl5() { - assert_choice_type("measObjectNR", type_.to_string(), "measObject"); - return c.get(); + assert_choice_type("sl5", type_.to_string(), "periodicityAndOffset"); + return c.get(); } - const meas_obj_eutra_s& meas_obj_eutra() const + uint8_t& sl8() { - assert_choice_type("measObjectEUTRA", type_.to_string(), "measObject"); - return c.get(); + assert_choice_type("sl8", type_.to_string(), "periodicityAndOffset"); + return c.get(); } - meas_obj_nr_s& set_meas_obj_nr() + uint8_t& sl10() { - set(types::meas_obj_nr); - return c.get(); + assert_choice_type("sl10", type_.to_string(), "periodicityAndOffset"); + return c.get(); } - meas_obj_eutra_s& set_meas_obj_eutra() + uint8_t& sl16() { - set(types::meas_obj_eutra); - return c.get(); + assert_choice_type("sl16", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl20() + { + assert_choice_type("sl20", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl40() + { + assert_choice_type("sl40", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl80() + { + assert_choice_type("sl80", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl160() + { + assert_choice_type("sl160", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + uint16_t& sl320() + { + assert_choice_type("sl320", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + uint16_t& sl640() + { + assert_choice_type("sl640", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl2() const + { + assert_choice_type("sl2", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl4() const + { + assert_choice_type("sl4", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl5() const + { + assert_choice_type("sl5", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl8() const + { + assert_choice_type("sl8", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl10() const + { + assert_choice_type("sl10", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl16() const + { + assert_choice_type("sl16", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl20() const + { + assert_choice_type("sl20", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl40() const + { + assert_choice_type("sl40", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl80() const + { + assert_choice_type("sl80", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl160() const + { + assert_choice_type("sl160", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint16_t& sl320() const + { + assert_choice_type("sl320", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + const uint16_t& sl640() const + { + assert_choice_type("sl640", type_.to_string(), "periodicityAndOffset"); + return c.get(); + } + uint8_t& set_sl2() + { + set(types::sl2); + return c.get(); + } + uint8_t& set_sl4() + { + set(types::sl4); + return c.get(); + } + uint8_t& set_sl5() + { + set(types::sl5); + return c.get(); + } + uint8_t& set_sl8() + { + set(types::sl8); + return c.get(); + } + uint8_t& set_sl10() + { + set(types::sl10); + return c.get(); + } + uint8_t& set_sl16() + { + set(types::sl16); + return c.get(); + } + uint8_t& set_sl20() + { + set(types::sl20); + return c.get(); + } + uint8_t& set_sl40() + { + set(types::sl40); + return c.get(); + } + uint8_t& set_sl80() + { + set(types::sl80); + return c.get(); + } + uint8_t& set_sl160() + { + set(types::sl160); + return c.get(); + } + uint16_t& set_sl320() + { + set(types::sl320); + return c.get(); + } + uint16_t& set_sl640() + { + set(types::sl640); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; // member variables - uint8_t meas_obj_id = 1; - meas_obj_c_ meas_obj; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// OtherConfig-v1540 ::= SEQUENCE -struct other_cfg_v1540_s { - bool ext = false; - bool overheat_assist_cfg_present = false; - setup_release_c overheat_assist_cfg; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PLMN-RAN-AreaCellList ::= SEQUENCE (SIZE (1..8)) OF PLMN-RAN-AreaCell -using plmn_ran_area_cell_list_l = dyn_array; - -// PLMN-RAN-AreaConfigList ::= SEQUENCE (SIZE (1..8)) OF PLMN-RAN-AreaConfig -using plmn_ran_area_cfg_list_l = dyn_array; - -// QuantityConfigNR ::= SEQUENCE -struct quant_cfg_nr_s { - bool quant_cfg_rs_idx_present = false; - quant_cfg_rs_s quant_cfg_cell; - quant_cfg_rs_s quant_cfg_rs_idx; + bool periodicity_and_offset_present = false; + bool res_present = false; + uint8_t sched_request_res_id = 1; + uint8_t sched_request_id = 0; + periodicity_and_offset_c_ periodicity_and_offset; + uint8_t res = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -15877,123 +14972,294 @@ struct quant_cfg_nr_s { void to_json(json_writer& j) const; }; -// RAT-Type ::= ENUMERATED -struct rat_type_opts { - enum options { nr, eutra_nr, eutra, spare1, /*...*/ nulltype } value; - - std::string to_string() const; -}; -typedef enumerated rat_type_e; - -// ReportConfigToAddMod ::= SEQUENCE -struct report_cfg_to_add_mod_s { - struct report_cfg_c_ { +// UCI-OnPUSCH ::= SEQUENCE +struct uci_on_pusch_s { + struct beta_offsets_c_ { + using dynamic_l_ = std::array; struct types_opts { - enum options { report_cfg_nr, /*...*/ report_cfg_inter_rat, nulltype } value; + enum options { dynamic_type, semi_static, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - report_cfg_c_() = default; - report_cfg_c_(const report_cfg_c_& other); - report_cfg_c_& operator=(const report_cfg_c_& other); - ~report_cfg_c_() { destroy_(); } + beta_offsets_c_() = default; + beta_offsets_c_(const beta_offsets_c_& other); + beta_offsets_c_& operator=(const beta_offsets_c_& other); + ~beta_offsets_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 - report_cfg_nr_s& report_cfg_nr() + dynamic_l_& dynamic_type() { - assert_choice_type("reportConfigNR", type_.to_string(), "reportConfig"); - return c.get(); + assert_choice_type("dynamic", type_.to_string(), "betaOffsets"); + return c.get(); } - report_cfg_inter_rat_s& report_cfg_inter_rat() + beta_offsets_s& semi_static() { - assert_choice_type("reportConfigInterRAT", type_.to_string(), "reportConfig"); - return c.get(); + assert_choice_type("semiStatic", type_.to_string(), "betaOffsets"); + return c.get(); } - const report_cfg_nr_s& report_cfg_nr() const + const dynamic_l_& dynamic_type() const { - assert_choice_type("reportConfigNR", type_.to_string(), "reportConfig"); - return c.get(); + assert_choice_type("dynamic", type_.to_string(), "betaOffsets"); + return c.get(); } - const report_cfg_inter_rat_s& report_cfg_inter_rat() const + const beta_offsets_s& semi_static() const { - assert_choice_type("reportConfigInterRAT", type_.to_string(), "reportConfig"); - return c.get(); + assert_choice_type("semiStatic", type_.to_string(), "betaOffsets"); + return c.get(); } - report_cfg_nr_s& set_report_cfg_nr() + dynamic_l_& set_dynamic_type() { - set(types::report_cfg_nr); - return c.get(); + set(types::dynamic_type); + return c.get(); } - report_cfg_inter_rat_s& set_report_cfg_inter_rat() + beta_offsets_s& set_semi_static() { - set(types::report_cfg_inter_rat); - return c.get(); + set(types::semi_static); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; + struct scaling_opts { + enum options { f0p5, f0p65, f0p8, f1, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated scaling_e_; + + // member variables + bool beta_offsets_present = false; + beta_offsets_c_ beta_offsets; + scaling_e_ scaling; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BeamFailureRecoveryConfig ::= SEQUENCE +struct beam_fail_recovery_cfg_s { + using candidate_beam_rs_list_l_ = dyn_array; + struct ssb_per_rach_occasion_opts { + enum options { one_eighth, one_fourth, one_half, one, two, four, eight, sixteen, nulltype } value; + typedef float number_type; + + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated ssb_per_rach_occasion_e_; + struct beam_fail_recovery_timer_opts { + enum options { ms10, ms20, ms40, ms60, ms80, ms100, ms150, ms200, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated beam_fail_recovery_timer_e_; + + // member variables + bool ext = false; + bool root_seq_idx_bfr_present = false; + bool rach_cfg_bfr_present = false; + bool rsrp_thres_ssb_present = false; + bool candidate_beam_rs_list_present = false; + bool ssb_per_rach_occasion_present = false; + bool ra_ssb_occasion_mask_idx_present = false; + bool recovery_search_space_id_present = false; + bool ra_prioritization_present = false; + bool beam_fail_recovery_timer_present = false; + uint8_t root_seq_idx_bfr = 0; + rach_cfg_generic_s rach_cfg_bfr; + uint8_t rsrp_thres_ssb = 0; + candidate_beam_rs_list_l_ candidate_beam_rs_list; + ssb_per_rach_occasion_e_ ssb_per_rach_occasion; + uint8_t ra_ssb_occasion_mask_idx = 0; + uint8_t recovery_search_space_id = 0; + ra_prioritization_s ra_prioritization; + beam_fail_recovery_timer_e_ beam_fail_recovery_timer; + // ... + // group 0 + bool msg1_subcarrier_spacing_present = false; + subcarrier_spacing_e msg1_subcarrier_spacing; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ConfiguredGrantConfig ::= SEQUENCE +struct cfgured_grant_cfg_s { + struct freq_hop_opts { + enum options { intra_slot, inter_slot, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated freq_hop_e_; + struct mcs_table_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated mcs_table_e_; + struct mcs_table_transform_precoder_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated mcs_table_transform_precoder_e_; + struct res_alloc_opts { + enum options { res_alloc_type0, res_alloc_type1, dynamic_switch, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated res_alloc_e_; + struct pwr_ctrl_loop_to_use_opts { + enum options { n0, n1, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated pwr_ctrl_loop_to_use_e_; + struct transform_precoder_opts { + enum options { enabled, disabled, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated transform_precoder_e_; + struct rep_k_opts { + enum options { n1, n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated rep_k_e_; + struct rep_k_rv_opts { + enum options { s1_minus0231, s2_minus0303, s3_minus0000, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated rep_k_rv_e_; + struct periodicity_opts { + enum 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, + sym6, + sym1x12, + sym2x12, + sym4x12, + sym5x12, + sym8x12, + sym10x12, + sym16x12, + sym20x12, + sym32x12, + sym40x12, + sym64x12, + sym80x12, + sym128x12, + sym160x12, + sym256x12, + sym320x12, + sym512x12, + sym640x12, + sym1280x12, + sym2560x12, + nulltype + } value; + + std::string to_string() const; + }; + typedef enumerated periodicity_e_; + struct rrc_cfgured_ul_grant_s_ { + bool ext = false; + bool dmrs_seq_initization_present = false; + bool srs_res_ind_present = false; + bool freq_hop_offset_present = false; + uint16_t time_domain_offset = 0; + uint8_t time_domain_alloc = 0; + fixed_bitstring<18> freq_domain_alloc; + uint8_t ant_port = 0; + uint8_t dmrs_seq_initization = 0; + uint8_t precoding_and_nof_layers = 0; + uint8_t srs_res_ind = 0; + uint8_t mcs_and_tbs = 0; + uint16_t freq_hop_offset = 1; + uint8_t pathloss_ref_idx = 0; + // ... + }; // member variables - uint8_t report_cfg_id = 1; - report_cfg_c_ report_cfg; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CarrierInfoNR ::= SEQUENCE -struct carrier_info_nr_s { - bool ext = false; - bool smtc_present = false; - uint32_t carrier_freq = 0; - subcarrier_spacing_e ssb_subcarrier_spacing; - ssb_mtc_s smtc; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// DRB-CountMSB-Info ::= SEQUENCE -struct drb_count_msb_info_s { - uint8_t drb_id = 1; - uint32_t count_msb_ul = 0; - uint32_t count_msb_dl = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FreqPriorityListEUTRA ::= SEQUENCE (SIZE (1..8)) OF FreqPriorityEUTRA -using freq_prio_list_eutra_l = dyn_array; - -// FreqPriorityListNR ::= SEQUENCE (SIZE (1..8)) OF FreqPriorityNR -using freq_prio_list_nr_l = dyn_array; - -// MasterKeyUpdate ::= SEQUENCE -struct master_key_upd_s { - bool ext = false; - bool nas_container_present = false; - bool key_set_change_ind = false; - uint8_t next_hop_chaining_count = 0; - dyn_octstring nas_container; + bool ext = false; + bool freq_hop_present = false; + bool mcs_table_present = false; + bool mcs_table_transform_precoder_present = false; + bool uci_on_pusch_present = false; + bool rbg_size_present = false; + bool transform_precoder_present = false; + bool rep_k_rv_present = false; + bool cfgured_grant_timer_present = false; + bool rrc_cfgured_ul_grant_present = false; + freq_hop_e_ freq_hop; + dmrs_ul_cfg_s cg_dmrs_cfg; + mcs_table_e_ mcs_table; + mcs_table_transform_precoder_e_ mcs_table_transform_precoder; + setup_release_c uci_on_pusch; + res_alloc_e_ res_alloc; + pwr_ctrl_loop_to_use_e_ pwr_ctrl_loop_to_use; + uint8_t p0_pusch_alpha = 0; + transform_precoder_e_ transform_precoder; + uint8_t nrof_harq_processes = 1; + rep_k_e_ rep_k; + rep_k_rv_e_ rep_k_rv; + periodicity_e_ periodicity; + uint8_t cfgured_grant_timer = 1; + rrc_cfgured_ul_grant_s_ rrc_cfgured_ul_grant; // ... // sequence methods @@ -16002,31 +15268,52 @@ struct master_key_upd_s { void to_json(json_writer& j) const; }; -// MeasGapConfig ::= SEQUENCE -struct meas_gap_cfg_s { - bool ext = false; - bool gap_fr2_present = false; - setup_release_c gap_fr2; - // ... - // group 0 - copy_ptr > gap_fr1; - copy_ptr > gap_ue; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// PUCCH-Config ::= SEQUENCE +struct pucch_cfg_s { + using res_set_to_add_mod_list_l_ = dyn_array; + using res_set_to_release_list_l_ = bounded_array; + using res_to_add_mod_list_l_ = dyn_array; + using res_to_release_list_l_ = dyn_array; + using sched_request_res_to_add_mod_list_l_ = dyn_array; + using sched_request_res_to_release_list_l_ = bounded_array; + using multi_csi_pucch_res_list_l_ = bounded_array; + using dl_data_to_ul_ack_l_ = bounded_array; + using spatial_relation_info_to_add_mod_list_l_ = dyn_array; + using spatial_relation_info_to_release_list_l_ = bounded_array; -// MeasGapSharingConfig ::= SEQUENCE -struct meas_gap_sharing_cfg_s { - bool ext = false; - bool gap_sharing_fr2_present = false; - setup_release_c gap_sharing_fr2; + // member variables + bool ext = false; + bool res_set_to_add_mod_list_present = false; + bool res_set_to_release_list_present = false; + bool res_to_add_mod_list_present = false; + bool res_to_release_list_present = false; + bool format1_present = false; + bool format2_present = false; + bool format3_present = false; + bool format4_present = false; + bool sched_request_res_to_add_mod_list_present = false; + bool sched_request_res_to_release_list_present = false; + bool multi_csi_pucch_res_list_present = false; + bool dl_data_to_ul_ack_present = false; + bool spatial_relation_info_to_add_mod_list_present = false; + bool spatial_relation_info_to_release_list_present = false; + bool pucch_pwr_ctrl_present = false; + res_set_to_add_mod_list_l_ res_set_to_add_mod_list; + res_set_to_release_list_l_ res_set_to_release_list; + res_to_add_mod_list_l_ res_to_add_mod_list; + res_to_release_list_l_ res_to_release_list; + setup_release_c format1; + setup_release_c format2; + setup_release_c format3; + setup_release_c format4; + sched_request_res_to_add_mod_list_l_ sched_request_res_to_add_mod_list; + sched_request_res_to_release_list_l_ sched_request_res_to_release_list; + multi_csi_pucch_res_list_l_ multi_csi_pucch_res_list; + dl_data_to_ul_ack_l_ dl_data_to_ul_ack; + spatial_relation_info_to_add_mod_list_l_ spatial_relation_info_to_add_mod_list; + spatial_relation_info_to_release_list_l_ spatial_relation_info_to_release_list; + pucch_pwr_ctrl_s pucch_pwr_ctrl; // ... - // group 0 - copy_ptr > gap_sharing_fr1; - copy_ptr > gap_sharing_ue; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16034,74 +15321,102 @@ struct meas_gap_sharing_cfg_s { void to_json(json_writer& j) const; }; -// MeasIdToAddModList ::= SEQUENCE (SIZE (1..64)) OF MeasIdToAddMod -using meas_id_to_add_mod_list_l = dyn_array; - -// MeasIdToRemoveList ::= SEQUENCE (SIZE (1..64)) OF INTEGER (1..64) -using meas_id_to_rem_list_l = dyn_array; - -// MeasObjectToAddModList ::= SEQUENCE (SIZE (1..64)) OF MeasObjectToAddMod -using meas_obj_to_add_mod_list_l = dyn_array; +// PUSCH-Config ::= SEQUENCE +struct pusch_cfg_s { + struct tx_cfg_opts { + enum options { codebook, non_codebook, nulltype } value; -// MeasObjectToRemoveList ::= SEQUENCE (SIZE (1..64)) OF INTEGER (1..64) -using meas_obj_to_rem_list_l = dyn_array; + std::string to_string() const; + }; + typedef enumerated tx_cfg_e_; + struct freq_hop_opts { + enum options { intra_slot, inter_slot, nulltype } value; -// OtherConfig ::= SEQUENCE -struct other_cfg_s { - struct delay_budget_report_cfg_c_ { - struct setup_s_ { - struct delay_budget_report_prohibit_timer_opts { - enum options { s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30, nulltype } value; - typedef float number_type; + std::string to_string() const; + }; + typedef enumerated freq_hop_e_; + using freq_hop_offset_lists_l_ = bounded_array; + struct res_alloc_opts { + enum options { res_alloc_type0, res_alloc_type1, dynamic_switch, nulltype } value; + typedef uint8_t number_type; - std::string to_string() const; - float to_number() const; - std::string to_number_string() const; - }; - typedef enumerated delay_budget_report_prohibit_timer_e_; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated res_alloc_e_; + struct pusch_aggregation_factor_opts { + enum options { n2, n4, n8, nulltype } value; + typedef uint8_t number_type; - // member variables - delay_budget_report_prohibit_timer_e_ delay_budget_report_prohibit_timer; - }; - struct types_opts { - enum options { release, setup, nulltype } value; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated pusch_aggregation_factor_e_; + struct mcs_table_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; - std::string to_string() const; - }; - typedef enumerated types; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated mcs_table_e_; + struct mcs_table_transform_precoder_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; - // choice methods - delay_budget_report_cfg_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; - // getters - setup_s_& setup() - { - assert_choice_type("setup", type_.to_string(), "delayBudgetReportingConfig"); - return c; - } - const setup_s_& setup() const - { - assert_choice_type("setup", type_.to_string(), "delayBudgetReportingConfig"); - return c; - } - setup_s_& set_setup() - { - set(types::setup); - return c; - } + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated mcs_table_transform_precoder_e_; + struct transform_precoder_opts { + enum options { enabled, disabled, nulltype } value; - private: - types type_; - setup_s_ c; + std::string to_string() const; + }; + typedef enumerated transform_precoder_e_; + struct codebook_subset_opts { + enum options { fully_and_partial_and_non_coherent, partial_and_non_coherent, non_coherent, nulltype } value; + + std::string to_string() const; }; + typedef enumerated codebook_subset_e_; // member variables - bool delay_budget_report_cfg_present = false; - delay_budget_report_cfg_c_ delay_budget_report_cfg; + bool ext = false; + bool data_scrambling_id_pusch_present = false; + bool tx_cfg_present = false; + bool dmrs_ul_for_pusch_map_type_a_present = false; + bool dmrs_ul_for_pusch_map_type_b_present = false; + bool pusch_pwr_ctrl_present = false; + bool freq_hop_present = false; + bool freq_hop_offset_lists_present = false; + bool pusch_time_domain_alloc_list_present = false; + bool pusch_aggregation_factor_present = false; + bool mcs_table_present = false; + bool mcs_table_transform_precoder_present = false; + bool transform_precoder_present = false; + bool codebook_subset_present = false; + bool max_rank_present = false; + bool rbg_size_present = false; + bool uci_on_pusch_present = false; + bool tp_pi2_bpsk_present = false; + uint16_t data_scrambling_id_pusch = 0; + tx_cfg_e_ tx_cfg; + setup_release_c dmrs_ul_for_pusch_map_type_a; + setup_release_c dmrs_ul_for_pusch_map_type_b; + pusch_pwr_ctrl_s pusch_pwr_ctrl; + freq_hop_e_ freq_hop; + freq_hop_offset_lists_l_ freq_hop_offset_lists; + res_alloc_e_ res_alloc; + setup_release_c > pusch_time_domain_alloc_list; + pusch_aggregation_factor_e_ pusch_aggregation_factor; + mcs_table_e_ mcs_table; + mcs_table_transform_precoder_e_ mcs_table_transform_precoder; + transform_precoder_e_ transform_precoder; + codebook_subset_e_ codebook_subset; + uint8_t max_rank = 1; + setup_release_c uci_on_pusch; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16109,27 +15424,62 @@ struct other_cfg_s { void to_json(json_writer& j) const; }; -// PeriodicRNAU-TimerValue ::= ENUMERATED -struct periodic_rnau_timer_value_opts { - enum options { min5, min10, min20, min30, min60, min120, min360, min720, nulltype } value; - typedef uint16_t number_type; +// SRS-Config ::= SEQUENCE +struct srs_cfg_s { + using srs_res_set_to_release_list_l_ = bounded_array; + using srs_res_set_to_add_mod_list_l_ = dyn_array; + using srs_res_to_release_list_l_ = dyn_array; + using srs_res_to_add_mod_list_l_ = dyn_array; - std::string to_string() const; - uint16_t to_number() const; + // member variables + bool ext = false; + bool srs_res_set_to_release_list_present = false; + bool srs_res_set_to_add_mod_list_present = false; + bool srs_res_to_release_list_present = false; + bool srs_res_to_add_mod_list_present = false; + bool tpc_accumulation_present = false; + srs_res_set_to_release_list_l_ srs_res_set_to_release_list; + srs_res_set_to_add_mod_list_l_ srs_res_set_to_add_mod_list; + srs_res_to_release_list_l_ srs_res_to_release_list; + srs_res_to_add_mod_list_l_ srs_res_to_add_mod_list; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated periodic_rnau_timer_value_e; -// QuantityConfig ::= SEQUENCE -struct quant_cfg_s { - using quant_cfg_nr_list_l_ = dyn_array; +// BWP-UplinkDedicated ::= SEQUENCE +struct bwp_ul_ded_s { + bool ext = false; + bool pucch_cfg_present = false; + bool pusch_cfg_present = false; + bool cfgured_grant_cfg_present = false; + bool srs_cfg_present = false; + bool beam_fail_recovery_cfg_present = false; + setup_release_c pucch_cfg; + setup_release_c pusch_cfg; + setup_release_c cfgured_grant_cfg; + setup_release_c srs_cfg; + setup_release_c beam_fail_recovery_cfg; + // ... - // member variables - bool ext = false; - bool quant_cfg_nr_list_present = false; - quant_cfg_nr_list_l_ quant_cfg_nr_list; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BWP-Uplink ::= SEQUENCE +struct bwp_ul_s { + bool ext = false; + bool bwp_common_present = false; + bool bwp_ded_present = false; + uint8_t bwp_id = 0; + bwp_ul_common_s bwp_common; + bwp_ul_ded_s bwp_ded; // ... - // group 0 - copy_ptr quant_cfg_eutra; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16137,69 +15487,183 @@ struct quant_cfg_s { void to_json(json_writer& j) const; }; -// RAN-NotificationAreaInfo ::= CHOICE -struct ran_notif_area_info_c { +// CA-BandwidthClassEUTRA ::= ENUMERATED +struct ca_bw_class_eutra_opts { + enum options { a, b, c, d, e, f, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated ca_bw_class_eutra_e; + +// CA-BandwidthClassNR ::= ENUMERATED +struct ca_bw_class_nr_opts { + enum options { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated ca_bw_class_nr_e; + +// BandParameters ::= CHOICE +struct band_params_c { + struct eutra_s_ { + bool ca_bw_class_dl_eutra_present = false; + bool ca_bw_class_ul_eutra_present = false; + uint16_t band_eutra = 1; + ca_bw_class_eutra_e ca_bw_class_dl_eutra; + ca_bw_class_eutra_e ca_bw_class_ul_eutra; + }; + struct nr_s_ { + bool ca_bw_class_dl_nr_present = false; + bool ca_bw_class_ul_nr_present = false; + uint16_t band_nr = 1; + ca_bw_class_nr_e ca_bw_class_dl_nr; + ca_bw_class_nr_e ca_bw_class_ul_nr; + }; struct types_opts { - enum options { cell_list, ran_area_cfg_list, /*...*/ nulltype } value; + enum options { eutra, nr, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - ran_notif_area_info_c() = default; - ran_notif_area_info_c(const ran_notif_area_info_c& other); - ran_notif_area_info_c& operator=(const ran_notif_area_info_c& other); - ~ran_notif_area_info_c() { destroy_(); } + band_params_c() = default; + band_params_c(const band_params_c& other); + band_params_c& operator=(const band_params_c& other); + ~band_params_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 - plmn_ran_area_cell_list_l& cell_list() + eutra_s_& eutra() { - assert_choice_type("cellList", type_.to_string(), "RAN-NotificationAreaInfo"); - return c.get(); + assert_choice_type("eutra", type_.to_string(), "BandParameters"); + return c.get(); } - plmn_ran_area_cfg_list_l& ran_area_cfg_list() + nr_s_& nr() { - assert_choice_type("ran-AreaConfigList", type_.to_string(), "RAN-NotificationAreaInfo"); - return c.get(); + assert_choice_type("nr", type_.to_string(), "BandParameters"); + return c.get(); } - const plmn_ran_area_cell_list_l& cell_list() const + const eutra_s_& eutra() const { - assert_choice_type("cellList", type_.to_string(), "RAN-NotificationAreaInfo"); - return c.get(); + assert_choice_type("eutra", type_.to_string(), "BandParameters"); + return c.get(); } - const plmn_ran_area_cfg_list_l& ran_area_cfg_list() const + const nr_s_& nr() const { - assert_choice_type("ran-AreaConfigList", type_.to_string(), "RAN-NotificationAreaInfo"); - return c.get(); + assert_choice_type("nr", type_.to_string(), "BandParameters"); + return c.get(); } - plmn_ran_area_cell_list_l& set_cell_list() + eutra_s_& set_eutra() { - set(types::cell_list); - return c.get(); + set(types::eutra); + return c.get(); } - plmn_ran_area_cfg_list_l& set_ran_area_cfg_list() + nr_s_& set_nr() { - set(types::ran_area_cfg_list); - return c.get(); + set(types::nr); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; -// RRCReconfiguration-v1540-IEs ::= SEQUENCE -struct rrc_recfg_v1540_ies_s { - bool other_cfg_v1540_present = false; - bool non_crit_ext_present = false; - other_cfg_v1540_s other_cfg_v1540; +// CA-ParametersEUTRA ::= SEQUENCE +struct ca_params_eutra_s { + bool ext = false; + bool multiple_timing_advance_present = false; + bool simul_rx_tx_present = false; + bool supported_naics_minus2_crs_ap_present = false; + bool add_rx_tx_performance_req_present = false; + bool ue_ca_pwr_class_n_present = false; + bool supported_bw_combination_set_eutra_v1530_present = false; + bounded_bitstring<1, 8> supported_naics_minus2_crs_ap; + bounded_bitstring<1, 32> supported_bw_combination_set_eutra_v1530; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CA-ParametersNR ::= SEQUENCE +struct ca_params_nr_s { + struct supported_num_tag_opts { + enum options { n2, n3, n4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated supported_num_tag_e_; + + // member variables + bool ext = false; + bool dummy_present = false; + bool parallel_tx_srs_pucch_pusch_present = false; + bool parallel_tx_prach_srs_pucch_pusch_present = false; + bool simul_rx_tx_inter_band_ca_present = false; + bool simul_rx_tx_sul_present = false; + bool diff_numerology_across_pucch_group_present = false; + bool diff_numerology_within_pucch_group_smaller_scs_present = false; + bool supported_num_tag_present = false; + supported_num_tag_e_ supported_num_tag; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MRDC-Parameters ::= SEQUENCE +struct mrdc_params_s { + struct ul_sharing_eutra_nr_opts { + enum options { tdm, fdm, both, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated ul_sharing_eutra_nr_e_; + struct ul_switching_time_eutra_nr_opts { + enum options { type1, type2, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated ul_switching_time_eutra_nr_e_; + struct intra_band_endc_support_opts { + enum options { non_contiguous, both, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated intra_band_endc_support_e_; + + // member variables + bool ext = false; + bool single_ul_tx_present = false; + bool dynamic_pwr_sharing_endc_present = false; + bool tdm_pattern_present = false; + bool ul_sharing_eutra_nr_present = false; + bool ul_switching_time_eutra_nr_present = false; + bool simul_rx_tx_inter_band_endc_present = false; + bool async_intra_band_endc_present = false; + ul_sharing_eutra_nr_e_ ul_sharing_eutra_nr; + ul_switching_time_eutra_nr_e_ ul_switching_time_eutra_nr; + // ... + // group 0 + bool dual_pa_architecture_present = false; + bool intra_band_endc_support_present = false; + bool ul_timing_align_eutra_nr_present = false; + intra_band_endc_support_e_ intra_band_endc_support; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16207,21 +15671,22 @@ struct rrc_recfg_v1540_ies_s { void to_json(json_writer& j) const; }; -// RedirectedCarrierInfo-EUTRA ::= SEQUENCE -struct redirected_carrier_info_eutra_s { - struct cn_type_opts { - enum options { epc, five_gc, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated cn_type_e_; +// BandCombination ::= SEQUENCE +struct band_combination_s { + using band_list_l_ = dyn_array; // member variables - bool cn_type_present = false; - uint32_t eutra_freq = 0; - cn_type_e_ cn_type; + bool ca_params_eutra_present = false; + bool ca_params_nr_present = false; + bool mrdc_params_present = false; + bool supported_bw_combination_set_present = false; + bool pwr_class_v1530_present = false; + band_list_l_ band_list; + uint16_t feature_set_combination = 0; + ca_params_eutra_s ca_params_eutra; + ca_params_nr_s ca_params_nr; + mrdc_params_s mrdc_params; + bounded_bitstring<1, 32> supported_bw_combination_set; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16229,19 +15694,66 @@ struct redirected_carrier_info_eutra_s { void to_json(json_writer& j) const; }; -// ReportConfigToAddModList ::= SEQUENCE (SIZE (1..64)) OF ReportConfigToAddMod -using report_cfg_to_add_mod_list_l = dyn_array; +// SRS-SwitchingTimeEUTRA ::= SEQUENCE +struct srs_switching_time_eutra_s { + struct switching_time_dl_opts { + enum options { + n0, + n0dot5, + n1, + n1dot5, + n2, + n2dot5, + n3, + n3dot5, + n4, + n4dot5, + n5, + n5dot5, + n6, + n6dot5, + n7, + nulltype + } value; + typedef float number_type; -// ReportConfigToRemoveList ::= SEQUENCE (SIZE (1..64)) OF INTEGER (1..64) -using report_cfg_to_rem_list_l = dyn_array; + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated switching_time_dl_e_; + struct switching_time_ul_opts { + enum options { + n0, + n0dot5, + n1, + n1dot5, + n2, + n2dot5, + n3, + n3dot5, + n4, + n4dot5, + n5, + n5dot5, + n6, + n6dot5, + n7, + nulltype + } value; + typedef float number_type; -// UE-CapabilityRAT-Request ::= SEQUENCE -struct ue_cap_rat_request_s { - bool ext = false; - bool cap_request_filt_present = false; - rat_type_e rat_type; - dyn_octstring cap_request_filt; - // ... + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated switching_time_ul_e_; + + // member variables + bool switching_time_dl_present = false; + bool switching_time_ul_present = false; + switching_time_dl_e_ switching_time_dl; + switching_time_ul_e_ switching_time_ul; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16249,26 +15761,30 @@ struct ue_cap_rat_request_s { void to_json(json_writer& j) const; }; -// CellReselectionPriorities ::= SEQUENCE -struct cell_resel_priorities_s { - struct t320_opts { - enum options { min5, min10, min20, min30, min60, min120, min180, spare1, nulltype } value; - typedef uint8_t number_type; +// SRS-SwitchingTimeNR ::= SEQUENCE +struct srs_switching_time_nr_s { + struct switching_time_dl_opts { + enum options { n0us, n30us, n100us, n140us, n200us, n300us, n500us, n900us, nulltype } value; + typedef uint16_t number_type; std::string to_string() const; - uint8_t to_number() const; + uint16_t to_number() const; }; - typedef enumerated t320_e_; + typedef enumerated switching_time_dl_e_; + struct switching_time_ul_opts { + enum options { n0us, n30us, n100us, n140us, n200us, n300us, n500us, n900us, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated switching_time_ul_e_; // member variables - bool ext = false; - bool freq_prio_list_eutra_present = false; - bool freq_prio_list_nr_present = false; - bool t320_present = false; - freq_prio_list_eutra_l freq_prio_list_eutra; - freq_prio_list_nr_l freq_prio_list_nr; - t320_e_ t320; - // ... + bool switching_time_dl_present = false; + bool switching_time_ul_present = false; + switching_time_dl_e_ switching_time_dl; + switching_time_ul_e_ switching_time_ul; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16276,91 +15792,136 @@ struct cell_resel_priorities_s { void to_json(json_writer& j) const; }; -// DRB-CountMSB-InfoList ::= SEQUENCE (SIZE (1..29)) OF DRB-CountMSB-Info -using drb_count_msb_info_list_l = dyn_array; +// BandParameters-v1540 ::= SEQUENCE +struct band_params_v1540_s { + struct srs_carrier_switch_c_ { + struct nr_s_ { + using srs_switching_times_list_nr_l_ = dyn_array; -// MeasConfig ::= SEQUENCE -struct meas_cfg_s { - struct s_measure_cfg_c_ { + // member variables + srs_switching_times_list_nr_l_ srs_switching_times_list_nr; + }; + struct eutra_s_ { + using srs_switching_times_list_eutra_l_ = dyn_array; + + // member variables + srs_switching_times_list_eutra_l_ srs_switching_times_list_eutra; + }; struct types_opts { - enum options { ssb_rsrp, csi_rsrp, nulltype } value; + enum options { nr, eutra, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - s_measure_cfg_c_() = default; - s_measure_cfg_c_(const s_measure_cfg_c_& other); - s_measure_cfg_c_& operator=(const s_measure_cfg_c_& other); - ~s_measure_cfg_c_() { destroy_(); } + srs_carrier_switch_c_() = default; + srs_carrier_switch_c_(const srs_carrier_switch_c_& other); + srs_carrier_switch_c_& operator=(const srs_carrier_switch_c_& other); + ~srs_carrier_switch_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 - uint8_t& ssb_rsrp() + nr_s_& nr() { - assert_choice_type("ssb-RSRP", type_.to_string(), "s-MeasureConfig"); - return c.get(); + assert_choice_type("nr", type_.to_string(), "srs-CarrierSwitch"); + return c.get(); } - uint8_t& csi_rsrp() + eutra_s_& eutra() { - assert_choice_type("csi-RSRP", type_.to_string(), "s-MeasureConfig"); - return c.get(); + assert_choice_type("eutra", type_.to_string(), "srs-CarrierSwitch"); + return c.get(); } - const uint8_t& ssb_rsrp() const + const nr_s_& nr() const { - assert_choice_type("ssb-RSRP", type_.to_string(), "s-MeasureConfig"); - return c.get(); + assert_choice_type("nr", type_.to_string(), "srs-CarrierSwitch"); + return c.get(); } - const uint8_t& csi_rsrp() const + const eutra_s_& eutra() const { - assert_choice_type("csi-RSRP", type_.to_string(), "s-MeasureConfig"); - return c.get(); + assert_choice_type("eutra", type_.to_string(), "srs-CarrierSwitch"); + return c.get(); } - uint8_t& set_ssb_rsrp() + nr_s_& set_nr() { - set(types::ssb_rsrp); - return c.get(); + set(types::nr); + return c.get(); } - uint8_t& set_csi_rsrp() + eutra_s_& set_eutra() { - set(types::csi_rsrp); - return c.get(); + set(types::eutra); + return c.get(); } private: - types type_; - pod_choice_buffer_t c; + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct srs_tx_switch_s_ { + struct supported_srs_tx_port_switch_opts { + enum options { t1r2, t1r4, t2r4, t1r4_t2r4, t1r1, t2r2, t4r4, not_supported, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated supported_srs_tx_port_switch_e_; + + // member variables + bool tx_switch_impact_to_rx_present = false; + bool tx_switch_with_another_band_present = false; + supported_srs_tx_port_switch_e_ supported_srs_tx_port_switch; + uint8_t tx_switch_impact_to_rx = 1; + uint8_t tx_switch_with_another_band = 1; + }; + + // member variables + bool srs_carrier_switch_present = false; + bool srs_tx_switch_present = false; + srs_carrier_switch_c_ srs_carrier_switch; + srs_tx_switch_s_ srs_tx_switch; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CA-ParametersNR-v1540 ::= SEQUENCE +struct ca_params_nr_v1540_s { + struct csi_rs_im_reception_for_feedback_per_band_comb_s_ { + bool max_num_simul_nzp_csi_rs_act_bwp_all_cc_present = false; + bool total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present = false; + uint8_t max_num_simul_nzp_csi_rs_act_bwp_all_cc = 1; + uint16_t total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc = 2; + }; + + // member variables + bool simul_srs_assoc_csi_rs_all_cc_present = false; + bool csi_rs_im_reception_for_feedback_per_band_comb_present = false; + bool simul_csi_reports_all_cc_present = false; + bool dual_pa_architecture_present = false; + uint8_t simul_srs_assoc_csi_rs_all_cc = 5; + csi_rs_im_reception_for_feedback_per_band_comb_s_ csi_rs_im_reception_for_feedback_per_band_comb; + uint8_t simul_csi_reports_all_cc = 5; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - void destroy_(); - }; +// BandCombination-v1540 ::= SEQUENCE +struct band_combination_v1540_s { + using band_list_v1540_l_ = dyn_array; // member variables - bool ext = false; - bool meas_obj_to_rem_list_present = false; - bool meas_obj_to_add_mod_list_present = false; - bool report_cfg_to_rem_list_present = false; - bool report_cfg_to_add_mod_list_present = false; - bool meas_id_to_rem_list_present = false; - bool meas_id_to_add_mod_list_present = false; - bool s_measure_cfg_present = false; - bool quant_cfg_present = false; - bool meas_gap_cfg_present = false; - bool meas_gap_sharing_cfg_present = false; - meas_obj_to_rem_list_l meas_obj_to_rem_list; - meas_obj_to_add_mod_list_l meas_obj_to_add_mod_list; - report_cfg_to_rem_list_l report_cfg_to_rem_list; - report_cfg_to_add_mod_list_l report_cfg_to_add_mod_list; - meas_id_to_rem_list_l meas_id_to_rem_list; - meas_id_to_add_mod_list_l meas_id_to_add_mod_list; - s_measure_cfg_c_ s_measure_cfg; - quant_cfg_s quant_cfg; - meas_gap_cfg_s meas_gap_cfg; - meas_gap_sharing_cfg_s meas_gap_sharing_cfg; - // ... + bool ca_params_nr_v1540_present = false; + band_list_v1540_l_ band_list_v1540; + ca_params_nr_v1540_s ca_params_nr_v1540; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16368,26 +15929,19 @@ struct meas_cfg_s { void to_json(json_writer& j) const; }; -// RRCReconfiguration-v1530-IEs ::= SEQUENCE -struct rrc_recfg_v1530_ies_s { - using ded_nas_msg_list_l_ = bounded_array; +// CA-ParametersNR-v1550 ::= SEQUENCE +struct ca_params_nr_v1550_s { + bool dummy_present = false; - // member variables - bool master_cell_group_present = false; - bool full_cfg_present = false; - bool ded_nas_msg_list_present = false; - bool master_key_upd_present = false; - bool ded_sib1_delivery_present = false; - bool ded_sys_info_delivery_present = false; - bool other_cfg_present = false; - bool non_crit_ext_present = false; - dyn_octstring master_cell_group; - ded_nas_msg_list_l_ ded_nas_msg_list; - master_key_upd_s master_key_upd; - dyn_octstring ded_sib1_delivery; - dyn_octstring ded_sys_info_delivery; - other_cfg_s other_cfg; - rrc_recfg_v1540_ies_s non_crit_ext; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombination-v1550 ::= SEQUENCE +struct band_combination_v1550_s { + ca_params_nr_v1550_s ca_params_nr_v1550; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16395,11 +15949,9 @@ struct rrc_recfg_v1530_ies_s { void to_json(json_writer& j) const; }; -// RRCRelease-v1540-IEs ::= SEQUENCE -struct rrc_release_v1540_ies_s { - bool wait_time_present = false; - bool non_crit_ext_present = false; - uint8_t wait_time = 1; +// CA-ParametersNR-v1560 ::= SEQUENCE +struct ca_params_nr_v1560_s { + bool diff_numerology_within_pucch_group_larger_scs_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16407,69 +15959,56 @@ struct rrc_release_v1540_ies_s { void to_json(json_writer& j) const; }; -// RedirectedCarrierInfo ::= CHOICE -struct redirected_carrier_info_c { - struct types_opts { - enum options { nr, eutra, /*...*/ nulltype } value; +// CA-ParametersEUTRA-v1560 ::= SEQUENCE +struct ca_params_eutra_v1560_s { + bool fd_mimo_total_weighted_layers_present = false; + uint8_t fd_mimo_total_weighted_layers = 2; - std::string to_string() const; - }; - typedef enumerated types; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // choice methods - redirected_carrier_info_c() = default; - redirected_carrier_info_c(const redirected_carrier_info_c& other); - redirected_carrier_info_c& operator=(const redirected_carrier_info_c& other); - ~redirected_carrier_info_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } +// CA-ParametersNRDC ::= SEQUENCE +struct ca_params_nrdc_s { + bool ca_params_nr_for_dc_present = false; + bool ca_params_nr_for_dc_v1540_present = false; + bool ca_params_nr_for_dc_v1550_present = false; + bool ca_params_nr_for_dc_v1560_present = false; + bool feature_set_combination_dc_present = false; + ca_params_nr_s ca_params_nr_for_dc; + ca_params_nr_v1540_s ca_params_nr_for_dc_v1540; + ca_params_nr_v1550_s ca_params_nr_for_dc_v1550; + ca_params_nr_v1560_s ca_params_nr_for_dc_v1560; + uint16_t feature_set_combination_dc = 0; + + // sequence methods SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; - // getters - carrier_info_nr_s& nr() - { - assert_choice_type("nr", type_.to_string(), "RedirectedCarrierInfo"); - return c.get(); - } - redirected_carrier_info_eutra_s& eutra() - { - assert_choice_type("eutra", type_.to_string(), "RedirectedCarrierInfo"); - return c.get(); - } - const carrier_info_nr_s& nr() const - { - assert_choice_type("nr", type_.to_string(), "RedirectedCarrierInfo"); - return c.get(); - } - const redirected_carrier_info_eutra_s& eutra() const - { - assert_choice_type("eutra", type_.to_string(), "RedirectedCarrierInfo"); - return c.get(); - } - carrier_info_nr_s& set_nr() - { - set(types::nr); - return c.get(); - } - redirected_carrier_info_eutra_s& set_eutra() - { - set(types::eutra); - return c.get(); - } +}; -private: - types type_; - choice_buffer_t c; +// BandCombination-v1560 ::= SEQUENCE +struct band_combination_v1560_s { + bool ne_dc_bc_present = false; + bool ca_params_nrdc_present = false; + bool ca_params_eutra_v1560_present = false; + bool ca_params_nr_v1560_present = false; + ca_params_nrdc_s ca_params_nrdc; + ca_params_eutra_v1560_s ca_params_eutra_v1560; + ca_params_nr_v1560_s ca_params_nr_v1560; - void destroy_(); + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -// SecurityConfigSMC ::= SEQUENCE -struct security_cfg_smc_s { - bool ext = false; - security_algorithm_cfg_s security_algorithm_cfg; - // ... +// CA-ParametersEUTRA-v1570 ::= SEQUENCE +struct ca_params_eutra_v1570_s { + bool dl_minus1024_qam_total_weighted_layers_present = false; + uint8_t dl_minus1024_qam_total_weighted_layers = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16477,18 +16016,9 @@ struct security_cfg_smc_s { void to_json(json_writer& j) const; }; -// SuspendConfig ::= SEQUENCE -struct suspend_cfg_s { - bool ext = false; - bool ran_notif_area_info_present = false; - bool t380_present = false; - fixed_bitstring<40> full_i_rnti; - fixed_bitstring<24> short_i_rnti; - paging_cycle_e ran_paging_cycle; - ran_notif_area_info_c ran_notif_area_info; - periodic_rnau_timer_value_e t380; - uint8_t next_hop_chaining_count = 0; - // ... +// BandCombination-v1570 ::= SEQUENCE +struct band_combination_v1570_s { + ca_params_eutra_v1570_s ca_params_eutra_v1570; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16496,15 +16026,19 @@ struct suspend_cfg_s { void to_json(json_writer& j) const; }; -// UE-CapabilityRAT-RequestList ::= SEQUENCE (SIZE (1..8)) OF UE-CapabilityRAT-Request -using ue_cap_rat_request_list_l = dyn_array; +// MRDC-Parameters-v1580 ::= SEQUENCE +struct mrdc_params_v1580_s { + bool dynamic_pwr_sharing_nedc_present = false; -// CounterCheck-IEs ::= SEQUENCE -struct counter_check_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - drb_count_msb_info_list_l drb_count_msb_info_list; - dyn_octstring late_non_crit_ext; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombination-v1580 ::= SEQUENCE +struct band_combination_v1580_s { + mrdc_params_v1580_s mrdc_params_v1580; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16512,13 +16046,9 @@ struct counter_check_ies_s { void to_json(json_writer& j) const; }; -// DLInformationTransfer-IEs ::= SEQUENCE -struct dl_info_transfer_ies_s { - bool ded_nas_msg_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - dyn_octstring ded_nas_msg; - dyn_octstring late_non_crit_ext; +// MRDC-Parameters-v1590 ::= SEQUENCE +struct mrdc_params_v1590_s { + bool inter_band_contiguous_mrdc_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16526,23 +16056,54 @@ struct dl_info_transfer_ies_s { void to_json(json_writer& j) const; }; -// MobilityFromNRCommand-IEs ::= SEQUENCE -struct mob_from_nr_cmd_ies_s { - struct target_rat_type_opts { - enum options { eutra, spare3, spare2, spare1, /*...*/ nulltype } value; +// BandCombination-v1590 ::= SEQUENCE +struct band_combination_v1590_s { + bool supported_bw_combination_set_intra_endc_present = false; + bounded_bitstring<1, 32> supported_bw_combination_set_intra_endc; + mrdc_params_v1590_s mrdc_params_v1590; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationList ::= SEQUENCE (SIZE (1..65536)) OF BandCombination +using band_combination_list_l = dyn_array; + +// BandCombinationList-v1540 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1540 +using band_combination_list_v1540_l = dyn_array; + +// BandCombinationList-v1550 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1550 +using band_combination_list_v1550_l = dyn_array; + +// BandCombinationList-v1560 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1560 +using band_combination_list_v1560_l = dyn_array; + +// BandCombinationList-v1570 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1570 +using band_combination_list_v1570_l = dyn_array; + +// BandCombinationList-v1580 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1580 +using band_combination_list_v1580_l = dyn_array; + +// BandCombinationList-v1590 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1590 +using band_combination_list_v1590_l = dyn_array; + +// SupportedCSI-RS-Resource ::= SEQUENCE +struct supported_csi_rs_res_s { + struct max_num_tx_ports_per_res_opts { + enum options { p2, p4, p8, p12, p16, p24, p32, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; - typedef enumerated target_rat_type_e_; + typedef enumerated max_num_tx_ports_per_res_e_; // member variables - bool nas_security_param_from_nr_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - target_rat_type_e_ target_rat_type; - dyn_octstring target_rat_msg_container; - dyn_octstring nas_security_param_from_nr; - dyn_octstring late_non_crit_ext; + max_num_tx_ports_per_res_e_ max_num_tx_ports_per_res; + uint8_t max_num_res_per_band = 1; + uint16_t total_num_tx_ports_per_band = 2; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16550,18 +16111,54 @@ struct mob_from_nr_cmd_ies_s { void to_json(json_writer& j) const; }; -// RRCReconfiguration-IEs ::= SEQUENCE -struct rrc_recfg_ies_s { - bool radio_bearer_cfg_present = false; - bool secondary_cell_group_present = false; - bool meas_cfg_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - radio_bearer_cfg_s radio_bearer_cfg; - dyn_octstring secondary_cell_group; - meas_cfg_s meas_cfg; - dyn_octstring late_non_crit_ext; - rrc_recfg_v1530_ies_s non_crit_ext; +// BeamManagementSSB-CSI-RS ::= SEQUENCE +struct beam_management_ssb_csi_rs_s { + struct max_num_ssb_csi_rs_res_one_tx_opts { + enum options { n0, n8, n16, n32, n64, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_ssb_csi_rs_res_one_tx_e_; + struct max_num_csi_rs_res_opts { + enum options { n0, n4, n8, n16, n32, n64, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_csi_rs_res_e_; + struct max_num_csi_rs_res_two_tx_opts { + enum options { n0, n4, n8, n16, n32, n64, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_csi_rs_res_two_tx_e_; + struct supported_csi_rs_density_opts { + enum options { one, three, one_and_three, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated supported_csi_rs_density_e_; + struct max_num_aperiodic_csi_rs_res_opts { + enum options { n0, n1, n4, n8, n16, n32, n64, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_aperiodic_csi_rs_res_e_; + + // member variables + bool supported_csi_rs_density_present = false; + max_num_ssb_csi_rs_res_one_tx_e_ max_num_ssb_csi_rs_res_one_tx; + max_num_csi_rs_res_e_ max_num_csi_rs_res; + max_num_csi_rs_res_two_tx_e_ max_num_csi_rs_res_two_tx; + supported_csi_rs_density_e_ supported_csi_rs_density; + max_num_aperiodic_csi_rs_res_e_ max_num_aperiodic_csi_rs_res; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16569,12 +16166,12 @@ struct rrc_recfg_ies_s { void to_json(json_writer& j) const; }; -// RRCReestablishment-IEs ::= SEQUENCE -struct rrc_reest_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - uint8_t next_hop_chaining_count = 0; - dyn_octstring late_non_crit_ext; +// CSI-RS-ForTracking ::= SEQUENCE +struct csi_rs_for_tracking_s { + uint8_t max_burst_len = 1; + uint8_t max_simul_res_sets_per_cc = 1; + uint8_t max_cfgured_res_sets_per_cc = 1; + uint16_t max_cfgured_res_sets_all_cc = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16582,42 +16179,23 @@ struct rrc_reest_ies_s { void to_json(json_writer& j) const; }; -// RRCRelease-IEs ::= SEQUENCE -struct rrc_release_ies_s { - struct depriorit_req_s_ { - struct depriorit_type_opts { - enum options { freq, nr, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated depriorit_type_e_; - struct depriorit_timer_opts { - enum options { min5, min10, min15, min30, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated depriorit_timer_e_; +// CSI-RS-IM-ReceptionForFeedback ::= SEQUENCE +struct csi_rs_im_reception_for_feedback_s { + struct max_cfg_num_csi_im_per_cc_opts { + enum options { n1, n2, n4, n8, n16, n32, nulltype } value; + typedef uint8_t number_type; - // member variables - depriorit_type_e_ depriorit_type; - depriorit_timer_e_ depriorit_timer; + std::string to_string() const; + uint8_t to_number() const; }; + typedef enumerated max_cfg_num_csi_im_per_cc_e_; // member variables - bool redirected_carrier_info_present = false; - bool cell_resel_priorities_present = false; - bool suspend_cfg_present = false; - bool depriorit_req_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - redirected_carrier_info_c redirected_carrier_info; - cell_resel_priorities_s cell_resel_priorities; - suspend_cfg_s suspend_cfg; - depriorit_req_s_ depriorit_req; - dyn_octstring late_non_crit_ext; - rrc_release_v1540_ies_s non_crit_ext; + uint8_t max_cfg_num_nzp_csi_rs_per_cc = 1; + uint16_t max_cfg_num_ports_across_nzp_csi_rs_per_cc = 2; + max_cfg_num_csi_im_per_cc_e_ max_cfg_num_csi_im_per_cc; + uint8_t max_num_simul_nzp_csi_rs_per_cc = 1; + uint16_t total_num_ports_simul_nzp_csi_rs_per_cc = 2; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16625,18 +16203,12 @@ struct rrc_release_ies_s { void to_json(json_writer& j) const; }; -// RRCResume-IEs ::= SEQUENCE -struct rrc_resume_ies_s { - bool radio_bearer_cfg_present = false; - bool master_cell_group_present = false; - bool meas_cfg_present = false; - bool full_cfg_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - radio_bearer_cfg_s radio_bearer_cfg; - dyn_octstring master_cell_group; - meas_cfg_s meas_cfg; - dyn_octstring late_non_crit_ext; +// CSI-RS-ProcFrameworkForSRS ::= SEQUENCE +struct csi_rs_proc_framework_for_srs_s { + uint8_t max_num_periodic_srs_assoc_csi_rs_per_bwp = 1; + uint8_t max_num_aperiodic_srs_assoc_csi_rs_per_bwp = 1; + uint8_t max_num_sp_srs_assoc_csi_rs_per_bwp = 0; + uint8_t simul_srs_assoc_csi_rs_per_cc = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16644,25 +16216,26 @@ struct rrc_resume_ies_s { void to_json(json_writer& j) const; }; -// SecurityModeCommand-IEs ::= SEQUENCE -struct security_mode_cmd_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - security_cfg_smc_s security_cfg_smc; - dyn_octstring late_non_crit_ext; +// CSI-ReportFramework ::= SEQUENCE +struct csi_report_framework_s { + struct max_num_aperiodic_csi_trigger_state_per_cc_opts { + enum options { n3, n7, n15, n31, n63, n128, nulltype } value; + typedef uint8_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_aperiodic_csi_trigger_state_per_cc_e_; -// UECapabilityEnquiry-IEs ::= SEQUENCE -struct ue_cap_enquiry_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - ue_cap_rat_request_list_l ue_cap_rat_request_list; - dyn_octstring late_non_crit_ext; + // member variables + uint8_t max_num_periodic_csi_per_bwp_for_csi_report = 1; + uint8_t max_num_aperiodic_csi_per_bwp_for_csi_report = 1; + uint8_t max_num_semi_persistent_csi_per_bwp_for_csi_report = 0; + uint8_t max_num_periodic_csi_per_bwp_for_beam_report = 1; + uint8_t max_num_aperiodic_csi_per_bwp_for_beam_report = 1; + max_num_aperiodic_csi_trigger_state_per_cc_e_ max_num_aperiodic_csi_trigger_state_per_cc; + uint8_t max_num_semi_persistent_csi_per_bwp_for_beam_report = 0; + uint8_t simul_csi_reports_per_cc = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16670,107 +16243,90 @@ struct ue_cap_enquiry_ies_s { void to_json(json_writer& j) const; }; -// CounterCheck ::= SEQUENCE -struct counter_check_s { - struct crit_exts_c_ { - struct types_opts { - enum options { counter_check, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; +// CodebookParameters ::= SEQUENCE +struct codebook_params_s { + struct type1_s_ { + struct single_panel_s_ { + using supported_csi_rs_res_list_l_ = dyn_array; + struct modes_opts { + enum options { mode1, mode1and_mode2, nulltype } value; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - counter_check_ies_s& counter_check() - { - assert_choice_type("counterCheck", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const counter_check_ies_s& counter_check() const - { - assert_choice_type("counterCheck", type_.to_string(), "criticalExtensions"); - return c.get(); - } - counter_check_ies_s& set_counter_check() - { - set(types::counter_check); - return c.get(); - } + std::string to_string() const; + }; + typedef enumerated modes_e_; - private: - types type_; - choice_buffer_t c; + // member variables + supported_csi_rs_res_list_l_ supported_csi_rs_res_list; + modes_e_ modes; + uint8_t max_num_csi_rs_per_res_set = 1; + }; + struct multi_panel_s_ { + using supported_csi_rs_res_list_l_ = dyn_array; + struct modes_opts { + enum options { mode1, mode2, both, nulltype } value; + typedef uint8_t number_type; - void destroy_(); - }; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated modes_e_; + struct nrof_panels_opts { + enum options { n2, n4, nulltype } value; + typedef uint8_t number_type; - // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated nrof_panels_e_; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + supported_csi_rs_res_list_l_ supported_csi_rs_res_list; + modes_e_ modes; + nrof_panels_e_ nrof_panels; + uint8_t max_num_csi_rs_per_res_set = 1; + }; -// DLInformationTransfer ::= SEQUENCE -struct dl_info_transfer_s { - struct crit_exts_c_ { - struct types_opts { - enum options { dl_info_transfer, crit_exts_future, nulltype } value; + // member variables + bool multi_panel_present = false; + single_panel_s_ single_panel; + multi_panel_s_ multi_panel; + }; + struct type2_s_ { + using supported_csi_rs_res_list_l_ = dyn_array; + struct amplitude_scaling_type_opts { + enum options { wideband, wideband_and_subband, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated amplitude_scaling_type_e_; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - dl_info_transfer_ies_s& dl_info_transfer() - { - assert_choice_type("dlInformationTransfer", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const dl_info_transfer_ies_s& dl_info_transfer() const - { - assert_choice_type("dlInformationTransfer", type_.to_string(), "criticalExtensions"); - return c.get(); - } - dl_info_transfer_ies_s& set_dl_info_transfer() - { - set(types::dl_info_transfer); - return c.get(); - } + // member variables + bool amplitude_subset_restrict_present = false; + supported_csi_rs_res_list_l_ supported_csi_rs_res_list; + uint8_t param_lx = 2; + amplitude_scaling_type_e_ amplitude_scaling_type; + }; + struct type2_port_sel_s_ { + using supported_csi_rs_res_list_l_ = dyn_array; + struct amplitude_scaling_type_opts { + enum options { wideband, wideband_and_subband, nulltype } value; - private: - types type_; - choice_buffer_t c; + std::string to_string() const; + }; + typedef enumerated amplitude_scaling_type_e_; - void destroy_(); + // member variables + supported_csi_rs_res_list_l_ supported_csi_rs_res_list; + uint8_t param_lx = 2; + amplitude_scaling_type_e_ amplitude_scaling_type; }; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool type2_present = false; + bool type2_port_sel_present = false; + type1_s_ type1; + type2_s_ type2; + type2_port_sel_s_ type2_port_sel; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16778,53 +16334,35 @@ struct dl_info_transfer_s { void to_json(json_writer& j) const; }; -// MobilityFromNRCommand ::= SEQUENCE -struct mob_from_nr_cmd_s { - struct crit_exts_c_ { - struct types_opts { - enum options { mob_from_nr_cmd, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; +// DummyG ::= SEQUENCE +struct dummy_g_s { + struct max_num_ssb_csi_rs_res_one_tx_opts { + enum options { n8, n16, n32, n64, nulltype } value; + typedef uint8_t number_type; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - mob_from_nr_cmd_ies_s& mob_from_nr_cmd() - { - assert_choice_type("mobilityFromNRCommand", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const mob_from_nr_cmd_ies_s& mob_from_nr_cmd() const - { - assert_choice_type("mobilityFromNRCommand", type_.to_string(), "criticalExtensions"); - return c.get(); - } - mob_from_nr_cmd_ies_s& set_mob_from_nr_cmd() - { - set(types::mob_from_nr_cmd); - return c.get(); - } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_ssb_csi_rs_res_one_tx_e_; + struct max_num_ssb_csi_rs_res_two_tx_opts { + enum options { n0, n4, n8, n16, n32, n64, nulltype } value; + typedef uint8_t number_type; - private: - types type_; - choice_buffer_t c; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_ssb_csi_rs_res_two_tx_e_; + struct supported_csi_rs_density_opts { + enum options { one, three, one_and_three, nulltype } value; - void destroy_(); + std::string to_string() const; }; + typedef enumerated supported_csi_rs_density_e_; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + max_num_ssb_csi_rs_res_one_tx_e_ max_num_ssb_csi_rs_res_one_tx; + max_num_ssb_csi_rs_res_two_tx_e_ max_num_ssb_csi_rs_res_two_tx; + supported_csi_rs_density_e_ supported_csi_rs_density; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16832,53 +16370,12 @@ struct mob_from_nr_cmd_s { void to_json(json_writer& j) const; }; -// RRCReconfiguration ::= SEQUENCE -struct rrc_recfg_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_recfg, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_recfg_ies_s& rrc_recfg() - { - assert_choice_type("rrcReconfiguration", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const rrc_recfg_ies_s& rrc_recfg() const - { - assert_choice_type("rrcReconfiguration", type_.to_string(), "criticalExtensions"); - return c.get(); - } - rrc_recfg_ies_s& set_rrc_recfg() - { - set(types::rrc_recfg); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; +// DummyH ::= SEQUENCE +struct dummy_h_s { + uint8_t burst_len = 1; + uint8_t max_simul_res_sets_per_cc = 1; + uint8_t max_cfgured_res_sets_per_cc = 1; + uint8_t max_cfgured_res_sets_all_cc = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16886,53 +16383,13 @@ struct rrc_recfg_s { void to_json(json_writer& j) const; }; -// RRCReestablishment ::= SEQUENCE -struct rrc_reest_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_reest, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_reest_ies_s& rrc_reest() - { - assert_choice_type("rrcReestablishment", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const rrc_reest_ies_s& rrc_reest() const - { - assert_choice_type("rrcReestablishment", type_.to_string(), "criticalExtensions"); - return c.get(); - } - rrc_reest_ies_s& set_rrc_reest() - { - set(types::rrc_reest); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; +// PTRS-DensityRecommendationDL ::= SEQUENCE +struct ptrs_density_recommendation_dl_s { + uint16_t freq_density1 = 1; + uint16_t freq_density2 = 1; + uint8_t time_density1 = 0; + uint8_t time_density2 = 0; + uint8_t time_density3 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16940,53 +16397,57 @@ struct rrc_reest_s { void to_json(json_writer& j) const; }; -// RRCRelease ::= SEQUENCE -struct rrc_release_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_release, crit_exts_future, nulltype } value; +// PTRS-DensityRecommendationUL ::= SEQUENCE +struct ptrs_density_recommendation_ul_s { + uint16_t freq_density1 = 1; + uint16_t freq_density2 = 1; + uint8_t time_density1 = 0; + uint8_t time_density2 = 0; + uint8_t time_density3 = 0; + uint16_t sample_density1 = 1; + uint16_t sample_density2 = 1; + uint16_t sample_density3 = 1; + uint16_t sample_density4 = 1; + uint16_t sample_density5 = 1; - std::string to_string() const; - }; - typedef enumerated types; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_release_ies_s& rrc_release() - { - assert_choice_type("rrcRelease", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const rrc_release_ies_s& rrc_release() const - { - assert_choice_type("rrcRelease", type_.to_string(), "criticalExtensions"); - return c.get(); - } - rrc_release_ies_s& set_rrc_release() - { - set(types::rrc_release); - return c.get(); - } +// SpatialRelations ::= SEQUENCE +struct spatial_relations_s { + struct max_num_cfgured_spatial_relations_opts { + enum options { n4, n8, n16, n32, n64, n96, nulltype } value; + typedef uint8_t number_type; - private: - types type_; - choice_buffer_t c; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_cfgured_spatial_relations_e_; + struct max_num_active_spatial_relations_opts { + enum options { n1, n2, n4, n8, n14, nulltype } value; + typedef uint8_t number_type; - void destroy_(); + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_active_spatial_relations_e_; + struct max_num_dl_rs_qcl_type_d_opts { + enum options { n1, n2, n4, n8, n14, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; }; + typedef enumerated max_num_dl_rs_qcl_type_d_e_; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool add_active_spatial_relation_pucch_present = false; + max_num_cfgured_spatial_relations_e_ max_num_cfgured_spatial_relations; + max_num_active_spatial_relations_e_ max_num_active_spatial_relations; + max_num_dl_rs_qcl_type_d_e_ max_num_dl_rs_qcl_type_d; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -16994,161 +16455,260 @@ struct rrc_release_s { void to_json(json_writer& j) const; }; -// RRCResume ::= SEQUENCE -struct rrc_resume_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_resume, crit_exts_future, nulltype } value; +// MIMO-ParametersPerBand ::= SEQUENCE +struct mimo_params_per_band_s { + struct tci_state_pdsch_s_ { + struct max_num_cfgured_tcistates_per_cc_opts { + enum options { n4, n8, n16, n32, n64, n128, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; - typedef enumerated types; + typedef enumerated max_num_cfgured_tcistates_per_cc_e_; + struct max_num_active_tci_per_bwp_opts { + enum options { n1, n2, n4, n8, nulltype } value; + typedef uint8_t number_type; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_resume_ies_s& rrc_resume() - { - assert_choice_type("rrcResume", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const rrc_resume_ies_s& rrc_resume() const - { - assert_choice_type("rrcResume", type_.to_string(), "criticalExtensions"); - return c.get(); - } - rrc_resume_ies_s& set_rrc_resume() - { - set(types::rrc_resume); - return c.get(); - } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_active_tci_per_bwp_e_; - private: - types type_; - choice_buffer_t c; + // member variables + bool max_num_cfgured_tcistates_per_cc_present = false; + bool max_num_active_tci_per_bwp_present = false; + max_num_cfgured_tcistates_per_cc_e_ max_num_cfgured_tcistates_per_cc; + max_num_active_tci_per_bwp_e_ max_num_active_tci_per_bwp; + }; + struct pusch_trans_coherence_opts { + enum options { non_coherent, partial_coherent, full_coherent, nulltype } value; - void destroy_(); + std::string to_string() const; }; + typedef enumerated pusch_trans_coherence_e_; + struct max_num_rx_tx_beam_switch_dl_s_ { + struct scs_minus15k_hz_opts { + enum options { n4, n7, n14, nulltype } value; + typedef uint8_t number_type; - // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scs_minus15k_hz_e_; + struct scs_minus30k_hz_opts { + enum options { n4, n7, n14, nulltype } value; + typedef uint8_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scs_minus30k_hz_e_; + struct scs_minus60k_hz_opts { + enum options { n4, n7, n14, nulltype } value; + typedef uint8_t number_type; -// SecurityModeCommand ::= SEQUENCE -struct security_mode_cmd_s { - struct crit_exts_c_ { - struct types_opts { - enum options { security_mode_cmd, crit_exts_future, nulltype } value; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scs_minus60k_hz_e_; + struct scs_minus120k_hz_opts { + enum options { n4, n7, n14, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; - typedef enumerated types; + typedef enumerated scs_minus120k_hz_e_; + struct scs_minus240k_hz_opts { + enum options { n4, n7, n14, nulltype } value; + typedef uint8_t number_type; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - security_mode_cmd_ies_s& security_mode_cmd() - { - assert_choice_type("securityModeCommand", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const security_mode_cmd_ies_s& security_mode_cmd() const - { - assert_choice_type("securityModeCommand", type_.to_string(), "criticalExtensions"); - return c.get(); - } - security_mode_cmd_ies_s& set_security_mode_cmd() - { - set(types::security_mode_cmd); - return c.get(); - } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scs_minus240k_hz_e_; - private: - types type_; - choice_buffer_t c; + // member variables + bool scs_minus15k_hz_present = false; + bool scs_minus30k_hz_present = false; + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + bool scs_minus240k_hz_present = false; + scs_minus15k_hz_e_ scs_minus15k_hz; + scs_minus30k_hz_e_ scs_minus30k_hz; + scs_minus60k_hz_e_ scs_minus60k_hz; + scs_minus120k_hz_e_ scs_minus120k_hz; + scs_minus240k_hz_e_ scs_minus240k_hz; + }; + struct max_num_non_group_beam_report_opts { + enum options { n1, n2, n4, nulltype } value; + typedef uint8_t number_type; - void destroy_(); + std::string to_string() const; + uint8_t to_number() const; }; + typedef enumerated max_num_non_group_beam_report_e_; + struct ul_beam_management_s_ { + struct max_num_srs_res_per_set_bm_opts { + enum options { n2, n4, n8, n16, nulltype } value; + typedef uint8_t number_type; - // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_num_srs_res_per_set_bm_e_; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + max_num_srs_res_per_set_bm_e_ max_num_srs_res_per_set_bm; + uint8_t max_num_srs_res_set = 1; + }; + struct beam_report_timing_s_ { + struct scs_minus15k_hz_opts { + enum options { sym2, sym4, sym8, nulltype } value; + typedef uint8_t number_type; -// UECapabilityEnquiry ::= SEQUENCE -struct ue_cap_enquiry_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ue_cap_enquiry, crit_exts_future, nulltype } value; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scs_minus15k_hz_e_; + struct scs_minus30k_hz_opts { + enum options { sym4, sym8, sym14, sym28, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scs_minus30k_hz_e_; + struct scs_minus60k_hz_opts { + enum options { sym8, sym14, sym28, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scs_minus60k_hz_e_; + struct scs_minus120k_hz_opts { + enum options { sym14, sym28, sym56, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated scs_minus120k_hz_e_; + + // member variables + bool scs_minus15k_hz_present = false; + bool scs_minus30k_hz_present = false; + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + scs_minus15k_hz_e_ scs_minus15k_hz; + scs_minus30k_hz_e_ scs_minus30k_hz; + scs_minus60k_hz_e_ scs_minus60k_hz; + scs_minus120k_hz_e_ scs_minus120k_hz; + }; + struct ptrs_density_recommendation_set_dl_s_ { + bool scs_minus15k_hz_present = false; + bool scs_minus30k_hz_present = false; + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + ptrs_density_recommendation_dl_s scs_minus15k_hz; + ptrs_density_recommendation_dl_s scs_minus30k_hz; + ptrs_density_recommendation_dl_s scs_minus60k_hz; + ptrs_density_recommendation_dl_s scs_minus120k_hz; + }; + struct ptrs_density_recommendation_set_ul_s_ { + bool scs_minus15k_hz_present = false; + bool scs_minus30k_hz_present = false; + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + ptrs_density_recommendation_ul_s scs_minus15k_hz; + ptrs_density_recommendation_ul_s scs_minus30k_hz; + ptrs_density_recommendation_ul_s scs_minus60k_hz; + ptrs_density_recommendation_ul_s scs_minus120k_hz; + }; + struct beam_switch_timing_s_ { + struct scs_minus60k_hz_opts { + enum options { sym14, sym28, sym48, sym224, sym336, nulltype } value; + typedef uint16_t number_type; std::string to_string() const; + uint16_t to_number() const; }; - typedef enumerated types; - - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - ue_cap_enquiry_ies_s& ue_cap_enquiry() - { - assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const ue_cap_enquiry_ies_s& ue_cap_enquiry() const - { - assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "criticalExtensions"); - return c.get(); - } - ue_cap_enquiry_ies_s& set_ue_cap_enquiry() - { - set(types::ue_cap_enquiry); - return c.get(); - } + typedef enumerated scs_minus60k_hz_e_; + struct scs_minus120k_hz_opts { + enum options { sym14, sym28, sym48, sym224, sym336, nulltype } value; + typedef uint16_t number_type; - private: - types type_; - choice_buffer_t c; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated scs_minus120k_hz_e_; - void destroy_(); + // member variables + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + scs_minus60k_hz_e_ scs_minus60k_hz; + scs_minus120k_hz_e_ scs_minus120k_hz; }; + using srs_assoc_csi_rs_l_ = dyn_array; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool ext = false; + bool tci_state_pdsch_present = false; + bool add_active_tci_state_pdcch_present = false; + bool pusch_trans_coherence_present = false; + bool beam_correspondence_without_ul_beam_sweeping_present = false; + bool periodic_beam_report_present = false; + bool aperiodic_beam_report_present = false; + bool sp_beam_report_pucch_present = false; + bool sp_beam_report_pusch_present = false; + bool dummy1_present = false; + bool max_num_rx_beam_present = false; + bool max_num_rx_tx_beam_switch_dl_present = false; + bool max_num_non_group_beam_report_present = false; + bool group_beam_report_present = false; + bool ul_beam_management_present = false; + bool max_num_csi_rs_bfd_present = false; + bool max_num_ssb_bfd_present = false; + bool max_num_csi_rs_ssb_cbd_present = false; + bool dummy2_present = false; + bool two_ports_ptrs_ul_present = false; + bool dummy5_present = false; + bool dummy3_present = false; + bool beam_report_timing_present = false; + bool ptrs_density_recommendation_set_dl_present = false; + bool ptrs_density_recommendation_set_ul_present = false; + bool dummy4_present = false; + bool aperiodic_trs_present = false; + tci_state_pdsch_s_ tci_state_pdsch; + pusch_trans_coherence_e_ pusch_trans_coherence; + dummy_g_s dummy1; + uint8_t max_num_rx_beam = 2; + max_num_rx_tx_beam_switch_dl_s_ max_num_rx_tx_beam_switch_dl; + max_num_non_group_beam_report_e_ max_num_non_group_beam_report; + ul_beam_management_s_ ul_beam_management; + uint8_t max_num_csi_rs_bfd = 1; + uint8_t max_num_ssb_bfd = 1; + uint16_t max_num_csi_rs_ssb_cbd = 1; + srs_res_s dummy5; + uint8_t dummy3 = 1; + beam_report_timing_s_ beam_report_timing; + ptrs_density_recommendation_set_dl_s_ ptrs_density_recommendation_set_dl; + ptrs_density_recommendation_set_ul_s_ ptrs_density_recommendation_set_ul; + dummy_h_s dummy4; + // ... + // group 0 + bool dummy6_present = false; + copy_ptr beam_management_ssb_csi_rs; + copy_ptr beam_switch_timing; + copy_ptr codebook_params; + copy_ptr csi_rs_im_reception_for_feedback; + copy_ptr csi_rs_proc_framework_for_srs; + copy_ptr csi_report_framework; + copy_ptr csi_rs_for_tracking; + copy_ptr srs_assoc_csi_rs; + copy_ptr spatial_relations; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -17156,592 +16716,368 @@ struct ue_cap_enquiry_s { void to_json(json_writer& j) const; }; -// DL-DCCH-MessageType ::= CHOICE -struct dl_dcch_msg_type_c { - struct c1_c_ { +// BandNR ::= SEQUENCE +struct band_nr_s { + struct bwp_same_numerology_opts { + enum options { upto2, upto4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated bwp_same_numerology_e_; + struct ue_pwr_class_opts { + enum options { pc1, pc2, pc3, pc4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated ue_pwr_class_e_; + struct ch_bws_dl_c_ { + struct fr1_s_ { + bool scs_minus15k_hz_present = false; + bool scs_minus30k_hz_present = false; + bool scs_minus60k_hz_present = false; + fixed_bitstring<10> scs_minus15k_hz; + fixed_bitstring<10> scs_minus30k_hz; + fixed_bitstring<10> scs_minus60k_hz; + }; + struct fr2_s_ { + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + fixed_bitstring<3> scs_minus60k_hz; + fixed_bitstring<3> scs_minus120k_hz; + }; struct types_opts { - enum options { - rrc_recfg, - rrc_resume, - rrc_release, - rrc_reest, - security_mode_cmd, - dl_info_transfer, - ue_cap_enquiry, - counter_check, - mob_from_nr_cmd, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; + enum options { fr1, fr2, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; typedef enumerated types; // choice methods - c1_c_() = default; - c1_c_(const c1_c_& other); - c1_c_& operator=(const c1_c_& other); - ~c1_c_() { destroy_(); } + ch_bws_dl_c_() = default; + ch_bws_dl_c_(const ch_bws_dl_c_& other); + ch_bws_dl_c_& operator=(const ch_bws_dl_c_& other); + ~ch_bws_dl_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 - rrc_recfg_s& rrc_recfg() - { - assert_choice_type("rrcReconfiguration", type_.to_string(), "c1"); - return c.get(); - } - rrc_resume_s& rrc_resume() - { - assert_choice_type("rrcResume", type_.to_string(), "c1"); - return c.get(); - } - rrc_release_s& rrc_release() - { - assert_choice_type("rrcRelease", type_.to_string(), "c1"); - return c.get(); - } - rrc_reest_s& rrc_reest() - { - assert_choice_type("rrcReestablishment", type_.to_string(), "c1"); - return c.get(); - } - security_mode_cmd_s& security_mode_cmd() - { - assert_choice_type("securityModeCommand", type_.to_string(), "c1"); - return c.get(); - } - dl_info_transfer_s& dl_info_transfer() - { - assert_choice_type("dlInformationTransfer", type_.to_string(), "c1"); - return c.get(); - } - ue_cap_enquiry_s& ue_cap_enquiry() - { - assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "c1"); - return c.get(); - } - counter_check_s& counter_check() - { - assert_choice_type("counterCheck", type_.to_string(), "c1"); - return c.get(); - } - mob_from_nr_cmd_s& mob_from_nr_cmd() - { - assert_choice_type("mobilityFromNRCommand", type_.to_string(), "c1"); - return c.get(); - } - const rrc_recfg_s& rrc_recfg() const - { - assert_choice_type("rrcReconfiguration", type_.to_string(), "c1"); - return c.get(); - } - const rrc_resume_s& rrc_resume() const - { - assert_choice_type("rrcResume", type_.to_string(), "c1"); - return c.get(); - } - const rrc_release_s& rrc_release() const - { - assert_choice_type("rrcRelease", type_.to_string(), "c1"); - return c.get(); - } - const rrc_reest_s& rrc_reest() const - { - assert_choice_type("rrcReestablishment", type_.to_string(), "c1"); - return c.get(); - } - const security_mode_cmd_s& security_mode_cmd() const - { - assert_choice_type("securityModeCommand", type_.to_string(), "c1"); - return c.get(); - } - const dl_info_transfer_s& dl_info_transfer() const - { - assert_choice_type("dlInformationTransfer", type_.to_string(), "c1"); - return c.get(); - } - const ue_cap_enquiry_s& ue_cap_enquiry() const - { - assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "c1"); - return c.get(); + fr1_s_& fr1() + { + assert_choice_type("fr1", type_.to_string(), "channelBWs-DL"); + return c.get(); } - const counter_check_s& counter_check() const + fr2_s_& fr2() { - assert_choice_type("counterCheck", type_.to_string(), "c1"); - return c.get(); + assert_choice_type("fr2", type_.to_string(), "channelBWs-DL"); + return c.get(); } - const mob_from_nr_cmd_s& mob_from_nr_cmd() const + const fr1_s_& fr1() const { - assert_choice_type("mobilityFromNRCommand", type_.to_string(), "c1"); - return c.get(); + assert_choice_type("fr1", type_.to_string(), "channelBWs-DL"); + return c.get(); } - rrc_recfg_s& set_rrc_recfg() + const fr2_s_& fr2() const { - set(types::rrc_recfg); - return c.get(); + assert_choice_type("fr2", type_.to_string(), "channelBWs-DL"); + return c.get(); } - rrc_resume_s& set_rrc_resume() + fr1_s_& set_fr1() { - set(types::rrc_resume); - return c.get(); + set(types::fr1); + return c.get(); } - rrc_release_s& set_rrc_release() + fr2_s_& set_fr2() { - set(types::rrc_release); - return c.get(); + set(types::fr2); + return c.get(); } - rrc_reest_s& set_rrc_reest() + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct ch_bws_ul_c_ { + struct fr1_s_ { + bool scs_minus15k_hz_present = false; + bool scs_minus30k_hz_present = false; + bool scs_minus60k_hz_present = false; + fixed_bitstring<10> scs_minus15k_hz; + fixed_bitstring<10> scs_minus30k_hz; + fixed_bitstring<10> scs_minus60k_hz; + }; + struct fr2_s_ { + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + fixed_bitstring<3> scs_minus60k_hz; + fixed_bitstring<3> scs_minus120k_hz; + }; + struct types_opts { + enum options { fr1, fr2, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + ch_bws_ul_c_() = default; + ch_bws_ul_c_(const ch_bws_ul_c_& other); + ch_bws_ul_c_& operator=(const ch_bws_ul_c_& other); + ~ch_bws_ul_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 + fr1_s_& fr1() { - set(types::rrc_reest); - return c.get(); + assert_choice_type("fr1", type_.to_string(), "channelBWs-UL"); + return c.get(); } - security_mode_cmd_s& set_security_mode_cmd() + fr2_s_& fr2() { - set(types::security_mode_cmd); - return c.get(); + assert_choice_type("fr2", type_.to_string(), "channelBWs-UL"); + return c.get(); } - dl_info_transfer_s& set_dl_info_transfer() + const fr1_s_& fr1() const { - set(types::dl_info_transfer); - return c.get(); + assert_choice_type("fr1", type_.to_string(), "channelBWs-UL"); + return c.get(); } - ue_cap_enquiry_s& set_ue_cap_enquiry() + const fr2_s_& fr2() const { - set(types::ue_cap_enquiry); - return c.get(); + assert_choice_type("fr2", type_.to_string(), "channelBWs-UL"); + return c.get(); } - counter_check_s& set_counter_check() + fr1_s_& set_fr1() { - set(types::counter_check); - return c.get(); + set(types::fr1); + return c.get(); } - mob_from_nr_cmd_s& set_mob_from_nr_cmd() + fr2_s_& set_fr2() { - set(types::mob_from_nr_cmd); - return c.get(); + set(types::fr2); + return c.get(); } private: - types type_; - choice_buffer_t - c; + types type_; + choice_buffer_t c; void destroy_(); }; - struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; + struct max_ul_duty_cycle_pc2_fr1_opts { + enum options { n60, n70, n80, n90, n100, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated types; - - // choice methods - dl_dcch_msg_type_c() = default; - dl_dcch_msg_type_c(const dl_dcch_msg_type_c& other); - dl_dcch_msg_type_c& operator=(const dl_dcch_msg_type_c& other); - ~dl_dcch_msg_type_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 - c1_c_& c1() - { - assert_choice_type("c1", type_.to_string(), "DL-DCCH-MessageType"); - return c.get(); - } - const c1_c_& c1() const - { - assert_choice_type("c1", type_.to_string(), "DL-DCCH-MessageType"); - return c.get(); - } - c1_c_& set_c1() - { - set(types::c1); - return c.get(); - } - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// DL-DCCH-Message ::= SEQUENCE -struct dl_dcch_msg_s { - dl_dcch_msg_type_c msg; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PagingUE-Identity ::= CHOICE -struct paging_ue_id_c { - struct types_opts { - enum options { ng_minus5_g_s_tmsi, full_i_rnti, /*...*/ nulltype } value; - typedef int8_t number_type; - - std::string to_string() const; - int8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - paging_ue_id_c() = default; - paging_ue_id_c(const paging_ue_id_c& other); - paging_ue_id_c& operator=(const paging_ue_id_c& other); - ~paging_ue_id_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 - fixed_bitstring<48>& ng_minus5_g_s_tmsi() - { - assert_choice_type("ng-5G-S-TMSI", type_.to_string(), "PagingUE-Identity"); - return c.get >(); - } - fixed_bitstring<40>& full_i_rnti() - { - assert_choice_type("fullI-RNTI", type_.to_string(), "PagingUE-Identity"); - return c.get >(); - } - const fixed_bitstring<48>& ng_minus5_g_s_tmsi() const - { - assert_choice_type("ng-5G-S-TMSI", type_.to_string(), "PagingUE-Identity"); - return c.get >(); - } - const fixed_bitstring<40>& full_i_rnti() const - { - assert_choice_type("fullI-RNTI", type_.to_string(), "PagingUE-Identity"); - return c.get >(); - } - fixed_bitstring<48>& set_ng_minus5_g_s_tmsi() - { - set(types::ng_minus5_g_s_tmsi); - return c.get >(); - } - fixed_bitstring<40>& set_full_i_rnti() - { - set(types::full_i_rnti); - return c.get >(); - } - -private: - types type_; - choice_buffer_t > c; - - void destroy_(); -}; - -// PagingRecord ::= SEQUENCE -struct paging_record_s { - bool ext = false; - bool access_type_present = false; - paging_ue_id_c ue_id; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PagingRecordList ::= SEQUENCE (SIZE (1..32)) OF PagingRecord -using paging_record_list_l = dyn_array; - -// Paging ::= SEQUENCE -struct paging_s { - bool paging_record_list_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - paging_record_list_l paging_record_list; - dyn_octstring late_non_crit_ext; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PCCH-MessageType ::= CHOICE -struct pcch_msg_type_c { - struct c1_c_ { + typedef enumerated max_ul_duty_cycle_pc2_fr1_e_; + struct max_ul_duty_cycle_fr2_opts { + enum options { n15, n20, n25, n30, n40, n50, n60, n70, n80, n90, n100, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated max_ul_duty_cycle_fr2_e_; + struct ch_bws_dl_v1590_c_ { + struct fr1_s_ { + bool scs_minus15k_hz_present = false; + bool scs_minus30k_hz_present = false; + bool scs_minus60k_hz_present = false; + fixed_bitstring<16> scs_minus15k_hz; + fixed_bitstring<16> scs_minus30k_hz; + fixed_bitstring<16> scs_minus60k_hz; + }; + struct fr2_s_ { + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + fixed_bitstring<8> scs_minus60k_hz; + fixed_bitstring<8> scs_minus120k_hz; + }; struct types_opts { - enum options { paging, spare1, nulltype } value; + enum options { fr1, fr2, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; typedef enumerated types; // choice methods - c1_c_() = default; + ch_bws_dl_v1590_c_() = default; + ch_bws_dl_v1590_c_(const ch_bws_dl_v1590_c_& other); + ch_bws_dl_v1590_c_& operator=(const ch_bws_dl_v1590_c_& other); + ~ch_bws_dl_v1590_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 - paging_s& paging() + fr1_s_& fr1() { - assert_choice_type("paging", type_.to_string(), "c1"); - return c; + assert_choice_type("fr1", type_.to_string(), "channelBWs-DL-v1590"); + return c.get(); } - const paging_s& paging() const + fr2_s_& fr2() { - assert_choice_type("paging", type_.to_string(), "c1"); - return c; + assert_choice_type("fr2", type_.to_string(), "channelBWs-DL-v1590"); + return c.get(); } - paging_s& set_paging() + const fr1_s_& fr1() const { - set(types::paging); - return c; + assert_choice_type("fr1", type_.to_string(), "channelBWs-DL-v1590"); + return c.get(); + } + const fr2_s_& fr2() const + { + assert_choice_type("fr2", type_.to_string(), "channelBWs-DL-v1590"); + return c.get(); + } + fr1_s_& set_fr1() + { + set(types::fr1); + return c.get(); + } + fr2_s_& set_fr2() + { + set(types::fr2); + return c.get(); } private: - types type_; - paging_s c; - }; - struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - pcch_msg_type_c() = default; - pcch_msg_type_c(const pcch_msg_type_c& other); - pcch_msg_type_c& operator=(const pcch_msg_type_c& other); - ~pcch_msg_type_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 - c1_c_& c1() - { - assert_choice_type("c1", type_.to_string(), "PCCH-MessageType"); - return c.get(); - } - const c1_c_& c1() const - { - assert_choice_type("c1", type_.to_string(), "PCCH-MessageType"); - return c.get(); - } - c1_c_& set_c1() - { - set(types::c1); - return c.get(); - } - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// PCCH-Message ::= SEQUENCE -struct pcch_msg_s { - pcch_msg_type_c msg; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// EstablishmentCause ::= ENUMERATED -struct establishment_cause_opts { - enum options { - emergency, - high_prio_access, - mt_access, - mo_sig, - mo_data, - mo_voice_call, - mo_video_call, - mo_sms, - mps_prio_access, - mcs_prio_access, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - - std::string to_string() const; -}; -typedef enumerated establishment_cause_e; - -// InitialUE-Identity ::= CHOICE -struct init_ue_id_c { - struct types_opts { - enum options { ng_minus5_g_s_tmsi_part1, random_value, nulltype } value; - typedef int8_t number_type; + types type_; + choice_buffer_t c; - std::string to_string() const; - int8_t to_number() const; + void destroy_(); }; - typedef enumerated types; - - // choice methods - init_ue_id_c() = default; - init_ue_id_c(const init_ue_id_c& other); - init_ue_id_c& operator=(const init_ue_id_c& other); - ~init_ue_id_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 - fixed_bitstring<39>& ng_minus5_g_s_tmsi_part1() - { - assert_choice_type("ng-5G-S-TMSI-Part1", type_.to_string(), "InitialUE-Identity"); - return c.get >(); - } - fixed_bitstring<39>& random_value() - { - assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity"); - return c.get >(); - } - const fixed_bitstring<39>& ng_minus5_g_s_tmsi_part1() const - { - assert_choice_type("ng-5G-S-TMSI-Part1", type_.to_string(), "InitialUE-Identity"); - return c.get >(); - } - const fixed_bitstring<39>& random_value() const - { - assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity"); - return c.get >(); - } - fixed_bitstring<39>& set_ng_minus5_g_s_tmsi_part1() - { - set(types::ng_minus5_g_s_tmsi_part1); - return c.get >(); - } - fixed_bitstring<39>& set_random_value() - { - set(types::random_value); - return c.get >(); - } - -private: - types type_; - choice_buffer_t > c; - - void destroy_(); -}; - -// ReestabUE-Identity ::= SEQUENCE -struct reestab_ue_id_s { - uint32_t c_rnti = 0; - uint16_t pci = 0; - fixed_bitstring<16> short_mac_i; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ReestablishmentCause ::= ENUMERATED -struct reest_cause_opts { - enum options { recfg_fail, ho_fail, other_fail, spare1, nulltype } value; - - std::string to_string() const; -}; -typedef enumerated reest_cause_e; - -// ResumeCause ::= ENUMERATED -struct resume_cause_opts { - enum options { - emergency, - high_prio_access, - mt_access, - mo_sig, - mo_data, - mo_voice_call, - mo_video_call, - mo_sms, - rna_upd, - mps_prio_access, - mcs_prio_access, - spare1, - spare2, - spare3, - spare4, - spare5, - nulltype - } value; - - std::string to_string() const; -}; -typedef enumerated resume_cause_e; + struct ch_bws_ul_v1590_c_ { + struct fr1_s_ { + bool scs_minus15k_hz_present = false; + bool scs_minus30k_hz_present = false; + bool scs_minus60k_hz_present = false; + fixed_bitstring<16> scs_minus15k_hz; + fixed_bitstring<16> scs_minus30k_hz; + fixed_bitstring<16> scs_minus60k_hz; + }; + struct fr2_s_ { + bool scs_minus60k_hz_present = false; + bool scs_minus120k_hz_present = false; + fixed_bitstring<8> scs_minus60k_hz; + fixed_bitstring<8> scs_minus120k_hz; + }; + struct types_opts { + enum options { fr1, fr2, nulltype } value; + typedef uint8_t number_type; -// RRCReestablishmentRequest-IEs ::= SEQUENCE -struct rrc_reest_request_ies_s { - reestab_ue_id_s ue_id; - reest_cause_e reest_cause; - fixed_bitstring<1> spare; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // choice methods + ch_bws_ul_v1590_c_() = default; + ch_bws_ul_v1590_c_(const ch_bws_ul_v1590_c_& other); + ch_bws_ul_v1590_c_& operator=(const ch_bws_ul_v1590_c_& other); + ~ch_bws_ul_v1590_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 + fr1_s_& fr1() + { + assert_choice_type("fr1", type_.to_string(), "channelBWs-UL-v1590"); + return c.get(); + } + fr2_s_& fr2() + { + assert_choice_type("fr2", type_.to_string(), "channelBWs-UL-v1590"); + return c.get(); + } + const fr1_s_& fr1() const + { + assert_choice_type("fr1", type_.to_string(), "channelBWs-UL-v1590"); + return c.get(); + } + const fr2_s_& fr2() const + { + assert_choice_type("fr2", type_.to_string(), "channelBWs-UL-v1590"); + return c.get(); + } + fr1_s_& set_fr1() + { + set(types::fr1); + return c.get(); + } + fr2_s_& set_fr2() + { + set(types::fr2); + return c.get(); + } -// RRCResumeRequest-IEs ::= SEQUENCE -struct rrc_resume_request_ies_s { - fixed_bitstring<24> resume_id; - fixed_bitstring<16> resume_mac_i; - resume_cause_e resume_cause; - fixed_bitstring<1> spare; + private: + types type_; + choice_buffer_t c; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + void destroy_(); + }; -// RRCSetupRequest-IEs ::= SEQUENCE -struct rrc_setup_request_ies_s { - init_ue_id_c ue_id; - establishment_cause_e establishment_cause; - fixed_bitstring<1> spare; + // member variables + bool ext = false; + bool modified_mpr_behaviour_present = false; + bool mimo_params_per_band_present = false; + bool extended_cp_present = false; + bool multiple_tci_present = false; + bool bwp_without_restrict_present = false; + bool bwp_same_numerology_present = false; + bool bwp_diff_numerology_present = false; + bool cross_carrier_sched_same_scs_present = false; + bool pdsch_minus256_qam_fr2_present = false; + bool pusch_minus256_qam_present = false; + bool ue_pwr_class_present = false; + bool rate_matching_lte_crs_present = false; + bool ch_bws_dl_present = false; + bool ch_bws_ul_present = false; + uint16_t band_nr = 1; + fixed_bitstring<8> modified_mpr_behaviour; + mimo_params_per_band_s mimo_params_per_band; + bwp_same_numerology_e_ bwp_same_numerology; + ue_pwr_class_e_ ue_pwr_class; + ch_bws_dl_c_ ch_bws_dl; + ch_bws_ul_c_ ch_bws_ul; + // ... + // group 0 + bool max_ul_duty_cycle_pc2_fr1_present = false; + max_ul_duty_cycle_pc2_fr1_e_ max_ul_duty_cycle_pc2_fr1; + // group 1 + bool pucch_spatial_rel_info_mac_ce_present = false; + bool pwr_boosting_pi2_bpsk_present = false; + // group 2 + bool max_ul_duty_cycle_fr2_present = false; + max_ul_duty_cycle_fr2_e_ max_ul_duty_cycle_fr2; + // group 3 + copy_ptr ch_bws_dl_v1590; + copy_ptr ch_bws_ul_v1590; + // group 4 + bool asymmetric_bw_combination_set_present = false; + bounded_bitstring<1, 32> asymmetric_bw_combination_set; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -17749,10 +17085,16 @@ struct rrc_setup_request_ies_s { void to_json(json_writer& j) const; }; -// RRCSystemInfoRequest-r15-IEs ::= SEQUENCE -struct rrc_sys_info_request_r15_ies_s { - fixed_bitstring<32> requested_si_list; - fixed_bitstring<12> spare; +// CFRA-CSIRS-Resource ::= SEQUENCE +struct cfra_csirs_res_s { + using ra_occasion_list_l_ = dyn_array; + + // member variables + bool ext = false; + uint8_t csi_rs = 0; + ra_occasion_list_l_ ra_occasion_list; + uint8_t ra_preamb_idx = 0; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -17760,9 +17102,12 @@ struct rrc_sys_info_request_r15_ies_s { void to_json(json_writer& j) const; }; -// RRCReestablishmentRequest ::= SEQUENCE -struct rrc_reest_request_s { - rrc_reest_request_ies_s rrc_reest_request; +// CFRA-SSB-Resource ::= SEQUENCE +struct cfra_ssb_res_s { + bool ext = false; + uint8_t ssb = 0; + uint8_t ra_preamb_idx = 0; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -17770,72 +17115,104 @@ struct rrc_reest_request_s { void to_json(json_writer& j) const; }; -// RRCResumeRequest ::= SEQUENCE -struct rrc_resume_request_s { - rrc_resume_request_ies_s rrc_resume_request; +// CFRA ::= SEQUENCE +struct cfra_s { + struct occasions_s_ { + struct ssb_per_rach_occasion_opts { + enum options { one_eighth, one_fourth, one_half, one, two, four, eight, sixteen, nulltype } value; + typedef float number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + typedef enumerated ssb_per_rach_occasion_e_; -// RRCSetupRequest ::= SEQUENCE -struct rrc_setup_request_s { - rrc_setup_request_ies_s rrc_setup_request; + // member variables + bool ssb_per_rach_occasion_present = false; + rach_cfg_generic_s rach_cfg_generic; + ssb_per_rach_occasion_e_ ssb_per_rach_occasion; + }; + struct res_c_ { + struct ssb_s_ { + using ssb_res_list_l_ = dyn_array; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + ssb_res_list_l_ ssb_res_list; + uint8_t ra_ssb_occasion_mask_idx = 0; + }; + struct csirs_s_ { + using csirs_res_list_l_ = dyn_array; -// RRCSystemInfoRequest ::= SEQUENCE -struct rrc_sys_info_request_s { - struct crit_exts_c_ { + // member variables + csirs_res_list_l_ csirs_res_list; + uint8_t rsrp_thres_csi_rs = 0; + }; struct types_opts { - enum options { rrc_sys_info_request_r15, crit_exts_future, nulltype } value; + enum options { ssb, csirs, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_c_() { destroy_(); } + res_c_() = default; + res_c_(const res_c_& other); + res_c_& operator=(const res_c_& other); + ~res_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 - rrc_sys_info_request_r15_ies_s& rrc_sys_info_request_r15() + ssb_s_& ssb() + { + assert_choice_type("ssb", type_.to_string(), "resources"); + return c.get(); + } + csirs_s_& csirs() + { + assert_choice_type("csirs", type_.to_string(), "resources"); + return c.get(); + } + const ssb_s_& ssb() const + { + assert_choice_type("ssb", type_.to_string(), "resources"); + return c.get(); + } + const csirs_s_& csirs() const { - assert_choice_type("rrcSystemInfoRequest-r15", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("csirs", type_.to_string(), "resources"); + return c.get(); } - const rrc_sys_info_request_r15_ies_s& rrc_sys_info_request_r15() const + ssb_s_& set_ssb() { - assert_choice_type("rrcSystemInfoRequest-r15", type_.to_string(), "criticalExtensions"); - return c.get(); + set(types::ssb); + return c.get(); } - rrc_sys_info_request_r15_ies_s& set_rrc_sys_info_request_r15() + csirs_s_& set_csirs() { - set(types::rrc_sys_info_request_r15); - return c.get(); + set(types::csirs); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; // member variables - crit_exts_c_ crit_exts; + bool ext = false; + bool occasions_present = false; + occasions_s_ occasions; + res_c_ res; + // ... + // group 0 + bool total_nof_ra_preambs_present = false; + uint8_t total_nof_ra_preambs = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -17843,140 +17220,97 @@ struct rrc_sys_info_request_s { void to_json(json_writer& j) const; }; -// UL-CCCH-MessageType ::= CHOICE -struct ul_ccch_msg_type_c { - struct c1_c_ { +// CSI-AssociatedReportConfigInfo ::= SEQUENCE +struct csi_associated_report_cfg_info_s { + struct res_for_ch_c_ { + struct nzp_csi_rs_s_ { + using qcl_info_l_ = bounded_array; + + // member variables + bool qcl_info_present = false; + uint8_t res_set = 1; + qcl_info_l_ qcl_info; + }; struct types_opts { - enum options { rrc_setup_request, rrc_resume_request, rrc_reest_request, rrc_sys_info_request, nulltype } value; + enum options { nzp_csi_rs, csi_ssb_res_set, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - c1_c_() = default; - c1_c_(const c1_c_& other); - c1_c_& operator=(const c1_c_& other); - ~c1_c_() { destroy_(); } + res_for_ch_c_() = default; + res_for_ch_c_(const res_for_ch_c_& other); + res_for_ch_c_& operator=(const res_for_ch_c_& other); + ~res_for_ch_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 - rrc_setup_request_s& rrc_setup_request() - { - assert_choice_type("rrcSetupRequest", type_.to_string(), "c1"); - return c.get(); - } - rrc_resume_request_s& rrc_resume_request() - { - assert_choice_type("rrcResumeRequest", type_.to_string(), "c1"); - return c.get(); - } - rrc_reest_request_s& rrc_reest_request() - { - assert_choice_type("rrcReestablishmentRequest", type_.to_string(), "c1"); - return c.get(); - } - rrc_sys_info_request_s& rrc_sys_info_request() - { - assert_choice_type("rrcSystemInfoRequest", type_.to_string(), "c1"); - return c.get(); - } - const rrc_setup_request_s& rrc_setup_request() const - { - assert_choice_type("rrcSetupRequest", type_.to_string(), "c1"); - return c.get(); - } - const rrc_resume_request_s& rrc_resume_request() const - { - assert_choice_type("rrcResumeRequest", type_.to_string(), "c1"); - return c.get(); - } - const rrc_reest_request_s& rrc_reest_request() const + nzp_csi_rs_s_& nzp_csi_rs() { - assert_choice_type("rrcReestablishmentRequest", type_.to_string(), "c1"); - return c.get(); + assert_choice_type("nzp-CSI-RS", type_.to_string(), "resourcesForChannel"); + return c.get(); } - const rrc_sys_info_request_s& rrc_sys_info_request() const + uint8_t& csi_ssb_res_set() { - assert_choice_type("rrcSystemInfoRequest", type_.to_string(), "c1"); - return c.get(); + assert_choice_type("csi-SSB-ResourceSet", type_.to_string(), "resourcesForChannel"); + return c.get(); } - rrc_setup_request_s& set_rrc_setup_request() + const nzp_csi_rs_s_& nzp_csi_rs() const { - set(types::rrc_setup_request); - return c.get(); + assert_choice_type("nzp-CSI-RS", type_.to_string(), "resourcesForChannel"); + return c.get(); } - rrc_resume_request_s& set_rrc_resume_request() + const uint8_t& csi_ssb_res_set() const { - set(types::rrc_resume_request); - return c.get(); + assert_choice_type("csi-SSB-ResourceSet", type_.to_string(), "resourcesForChannel"); + return c.get(); } - rrc_reest_request_s& set_rrc_reest_request() + nzp_csi_rs_s_& set_nzp_csi_rs() { - set(types::rrc_reest_request); - return c.get(); + set(types::nzp_csi_rs); + return c.get(); } - rrc_sys_info_request_s& set_rrc_sys_info_request() + uint8_t& set_csi_ssb_res_set() { - set(types::rrc_sys_info_request); - return c.get(); + set(types::csi_ssb_res_set); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; - struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; - typedef uint8_t number_type; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; + // member variables + bool ext = false; + bool csi_im_res_for_interference_present = false; + bool nzp_csi_rs_res_for_interference_present = false; + uint8_t report_cfg_id = 0; + res_for_ch_c_ res_for_ch; + uint8_t csi_im_res_for_interference = 1; + uint8_t nzp_csi_rs_res_for_interference = 1; + // ... - // choice methods - ul_ccch_msg_type_c() = default; - ul_ccch_msg_type_c(const ul_ccch_msg_type_c& other); - ul_ccch_msg_type_c& operator=(const ul_ccch_msg_type_c& other); - ~ul_ccch_msg_type_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } + // sequence methods SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; - // getters - c1_c_& c1() - { - assert_choice_type("c1", type_.to_string(), "UL-CCCH-MessageType"); - return c.get(); - } - const c1_c_& c1() const - { - assert_choice_type("c1", type_.to_string(), "UL-CCCH-MessageType"); - return c.get(); - } - c1_c_& set_c1() - { - set(types::c1); - return c.get(); - } - -private: - types type_; - choice_buffer_t c; - - void destroy_(); }; -// UL-CCCH-Message ::= SEQUENCE -struct ul_ccch_msg_s { - ul_ccch_msg_type_c msg; +// CSI-AperiodicTriggerState ::= SEQUENCE +struct csi_aperiodic_trigger_state_s { + using associated_report_cfg_info_list_l_ = dyn_array; + + // member variables + bool ext = false; + associated_report_cfg_info_list_l_ associated_report_cfg_info_list; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -17984,34 +17318,42 @@ struct ul_ccch_msg_s { void to_json(json_writer& j) const; }; -// RRCResumeRequest1-IEs ::= SEQUENCE -struct rrc_resume_request1_ies_s { - fixed_bitstring<40> resume_id; - fixed_bitstring<16> resume_mac_i; - resume_cause_e resume_cause; - fixed_bitstring<1> spare; +// CSI-AperiodicTriggerStateList ::= SEQUENCE (SIZE (1..128)) OF CSI-AperiodicTriggerState +using csi_aperiodic_trigger_state_list_l = dyn_array; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// CSI-IM-Resource ::= SEQUENCE +struct csi_im_res_s { + struct csi_im_res_elem_pattern_c_ { + struct pattern0_s_ { + struct subcarrier_location_p0_opts { + enum options { s0, s2, s4, s6, s8, s10, nulltype } value; + typedef uint8_t number_type; -// RRCResumeRequest1 ::= SEQUENCE -struct rrc_resume_request1_s { - rrc_resume_request1_ies_s rrc_resume_request1; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated subcarrier_location_p0_e_; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + subcarrier_location_p0_e_ subcarrier_location_p0; + uint8_t symbol_location_p0 = 0; + }; + struct pattern1_s_ { + struct subcarrier_location_p1_opts { + enum options { s0, s4, s8, nulltype } value; + typedef uint8_t number_type; -// UL-CCCH1-MessageType ::= CHOICE -struct ul_ccch1_msg_type_c { - struct c1_c_ { + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated subcarrier_location_p1_e_; + + // member variables + subcarrier_location_p1_e_ subcarrier_location_p1; + uint8_t symbol_location_p1 = 0; + }; struct types_opts { - enum options { rrc_resume_request1, spare3, spare2, spare1, nulltype } value; + enum options { pattern0, pattern1, nulltype } value; typedef uint8_t number_type; std::string to_string() const; @@ -18020,79 +17362,64 @@ struct ul_ccch1_msg_type_c { typedef enumerated types; // choice methods - c1_c_() = default; + csi_im_res_elem_pattern_c_() = default; + csi_im_res_elem_pattern_c_(const csi_im_res_elem_pattern_c_& other); + csi_im_res_elem_pattern_c_& operator=(const csi_im_res_elem_pattern_c_& other); + ~csi_im_res_elem_pattern_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 - rrc_resume_request1_s& rrc_resume_request1() + pattern0_s_& pattern0() { - assert_choice_type("rrcResumeRequest1", type_.to_string(), "c1"); - return c; + assert_choice_type("pattern0", type_.to_string(), "csi-IM-ResourceElementPattern"); + return c.get(); } - const rrc_resume_request1_s& rrc_resume_request1() const + pattern1_s_& pattern1() { - assert_choice_type("rrcResumeRequest1", type_.to_string(), "c1"); - return c; + assert_choice_type("pattern1", type_.to_string(), "csi-IM-ResourceElementPattern"); + return c.get(); } - rrc_resume_request1_s& set_rrc_resume_request1() + const pattern0_s_& pattern0() const { - set(types::rrc_resume_request1); - return c; + assert_choice_type("pattern0", type_.to_string(), "csi-IM-ResourceElementPattern"); + return c.get(); + } + const pattern1_s_& pattern1() const + { + assert_choice_type("pattern1", type_.to_string(), "csi-IM-ResourceElementPattern"); + return c.get(); + } + pattern0_s_& set_pattern0() + { + set(types::pattern0); + return c.get(); + } + pattern1_s_& set_pattern1() + { + set(types::pattern1); + return c.get(); } private: - types type_; - rrc_resume_request1_s c; - }; - struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; - typedef uint8_t number_type; + types type_; + choice_buffer_t c; - std::string to_string() const; - uint8_t to_number() const; + void destroy_(); }; - typedef enumerated types; - - // choice methods - ul_ccch1_msg_type_c() = default; - ul_ccch1_msg_type_c(const ul_ccch1_msg_type_c& other); - ul_ccch1_msg_type_c& operator=(const ul_ccch1_msg_type_c& other); - ~ul_ccch1_msg_type_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 - c1_c_& c1() - { - assert_choice_type("c1", type_.to_string(), "UL-CCCH1-MessageType"); - return c.get(); - } - const c1_c_& c1() const - { - assert_choice_type("c1", type_.to_string(), "UL-CCCH1-MessageType"); - return c.get(); - } - c1_c_& set_c1() - { - set(types::c1); - return c.get(); - } -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// UL-CCCH1-Message ::= SEQUENCE -struct ul_ccch1_msg_s { - ul_ccch1_msg_type_c msg; + // member variables + bool ext = false; + bool csi_im_res_elem_pattern_present = false; + bool freq_band_present = false; + bool periodicity_and_offset_present = false; + uint8_t csi_im_res_id = 0; + csi_im_res_elem_pattern_c_ csi_im_res_elem_pattern; + csi_freq_occupation_s freq_band; + csi_res_periodicity_and_offset_c periodicity_and_offset; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -18100,14 +17427,15 @@ struct ul_ccch1_msg_s { void to_json(json_writer& j) const; }; -// MeasQuantityResults ::= SEQUENCE -struct meas_quant_results_s { - bool rsrp_present = false; - bool rsrq_present = false; - bool sinr_present = false; - uint8_t rsrp = 0; - uint8_t rsrq = 0; - uint8_t sinr = 0; +// CSI-IM-ResourceSet ::= SEQUENCE +struct csi_im_res_set_s { + using csi_im_res_l_ = bounded_array; + + // member variables + bool ext = false; + uint8_t csi_im_res_set_id = 0; + csi_im_res_l_ csi_im_res; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -18115,71 +17443,203 @@ struct meas_quant_results_s { void to_json(json_writer& j) const; }; -// PLMN-Identity-EUTRA-5GC ::= CHOICE -struct plmn_id_eutra_minus5_gc_c { +// CSI-ReportPeriodicityAndOffset ::= CHOICE +struct csi_report_periodicity_and_offset_c { struct types_opts { - enum options { plmn_id_eutra_minus5_gc, plmn_idx, nulltype } value; - typedef int8_t number_type; + enum options { + slots4, + slots5, + slots8, + slots10, + slots16, + slots20, + slots40, + slots80, + slots160, + slots320, + nulltype + } value; + typedef uint16_t number_type; std::string to_string() const; - int8_t to_number() const; + uint16_t to_number() const; }; typedef enumerated types; // choice methods - plmn_id_eutra_minus5_gc_c() = default; - plmn_id_eutra_minus5_gc_c(const plmn_id_eutra_minus5_gc_c& other); - plmn_id_eutra_minus5_gc_c& operator=(const plmn_id_eutra_minus5_gc_c& other); - ~plmn_id_eutra_minus5_gc_c() { destroy_(); } + csi_report_periodicity_and_offset_c() = default; + csi_report_periodicity_and_offset_c(const csi_report_periodicity_and_offset_c& other); + csi_report_periodicity_and_offset_c& operator=(const csi_report_periodicity_and_offset_c& other); + ~csi_report_periodicity_and_offset_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 - plmn_id_s& plmn_id_eutra_minus5_gc() + uint8_t& slots4() { - assert_choice_type("plmn-Identity-EUTRA-5GC", type_.to_string(), "PLMN-Identity-EUTRA-5GC"); - return c.get(); + assert_choice_type("slots4", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); } - uint8_t& plmn_idx() + uint8_t& slots5() { - assert_choice_type("plmn-index", type_.to_string(), "PLMN-Identity-EUTRA-5GC"); + assert_choice_type("slots5", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); return c.get(); } - const plmn_id_s& plmn_id_eutra_minus5_gc() const + uint8_t& slots8() { - assert_choice_type("plmn-Identity-EUTRA-5GC", type_.to_string(), "PLMN-Identity-EUTRA-5GC"); - return c.get(); + assert_choice_type("slots8", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); } - const uint8_t& plmn_idx() const + uint8_t& slots10() { - assert_choice_type("plmn-index", type_.to_string(), "PLMN-Identity-EUTRA-5GC"); + assert_choice_type("slots10", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); return c.get(); } - plmn_id_s& set_plmn_id_eutra_minus5_gc() + uint8_t& slots16() { - set(types::plmn_id_eutra_minus5_gc); - return c.get(); + assert_choice_type("slots16", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); } - uint8_t& set_plmn_idx() + uint8_t& slots20() { - set(types::plmn_idx); + assert_choice_type("slots20", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots40() + { + assert_choice_type("slots40", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots80() + { + assert_choice_type("slots80", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots160() + { + assert_choice_type("slots160", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + uint16_t& slots320() + { + assert_choice_type("slots320", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots4() const + { + assert_choice_type("slots4", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots5() const + { + assert_choice_type("slots5", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots8() const + { + assert_choice_type("slots8", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots10() const + { + assert_choice_type("slots10", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots16() const + { + assert_choice_type("slots16", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots20() const + { + assert_choice_type("slots20", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots40() const + { + assert_choice_type("slots40", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots80() const + { + assert_choice_type("slots80", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots160() const + { + assert_choice_type("slots160", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + const uint16_t& slots320() const + { + assert_choice_type("slots320", type_.to_string(), "CSI-ReportPeriodicityAndOffset"); + return c.get(); + } + uint8_t& set_slots4() + { + set(types::slots4); + return c.get(); + } + uint8_t& set_slots5() + { + set(types::slots5); + return c.get(); + } + uint8_t& set_slots8() + { + set(types::slots8); + return c.get(); + } + uint8_t& set_slots10() + { + set(types::slots10); + return c.get(); + } + uint8_t& set_slots16() + { + set(types::slots16); return c.get(); } + uint8_t& set_slots20() + { + set(types::slots20); + return c.get(); + } + uint8_t& set_slots40() + { + set(types::slots40); + return c.get(); + } + uint8_t& set_slots80() + { + set(types::slots80); + return c.get(); + } + uint8_t& set_slots160() + { + set(types::slots160); + return c.get(); + } + uint16_t& set_slots320() + { + set(types::slots320); + return c.get(); + } private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; -// ResultsPerCSI-RS-Index ::= SEQUENCE -struct results_per_csi_rs_idx_s { - bool csi_rs_results_present = false; - uint8_t csi_rs_idx = 0; - meas_quant_results_s csi_rs_results; +// CSI-SemiPersistentOnPUSCH-TriggerState ::= SEQUENCE +struct csi_semi_persistent_on_pusch_trigger_state_s { + bool ext = false; + uint8_t associated_report_cfg_info = 0; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -18187,268 +17647,940 @@ struct results_per_csi_rs_idx_s { void to_json(json_writer& j) const; }; -// ResultsPerSSB-Index ::= SEQUENCE -struct results_per_ssb_idx_s { - bool ssb_results_present = false; - uint8_t ssb_idx = 0; - meas_quant_results_s ssb_results; +// CodebookConfig ::= SEQUENCE +struct codebook_cfg_s { + struct codebook_type_c_ { + struct type1_s_ { + struct sub_type_c_ { + struct type_i_single_panel_s_ { + struct nr_of_ant_ports_c_ { + struct two_s_ { + fixed_bitstring<6> two_tx_codebook_subset_restrict; + }; + struct more_than_two_s_ { + struct n1_n2_c_ { + struct types_opts { + enum options { + two_one_type_i_single_panel_restrict, + two_two_type_i_single_panel_restrict, + four_one_type_i_single_panel_restrict, + three_two_type_i_single_panel_restrict, + six_one_type_i_single_panel_restrict, + four_two_type_i_single_panel_restrict, + eight_one_type_i_single_panel_restrict, + four_three_type_i_single_panel_restrict, + six_two_type_i_single_panel_restrict, + twelve_one_type_i_single_panel_restrict, + four_four_type_i_single_panel_restrict, + eight_two_type_i_single_panel_restrict, + sixteen_one_type_i_single_panel_restrict, + nulltype + } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + n1_n2_c_() = default; + n1_n2_c_(const n1_n2_c_& other); + n1_n2_c_& operator=(const n1_n2_c_& other); + ~n1_n2_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 + fixed_bitstring<8>& two_one_type_i_single_panel_restrict() + { + assert_choice_type("two-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<64>& two_two_type_i_single_panel_restrict() + { + assert_choice_type("two-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<16>& four_one_type_i_single_panel_restrict() + { + assert_choice_type("four-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<96>& three_two_type_i_single_panel_restrict() + { + assert_choice_type("three-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<24>& six_one_type_i_single_panel_restrict() + { + assert_choice_type("six-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<128>& four_two_type_i_single_panel_restrict() + { + assert_choice_type("four-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<32>& eight_one_type_i_single_panel_restrict() + { + assert_choice_type("eight-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<192>& four_three_type_i_single_panel_restrict() + { + assert_choice_type("four-three-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<192>& six_two_type_i_single_panel_restrict() + { + assert_choice_type("six-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<48>& twelve_one_type_i_single_panel_restrict() + { + assert_choice_type("twelve-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<256>& four_four_type_i_single_panel_restrict() + { + assert_choice_type("four-four-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<256>& eight_two_type_i_single_panel_restrict() + { + assert_choice_type("eight-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<64>& sixteen_one_type_i_single_panel_restrict() + { + assert_choice_type("sixteen-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<8>& two_one_type_i_single_panel_restrict() const + { + assert_choice_type("two-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<64>& two_two_type_i_single_panel_restrict() const + { + assert_choice_type("two-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<16>& four_one_type_i_single_panel_restrict() const + { + assert_choice_type("four-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<96>& three_two_type_i_single_panel_restrict() const + { + assert_choice_type("three-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<24>& six_one_type_i_single_panel_restrict() const + { + assert_choice_type("six-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<128>& four_two_type_i_single_panel_restrict() const + { + assert_choice_type("four-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<32>& eight_one_type_i_single_panel_restrict() const + { + assert_choice_type("eight-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<192>& four_three_type_i_single_panel_restrict() const + { + assert_choice_type("four-three-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<192>& six_two_type_i_single_panel_restrict() const + { + assert_choice_type("six-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<48>& twelve_one_type_i_single_panel_restrict() const + { + assert_choice_type("twelve-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<256>& four_four_type_i_single_panel_restrict() const + { + assert_choice_type("four-four-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<256>& eight_two_type_i_single_panel_restrict() const + { + assert_choice_type("eight-two-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + const fixed_bitstring<64>& sixteen_one_type_i_single_panel_restrict() const + { + assert_choice_type("sixteen-one-TypeI-SinglePanel-Restriction", type_.to_string(), "n1-n2"); + return c.get >(); + } + fixed_bitstring<8>& set_two_one_type_i_single_panel_restrict() + { + set(types::two_one_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<64>& set_two_two_type_i_single_panel_restrict() + { + set(types::two_two_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<16>& set_four_one_type_i_single_panel_restrict() + { + set(types::four_one_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<96>& set_three_two_type_i_single_panel_restrict() + { + set(types::three_two_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<24>& set_six_one_type_i_single_panel_restrict() + { + set(types::six_one_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<128>& set_four_two_type_i_single_panel_restrict() + { + set(types::four_two_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<32>& set_eight_one_type_i_single_panel_restrict() + { + set(types::eight_one_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<192>& set_four_three_type_i_single_panel_restrict() + { + set(types::four_three_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<192>& set_six_two_type_i_single_panel_restrict() + { + set(types::six_two_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<48>& set_twelve_one_type_i_single_panel_restrict() + { + set(types::twelve_one_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<256>& set_four_four_type_i_single_panel_restrict() + { + set(types::four_four_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<256>& set_eight_two_type_i_single_panel_restrict() + { + set(types::eight_two_type_i_single_panel_restrict); + return c.get >(); + } + fixed_bitstring<64>& set_sixteen_one_type_i_single_panel_restrict() + { + set(types::sixteen_one_type_i_single_panel_restrict); + return c.get >(); + } + + private: + types type_; + choice_buffer_t > c; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + void destroy_(); + }; -// CGI-Info ::= SEQUENCE -struct cgi_info_s { - struct no_sib1_s_ { - uint8_t ssb_subcarrier_offset = 0; - pdcch_cfg_sib1_s pdcch_cfg_sib1; - }; + // member variables + bool type_i_single_panel_codebook_subset_restrict_i2_present = false; + n1_n2_c_ n1_n2; + fixed_bitstring<16> type_i_single_panel_codebook_subset_restrict_i2; + }; + struct types_opts { + enum options { two, more_than_two, nulltype } value; + typedef uint8_t number_type; - // member variables - bool ext = false; - bool plmn_id_info_list_present = false; - bool freq_band_list_present = false; - bool no_sib1_present = false; - plmn_id_info_list_l plmn_id_info_list; - multi_freq_band_list_nr_l freq_band_list; - no_sib1_s_ no_sib1; - // ... + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // choice methods + nr_of_ant_ports_c_() = default; + nr_of_ant_ports_c_(const nr_of_ant_ports_c_& other); + nr_of_ant_ports_c_& operator=(const nr_of_ant_ports_c_& other); + ~nr_of_ant_ports_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 + two_s_& two() + { + assert_choice_type("two", type_.to_string(), "nrOfAntennaPorts"); + return c.get(); + } + more_than_two_s_& more_than_two() + { + assert_choice_type("moreThanTwo", type_.to_string(), "nrOfAntennaPorts"); + return c.get(); + } + const two_s_& two() const + { + assert_choice_type("two", type_.to_string(), "nrOfAntennaPorts"); + return c.get(); + } + const more_than_two_s_& more_than_two() const + { + assert_choice_type("moreThanTwo", type_.to_string(), "nrOfAntennaPorts"); + return c.get(); + } + two_s_& set_two() + { + set(types::two); + return c.get(); + } + more_than_two_s_& set_more_than_two() + { + set(types::more_than_two); + return c.get(); + } -// CellIdentity-EUTRA-5GC ::= CHOICE -struct cell_id_eutra_minus5_gc_c { - struct types_opts { - enum options { cell_id_eutra, cell_id_idx, nulltype } value; + private: + types type_; + choice_buffer_t c; - std::string to_string() const; - }; - typedef enumerated types; + void destroy_(); + }; - // choice methods - cell_id_eutra_minus5_gc_c() = default; - cell_id_eutra_minus5_gc_c(const cell_id_eutra_minus5_gc_c& other); - cell_id_eutra_minus5_gc_c& operator=(const cell_id_eutra_minus5_gc_c& other); - ~cell_id_eutra_minus5_gc_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 - fixed_bitstring<28>& cell_id_eutra() - { - assert_choice_type("cellIdentity-EUTRA", type_.to_string(), "CellIdentity-EUTRA-5GC"); - return c.get >(); - } - uint8_t& cell_id_idx() - { - assert_choice_type("cellId-index", type_.to_string(), "CellIdentity-EUTRA-5GC"); - return c.get(); - } - const fixed_bitstring<28>& cell_id_eutra() const - { - assert_choice_type("cellIdentity-EUTRA", type_.to_string(), "CellIdentity-EUTRA-5GC"); - return c.get >(); - } - const uint8_t& cell_id_idx() const - { - assert_choice_type("cellId-index", type_.to_string(), "CellIdentity-EUTRA-5GC"); - return c.get(); - } - fixed_bitstring<28>& set_cell_id_eutra() - { - set(types::cell_id_eutra); - return c.get >(); - } - uint8_t& set_cell_id_idx() - { - set(types::cell_id_idx); - return c.get(); - } + // member variables + nr_of_ant_ports_c_ nr_of_ant_ports; + fixed_bitstring<8> type_i_single_panel_ri_restrict; + }; + struct type_i_multi_panel_s_ { + struct ng_n1_n2_c_ { + struct types_opts { + enum options { + two_two_one_type_i_multi_panel_restrict, + two_four_one_type_i_multi_panel_restrict, + four_two_one_type_i_multi_panel_restrict, + two_two_two_type_i_multi_panel_restrict, + two_eight_one_type_i_multi_panel_restrict, + four_four_one_type_i_multi_panel_restrict, + two_four_two_type_i_multi_panel_restrict, + four_two_two_type_i_multi_panel_restrict, + nulltype + } value; -private: - types type_; - choice_buffer_t > c; + std::string to_string() const; + }; + typedef enumerated types; - void destroy_(); -}; + // choice methods + ng_n1_n2_c_() = default; + ng_n1_n2_c_(const ng_n1_n2_c_& other); + ng_n1_n2_c_& operator=(const ng_n1_n2_c_& other); + ~ng_n1_n2_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 + fixed_bitstring<8>& two_two_one_type_i_multi_panel_restrict() + { + assert_choice_type("two-two-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + fixed_bitstring<16>& two_four_one_type_i_multi_panel_restrict() + { + assert_choice_type("two-four-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + fixed_bitstring<8>& four_two_one_type_i_multi_panel_restrict() + { + assert_choice_type("four-two-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + fixed_bitstring<64>& two_two_two_type_i_multi_panel_restrict() + { + assert_choice_type("two-two-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + fixed_bitstring<32>& two_eight_one_type_i_multi_panel_restrict() + { + assert_choice_type("two-eight-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + fixed_bitstring<16>& four_four_one_type_i_multi_panel_restrict() + { + assert_choice_type("four-four-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + fixed_bitstring<128>& two_four_two_type_i_multi_panel_restrict() + { + assert_choice_type("two-four-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + fixed_bitstring<64>& four_two_two_type_i_multi_panel_restrict() + { + assert_choice_type("four-two-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + const fixed_bitstring<8>& two_two_one_type_i_multi_panel_restrict() const + { + assert_choice_type("two-two-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + const fixed_bitstring<16>& two_four_one_type_i_multi_panel_restrict() const + { + assert_choice_type("two-four-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + const fixed_bitstring<8>& four_two_one_type_i_multi_panel_restrict() const + { + assert_choice_type("four-two-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + const fixed_bitstring<64>& two_two_two_type_i_multi_panel_restrict() const + { + assert_choice_type("two-two-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + const fixed_bitstring<32>& two_eight_one_type_i_multi_panel_restrict() const + { + assert_choice_type("two-eight-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + const fixed_bitstring<16>& four_four_one_type_i_multi_panel_restrict() const + { + assert_choice_type("four-four-one-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + const fixed_bitstring<128>& two_four_two_type_i_multi_panel_restrict() const + { + assert_choice_type("two-four-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + const fixed_bitstring<64>& four_two_two_type_i_multi_panel_restrict() const + { + assert_choice_type("four-two-two-TypeI-MultiPanel-Restriction", type_.to_string(), "ng-n1-n2"); + return c.get >(); + } + fixed_bitstring<8>& set_two_two_one_type_i_multi_panel_restrict() + { + set(types::two_two_one_type_i_multi_panel_restrict); + return c.get >(); + } + fixed_bitstring<16>& set_two_four_one_type_i_multi_panel_restrict() + { + set(types::two_four_one_type_i_multi_panel_restrict); + return c.get >(); + } + fixed_bitstring<8>& set_four_two_one_type_i_multi_panel_restrict() + { + set(types::four_two_one_type_i_multi_panel_restrict); + return c.get >(); + } + fixed_bitstring<64>& set_two_two_two_type_i_multi_panel_restrict() + { + set(types::two_two_two_type_i_multi_panel_restrict); + return c.get >(); + } + fixed_bitstring<32>& set_two_eight_one_type_i_multi_panel_restrict() + { + set(types::two_eight_one_type_i_multi_panel_restrict); + return c.get >(); + } + fixed_bitstring<16>& set_four_four_one_type_i_multi_panel_restrict() + { + set(types::four_four_one_type_i_multi_panel_restrict); + return c.get >(); + } + fixed_bitstring<128>& set_two_four_two_type_i_multi_panel_restrict() + { + set(types::two_four_two_type_i_multi_panel_restrict); + return c.get >(); + } + fixed_bitstring<64>& set_four_two_two_type_i_multi_panel_restrict() + { + set(types::four_two_two_type_i_multi_panel_restrict); + return c.get >(); + } -// PLMN-IdentityList-EUTRA-5GC ::= SEQUENCE (SIZE (1..12)) OF PLMN-Identity-EUTRA-5GC -using plmn_id_list_eutra_minus5_gc_l = dyn_array; + private: + types type_; + choice_buffer_t > c; -// PLMN-IdentityList-EUTRA-EPC ::= SEQUENCE (SIZE (1..12)) OF PLMN-Identity -using plmn_id_list_eutra_epc_l = dyn_array; + void destroy_(); + }; -// ResultsPerCSI-RS-IndexList ::= SEQUENCE (SIZE (1..64)) OF ResultsPerCSI-RS-Index -using results_per_csi_rs_idx_list_l = dyn_array; + // member variables + ng_n1_n2_c_ ng_n1_n2; + fixed_bitstring<4> ri_restrict; + }; + struct types_opts { + enum options { type_i_single_panel, type_i_multi_panel, nulltype } value; -// ResultsPerSSB-IndexList ::= SEQUENCE (SIZE (1..64)) OF ResultsPerSSB-Index -using results_per_ssb_idx_list_l = dyn_array; + std::string to_string() const; + }; + typedef enumerated types; -// CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE -struct cell_access_related_info_eutra_minus5_gc_s { - bool ranac_minus5gc_present = false; - plmn_id_list_eutra_minus5_gc_l plmn_id_list_eutra_minus5gc; - fixed_bitstring<24> tac_eutra_minus5gc; - uint16_t ranac_minus5gc = 0; - cell_id_eutra_minus5_gc_c cell_id_eutra_minus5gc; + // choice methods + sub_type_c_() = default; + sub_type_c_(const sub_type_c_& other); + sub_type_c_& operator=(const sub_type_c_& other); + ~sub_type_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 + type_i_single_panel_s_& type_i_single_panel() + { + assert_choice_type("typeI-SinglePanel", type_.to_string(), "subType"); + return c.get(); + } + type_i_multi_panel_s_& type_i_multi_panel() + { + assert_choice_type("typeI-MultiPanel", type_.to_string(), "subType"); + return c.get(); + } + const type_i_single_panel_s_& type_i_single_panel() const + { + assert_choice_type("typeI-SinglePanel", type_.to_string(), "subType"); + return c.get(); + } + const type_i_multi_panel_s_& type_i_multi_panel() const + { + assert_choice_type("typeI-MultiPanel", type_.to_string(), "subType"); + return c.get(); + } + type_i_single_panel_s_& set_type_i_single_panel() + { + set(types::type_i_single_panel); + return c.get(); + } + type_i_multi_panel_s_& set_type_i_multi_panel() + { + set(types::type_i_multi_panel); + return c.get(); + } - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + private: + types type_; + choice_buffer_t c; -// CellAccessRelatedInfo-EUTRA-EPC ::= SEQUENCE -struct cell_access_related_info_eutra_epc_s { - plmn_id_list_eutra_epc_l plmn_id_list_eutra_epc; - fixed_bitstring<16> tac_eutra_epc; - fixed_bitstring<28> cell_id_eutra_epc; + void destroy_(); + }; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + sub_type_c_ sub_type; + uint8_t codebook_mode = 1; + }; + struct type2_s_ { + struct sub_type_c_ { + struct type_ii_s_ { + struct n1_n2_codebook_subset_restrict_c_ { + struct types_opts { + enum 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, + nulltype + } value; -// MeasQuantityResultsEUTRA ::= SEQUENCE -struct meas_quant_results_eutra_s { - bool rsrp_present = false; - bool rsrq_present = false; - bool sinr_present = false; - uint8_t rsrp = 0; - uint8_t rsrq = 0; - uint8_t sinr = 0; + std::string to_string() const; + }; + typedef enumerated types; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // choice methods + n1_n2_codebook_subset_restrict_c_() = default; + n1_n2_codebook_subset_restrict_c_(const n1_n2_codebook_subset_restrict_c_& other); + n1_n2_codebook_subset_restrict_c_& operator=(const n1_n2_codebook_subset_restrict_c_& other); + ~n1_n2_codebook_subset_restrict_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 + fixed_bitstring<16>& two_one() + { + assert_choice_type("two-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<43>& two_two() + { + assert_choice_type("two-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<32>& four_one() + { + assert_choice_type("four-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<59>& three_two() + { + assert_choice_type("three-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<48>& six_one() + { + assert_choice_type("six-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<75>& four_two() + { + assert_choice_type("four-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<64>& eight_one() + { + assert_choice_type("eight-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<107>& four_three() + { + assert_choice_type("four-three", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<107>& six_two() + { + assert_choice_type("six-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<96>& twelve_one() + { + assert_choice_type("twelve-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<139>& four_four() + { + assert_choice_type("four-four", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<139>& eight_two() + { + assert_choice_type("eight-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<128>& sixteen_one() + { + assert_choice_type("sixteen-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<16>& two_one() const + { + assert_choice_type("two-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<43>& two_two() const + { + assert_choice_type("two-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<32>& four_one() const + { + assert_choice_type("four-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<59>& three_two() const + { + assert_choice_type("three-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<48>& six_one() const + { + assert_choice_type("six-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<75>& four_two() const + { + assert_choice_type("four-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<64>& eight_one() const + { + assert_choice_type("eight-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<107>& four_three() const + { + assert_choice_type("four-three", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<107>& six_two() const + { + assert_choice_type("six-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<96>& twelve_one() const + { + assert_choice_type("twelve-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<139>& four_four() const + { + assert_choice_type("four-four", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<139>& eight_two() const + { + assert_choice_type("eight-two", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<128>& sixteen_one() const + { + assert_choice_type("sixteen-one", type_.to_string(), "n1-n2-codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<16>& set_two_one() + { + set(types::two_one); + return c.get >(); + } + fixed_bitstring<43>& set_two_two() + { + set(types::two_two); + return c.get >(); + } + fixed_bitstring<32>& set_four_one() + { + set(types::four_one); + return c.get >(); + } + fixed_bitstring<59>& set_three_two() + { + set(types::three_two); + return c.get >(); + } + fixed_bitstring<48>& set_six_one() + { + set(types::six_one); + return c.get >(); + } + fixed_bitstring<75>& set_four_two() + { + set(types::four_two); + return c.get >(); + } + fixed_bitstring<64>& set_eight_one() + { + set(types::eight_one); + return c.get >(); + } + fixed_bitstring<107>& set_four_three() + { + set(types::four_three); + return c.get >(); + } + fixed_bitstring<107>& set_six_two() + { + set(types::six_two); + return c.get >(); + } + fixed_bitstring<96>& set_twelve_one() + { + set(types::twelve_one); + return c.get >(); + } + fixed_bitstring<139>& set_four_four() + { + set(types::four_four); + return c.get >(); + } + fixed_bitstring<139>& set_eight_two() + { + set(types::eight_two); + return c.get >(); + } + fixed_bitstring<128>& set_sixteen_one() + { + set(types::sixteen_one); + return c.get >(); + } -// MeasResultNR ::= SEQUENCE -struct meas_result_nr_s { - struct meas_result_s_ { - struct cell_results_s_ { - bool results_ssb_cell_present = false; - bool results_csi_rs_cell_present = false; - meas_quant_results_s results_ssb_cell; - meas_quant_results_s results_csi_rs_cell; - }; - struct rs_idx_results_s_ { - bool results_ssb_idxes_present = false; - bool results_csi_rs_idxes_present = false; - results_per_ssb_idx_list_l results_ssb_idxes; - results_per_csi_rs_idx_list_l results_csi_rs_idxes; - }; + private: + types type_; + choice_buffer_t > c; - // member variables - bool rs_idx_results_present = false; - cell_results_s_ cell_results; - rs_idx_results_s_ rs_idx_results; - }; + void destroy_(); + }; - // member variables - bool ext = false; - bool pci_present = false; - uint16_t pci = 0; - meas_result_s_ meas_result; - // ... - // group 0 - copy_ptr cgi_info; + // member variables + n1_n2_codebook_subset_restrict_c_ n1_n2_codebook_subset_restrict; + fixed_bitstring<2> type_ii_ri_restrict; + }; + struct type_ii_port_sel_s_ { + struct port_sel_sampling_size_opts { + enum options { n1, n2, n3, n4, nulltype } value; + typedef uint8_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated port_sel_sampling_size_e_; -// MultiBandInfoListEUTRA ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..256) -using multi_band_info_list_eutra_l = bounded_array; + // member variables + bool port_sel_sampling_size_present = false; + port_sel_sampling_size_e_ port_sel_sampling_size; + fixed_bitstring<2> type_ii_port_sel_ri_restrict; + }; + struct types_opts { + enum options { type_ii, type_ii_port_sel, nulltype } value; -// UplinkTxDirectCurrentBWP ::= SEQUENCE -struct ul_tx_direct_current_bwp_s { - uint8_t bwp_id = 0; - bool shift7dot5k_hz = false; - uint16_t tx_direct_current_location = 0; + std::string to_string() const; + }; + typedef enumerated types; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // choice methods + sub_type_c_() = default; + sub_type_c_(const sub_type_c_& other); + sub_type_c_& operator=(const sub_type_c_& other); + ~sub_type_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 + type_ii_s_& type_ii() + { + assert_choice_type("typeII", type_.to_string(), "subType"); + return c.get(); + } + type_ii_port_sel_s_& type_ii_port_sel() + { + assert_choice_type("typeII-PortSelection", type_.to_string(), "subType"); + return c.get(); + } + const type_ii_s_& type_ii() const + { + assert_choice_type("typeII", type_.to_string(), "subType"); + return c.get(); + } + const type_ii_port_sel_s_& type_ii_port_sel() const + { + assert_choice_type("typeII-PortSelection", type_.to_string(), "subType"); + return c.get(); + } + type_ii_s_& set_type_ii() + { + set(types::type_ii); + return c.get(); + } + type_ii_port_sel_s_& set_type_ii_port_sel() + { + set(types::type_ii_port_sel); + return c.get(); + } -// EUTRA-RSTD-Info ::= SEQUENCE -struct eutra_rstd_info_s { - bool ext = false; - uint32_t carrier_freq = 0; - uint8_t meas_prs_offset = 0; - // ... + private: + types type_; + choice_buffer_t c; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + void destroy_(); + }; + struct phase_alphabet_size_opts { + enum options { n4, n8, nulltype } value; + typedef uint8_t number_type; -// MIMO-LayersDL ::= ENUMERATED -struct mimo_layers_dl_opts { - enum options { two_layers, four_layers, eight_layers, nulltype } value; - typedef uint8_t number_type; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated phase_alphabet_size_e_; + struct nof_beams_opts { + enum options { two, three, four, nulltype } value; + typedef uint8_t number_type; - std::string to_string() const; - uint8_t to_number() const; -}; -typedef enumerated mimo_layers_dl_e; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated nof_beams_e_; -// MIMO-LayersUL ::= ENUMERATED -struct mimo_layers_ul_opts { - enum options { one_layer, two_layers, four_layers, nulltype } value; - typedef uint8_t number_type; + // member variables + sub_type_c_ sub_type; + phase_alphabet_size_e_ phase_alphabet_size; + bool subband_amplitude = false; + nof_beams_e_ nof_beams; + }; + struct types_opts { + enum options { type1, type2, nulltype } value; + typedef uint8_t number_type; - std::string to_string() const; - uint8_t to_number() const; -}; -typedef enumerated mimo_layers_ul_e; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; -// MeasResultEUTRA ::= SEQUENCE -struct meas_result_eutra_s { - struct cgi_info_s_ { - struct cgi_info_epc_s_ { - using cgi_info_epc_list_l_ = dyn_array; + // choice methods + codebook_type_c_() = default; + codebook_type_c_(const codebook_type_c_& other); + codebook_type_c_& operator=(const codebook_type_c_& other); + ~codebook_type_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 + type1_s_& type1() + { + assert_choice_type("type1", type_.to_string(), "codebookType"); + return c.get(); + } + type2_s_& type2() + { + assert_choice_type("type2", type_.to_string(), "codebookType"); + return c.get(); + } + const type1_s_& type1() const + { + assert_choice_type("type1", type_.to_string(), "codebookType"); + return c.get(); + } + const type2_s_& type2() const + { + assert_choice_type("type2", type_.to_string(), "codebookType"); + return c.get(); + } + type1_s_& set_type1() + { + set(types::type1); + return c.get(); + } + type2_s_& set_type2() + { + set(types::type2); + return c.get(); + } - // member variables - bool cgi_info_epc_list_present = false; - cell_access_related_info_eutra_epc_s cgi_info_epc_legacy; - cgi_info_epc_list_l_ cgi_info_epc_list; - }; - using cgi_info_minus5_gc_l_ = dyn_array; + private: + types type_; + choice_buffer_t c; - // member variables - bool cgi_info_epc_present = false; - bool cgi_info_minus5_gc_present = false; - bool multi_band_info_list_present = false; - bool freq_band_ind_prio_present = false; - cgi_info_epc_s_ cgi_info_epc; - cgi_info_minus5_gc_l_ cgi_info_minus5_gc; - uint16_t freq_band_ind = 1; - multi_band_info_list_eutra_l multi_band_info_list; + void destroy_(); }; // member variables - bool ext = false; - bool cgi_info_present = false; - uint16_t eutra_pci = 0; - meas_quant_results_eutra_s meas_result; - cgi_info_s_ cgi_info; - // ... + codebook_type_c_ codebook_type; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -18456,14 +18588,10 @@ struct meas_result_eutra_s { void to_json(json_writer& j) const; }; -// MeasResultServMO ::= SEQUENCE -struct meas_result_serv_mo_s { - bool ext = false; - bool meas_result_best_neigh_cell_present = false; - uint8_t serv_cell_id = 0; - meas_result_nr_s meas_result_serving_cell; - meas_result_nr_s meas_result_best_neigh_cell; - // ... +// PUCCH-CSI-Resource ::= SEQUENCE +struct pucch_csi_res_s { + uint8_t ul_bw_part_id = 0; + uint8_t pucch_res = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -18471,496 +18599,771 @@ struct meas_result_serv_mo_s { void to_json(json_writer& j) const; }; -// ReducedAggregatedBandwidth ::= ENUMERATED -struct reduced_aggregated_bw_opts { - enum options { - mhz0, - mhz10, - mhz20, - mhz30, - mhz40, - mhz50, - mhz60, - mhz80, - mhz100, - mhz200, - mhz300, - mhz400, - nulltype - } value; - typedef uint16_t number_type; - - std::string to_string() const; - uint16_t to_number() const; -}; -typedef enumerated reduced_aggregated_bw_e; +// PortIndexFor8Ranks ::= CHOICE +struct port_idx_for8_ranks_c { + struct port_idx8_s_ { + using rank2_minus8_l_ = std::array; + using rank3_minus8_l_ = std::array; + using rank4_minus8_l_ = std::array; + using rank5_minus8_l_ = std::array; + using rank6_minus8_l_ = std::array; + using rank7_minus8_l_ = std::array; + using rank8_minus8_l_ = std::array; -// UplinkTxDirectCurrentCell ::= SEQUENCE -struct ul_tx_direct_current_cell_s { - using ul_direct_current_bwp_l_ = dyn_array; + // member variables + bool rank1_minus8_present = false; + bool rank2_minus8_present = false; + bool rank3_minus8_present = false; + bool rank4_minus8_present = false; + bool rank5_minus8_present = false; + bool rank6_minus8_present = false; + bool rank7_minus8_present = false; + bool rank8_minus8_present = false; + uint8_t rank1_minus8 = 0; + rank2_minus8_l_ rank2_minus8; + rank3_minus8_l_ rank3_minus8; + rank4_minus8_l_ rank4_minus8; + rank5_minus8_l_ rank5_minus8; + rank6_minus8_l_ rank6_minus8; + rank7_minus8_l_ rank7_minus8; + rank8_minus8_l_ rank8_minus8; + }; + struct port_idx4_s_ { + using rank2_minus4_l_ = std::array; + using rank3_minus4_l_ = std::array; + using rank4_minus4_l_ = std::array; - // member variables - bool ext = false; - uint8_t serv_cell_idx = 0; - ul_direct_current_bwp_l_ ul_direct_current_bwp; - // ... + // member variables + bool rank1_minus4_present = false; + bool rank2_minus4_present = false; + bool rank3_minus4_present = false; + bool rank4_minus4_present = false; + uint8_t rank1_minus4 = 0; + rank2_minus4_l_ rank2_minus4; + rank3_minus4_l_ rank3_minus4; + rank4_minus4_l_ rank4_minus4; + }; + struct port_idx2_s_ { + using rank2_minus2_l_ = std::array; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + bool rank1_minus2_present = false; + bool rank2_minus2_present = false; + uint8_t rank1_minus2 = 0; + rank2_minus2_l_ rank2_minus2; + }; + struct types_opts { + enum options { port_idx8, port_idx4, port_idx2, port_idx1, nulltype } value; + typedef uint8_t number_type; -// DRB-CountInfo ::= SEQUENCE -struct drb_count_info_s { - uint8_t drb_id = 1; - uint64_t count_ul = 0; - uint64_t count_dl = 0; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; - // sequence methods + // choice methods + port_idx_for8_ranks_c() = default; + port_idx_for8_ranks_c(const port_idx_for8_ranks_c& other); + port_idx_for8_ranks_c& operator=(const port_idx_for8_ranks_c& other); + ~port_idx_for8_ranks_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; -}; - -// EUTRA-RSTD-InfoList ::= SEQUENCE (SIZE (1..3)) OF EUTRA-RSTD-Info -using eutra_rstd_info_list_l = dyn_array; - -// MeasResultListEUTRA ::= SEQUENCE (SIZE (1..8)) OF MeasResultEUTRA -using meas_result_list_eutra_l = dyn_array; + // getters + port_idx8_s_& port_idx8() + { + assert_choice_type("portIndex8", type_.to_string(), "PortIndexFor8Ranks"); + return c.get(); + } + port_idx4_s_& port_idx4() + { + assert_choice_type("portIndex4", type_.to_string(), "PortIndexFor8Ranks"); + return c.get(); + } + port_idx2_s_& port_idx2() + { + assert_choice_type("portIndex2", type_.to_string(), "PortIndexFor8Ranks"); + return c.get(); + } + const port_idx8_s_& port_idx8() const + { + assert_choice_type("portIndex8", type_.to_string(), "PortIndexFor8Ranks"); + return c.get(); + } + const port_idx4_s_& port_idx4() const + { + assert_choice_type("portIndex4", type_.to_string(), "PortIndexFor8Ranks"); + return c.get(); + } + const port_idx2_s_& port_idx2() const + { + assert_choice_type("portIndex2", type_.to_string(), "PortIndexFor8Ranks"); + return c.get(); + } + port_idx8_s_& set_port_idx8() + { + set(types::port_idx8); + return c.get(); + } + port_idx4_s_& set_port_idx4() + { + set(types::port_idx4); + return c.get(); + } + port_idx2_s_& set_port_idx2() + { + set(types::port_idx2); + return c.get(); + } -// MeasResultListNR ::= SEQUENCE (SIZE (1..8)) OF MeasResultNR -using meas_result_list_nr_l = dyn_array; +private: + types type_; + choice_buffer_t c; -// MeasResultServMOList ::= SEQUENCE (SIZE (1..32)) OF MeasResultServMO -using meas_result_serv_mo_list_l = dyn_array; + void destroy_(); +}; -// OverheatingAssistance ::= SEQUENCE -struct overheat_assist_s { - struct reduced_max_ccs_s_ { - uint8_t reduced_ccs_dl = 0; - uint8_t reduced_ccs_ul = 0; - }; - struct reduced_max_bw_fr1_s_ { - reduced_aggregated_bw_e reduced_bw_fr1_dl; - reduced_aggregated_bw_e reduced_bw_fr1_ul; - }; - struct reduced_max_bw_fr2_s_ { - reduced_aggregated_bw_e reduced_bw_fr2_dl; - reduced_aggregated_bw_e reduced_bw_fr2_ul; - }; - struct reduced_max_mimo_layers_fr1_s_ { - mimo_layers_dl_e reduced_mimo_layers_fr1_dl; - mimo_layers_ul_e reduced_mimo_layers_fr1_ul; - }; - struct reduced_max_mimo_layers_fr2_s_ { - mimo_layers_dl_e reduced_mimo_layers_fr2_dl; - mimo_layers_ul_e reduced_mimo_layers_fr2_ul; - }; +// CSI-ReportConfig ::= SEQUENCE +struct csi_report_cfg_s { + struct report_cfg_type_c_ { + struct periodic_s_ { + using pucch_csi_res_list_l_ = dyn_array; - // member variables - bool reduced_max_ccs_present = false; - bool reduced_max_bw_fr1_present = false; - bool reduced_max_bw_fr2_present = false; - bool reduced_max_mimo_layers_fr1_present = false; - bool reduced_max_mimo_layers_fr2_present = false; - reduced_max_ccs_s_ reduced_max_ccs; - reduced_max_bw_fr1_s_ reduced_max_bw_fr1; - reduced_max_bw_fr2_s_ reduced_max_bw_fr2; - reduced_max_mimo_layers_fr1_s_ reduced_max_mimo_layers_fr1; - reduced_max_mimo_layers_fr2_s_ reduced_max_mimo_layers_fr2; + // member variables + csi_report_periodicity_and_offset_c report_slot_cfg; + pucch_csi_res_list_l_ pucch_csi_res_list; + }; + struct semi_persistent_on_pucch_s_ { + using pucch_csi_res_list_l_ = dyn_array; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + csi_report_periodicity_and_offset_c report_slot_cfg; + pucch_csi_res_list_l_ pucch_csi_res_list; + }; + struct semi_persistent_on_pusch_s_ { + struct report_slot_cfg_opts { + enum options { sl5, sl10, sl20, sl40, sl80, sl160, sl320, nulltype } value; + typedef uint16_t number_type; -// UE-CapabilityRAT-Container ::= SEQUENCE -struct ue_cap_rat_container_s { - rat_type_e rat_type; - dyn_octstring ue_cap_rat_container; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated report_slot_cfg_e_; + using report_slot_offset_list_l_ = bounded_array; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + report_slot_cfg_e_ report_slot_cfg; + report_slot_offset_list_l_ report_slot_offset_list; + uint8_t p0alpha = 0; + }; + struct aperiodic_s_ { + using report_slot_offset_list_l_ = bounded_array; -// UplinkTxDirectCurrentList ::= SEQUENCE (SIZE (1..32)) OF UplinkTxDirectCurrentCell -using ul_tx_direct_current_list_l = dyn_array; + // member variables + report_slot_offset_list_l_ report_slot_offset_list; + }; + struct types_opts { + enum options { periodic, semi_persistent_on_pucch, semi_persistent_on_pusch, aperiodic, nulltype } value; -// DRB-CountInfoList ::= SEQUENCE (SIZE (0..29)) OF DRB-CountInfo -using drb_count_info_list_l = dyn_array; + std::string to_string() const; + }; + typedef enumerated types; -// DelayBudgetReport ::= CHOICE -struct delay_budget_report_c { - struct type1_opts { - enum options { - ms_minus1280, - ms_minus640, - ms_minus320, - ms_minus160, - ms_minus80, - ms_minus60, - ms_minus40, - ms_minus20, - ms0, - ms20, - ms40, - ms60, - ms80, - ms160, - ms320, - ms640, - ms1280, - nulltype - } value; - typedef int16_t number_type; + // choice methods + report_cfg_type_c_() = default; + report_cfg_type_c_(const report_cfg_type_c_& other); + report_cfg_type_c_& operator=(const report_cfg_type_c_& other); + ~report_cfg_type_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 + periodic_s_& periodic() + { + assert_choice_type("periodic", type_.to_string(), "reportConfigType"); + return c.get(); + } + semi_persistent_on_pucch_s_& semi_persistent_on_pucch() + { + assert_choice_type("semiPersistentOnPUCCH", type_.to_string(), "reportConfigType"); + return c.get(); + } + semi_persistent_on_pusch_s_& semi_persistent_on_pusch() + { + assert_choice_type("semiPersistentOnPUSCH", type_.to_string(), "reportConfigType"); + return c.get(); + } + aperiodic_s_& aperiodic() + { + assert_choice_type("aperiodic", type_.to_string(), "reportConfigType"); + return c.get(); + } + const periodic_s_& periodic() const + { + assert_choice_type("periodic", type_.to_string(), "reportConfigType"); + return c.get(); + } + const semi_persistent_on_pucch_s_& semi_persistent_on_pucch() const + { + assert_choice_type("semiPersistentOnPUCCH", type_.to_string(), "reportConfigType"); + return c.get(); + } + const semi_persistent_on_pusch_s_& semi_persistent_on_pusch() const + { + assert_choice_type("semiPersistentOnPUSCH", type_.to_string(), "reportConfigType"); + return c.get(); + } + const aperiodic_s_& aperiodic() const + { + assert_choice_type("aperiodic", type_.to_string(), "reportConfigType"); + return c.get(); + } + periodic_s_& set_periodic() + { + set(types::periodic); + return c.get(); + } + semi_persistent_on_pucch_s_& set_semi_persistent_on_pucch() + { + set(types::semi_persistent_on_pucch); + return c.get(); + } + semi_persistent_on_pusch_s_& set_semi_persistent_on_pusch() + { + set(types::semi_persistent_on_pusch); + return c.get(); + } + aperiodic_s_& set_aperiodic() + { + set(types::aperiodic); + return c.get(); + } - std::string to_string() const; - int16_t to_number() const; - }; - typedef enumerated type1_e_; - struct types_opts { - enum options { type1, /*...*/ nulltype } value; - typedef uint8_t number_type; + private: + types type_; + choice_buffer_t c; - std::string to_string() const; - uint8_t to_number() const; + void destroy_(); }; - typedef enumerated types; - - // choice methods - types type() const { return types::type1; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - type1_e_& type1() { return c; } - const type1_e_& type1() const { return c; } + struct report_quant_c_ { + struct cri_ri_i1_cqi_s_ { + struct pdsch_bundle_size_for_csi_opts { + enum options { n2, n4, nulltype } value; + typedef uint8_t number_type; -private: - type1_e_ c; -}; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated pdsch_bundle_size_for_csi_e_; -// FailureInfoRLC-Bearer ::= SEQUENCE -struct fail_info_rlc_bearer_s { - struct fail_type_opts { - enum options { dupl, spare3, spare2, spare1, nulltype } value; + // member variables + bool pdsch_bundle_size_for_csi_present = false; + pdsch_bundle_size_for_csi_e_ pdsch_bundle_size_for_csi; + }; + struct types_opts { + enum options { + none, + cri_ri_pmi_cqi, + cri_ri_i1, + cri_ri_i1_cqi, + cri_ri_cqi, + cri_rsrp, + ssb_idx_rsrp, + cri_ri_li_pmi_cqi, + nulltype + } value; - std::string to_string() const; - }; - typedef enumerated fail_type_e_; + std::string to_string() const; + }; + typedef enumerated types; - // member variables - uint8_t cell_group_id = 0; - uint8_t lc_ch_id = 1; - fail_type_e_ fail_type; + // choice methods + report_quant_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; + // getters + cri_ri_i1_cqi_s_& cri_ri_i1_cqi() + { + assert_choice_type("cri-RI-i1-CQI", type_.to_string(), "reportQuantity"); + return c; + } + const cri_ri_i1_cqi_s_& cri_ri_i1_cqi() const + { + assert_choice_type("cri-RI-i1-CQI", type_.to_string(), "reportQuantity"); + return c; + } + cri_ri_i1_cqi_s_& set_cri_ri_i1_cqi() + { + set(types::cri_ri_i1_cqi); + return c; + } - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + private: + types type_; + cri_ri_i1_cqi_s_ c; + }; + struct report_freq_cfg_s_ { + struct cqi_format_ind_opts { + enum options { wideband_cqi, subband_cqi, nulltype } value; -// LocationMeasurementInfo ::= CHOICE -struct location_meas_info_c { - struct types_opts { - enum options { eutra_rstd, /*...*/ eutra_fine_timing_detection, nulltype } value; + std::string to_string() const; + }; + typedef enumerated cqi_format_ind_e_; + struct pmi_format_ind_opts { + enum options { wideband_pmi, subband_pmi, nulltype } value; - std::string to_string() const; - }; - typedef enumerated types; + std::string to_string() const; + }; + typedef enumerated pmi_format_ind_e_; + struct csi_report_band_c_ { + struct types_opts { + enum options { + subbands3, + subbands4, + subbands5, + subbands6, + subbands7, + subbands8, + subbands9, + subbands10, + subbands11, + subbands12, + subbands13, + subbands14, + subbands15, + subbands16, + subbands17, + subbands18, + // ... + subbands19_v1530, + nulltype + } value; + typedef uint8_t number_type; - // choice methods - location_meas_info_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; - // getters - eutra_rstd_info_list_l& eutra_rstd() - { - assert_choice_type("eutra-RSTD", type_.to_string(), "LocationMeasurementInfo"); - return c; - } - const eutra_rstd_info_list_l& eutra_rstd() const - { - assert_choice_type("eutra-RSTD", type_.to_string(), "LocationMeasurementInfo"); - return c; - } - eutra_rstd_info_list_l& set_eutra_rstd() - { - set(types::eutra_rstd); - return c; - } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; -private: - types type_; - eutra_rstd_info_list_l c; -}; + // choice methods + csi_report_band_c_() = default; + csi_report_band_c_(const csi_report_band_c_& other); + csi_report_band_c_& operator=(const csi_report_band_c_& other); + ~csi_report_band_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 + fixed_bitstring<3>& subbands3() + { + assert_choice_type("subbands3", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<4>& subbands4() + { + assert_choice_type("subbands4", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<5>& subbands5() + { + assert_choice_type("subbands5", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<6>& subbands6() + { + assert_choice_type("subbands6", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<7>& subbands7() + { + assert_choice_type("subbands7", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<8>& subbands8() + { + assert_choice_type("subbands8", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<9>& subbands9() + { + assert_choice_type("subbands9", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<10>& subbands10() + { + assert_choice_type("subbands10", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<11>& subbands11() + { + assert_choice_type("subbands11", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<12>& subbands12() + { + assert_choice_type("subbands12", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<13>& subbands13() + { + assert_choice_type("subbands13", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<14>& subbands14() + { + assert_choice_type("subbands14", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<15>& subbands15() + { + assert_choice_type("subbands15", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<16>& subbands16() + { + assert_choice_type("subbands16", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<17>& subbands17() + { + assert_choice_type("subbands17", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<18>& subbands18() + { + assert_choice_type("subbands18", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<19>& subbands19_v1530() + { + assert_choice_type("subbands19-v1530", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<3>& subbands3() const + { + assert_choice_type("subbands3", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<4>& subbands4() const + { + assert_choice_type("subbands4", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<5>& subbands5() const + { + assert_choice_type("subbands5", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<6>& subbands6() const + { + assert_choice_type("subbands6", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<7>& subbands7() const + { + assert_choice_type("subbands7", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<8>& subbands8() const + { + assert_choice_type("subbands8", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<9>& subbands9() const + { + assert_choice_type("subbands9", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<10>& subbands10() const + { + assert_choice_type("subbands10", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<11>& subbands11() const + { + assert_choice_type("subbands11", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<12>& subbands12() const + { + assert_choice_type("subbands12", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<13>& subbands13() const + { + assert_choice_type("subbands13", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<14>& subbands14() const + { + assert_choice_type("subbands14", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<15>& subbands15() const + { + assert_choice_type("subbands15", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<16>& subbands16() const + { + assert_choice_type("subbands16", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<17>& subbands17() const + { + assert_choice_type("subbands17", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<18>& subbands18() const + { + assert_choice_type("subbands18", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + const fixed_bitstring<19>& subbands19_v1530() const + { + assert_choice_type("subbands19-v1530", type_.to_string(), "csi-ReportingBand"); + return c.get >(); + } + fixed_bitstring<3>& set_subbands3() + { + set(types::subbands3); + return c.get >(); + } + fixed_bitstring<4>& set_subbands4() + { + set(types::subbands4); + return c.get >(); + } + fixed_bitstring<5>& set_subbands5() + { + set(types::subbands5); + return c.get >(); + } + fixed_bitstring<6>& set_subbands6() + { + set(types::subbands6); + return c.get >(); + } + fixed_bitstring<7>& set_subbands7() + { + set(types::subbands7); + return c.get >(); + } + fixed_bitstring<8>& set_subbands8() + { + set(types::subbands8); + return c.get >(); + } + fixed_bitstring<9>& set_subbands9() + { + set(types::subbands9); + return c.get >(); + } + fixed_bitstring<10>& set_subbands10() + { + set(types::subbands10); + return c.get >(); + } + fixed_bitstring<11>& set_subbands11() + { + set(types::subbands11); + return c.get >(); + } + fixed_bitstring<12>& set_subbands12() + { + set(types::subbands12); + return c.get >(); + } + fixed_bitstring<13>& set_subbands13() + { + set(types::subbands13); + return c.get >(); + } + fixed_bitstring<14>& set_subbands14() + { + set(types::subbands14); + return c.get >(); + } + fixed_bitstring<15>& set_subbands15() + { + set(types::subbands15); + return c.get >(); + } + fixed_bitstring<16>& set_subbands16() + { + set(types::subbands16); + return c.get >(); + } + fixed_bitstring<17>& set_subbands17() + { + set(types::subbands17); + return c.get >(); + } + fixed_bitstring<18>& set_subbands18() + { + set(types::subbands18); + return c.get >(); + } + fixed_bitstring<19>& set_subbands19_v1530() + { + set(types::subbands19_v1530); + return c.get >(); + } -// MeasResults ::= SEQUENCE -struct meas_results_s { - struct meas_result_neigh_cells_c_ { - struct types_opts { - enum options { meas_result_list_nr, /*...*/ meas_result_list_eutra, nulltype } value; + private: + types type_; + choice_buffer_t > c; - std::string to_string() const; + void destroy_(); }; - typedef enumerated types; - - // choice methods - meas_result_neigh_cells_c_() = default; - meas_result_neigh_cells_c_(const meas_result_neigh_cells_c_& other); - meas_result_neigh_cells_c_& operator=(const meas_result_neigh_cells_c_& other); - ~meas_result_neigh_cells_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 - meas_result_list_nr_l& meas_result_list_nr() - { - assert_choice_type("measResultListNR", type_.to_string(), "measResultNeighCells"); - return c.get(); - } - meas_result_list_eutra_l& meas_result_list_eutra() - { - assert_choice_type("measResultListEUTRA", type_.to_string(), "measResultNeighCells"); - return c.get(); - } - const meas_result_list_nr_l& meas_result_list_nr() const - { - assert_choice_type("measResultListNR", type_.to_string(), "measResultNeighCells"); - return c.get(); - } - const meas_result_list_eutra_l& meas_result_list_eutra() const - { - assert_choice_type("measResultListEUTRA", type_.to_string(), "measResultNeighCells"); - return c.get(); - } - meas_result_list_nr_l& set_meas_result_list_nr() - { - set(types::meas_result_list_nr); - return c.get(); - } - meas_result_list_eutra_l& set_meas_result_list_eutra() - { - set(types::meas_result_list_eutra); - return c.get(); - } - private: - types type_; - choice_buffer_t c; - - void destroy_(); + // member variables + bool cqi_format_ind_present = false; + bool pmi_format_ind_present = false; + bool csi_report_band_present = false; + cqi_format_ind_e_ cqi_format_ind; + pmi_format_ind_e_ pmi_format_ind; + csi_report_band_c_ csi_report_band; }; - - // member variables - bool ext = false; - bool meas_result_neigh_cells_present = false; - uint8_t meas_id = 1; - meas_result_serv_mo_list_l meas_result_serving_mo_list; - meas_result_neigh_cells_c_ meas_result_neigh_cells; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE -struct rrc_recfg_complete_v1530_ies_s { - bool ul_tx_direct_current_list_present = false; - bool non_crit_ext_present = false; - ul_tx_direct_current_list_l ul_tx_direct_current_list; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RegisteredAMF ::= SEQUENCE -struct registered_amf_s { - bool plmn_id_present = false; - plmn_id_s plmn_id; - fixed_bitstring<24> amf_id; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// S-NSSAI ::= CHOICE -struct s_nssai_c { - struct types_opts { - enum options { sst, sst_sd, nulltype } value; + struct time_restrict_for_ch_meass_opts { + enum options { cfgured, not_cfgured, nulltype } value; std::string to_string() const; }; - typedef enumerated types; - - // choice methods - s_nssai_c() = default; - s_nssai_c(const s_nssai_c& other); - s_nssai_c& operator=(const s_nssai_c& other); - ~s_nssai_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 - fixed_bitstring<8>& sst() - { - assert_choice_type("sst", type_.to_string(), "S-NSSAI"); - return c.get >(); - } - fixed_bitstring<32>& sst_sd() - { - assert_choice_type("sst-SD", type_.to_string(), "S-NSSAI"); - return c.get >(); - } - const fixed_bitstring<8>& sst() const - { - assert_choice_type("sst", type_.to_string(), "S-NSSAI"); - return c.get >(); - } - const fixed_bitstring<32>& sst_sd() const - { - assert_choice_type("sst-SD", type_.to_string(), "S-NSSAI"); - return c.get >(); - } - fixed_bitstring<8>& set_sst() - { - set(types::sst); - return c.get >(); - } - fixed_bitstring<32>& set_sst_sd() - { - set(types::sst_sd); - return c.get >(); - } - -private: - types type_; - choice_buffer_t > c; - - void destroy_(); -}; - -// UE-CapabilityRAT-ContainerList ::= SEQUENCE (SIZE (0..8)) OF UE-CapabilityRAT-Container -using ue_cap_rat_container_list_l = dyn_array; - -// UEAssistanceInformation-v1540-IEs ::= SEQUENCE -struct ueassist_info_v1540_ies_s { - bool overheat_assist_present = false; - bool non_crit_ext_present = false; - overheat_assist_s overheat_assist; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CounterCheckResponse-IEs ::= SEQUENCE -struct counter_check_resp_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - drb_count_info_list_l drb_count_info_list; - dyn_octstring late_non_crit_ext; + typedef enumerated time_restrict_for_ch_meass_e_; + struct time_restrict_for_interference_meass_opts { + enum options { cfgured, not_cfgured, nulltype } value; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + }; + typedef enumerated time_restrict_for_interference_meass_e_; + struct dummy_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; -// FailureInformation-IEs ::= SEQUENCE -struct fail_info_ies_s { - bool fail_info_rlc_bearer_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - fail_info_rlc_bearer_s fail_info_rlc_bearer; - dyn_octstring late_non_crit_ext; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated dummy_e_; + struct group_based_beam_report_c_ { + struct disabled_s_ { + struct nrof_reported_rs_opts { + enum options { n1, n2, n3, n4, nulltype } value; + typedef uint8_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated nrof_reported_rs_e_; -// LocationMeasurementIndication-IEs ::= SEQUENCE -struct location_meas_ind_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - setup_release_c meas_ind; - dyn_octstring late_non_crit_ext; + // member variables + bool nrof_reported_rs_present = false; + nrof_reported_rs_e_ nrof_reported_rs; + }; + struct types_opts { + enum options { enabled, disabled, nulltype } value; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + }; + typedef enumerated types; -// MeasurementReport-IEs ::= SEQUENCE -struct meas_report_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - meas_results_s meas_results; - dyn_octstring late_non_crit_ext; + // choice methods + group_based_beam_report_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; + // getters + disabled_s_& disabled() + { + assert_choice_type("disabled", type_.to_string(), "groupBasedBeamReporting"); + return c; + } + const disabled_s_& disabled() const + { + assert_choice_type("disabled", type_.to_string(), "groupBasedBeamReporting"); + return c; + } + disabled_s_& set_disabled() + { + set(types::disabled); + return c; + } - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + private: + types type_; + disabled_s_ c; + }; + struct cqi_table_opts { + enum options { table1, table2, table3, spare1, nulltype } value; + typedef uint8_t number_type; -// RRCReconfigurationComplete-IEs ::= SEQUENCE -struct rrc_recfg_complete_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - dyn_octstring late_non_crit_ext; - rrc_recfg_complete_v1530_ies_s non_crit_ext; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated cqi_table_e_; + struct subband_size_opts { + enum options { value1, value2, nulltype } value; + typedef uint8_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated subband_size_e_; + using non_pmi_port_ind_l_ = dyn_array; + struct semi_persistent_on_pusch_v1530_s_ { + struct report_slot_cfg_v1530_opts { + enum options { sl4, sl8, sl16, nulltype } value; + typedef uint8_t number_type; -// RRCReestablishmentComplete-IEs ::= SEQUENCE -struct rrc_reest_complete_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - dyn_octstring late_non_crit_ext; + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated report_slot_cfg_v1530_e_; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // member variables + report_slot_cfg_v1530_e_ report_slot_cfg_v1530; + }; -// RRCResumeComplete-IEs ::= SEQUENCE -struct rrc_resume_complete_ies_s { - bool ded_nas_msg_present = false; - bool sel_plmn_id_present = false; - bool ul_tx_direct_current_list_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - dyn_octstring ded_nas_msg; - uint8_t sel_plmn_id = 1; - ul_tx_direct_current_list_l ul_tx_direct_current_list; - dyn_octstring late_non_crit_ext; + // member variables + bool ext = false; + bool carrier_present = false; + bool csi_im_res_for_interference_present = false; + bool nzp_csi_rs_res_for_interference_present = false; + bool report_freq_cfg_present = false; + bool codebook_cfg_present = false; + bool dummy_present = false; + bool cqi_table_present = false; + bool non_pmi_port_ind_present = false; + uint8_t report_cfg_id = 0; + uint8_t carrier = 0; + uint8_t res_for_ch_meas = 0; + uint8_t csi_im_res_for_interference = 0; + uint8_t nzp_csi_rs_res_for_interference = 0; + report_cfg_type_c_ report_cfg_type; + report_quant_c_ report_quant; + report_freq_cfg_s_ report_freq_cfg; + time_restrict_for_ch_meass_e_ time_restrict_for_ch_meass; + time_restrict_for_interference_meass_e_ time_restrict_for_interference_meass; + codebook_cfg_s codebook_cfg; + dummy_e_ dummy; + group_based_beam_report_c_ group_based_beam_report; + cqi_table_e_ cqi_table; + subband_size_e_ subband_size; + non_pmi_port_ind_l_ non_pmi_port_ind; + // ... + // group 0 + copy_ptr semi_persistent_on_pusch_v1530; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -18968,86 +19371,89 @@ struct rrc_resume_complete_ies_s { void to_json(json_writer& j) const; }; -// RRCSetupComplete-IEs ::= SEQUENCE -struct rrc_setup_complete_ies_s { - struct guami_type_opts { - enum options { native, mapped, nulltype } value; +// CSI-ResourceConfig ::= SEQUENCE +struct csi_res_cfg_s { + struct csi_rs_res_set_list_c_ { + struct nzp_csi_rs_ssb_s_ { + using nzp_csi_rs_res_set_list_l_ = bounded_array; + using csi_ssb_res_set_list_l_ = std::array; - std::string to_string() const; - }; - typedef enumerated guami_type_e_; - using s_nssai_list_l_ = dyn_array; - struct ng_minus5_g_s_tmsi_value_c_ { + // member variables + bool nzp_csi_rs_res_set_list_present = false; + bool csi_ssb_res_set_list_present = false; + nzp_csi_rs_res_set_list_l_ nzp_csi_rs_res_set_list; + csi_ssb_res_set_list_l_ csi_ssb_res_set_list; + }; + using csi_im_res_set_list_l_ = bounded_array; struct types_opts { - enum options { ng_minus5_g_s_tmsi, ng_minus5_g_s_tmsi_part2, nulltype } value; + enum options { nzp_csi_rs_ssb, csi_im_res_set_list, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - ng_minus5_g_s_tmsi_value_c_() = default; - ng_minus5_g_s_tmsi_value_c_(const ng_minus5_g_s_tmsi_value_c_& other); - ng_minus5_g_s_tmsi_value_c_& operator=(const ng_minus5_g_s_tmsi_value_c_& other); - ~ng_minus5_g_s_tmsi_value_c_() { destroy_(); } + csi_rs_res_set_list_c_() = default; + csi_rs_res_set_list_c_(const csi_rs_res_set_list_c_& other); + csi_rs_res_set_list_c_& operator=(const csi_rs_res_set_list_c_& other); + ~csi_rs_res_set_list_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 - fixed_bitstring<48>& ng_minus5_g_s_tmsi() + nzp_csi_rs_ssb_s_& nzp_csi_rs_ssb() { - assert_choice_type("ng-5G-S-TMSI", type_.to_string(), "ng-5G-S-TMSI-Value"); - return c.get >(); + assert_choice_type("nzp-CSI-RS-SSB", type_.to_string(), "csi-RS-ResourceSetList"); + return c.get(); } - fixed_bitstring<9>& ng_minus5_g_s_tmsi_part2() + csi_im_res_set_list_l_& csi_im_res_set_list() { - assert_choice_type("ng-5G-S-TMSI-Part2", type_.to_string(), "ng-5G-S-TMSI-Value"); - return c.get >(); + assert_choice_type("csi-IM-ResourceSetList", type_.to_string(), "csi-RS-ResourceSetList"); + return c.get(); } - const fixed_bitstring<48>& ng_minus5_g_s_tmsi() const + const nzp_csi_rs_ssb_s_& nzp_csi_rs_ssb() const { - assert_choice_type("ng-5G-S-TMSI", type_.to_string(), "ng-5G-S-TMSI-Value"); - return c.get >(); + assert_choice_type("nzp-CSI-RS-SSB", type_.to_string(), "csi-RS-ResourceSetList"); + return c.get(); } - const fixed_bitstring<9>& ng_minus5_g_s_tmsi_part2() const + const csi_im_res_set_list_l_& csi_im_res_set_list() const { - assert_choice_type("ng-5G-S-TMSI-Part2", type_.to_string(), "ng-5G-S-TMSI-Value"); - return c.get >(); + assert_choice_type("csi-IM-ResourceSetList", type_.to_string(), "csi-RS-ResourceSetList"); + return c.get(); } - fixed_bitstring<48>& set_ng_minus5_g_s_tmsi() + nzp_csi_rs_ssb_s_& set_nzp_csi_rs_ssb() { - set(types::ng_minus5_g_s_tmsi); - return c.get >(); + set(types::nzp_csi_rs_ssb); + return c.get(); } - fixed_bitstring<9>& set_ng_minus5_g_s_tmsi_part2() + csi_im_res_set_list_l_& set_csi_im_res_set_list() { - set(types::ng_minus5_g_s_tmsi_part2); - return c.get >(); + set(types::csi_im_res_set_list); + return c.get(); } private: - types type_; - choice_buffer_t > c; + types type_; + choice_buffer_t c; void destroy_(); }; + struct res_type_opts { + enum options { aperiodic, semi_persistent, periodic, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated res_type_e_; // member variables - bool registered_amf_present = false; - bool guami_type_present = false; - bool s_nssai_list_present = false; - bool ng_minus5_g_s_tmsi_value_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - uint8_t sel_plmn_id = 1; - registered_amf_s registered_amf; - guami_type_e_ guami_type; - s_nssai_list_l_ s_nssai_list; - dyn_octstring ded_nas_msg; - ng_minus5_g_s_tmsi_value_c_ ng_minus5_g_s_tmsi_value; - dyn_octstring late_non_crit_ext; + bool ext = false; + uint8_t csi_res_cfg_id = 0; + csi_rs_res_set_list_c_ csi_rs_res_set_list; + uint8_t bwp_id = 0; + res_type_e_ res_type; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19055,11 +19461,15 @@ struct rrc_setup_complete_ies_s { void to_json(json_writer& j) const; }; -// SecurityModeComplete-IEs ::= SEQUENCE -struct security_mode_complete_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - dyn_octstring late_non_crit_ext; +// CSI-SSB-ResourceSet ::= SEQUENCE +struct csi_ssb_res_set_s { + using csi_ssb_res_list_l_ = dyn_array; + + // member variables + bool ext = false; + uint8_t csi_ssb_res_set_id = 0; + csi_ssb_res_list_l_ csi_ssb_res_list; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19067,26 +19477,33 @@ struct security_mode_complete_ies_s { void to_json(json_writer& j) const; }; -// SecurityModeFailure-IEs ::= SEQUENCE -struct security_mode_fail_ies_s { - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - dyn_octstring late_non_crit_ext; +// CSI-SemiPersistentOnPUSCH-TriggerStateList ::= SEQUENCE (SIZE (1..64)) OF CSI-SemiPersistentOnPUSCH-TriggerState +using csi_semi_persistent_on_pusch_trigger_state_list_l = dyn_array; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// NZP-CSI-RS-Resource ::= SEQUENCE +struct nzp_csi_rs_res_s { + struct pwr_ctrl_offset_ss_opts { + enum options { db_minus3, db0, db3, db6, nulltype } value; + typedef int8_t number_type; -// UEAssistanceInformation-IEs ::= SEQUENCE -struct ueassist_info_ies_s { - bool delay_budget_report_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - delay_budget_report_c delay_budget_report; - dyn_octstring late_non_crit_ext; - ueassist_info_v1540_ies_s non_crit_ext; + std::string to_string() const; + int8_t to_number() const; + }; + typedef enumerated pwr_ctrl_offset_ss_e_; + + // member variables + bool ext = false; + bool pwr_ctrl_offset_ss_present = false; + bool periodicity_and_offset_present = false; + bool qcl_info_periodic_csi_rs_present = false; + uint8_t nzp_csi_rs_res_id = 0; + csi_rs_res_map_s res_map; + int8_t pwr_ctrl_offset = -8; + pwr_ctrl_offset_ss_e_ pwr_ctrl_offset_ss; + uint16_t scrambling_id = 0; + csi_res_periodicity_and_offset_c periodicity_and_offset; + uint8_t qcl_info_periodic_csi_rs = 0; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19094,13 +19511,26 @@ struct ueassist_info_ies_s { void to_json(json_writer& j) const; }; -// UECapabilityInformation-IEs ::= SEQUENCE -struct ue_cap_info_ies_s { - bool ue_cap_rat_container_list_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - ue_cap_rat_container_list_l ue_cap_rat_container_list; - dyn_octstring late_non_crit_ext; +// NZP-CSI-RS-ResourceSet ::= SEQUENCE +struct nzp_csi_rs_res_set_s { + using nzp_csi_rs_res_l_ = dyn_array; + struct repeat_opts { + enum options { on, off, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated repeat_e_; + + // member variables + bool ext = false; + bool repeat_present = false; + bool aperiodic_trigger_offset_present = false; + bool trs_info_present = false; + uint8_t nzp_csi_res_set_id = 0; + nzp_csi_rs_res_l_ nzp_csi_rs_res; + repeat_e_ repeat; + uint8_t aperiodic_trigger_offset = 0; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19108,13 +19538,61 @@ struct ue_cap_info_ies_s { void to_json(json_writer& j) const; }; -// ULInformationTransfer-IEs ::= SEQUENCE -struct ul_info_transfer_ies_s { - bool ded_nas_msg_present = false; - bool late_non_crit_ext_present = false; - bool non_crit_ext_present = false; - dyn_octstring ded_nas_msg; - dyn_octstring late_non_crit_ext; +// CSI-MeasConfig ::= SEQUENCE +struct csi_meas_cfg_s { + using nzp_csi_rs_res_to_add_mod_list_l_ = dyn_array; + using nzp_csi_rs_res_to_release_list_l_ = dyn_array; + using nzp_csi_rs_res_set_to_add_mod_list_l_ = dyn_array; + using nzp_csi_rs_res_set_to_release_list_l_ = dyn_array; + using csi_im_res_to_add_mod_list_l_ = dyn_array; + using csi_im_res_to_release_list_l_ = bounded_array; + using csi_im_res_set_to_add_mod_list_l_ = dyn_array; + using csi_im_res_set_to_release_list_l_ = dyn_array; + using csi_ssb_res_set_to_add_mod_list_l_ = dyn_array; + using csi_ssb_res_set_to_release_list_l_ = dyn_array; + using csi_res_cfg_to_add_mod_list_l_ = dyn_array; + using csi_res_cfg_to_release_list_l_ = dyn_array; + using csi_report_cfg_to_add_mod_list_l_ = dyn_array; + using csi_report_cfg_to_release_list_l_ = dyn_array; + + // member variables + bool ext = false; + bool nzp_csi_rs_res_to_add_mod_list_present = false; + bool nzp_csi_rs_res_to_release_list_present = false; + bool nzp_csi_rs_res_set_to_add_mod_list_present = false; + bool nzp_csi_rs_res_set_to_release_list_present = false; + bool csi_im_res_to_add_mod_list_present = false; + bool csi_im_res_to_release_list_present = false; + bool csi_im_res_set_to_add_mod_list_present = false; + bool csi_im_res_set_to_release_list_present = false; + bool csi_ssb_res_set_to_add_mod_list_present = false; + bool csi_ssb_res_set_to_release_list_present = false; + bool csi_res_cfg_to_add_mod_list_present = false; + bool csi_res_cfg_to_release_list_present = false; + bool csi_report_cfg_to_add_mod_list_present = false; + bool csi_report_cfg_to_release_list_present = false; + bool report_trigger_size_present = false; + bool aperiodic_trigger_state_list_present = false; + bool semi_persistent_on_pusch_trigger_state_list_present = false; + nzp_csi_rs_res_to_add_mod_list_l_ nzp_csi_rs_res_to_add_mod_list; + nzp_csi_rs_res_to_release_list_l_ nzp_csi_rs_res_to_release_list; + nzp_csi_rs_res_set_to_add_mod_list_l_ nzp_csi_rs_res_set_to_add_mod_list; + nzp_csi_rs_res_set_to_release_list_l_ nzp_csi_rs_res_set_to_release_list; + csi_im_res_to_add_mod_list_l_ csi_im_res_to_add_mod_list; + csi_im_res_to_release_list_l_ csi_im_res_to_release_list; + csi_im_res_set_to_add_mod_list_l_ csi_im_res_set_to_add_mod_list; + csi_im_res_set_to_release_list_l_ csi_im_res_set_to_release_list; + csi_ssb_res_set_to_add_mod_list_l_ csi_ssb_res_set_to_add_mod_list; + csi_ssb_res_set_to_release_list_l_ csi_ssb_res_set_to_release_list; + csi_res_cfg_to_add_mod_list_l_ csi_res_cfg_to_add_mod_list; + csi_res_cfg_to_release_list_l_ csi_res_cfg_to_release_list; + csi_report_cfg_to_add_mod_list_l_ csi_report_cfg_to_add_mod_list; + csi_report_cfg_to_release_list_l_ csi_report_cfg_to_release_list; + uint8_t report_trigger_size = 0; + setup_release_c > aperiodic_trigger_state_list; + setup_release_c > + semi_persistent_on_pusch_trigger_state_list; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19122,106 +19600,168 @@ struct ul_info_transfer_ies_s { void to_json(json_writer& j) const; }; -// CounterCheckResponse ::= SEQUENCE -struct counter_check_resp_s { - struct crit_exts_c_ { +// EUTRA-MBSFN-SubframeConfig ::= SEQUENCE +struct eutra_mbsfn_sf_cfg_s { + struct radioframe_alloc_period_opts { + enum options { n1, n2, n4, n8, n16, n32, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated radioframe_alloc_period_e_; + struct sf_alloc1_c_ { struct types_opts { - enum options { counter_check_resp, crit_exts_future, nulltype } value; + enum options { one_frame, four_frames, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; typedef enumerated types; // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_c_() { destroy_(); } + sf_alloc1_c_() = default; + sf_alloc1_c_(const sf_alloc1_c_& other); + sf_alloc1_c_& operator=(const sf_alloc1_c_& other); + ~sf_alloc1_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 - counter_check_resp_ies_s& counter_check_resp() + fixed_bitstring<6>& one_frame() { - assert_choice_type("counterCheckResponse", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation1"); + return c.get >(); } - const counter_check_resp_ies_s& counter_check_resp() const + fixed_bitstring<24>& four_frames() { - assert_choice_type("counterCheckResponse", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation1"); + return c.get >(); } - counter_check_resp_ies_s& set_counter_check_resp() + const fixed_bitstring<6>& one_frame() const { - set(types::counter_check_resp); - return c.get(); + assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation1"); + return c.get >(); + } + const fixed_bitstring<24>& four_frames() const + { + assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation1"); + return c.get >(); + } + fixed_bitstring<6>& set_one_frame() + { + set(types::one_frame); + return c.get >(); + } + fixed_bitstring<24>& set_four_frames() + { + set(types::four_frames); + return c.get >(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t > c; void destroy_(); }; - - // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FailureInformation ::= SEQUENCE -struct fail_info_s { - struct crit_exts_c_ { + struct sf_alloc2_c_ { struct types_opts { - enum options { fail_info, crit_exts_future, nulltype } value; + enum options { one_frame, four_frames, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; typedef enumerated types; // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_c_() { destroy_(); } + sf_alloc2_c_() = default; + sf_alloc2_c_(const sf_alloc2_c_& other); + sf_alloc2_c_& operator=(const sf_alloc2_c_& other); + ~sf_alloc2_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 - fail_info_ies_s& fail_info() + fixed_bitstring<2>& one_frame() { - assert_choice_type("failureInformation", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation2"); + return c.get >(); } - const fail_info_ies_s& fail_info() const + fixed_bitstring<8>& four_frames() { - assert_choice_type("failureInformation", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation2"); + return c.get >(); } - fail_info_ies_s& set_fail_info() + const fixed_bitstring<2>& one_frame() const { - set(types::fail_info); - return c.get(); + assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation2"); + return c.get >(); + } + const fixed_bitstring<8>& four_frames() const + { + assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation2"); + return c.get >(); + } + fixed_bitstring<2>& set_one_frame() + { + set(types::one_frame); + return c.get >(); + } + fixed_bitstring<8>& set_four_frames() + { + set(types::four_frames); + return c.get >(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t > c; void destroy_(); }; // member variables - crit_exts_c_ crit_exts; + bool ext = false; + bool sf_alloc2_present = false; + radioframe_alloc_period_e_ radioframe_alloc_period; + uint8_t radioframe_alloc_offset = 0; + sf_alloc1_c_ sf_alloc1; + sf_alloc2_c_ sf_alloc2; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRS-CC-SetIndex ::= SEQUENCE +struct srs_cc_set_idx_s { + bool cc_set_idx_present = false; + bool cc_idx_in_one_cc_set_present = false; + uint8_t cc_set_idx = 0; + uint8_t cc_idx_in_one_cc_set = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SlotFormatCombination ::= SEQUENCE +struct slot_format_combination_s { + using slot_formats_l_ = dyn_array; + + // member variables + uint16_t slot_format_combination_id = 0; + slot_formats_l_ slot_formats; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19229,52 +19769,21 @@ struct fail_info_s { void to_json(json_writer& j) const; }; -// LocationMeasurementIndication ::= SEQUENCE -struct location_meas_ind_s { - struct crit_exts_c_ { - struct types_opts { - enum options { location_meas_ind, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - location_meas_ind_ies_s& location_meas_ind() - { - assert_choice_type("locationMeasurementIndication", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const location_meas_ind_ies_s& location_meas_ind() const - { - assert_choice_type("locationMeasurementIndication", type_.to_string(), "criticalExtensions"); - return c.get(); - } - location_meas_ind_ies_s& set_location_meas_ind() - { - set(types::location_meas_ind); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; +// EUTRA-MBSFN-SubframeConfigList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-MBSFN-SubframeConfig +using eutra_mbsfn_sf_cfg_list_l = dyn_array; - void destroy_(); - }; +// FrequencyInfoDL ::= SEQUENCE +struct freq_info_dl_s { + using scs_specific_carrier_list_l_ = dyn_array; // member variables - crit_exts_c_ crit_exts; + bool ext = false; + bool absolute_freq_ssb_present = false; + uint32_t absolute_freq_ssb = 0; + multi_freq_band_list_nr_l freq_band_list; + uint32_t absolute_freq_point_a = 0; + scs_specific_carrier_list_l_ scs_specific_carrier_list; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19282,52 +19791,45 @@ struct location_meas_ind_s { void to_json(json_writer& j) const; }; -// MeasurementReport ::= SEQUENCE -struct meas_report_s { - struct crit_exts_c_ { - struct types_opts { - enum options { meas_report, crit_exts_future, nulltype } value; +// FrequencyInfoUL ::= SEQUENCE +struct freq_info_ul_s { + using scs_specific_carrier_list_l_ = dyn_array; - std::string to_string() const; - }; - typedef enumerated types; + // member variables + bool ext = false; + bool freq_band_list_present = false; + bool absolute_freq_point_a_present = false; + bool add_spec_emission_present = false; + bool p_max_present = false; + bool freq_shift7p5khz_present = false; + multi_freq_band_list_nr_l freq_band_list; + uint32_t absolute_freq_point_a = 0; + scs_specific_carrier_list_l_ scs_specific_carrier_list; + uint8_t add_spec_emission = 0; + int8_t p_max = -30; + // ... - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - meas_report_ies_s& meas_report() - { - assert_choice_type("measurementReport", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const meas_report_ies_s& meas_report() const - { - assert_choice_type("measurementReport", type_.to_string(), "criticalExtensions"); - return c.get(); - } - meas_report_ies_s& set_meas_report() - { - set(types::meas_report); - return c.get(); - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - choice_buffer_t c; +// PUSCH-CodeBlockGroupTransmission ::= SEQUENCE +struct pusch_code_block_group_tx_s { + struct max_code_block_groups_per_transport_block_opts { + enum options { n2, n4, n6, n8, nulltype } value; + typedef uint8_t number_type; - void destroy_(); + std::string to_string() const; + uint8_t to_number() const; }; + typedef enumerated max_code_block_groups_per_transport_block_e_; // member variables - crit_exts_c_ crit_exts; + bool ext = false; + max_code_block_groups_per_transport_block_e_ max_code_block_groups_per_transport_block; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19335,53 +19837,35 @@ struct meas_report_s { void to_json(json_writer& j) const; }; -// RRCReconfigurationComplete ::= SEQUENCE -struct rrc_recfg_complete_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_recfg_complete, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; +// SRS-TPC-PDCCH-Config ::= SEQUENCE +struct srs_tpc_pdcch_cfg_s { + using srs_cc_set_idxlist_l_ = dyn_array; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_recfg_complete_ies_s& rrc_recfg_complete() - { - assert_choice_type("rrcReconfigurationComplete", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const rrc_recfg_complete_ies_s& rrc_recfg_complete() const - { - assert_choice_type("rrcReconfigurationComplete", type_.to_string(), "criticalExtensions"); - return c.get(); - } - rrc_recfg_complete_ies_s& set_rrc_recfg_complete() - { - set(types::rrc_recfg_complete); - return c.get(); - } + // member variables + bool srs_cc_set_idxlist_present = false; + srs_cc_set_idxlist_l_ srs_cc_set_idxlist; - private: - types type_; - choice_buffer_t c; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - void destroy_(); - }; +// SlotFormatCombinationsPerCell ::= SEQUENCE +struct slot_format_combinations_per_cell_s { + using slot_format_combinations_l_ = dyn_array; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool ext = false; + bool subcarrier_spacing2_present = false; + bool slot_format_combinations_present = false; + bool position_in_dci_present = false; + uint8_t serving_cell_id = 0; + subcarrier_spacing_e subcarrier_spacing; + subcarrier_spacing_e subcarrier_spacing2; + slot_format_combinations_l_ slot_format_combinations; + uint8_t position_in_dci = 0; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19389,53 +19873,37 @@ struct rrc_recfg_complete_s { void to_json(json_writer& j) const; }; -// RRCReestablishmentComplete ::= SEQUENCE -struct rrc_reest_complete_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_reest_complete, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; +// DownlinkConfigCommon ::= SEQUENCE +struct dl_cfg_common_s { + bool ext = false; + bool freq_info_dl_present = false; + bool init_dl_bwp_present = false; + freq_info_dl_s freq_info_dl; + bwp_dl_common_s init_dl_bwp; + // ... - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_reest_complete_ies_s& rrc_reest_complete() - { - assert_choice_type("rrcReestablishmentComplete", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const rrc_reest_complete_ies_s& rrc_reest_complete() const - { - assert_choice_type("rrcReestablishmentComplete", type_.to_string(), "criticalExtensions"); - return c.get(); - } - rrc_reest_complete_ies_s& set_rrc_reest_complete() - { - set(types::rrc_reest_complete); - return c.get(); - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - choice_buffer_t c; +// PDSCH-CodeBlockGroupTransmission ::= SEQUENCE +struct pdsch_code_block_group_tx_s { + struct max_code_block_groups_per_transport_block_opts { + enum options { n2, n4, n6, n8, nulltype } value; + typedef uint8_t number_type; - void destroy_(); + std::string to_string() const; + uint8_t to_number() const; }; + typedef enumerated max_code_block_groups_per_transport_block_e_; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool ext = false; + max_code_block_groups_per_transport_block_e_ max_code_block_groups_per_transport_block; + bool code_block_group_flush_ind = false; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19443,53 +19911,30 @@ struct rrc_reest_complete_s { void to_json(json_writer& j) const; }; -// RRCResumeComplete ::= SEQUENCE -struct rrc_resume_complete_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_resume_complete, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_resume_complete_ies_s& rrc_resume_complete() - { - assert_choice_type("rrcResumeComplete", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const rrc_resume_complete_ies_s& rrc_resume_complete() const - { - assert_choice_type("rrcResumeComplete", type_.to_string(), "criticalExtensions"); - return c.get(); - } - rrc_resume_complete_ies_s& set_rrc_resume_complete() - { - set(types::rrc_resume_complete); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; +// PUSCH-ServingCellConfig ::= SEQUENCE +struct pusch_serving_cell_cfg_s { + struct xoverhead_opts { + enum options { xoh6, xoh12, xoh18, nulltype } value; + typedef uint8_t number_type; - void destroy_(); + std::string to_string() const; + uint8_t to_number() const; }; + typedef enumerated xoverhead_e_; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool ext = false; + bool code_block_group_tx_present = false; + bool rate_matching_present = false; + bool xoverhead_present = false; + setup_release_c code_block_group_tx; + xoverhead_e_ xoverhead; + // ... + // group 0 + bool max_mimo_layers_present = false; + bool processing_type2_enabled_present = false; + uint8_t max_mimo_layers = 1; + bool processing_type2_enabled = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19497,53 +19942,158 @@ struct rrc_resume_complete_s { void to_json(json_writer& j) const; }; -// RRCSetupComplete ::= SEQUENCE -struct rrc_setup_complete_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_setup_complete, crit_exts_future, nulltype } value; +// PollByte ::= ENUMERATED +struct poll_byte_opts { + enum 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, + mb10, + mb11, + mb12, + mb13, + mb14, + mb15, + mb16, + mb17, + mb18, + mb20, + mb25, + mb30, + mb40, + infinity, + spare20, + spare19, + spare18, + spare17, + spare16, + spare15, + spare14, + spare13, + spare12, + spare11, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; - std::string to_string() const; - }; - typedef enumerated types; + std::string to_string() const; +}; +typedef enumerated poll_byte_e; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - rrc_setup_complete_ies_s& rrc_setup_complete() - { - assert_choice_type("rrcSetupComplete", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const rrc_setup_complete_ies_s& rrc_setup_complete() const - { - assert_choice_type("rrcSetupComplete", type_.to_string(), "criticalExtensions"); - return c.get(); - } - rrc_setup_complete_ies_s& set_rrc_setup_complete() - { - set(types::rrc_setup_complete); - return c.get(); - } +// PollPDU ::= ENUMERATED +struct poll_pdu_opts { + enum 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, + nulltype + } value; + typedef int32_t number_type; - private: - types type_; - choice_buffer_t c; + std::string to_string() const; + int32_t to_number() const; +}; +typedef enumerated poll_pdu_e; - void destroy_(); +// RateMatchPatternLTE-CRS ::= SEQUENCE +struct rate_match_pattern_lte_crs_s { + struct carrier_bw_dl_opts { + enum options { n6, n15, n25, n50, n75, n100, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated carrier_bw_dl_e_; + struct nrof_crs_ports_opts { + enum options { n1, n2, n4, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; }; + typedef enumerated nrof_crs_ports_e_; + struct v_shift_opts { + enum options { n0, n1, n2, n3, n4, n5, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated v_shift_e_; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool mbsfn_sf_cfg_list_present = false; + uint16_t carrier_freq_dl = 0; + carrier_bw_dl_e_ carrier_bw_dl; + eutra_mbsfn_sf_cfg_list_l mbsfn_sf_cfg_list; + nrof_crs_ports_e_ nrof_crs_ports; + v_shift_e_ v_shift; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19551,53 +20101,103 @@ struct rrc_setup_complete_s { void to_json(json_writer& j) const; }; -// SecurityModeComplete ::= SEQUENCE -struct security_mode_complete_s { - struct crit_exts_c_ { +// SN-FieldLengthAM ::= ENUMERATED +struct sn_field_len_am_opts { + enum options { size12, size18, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated sn_field_len_am_e; + +// SN-FieldLengthUM ::= ENUMERATED +struct sn_field_len_um_opts { + enum options { size6, size12, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated sn_field_len_um_e; + +// SRS-CarrierSwitching ::= SEQUENCE +struct srs_carrier_switching_s { + struct srs_switch_from_carrier_opts { + enum options { sul, nul, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated srs_switch_from_carrier_e_; + struct srs_tpc_pdcch_group_c_ { + using type_a_l_ = dyn_array; struct types_opts { - enum options { security_mode_complete, crit_exts_future, nulltype } value; + enum options { type_a, type_b, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_c_() { destroy_(); } + srs_tpc_pdcch_group_c_() = default; + srs_tpc_pdcch_group_c_(const srs_tpc_pdcch_group_c_& other); + srs_tpc_pdcch_group_c_& operator=(const srs_tpc_pdcch_group_c_& other); + ~srs_tpc_pdcch_group_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 - security_mode_complete_ies_s& security_mode_complete() + type_a_l_& type_a() { - assert_choice_type("securityModeComplete", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("typeA", type_.to_string(), "srs-TPC-PDCCH-Group"); + return c.get(); } - const security_mode_complete_ies_s& security_mode_complete() const + srs_tpc_pdcch_cfg_s& type_b() { - assert_choice_type("securityModeComplete", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("typeB", type_.to_string(), "srs-TPC-PDCCH-Group"); + return c.get(); } - security_mode_complete_ies_s& set_security_mode_complete() + const type_a_l_& type_a() const { - set(types::security_mode_complete); - return c.get(); + assert_choice_type("typeA", type_.to_string(), "srs-TPC-PDCCH-Group"); + return c.get(); + } + const srs_tpc_pdcch_cfg_s& type_b() const + { + assert_choice_type("typeB", type_.to_string(), "srs-TPC-PDCCH-Group"); + return c.get(); + } + type_a_l_& set_type_a() + { + set(types::type_a); + return c.get(); + } + srs_tpc_pdcch_cfg_s& set_type_b() + { + set(types::type_b); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; + using monitoring_cells_l_ = bounded_array; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool ext = false; + bool srs_switch_from_serv_cell_idx_present = false; + bool srs_tpc_pdcch_group_present = false; + bool monitoring_cells_present = false; + uint8_t srs_switch_from_serv_cell_idx = 0; + srs_switch_from_carrier_e_ srs_switch_from_carrier; + srs_tpc_pdcch_group_c_ srs_tpc_pdcch_group; + monitoring_cells_l_ monitoring_cells; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19605,53 +20205,20 @@ struct security_mode_complete_s { void to_json(json_writer& j) const; }; -// SecurityModeFailure ::= SEQUENCE -struct security_mode_fail_s { - struct crit_exts_c_ { - struct types_opts { - enum options { security_mode_fail, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - security_mode_fail_ies_s& security_mode_fail() - { - assert_choice_type("securityModeFailure", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const security_mode_fail_ies_s& security_mode_fail() const - { - assert_choice_type("securityModeFailure", type_.to_string(), "criticalExtensions"); - return c.get(); - } - security_mode_fail_ies_s& set_security_mode_fail() - { - set(types::security_mode_fail); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; +// SlotFormatIndicator ::= SEQUENCE +struct slot_format_ind_s { + using slot_format_comb_to_add_mod_list_l_ = dyn_array; + using slot_format_comb_to_release_list_l_ = bounded_array; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + bool ext = false; + bool slot_format_comb_to_add_mod_list_present = false; + bool slot_format_comb_to_release_list_present = false; + uint32_t sfi_rnti = 0; + uint8_t dci_payload_size = 1; + slot_format_comb_to_add_mod_list_l_ slot_format_comb_to_add_mod_list; + slot_format_comb_to_release_list_l_ slot_format_comb_to_release_list; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19659,106 +20226,250 @@ struct security_mode_fail_s { void to_json(json_writer& j) const; }; -// UEAssistanceInformation ::= SEQUENCE -struct ueassist_info_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ue_assist_info, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; +// T-PollRetransmit ::= ENUMERATED +struct t_poll_retx_opts { + enum 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, + ms170, + ms175, + ms180, + ms185, + ms190, + ms195, + ms200, + ms205, + ms210, + ms215, + ms220, + ms225, + ms230, + ms235, + ms240, + ms245, + ms250, + ms300, + ms350, + ms400, + ms450, + ms500, + ms800, + ms1000, + ms2000, + ms4000, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - ueassist_info_ies_s& ue_assist_info() - { - assert_choice_type("ueAssistanceInformation", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const ueassist_info_ies_s& ue_assist_info() const - { - assert_choice_type("ueAssistanceInformation", type_.to_string(), "criticalExtensions"); - return c.get(); - } - ueassist_info_ies_s& set_ue_assist_info() - { - set(types::ue_assist_info); - return c.get(); - } + std::string to_string() const; + uint16_t to_number() const; +}; +typedef enumerated t_poll_retx_e; - private: - types type_; - choice_buffer_t c; +// T-Reassembly ::= ENUMERATED +struct t_reassembly_opts { + enum 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, + nulltype + } value; + typedef uint8_t number_type; - void destroy_(); - }; + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated t_reassembly_e; - // member variables - crit_exts_c_ crit_exts; +// T-StatusProhibit ::= ENUMERATED +struct t_status_prohibit_opts { + enum 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, + ms165, + ms170, + ms175, + ms180, + ms185, + ms190, + ms195, + ms200, + ms205, + ms210, + ms215, + ms220, + ms225, + ms230, + ms235, + ms240, + ms245, + ms250, + ms300, + ms350, + ms400, + ms450, + ms500, + ms800, + ms1000, + ms1200, + ms1600, + ms2000, + ms2400, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + std::string to_string() const; + uint16_t to_number() const; }; +typedef enumerated t_status_prohibit_e; -// UECapabilityInformation ::= SEQUENCE -struct ue_cap_info_s { - struct crit_exts_c_ { +// TDD-UL-DL-SlotConfig ::= SEQUENCE +struct tdd_ul_dl_slot_cfg_s { + struct symbols_c_ { + struct explicit_s_ { + bool nrof_dl_symbols_present = false; + bool nrof_ul_symbols_present = false; + uint8_t nrof_dl_symbols = 1; + uint8_t nrof_ul_symbols = 1; + }; struct types_opts { - enum options { ue_cap_info, crit_exts_future, nulltype } value; + enum options { all_dl, all_ul, explicit_type, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_c_() { destroy_(); } + symbols_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; // getters - ue_cap_info_ies_s& ue_cap_info() + explicit_s_& explicit_type() { - assert_choice_type("ueCapabilityInformation", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("explicit", type_.to_string(), "symbols"); + return c; } - const ue_cap_info_ies_s& ue_cap_info() const + const explicit_s_& explicit_type() const { - assert_choice_type("ueCapabilityInformation", type_.to_string(), "criticalExtensions"); - return c.get(); + assert_choice_type("explicit", type_.to_string(), "symbols"); + return c; } - ue_cap_info_ies_s& set_ue_cap_info() + explicit_s_& set_explicit_type() { - set(types::ue_cap_info); - return c.get(); + set(types::explicit_type); + return c; } private: - types type_; - choice_buffer_t c; - - void destroy_(); + types type_; + explicit_s_ c; }; // member variables - uint8_t rrc_transaction_id = 0; - crit_exts_c_ crit_exts; + uint16_t slot_idx = 0; + symbols_c_ symbols; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19766,52 +20477,13 @@ struct ue_cap_info_s { void to_json(json_writer& j) const; }; -// ULInformationTransfer ::= SEQUENCE -struct ul_info_transfer_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ul_info_transfer, crit_exts_future, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - crit_exts_c_() = default; - crit_exts_c_(const crit_exts_c_& other); - crit_exts_c_& operator=(const crit_exts_c_& other); - ~crit_exts_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 - ul_info_transfer_ies_s& ul_info_transfer() - { - assert_choice_type("ulInformationTransfer", type_.to_string(), "criticalExtensions"); - return c.get(); - } - const ul_info_transfer_ies_s& ul_info_transfer() const - { - assert_choice_type("ulInformationTransfer", type_.to_string(), "criticalExtensions"); - return c.get(); - } - ul_info_transfer_ies_s& set_ul_info_transfer() - { - set(types::ul_info_transfer); - return c.get(); - } - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - crit_exts_c_ crit_exts; +// UplinkConfigCommon ::= SEQUENCE +struct ul_cfg_common_s { + bool freq_info_ul_present = false; + bool init_ul_bwp_present = false; + freq_info_ul_s freq_info_ul; + bwp_ul_common_s init_ul_bwp; + time_align_timer_e dummy; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -19819,306 +20491,202 @@ struct ul_info_transfer_s { void to_json(json_writer& j) const; }; -// UL-DCCH-MessageType ::= CHOICE -struct ul_dcch_msg_type_c { - struct c1_c_ { - struct types_opts { - enum options { - meas_report, - rrc_recfg_complete, - rrc_setup_complete, - rrc_reest_complete, - rrc_resume_complete, - security_mode_complete, - security_mode_fail, - ul_info_transfer, - location_meas_ind, - ue_cap_info, - counter_check_resp, - ue_assist_info, - fail_info, - spare3, - spare2, - spare1, - nulltype - } value; +// CrossCarrierSchedulingConfig ::= SEQUENCE +struct cross_carrier_sched_cfg_s { + struct sched_cell_info_c_ { + struct own_s_ { + bool cif_presence = false; + }; + struct other_s_ { + uint8_t sched_cell_id = 0; + uint8_t cif_in_sched_cell = 1; + }; + struct types_opts { + enum options { own, other, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - c1_c_() = default; - c1_c_(const c1_c_& other); - c1_c_& operator=(const c1_c_& other); - ~c1_c_() { destroy_(); } + sched_cell_info_c_() = default; + sched_cell_info_c_(const sched_cell_info_c_& other); + sched_cell_info_c_& operator=(const sched_cell_info_c_& other); + ~sched_cell_info_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 - meas_report_s& meas_report() - { - assert_choice_type("measurementReport", type_.to_string(), "c1"); - return c.get(); - } - rrc_recfg_complete_s& rrc_recfg_complete() - { - assert_choice_type("rrcReconfigurationComplete", type_.to_string(), "c1"); - return c.get(); - } - rrc_setup_complete_s& rrc_setup_complete() - { - assert_choice_type("rrcSetupComplete", type_.to_string(), "c1"); - return c.get(); - } - rrc_reest_complete_s& rrc_reest_complete() - { - assert_choice_type("rrcReestablishmentComplete", type_.to_string(), "c1"); - return c.get(); - } - rrc_resume_complete_s& rrc_resume_complete() - { - assert_choice_type("rrcResumeComplete", type_.to_string(), "c1"); - return c.get(); - } - security_mode_complete_s& security_mode_complete() - { - assert_choice_type("securityModeComplete", type_.to_string(), "c1"); - return c.get(); - } - security_mode_fail_s& security_mode_fail() - { - assert_choice_type("securityModeFailure", type_.to_string(), "c1"); - return c.get(); - } - ul_info_transfer_s& ul_info_transfer() - { - assert_choice_type("ulInformationTransfer", type_.to_string(), "c1"); - return c.get(); - } - location_meas_ind_s& location_meas_ind() - { - assert_choice_type("locationMeasurementIndication", type_.to_string(), "c1"); - return c.get(); - } - ue_cap_info_s& ue_cap_info() - { - assert_choice_type("ueCapabilityInformation", type_.to_string(), "c1"); - return c.get(); - } - counter_check_resp_s& counter_check_resp() - { - assert_choice_type("counterCheckResponse", type_.to_string(), "c1"); - return c.get(); - } - ueassist_info_s& ue_assist_info() - { - assert_choice_type("ueAssistanceInformation", type_.to_string(), "c1"); - return c.get(); - } - fail_info_s& fail_info() - { - assert_choice_type("failureInformation", type_.to_string(), "c1"); - return c.get(); - } - const meas_report_s& meas_report() const - { - assert_choice_type("measurementReport", type_.to_string(), "c1"); - return c.get(); - } - const rrc_recfg_complete_s& rrc_recfg_complete() const - { - assert_choice_type("rrcReconfigurationComplete", type_.to_string(), "c1"); - return c.get(); - } - const rrc_setup_complete_s& rrc_setup_complete() const - { - assert_choice_type("rrcSetupComplete", type_.to_string(), "c1"); - return c.get(); - } - const rrc_reest_complete_s& rrc_reest_complete() const - { - assert_choice_type("rrcReestablishmentComplete", type_.to_string(), "c1"); - return c.get(); - } - const rrc_resume_complete_s& rrc_resume_complete() const - { - assert_choice_type("rrcResumeComplete", type_.to_string(), "c1"); - return c.get(); - } - const security_mode_complete_s& security_mode_complete() const - { - assert_choice_type("securityModeComplete", type_.to_string(), "c1"); - return c.get(); - } - const security_mode_fail_s& security_mode_fail() const - { - assert_choice_type("securityModeFailure", type_.to_string(), "c1"); - return c.get(); - } - const ul_info_transfer_s& ul_info_transfer() const - { - assert_choice_type("ulInformationTransfer", type_.to_string(), "c1"); - return c.get(); - } - const location_meas_ind_s& location_meas_ind() const - { - assert_choice_type("locationMeasurementIndication", type_.to_string(), "c1"); - return c.get(); - } - const ue_cap_info_s& ue_cap_info() const - { - assert_choice_type("ueCapabilityInformation", type_.to_string(), "c1"); - return c.get(); - } - const counter_check_resp_s& counter_check_resp() const - { - assert_choice_type("counterCheckResponse", type_.to_string(), "c1"); - return c.get(); - } - const ueassist_info_s& ue_assist_info() const - { - assert_choice_type("ueAssistanceInformation", type_.to_string(), "c1"); - return c.get(); - } - const fail_info_s& fail_info() const - { - assert_choice_type("failureInformation", type_.to_string(), "c1"); - return c.get(); - } - meas_report_s& set_meas_report() - { - set(types::meas_report); - return c.get(); - } - rrc_recfg_complete_s& set_rrc_recfg_complete() - { - set(types::rrc_recfg_complete); - return c.get(); - } - rrc_setup_complete_s& set_rrc_setup_complete() - { - set(types::rrc_setup_complete); - return c.get(); - } - rrc_reest_complete_s& set_rrc_reest_complete() - { - set(types::rrc_reest_complete); - return c.get(); - } - rrc_resume_complete_s& set_rrc_resume_complete() - { - set(types::rrc_resume_complete); - return c.get(); - } - security_mode_complete_s& set_security_mode_complete() - { - set(types::security_mode_complete); - return c.get(); - } - security_mode_fail_s& set_security_mode_fail() - { - set(types::security_mode_fail); - return c.get(); - } - ul_info_transfer_s& set_ul_info_transfer() + own_s_& own() { - set(types::ul_info_transfer); - return c.get(); + assert_choice_type("own", type_.to_string(), "schedulingCellInfo"); + return c.get(); } - location_meas_ind_s& set_location_meas_ind() + other_s_& other() { - set(types::location_meas_ind); - return c.get(); + assert_choice_type("other", type_.to_string(), "schedulingCellInfo"); + return c.get(); } - ue_cap_info_s& set_ue_cap_info() + const own_s_& own() const { - set(types::ue_cap_info); - return c.get(); + assert_choice_type("own", type_.to_string(), "schedulingCellInfo"); + return c.get(); } - counter_check_resp_s& set_counter_check_resp() + const other_s_& other() const { - set(types::counter_check_resp); - return c.get(); + assert_choice_type("other", type_.to_string(), "schedulingCellInfo"); + return c.get(); } - ueassist_info_s& set_ue_assist_info() + own_s_& set_own() { - set(types::ue_assist_info); - return c.get(); + set(types::own); + return c.get(); } - fail_info_s& set_fail_info() + other_s_& set_other() { - set(types::fail_info); - return c.get(); + set(types::other); + return c.get(); } - private: - types type_; - choice_buffer_t - c; + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + sched_cell_info_c_ sched_cell_info; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-AM-RLC ::= SEQUENCE +struct dl_am_rlc_s { + bool sn_field_len_present = false; + sn_field_len_am_e sn_field_len; + t_reassembly_e t_reassembly; + t_status_prohibit_e t_status_prohibit; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-UM-RLC ::= SEQUENCE +struct dl_um_rlc_s { + bool sn_field_len_present = false; + sn_field_len_um_e sn_field_len; + t_reassembly_e t_reassembly; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCCH-ServingCellConfig ::= SEQUENCE +struct pdcch_serving_cell_cfg_s { + bool ext = false; + bool slot_format_ind_present = false; + setup_release_c slot_format_ind; + // ... - void destroy_(); + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ServingCellConfig ::= SEQUENCE +struct pdsch_serving_cell_cfg_s { + struct xoverhead_opts { + enum options { xoh6, xoh12, xoh18, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; }; - struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; + typedef enumerated xoverhead_e_; + struct nrof_harq_processes_for_pdsch_opts { + enum options { n2, n4, n6, n10, n12, n16, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated types; + typedef enumerated nrof_harq_processes_for_pdsch_e_; - // choice methods - ul_dcch_msg_type_c() = default; - ul_dcch_msg_type_c(const ul_dcch_msg_type_c& other); - ul_dcch_msg_type_c& operator=(const ul_dcch_msg_type_c& other); - ~ul_dcch_msg_type_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } + // member variables + bool ext = false; + bool code_block_group_tx_present = false; + bool xoverhead_present = false; + bool nrof_harq_processes_for_pdsch_present = false; + bool pucch_cell_present = false; + setup_release_c code_block_group_tx; + xoverhead_e_ xoverhead; + nrof_harq_processes_for_pdsch_e_ nrof_harq_processes_for_pdsch; + uint8_t pucch_cell = 0; + // ... + // group 0 + bool max_mimo_layers_present = false; + bool processing_type2_enabled_present = false; + uint8_t max_mimo_layers = 1; + bool processing_type2_enabled = false; + + // sequence methods SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; - // getters - c1_c_& c1() - { - assert_choice_type("c1", type_.to_string(), "UL-DCCH-MessageType"); - return c.get(); - } - const c1_c_& c1() const - { - assert_choice_type("c1", type_.to_string(), "UL-DCCH-MessageType"); - return c.get(); - } - c1_c_& set_c1() - { - set(types::c1); - return c.get(); - } +}; -private: - types type_; - choice_buffer_t c; +// RACH-ConfigDedicated ::= SEQUENCE +struct rach_cfg_ded_s { + bool ext = false; + bool cfra_present = false; + bool ra_prioritization_present = false; + cfra_s cfra; + ra_prioritization_s ra_prioritization; + // ... - void destroy_(); + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -// UL-DCCH-Message ::= SEQUENCE -struct ul_dcch_msg_s { - ul_dcch_msg_type_c msg; +// SchedulingRequestToAddMod ::= SEQUENCE +struct sched_request_to_add_mod_s { + struct sr_prohibit_timer_opts { + enum options { ms1, ms2, ms4, ms8, ms16, ms32, ms64, ms128, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated sr_prohibit_timer_e_; + struct sr_trans_max_opts { + enum options { n4, n8, n16, n32, n64, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated sr_trans_max_e_; + + // member variables + bool sr_prohibit_timer_present = false; + uint8_t sched_request_id = 0; + sr_prohibit_timer_e_ sr_prohibit_timer; + sr_trans_max_e_ sr_trans_max; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -20126,105 +20694,147 @@ struct ul_dcch_msg_s { void to_json(json_writer& j) const; }; -// CA-BandwidthClassEUTRA ::= ENUMERATED -struct ca_bw_class_eutra_opts { - enum options { a, b, c, d, e, f, /*...*/ nulltype } value; +// ServingCellConfigCommon ::= SEQUENCE +struct serving_cell_cfg_common_s { + struct n_timing_advance_offset_opts { + enum options { n0, n25600, n39936, nulltype } value; + typedef uint16_t number_type; - std::string to_string() const; -}; -typedef enumerated ca_bw_class_eutra_e; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated n_timing_advance_offset_e_; + struct ssb_positions_in_burst_c_ { + struct types_opts { + enum options { short_bitmap, medium_bitmap, long_bitmap, nulltype } value; -// CA-BandwidthClassNR ::= ENUMERATED -struct ca_bw_class_nr_opts { - enum options { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, /*...*/ nulltype } value; + std::string to_string() const; + }; + typedef enumerated types; - std::string to_string() const; -}; -typedef enumerated ca_bw_class_nr_e; + // choice methods + ssb_positions_in_burst_c_() = default; + ssb_positions_in_burst_c_(const ssb_positions_in_burst_c_& other); + ssb_positions_in_burst_c_& operator=(const ssb_positions_in_burst_c_& other); + ~ssb_positions_in_burst_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 + fixed_bitstring<4>& short_bitmap() + { + assert_choice_type("shortBitmap", type_.to_string(), "ssb-PositionsInBurst"); + return c.get >(); + } + fixed_bitstring<8>& medium_bitmap() + { + assert_choice_type("mediumBitmap", type_.to_string(), "ssb-PositionsInBurst"); + return c.get >(); + } + fixed_bitstring<64>& long_bitmap() + { + assert_choice_type("longBitmap", type_.to_string(), "ssb-PositionsInBurst"); + return c.get >(); + } + const fixed_bitstring<4>& short_bitmap() const + { + assert_choice_type("shortBitmap", type_.to_string(), "ssb-PositionsInBurst"); + return c.get >(); + } + const fixed_bitstring<8>& medium_bitmap() const + { + assert_choice_type("mediumBitmap", type_.to_string(), "ssb-PositionsInBurst"); + return c.get >(); + } + const fixed_bitstring<64>& long_bitmap() const + { + assert_choice_type("longBitmap", type_.to_string(), "ssb-PositionsInBurst"); + return c.get >(); + } + fixed_bitstring<4>& set_short_bitmap() + { + set(types::short_bitmap); + return c.get >(); + } + fixed_bitstring<8>& set_medium_bitmap() + { + set(types::medium_bitmap); + return c.get >(); + } + fixed_bitstring<64>& set_long_bitmap() + { + set(types::long_bitmap); + return c.get >(); + } -// BandParameters ::= CHOICE -struct band_params_c { - struct eutra_s_ { - bool ca_bw_class_dl_eutra_present = false; - bool ca_bw_class_ul_eutra_present = false; - uint16_t band_eutra = 1; - ca_bw_class_eutra_e ca_bw_class_dl_eutra; - ca_bw_class_eutra_e ca_bw_class_ul_eutra; + private: + types type_; + choice_buffer_t > c; + + void destroy_(); }; - struct nr_s_ { - bool ca_bw_class_dl_nr_present = false; - bool ca_bw_class_ul_nr_present = false; - uint16_t band_nr = 1; - ca_bw_class_nr_e ca_bw_class_dl_nr; - ca_bw_class_nr_e ca_bw_class_ul_nr; + struct ssb_periodicity_serving_cell_opts { + enum options { ms5, ms10, ms20, ms40, ms80, ms160, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; }; - struct types_opts { - enum options { eutra, nr, nulltype } value; + typedef enumerated ssb_periodicity_serving_cell_e_; + struct dmrs_type_a_position_opts { + enum options { pos2, pos3, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; - typedef enumerated types; + typedef enumerated dmrs_type_a_position_e_; + using rate_match_pattern_to_add_mod_list_l_ = dyn_array; + using rate_match_pattern_to_release_list_l_ = bounded_array; + + // member variables + bool ext = false; + bool pci_present = false; + bool dl_cfg_common_present = false; + bool ul_cfg_common_present = false; + bool supplementary_ul_cfg_present = false; + bool n_timing_advance_offset_present = false; + bool ssb_positions_in_burst_present = false; + bool ssb_periodicity_serving_cell_present = false; + bool lte_crs_to_match_around_present = false; + bool rate_match_pattern_to_add_mod_list_present = false; + bool rate_match_pattern_to_release_list_present = false; + bool ssb_subcarrier_spacing_present = false; + bool tdd_ul_dl_cfg_common_present = false; + uint16_t pci = 0; + dl_cfg_common_s dl_cfg_common; + ul_cfg_common_s ul_cfg_common; + ul_cfg_common_s supplementary_ul_cfg; + n_timing_advance_offset_e_ n_timing_advance_offset; + ssb_positions_in_burst_c_ ssb_positions_in_burst; + ssb_periodicity_serving_cell_e_ ssb_periodicity_serving_cell; + dmrs_type_a_position_e_ dmrs_type_a_position; + setup_release_c lte_crs_to_match_around; + rate_match_pattern_to_add_mod_list_l_ rate_match_pattern_to_add_mod_list; + rate_match_pattern_to_release_list_l_ rate_match_pattern_to_release_list; + subcarrier_spacing_e ssb_subcarrier_spacing; + tdd_ul_dl_cfg_common_s tdd_ul_dl_cfg_common; + int8_t ss_pbch_block_pwr = -60; + // ... - // choice methods - band_params_c() = default; - band_params_c(const band_params_c& other); - band_params_c& operator=(const band_params_c& other); - ~band_params_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } + // sequence methods SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; - // getters - eutra_s_& eutra() - { - assert_choice_type("eutra", type_.to_string(), "BandParameters"); - return c.get(); - } - nr_s_& nr() - { - assert_choice_type("nr", type_.to_string(), "BandParameters"); - return c.get(); - } - const eutra_s_& eutra() const - { - assert_choice_type("eutra", type_.to_string(), "BandParameters"); - return c.get(); - } - const nr_s_& nr() const - { - assert_choice_type("nr", type_.to_string(), "BandParameters"); - return c.get(); - } - eutra_s_& set_eutra() - { - set(types::eutra); - return c.get(); - } - nr_s_& set_nr() - { - set(types::nr); - return c.get(); - } - -private: - types type_; - choice_buffer_t c; - - void destroy_(); }; -// CA-ParametersEUTRA ::= SEQUENCE -struct ca_params_eutra_s { - bool ext = false; - bool multiple_timing_advance_present = false; - bool simul_rx_tx_present = false; - bool supported_naics_minus2_crs_ap_present = false; - bool add_rx_tx_performance_req_present = false; - bool ue_ca_pwr_class_n_present = false; - bool supported_bw_combination_set_eutra_v1530_present = false; - bounded_bitstring<1, 8> supported_naics_minus2_crs_ap; - bounded_bitstring<1, 32> supported_bw_combination_set_eutra_v1530; +// TAG ::= SEQUENCE +struct tag_s { + bool ext = false; + uint8_t tag_id = 0; + time_align_timer_e time_align_timer; // ... // sequence methods @@ -20233,28 +20843,17 @@ struct ca_params_eutra_s { void to_json(json_writer& j) const; }; -// CA-ParametersNR ::= SEQUENCE -struct ca_params_nr_s { - struct supported_num_tag_opts { - enum options { n2, n3, n4, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated supported_num_tag_e_; +// TDD-UL-DL-ConfigDedicated ::= SEQUENCE +struct tdd_ul_dl_cfg_ded_s { + using slot_specific_cfgs_to_add_mod_list_l_ = dyn_array; + using slot_specific_cfgs_to_release_list_l_ = dyn_array; // member variables - bool ext = false; - bool multiple_timing_advances_present = false; - bool parallel_tx_srs_pucch_pusch_present = false; - bool parallel_tx_prach_srs_pucch_pusch_present = false; - bool simul_rx_tx_inter_band_ca_present = false; - bool simul_rx_tx_sul_present = false; - bool diff_numerology_across_pucch_group_present = false; - bool diff_numerology_within_pucch_group_present = false; - bool supported_num_tag_present = false; - supported_num_tag_e_ supported_num_tag; + bool ext = false; + bool slot_specific_cfgs_to_add_mod_list_present = false; + bool slot_specific_cfgs_to_release_list_present = false; + slot_specific_cfgs_to_add_mod_list_l_ slot_specific_cfgs_to_add_mod_list; + slot_specific_cfgs_to_release_list_l_ slot_specific_cfgs_to_release_list; // ... // sequence methods @@ -20263,46 +20862,24 @@ struct ca_params_nr_s { void to_json(json_writer& j) const; }; -// MRDC-Parameters ::= SEQUENCE -struct mrdc_params_s { - struct ul_sharing_eutra_nr_opts { - enum options { tdm, fdm, both, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated ul_sharing_eutra_nr_e_; - struct ul_switching_time_eutra_nr_opts { - enum options { type1, type2, nulltype } value; +// UL-AM-RLC ::= SEQUENCE +struct ul_am_rlc_s { + struct max_retx_thres_opts { + enum options { t1, t2, t3, t4, t6, t8, t16, t32, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated ul_switching_time_eutra_nr_e_; - struct intra_band_endc_support_v1540_opts { - enum options { non_contiguous, both, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated intra_band_endc_support_v1540_e_; + typedef enumerated max_retx_thres_e_; // member variables - bool ext = false; - bool single_ul_tx_present = false; - bool dynamic_pwr_sharing_present = false; - bool tdm_pattern_present = false; - bool ul_sharing_eutra_nr_present = false; - bool ul_switching_time_eutra_nr_present = false; - bool simul_rx_tx_inter_band_endc_present = false; - bool async_intra_band_endc_present = false; - ul_sharing_eutra_nr_e_ ul_sharing_eutra_nr; - ul_switching_time_eutra_nr_e_ ul_switching_time_eutra_nr; - // ... - // group 0 - bool dual_pa_architecture_present = false; - bool intra_band_endc_support_v1540_present = false; - bool ul_timing_align_eutra_nr_present = false; - intra_band_endc_support_v1540_e_ intra_band_endc_support_v1540; + bool sn_field_len_present = false; + sn_field_len_am_e sn_field_len; + t_poll_retx_e t_poll_retx; + poll_pdu_e poll_pdu; + poll_byte_e poll_byte; + max_retx_thres_e_ max_retx_thres; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -20310,22 +20887,42 @@ struct mrdc_params_s { void to_json(json_writer& j) const; }; -// BandCombination ::= SEQUENCE -struct band_combination_s { - using band_list_l_ = dyn_array; +// UL-UM-RLC ::= SEQUENCE +struct ul_um_rlc_s { + bool sn_field_len_present = false; + sn_field_len_um_e sn_field_len; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkConfig ::= SEQUENCE +struct ul_cfg_s { + using ul_bwp_to_release_list_l_ = bounded_array; + using ul_bwp_to_add_mod_list_l_ = dyn_array; + using ul_ch_bw_per_scs_list_l_ = dyn_array; // member variables - bool ca_params_eutra_present = false; - bool ca_params_nr_present = false; - bool mrdc_params_present = false; - bool supported_bw_combination_set_present = false; - bool pwr_class_v1530_present = false; - band_list_l_ band_list; - uint16_t feature_set_combination = 0; - ca_params_eutra_s ca_params_eutra; - ca_params_nr_s ca_params_nr; - mrdc_params_s mrdc_params; - bounded_bitstring<1, 32> supported_bw_combination_set; + bool ext = false; + bool init_ul_bwp_present = false; + bool ul_bwp_to_release_list_present = false; + bool ul_bwp_to_add_mod_list_present = false; + bool first_active_ul_bwp_id_present = false; + bool pusch_serving_cell_cfg_present = false; + bool carrier_switching_present = false; + bwp_ul_ded_s init_ul_bwp; + ul_bwp_to_release_list_l_ ul_bwp_to_release_list; + ul_bwp_to_add_mod_list_l_ ul_bwp_to_add_mod_list; + uint8_t first_active_ul_bwp_id = 0; + setup_release_c pusch_serving_cell_cfg; + setup_release_c carrier_switching; + // ... + // group 0 + bool pwr_boost_pi2_bpsk_present = false; + bool pwr_boost_pi2_bpsk = false; + copy_ptr ul_ch_bw_per_scs_list; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -20333,66 +20930,76 @@ struct band_combination_s { void to_json(json_writer& j) const; }; -// SRS-SwitchingTimeEUTRA ::= SEQUENCE -struct srs_switching_time_eutra_s { - struct switching_time_dl_opts { +// BSR-Config ::= SEQUENCE +struct bsr_cfg_s { + struct periodic_bsr_timer_opts { enum options { - n0, - n0dot5, - n1, - n1dot5, - n2, - n2dot5, - n3, - n3dot5, - n4, - n4dot5, - n5, - n5dot5, - n6, - n6dot5, - n7, + sf1, + sf5, + sf10, + sf16, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf320, + sf640, + sf1280, + sf2560, + infinity, nulltype } value; - typedef float number_type; + typedef int16_t number_type; std::string to_string() const; - float to_number() const; - std::string to_number_string() const; + int16_t to_number() const; }; - typedef enumerated switching_time_dl_e_; - struct switching_time_ul_opts { + typedef enumerated periodic_bsr_timer_e_; + struct retx_bsr_timer_opts { enum options { - n0, - n0dot5, - n1, - n1dot5, - n2, - n2dot5, - n3, - n3dot5, - n4, - n4dot5, - n5, - n5dot5, - n6, - n6dot5, - n7, + sf10, + sf20, + sf40, + sf80, + sf160, + sf320, + sf640, + sf1280, + sf2560, + sf5120, + sf10240, + spare5, + spare4, + spare3, + spare2, + spare1, nulltype } value; - typedef float number_type; + typedef uint16_t number_type; std::string to_string() const; - float to_number() const; - std::string to_number_string() const; + uint16_t to_number() const; }; - typedef enumerated switching_time_ul_e_; + typedef enumerated retx_bsr_timer_e_; + struct lc_ch_sr_delay_timer_opts { + enum options { sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated lc_ch_sr_delay_timer_e_; // member variables - bool switching_time_dl_present = false; - bool switching_time_ul_present = false; - switching_time_dl_e_ switching_time_dl; - switching_time_ul_e_ switching_time_ul; + bool ext = false; + bool lc_ch_sr_delay_timer_present = false; + periodic_bsr_timer_e_ periodic_bsr_timer; + retx_bsr_timer_e_ retx_bsr_timer; + lc_ch_sr_delay_timer_e_ lc_ch_sr_delay_timer; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -20400,323 +21007,642 @@ struct srs_switching_time_eutra_s { void to_json(json_writer& j) const; }; -// SRS-SwitchingTimeNR ::= SEQUENCE -struct srs_switching_time_nr_s { - struct switching_time_dl_opts { - enum options { n0us, n30us, n100us, n140us, n200us, n300us, n500us, n900us, nulltype } value; +// DRX-Config ::= SEQUENCE +struct drx_cfg_s { + struct drx_on_dur_timer_c_ { + struct milli_seconds_opts { + enum 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, + nulltype + } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated milli_seconds_e_; + struct types_opts { + enum options { sub_milli_seconds, milli_seconds, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + drx_on_dur_timer_c_() = default; + drx_on_dur_timer_c_(const drx_on_dur_timer_c_& other); + drx_on_dur_timer_c_& operator=(const drx_on_dur_timer_c_& other); + ~drx_on_dur_timer_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 + uint8_t& sub_milli_seconds() + { + assert_choice_type("subMilliSeconds", type_.to_string(), "drx-onDurationTimer"); + return c.get(); + } + milli_seconds_e_& milli_seconds() + { + assert_choice_type("milliSeconds", type_.to_string(), "drx-onDurationTimer"); + return c.get(); + } + const uint8_t& sub_milli_seconds() const + { + assert_choice_type("subMilliSeconds", type_.to_string(), "drx-onDurationTimer"); + return c.get(); + } + const milli_seconds_e_& milli_seconds() const + { + assert_choice_type("milliSeconds", type_.to_string(), "drx-onDurationTimer"); + return c.get(); + } + uint8_t& set_sub_milli_seconds() + { + set(types::sub_milli_seconds); + return c.get(); + } + milli_seconds_e_& set_milli_seconds() + { + set(types::milli_seconds); + return c.get(); + } + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct drx_inactivity_timer_opts { + enum 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, + nulltype + } value; typedef uint16_t number_type; std::string to_string() const; uint16_t to_number() const; }; - typedef enumerated switching_time_dl_e_; - struct switching_time_ul_opts { - enum options { n0us, n30us, n100us, n140us, n200us, n300us, n500us, n900us, nulltype } value; + typedef enumerated drx_inactivity_timer_e_; + struct drx_retx_timer_dl_opts { + enum 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, + nulltype + } value; typedef uint16_t number_type; std::string to_string() const; uint16_t to_number() const; }; - typedef enumerated switching_time_ul_e_; - - // member variables - bool switching_time_dl_present = false; - bool switching_time_ul_present = false; - switching_time_dl_e_ switching_time_dl; - switching_time_ul_e_ switching_time_ul; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandParameters-v1540 ::= SEQUENCE -struct band_params_v1540_s { - struct srs_carrier_switch_c_ { - struct nr_s_ { - using srs_switching_times_list_nr_l_ = dyn_array; - - // member variables - srs_switching_times_list_nr_l_ srs_switching_times_list_nr; - }; - struct eutra_s_ { - using srs_switching_times_list_eutra_l_ = dyn_array; + typedef enumerated drx_retx_timer_dl_e_; + struct drx_retx_timer_ul_opts { + enum 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, + nulltype + } value; + typedef uint16_t number_type; - // member variables - srs_switching_times_list_eutra_l_ srs_switching_times_list_eutra; - }; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated drx_retx_timer_ul_e_; + struct drx_long_cycle_start_offset_c_ { struct types_opts { - enum options { nr, eutra, nulltype } value; + enum options { + ms10, + ms20, + ms32, + ms40, + ms60, + ms64, + ms70, + ms80, + ms128, + ms160, + ms256, + ms320, + ms512, + ms640, + ms1024, + ms1280, + ms2048, + ms2560, + ms5120, + ms10240, + nulltype + } value; + typedef uint16_t number_type; std::string to_string() const; + uint16_t to_number() const; }; typedef enumerated types; // choice methods - srs_carrier_switch_c_() = default; - srs_carrier_switch_c_(const srs_carrier_switch_c_& other); - srs_carrier_switch_c_& operator=(const srs_carrier_switch_c_& other); - ~srs_carrier_switch_c_() { destroy_(); } + drx_long_cycle_start_offset_c_() = default; + drx_long_cycle_start_offset_c_(const drx_long_cycle_start_offset_c_& other); + drx_long_cycle_start_offset_c_& operator=(const drx_long_cycle_start_offset_c_& other); + ~drx_long_cycle_start_offset_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 - nr_s_& nr() + uint8_t& ms10() + { + assert_choice_type("ms10", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms20() + { + assert_choice_type("ms20", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms32() + { + assert_choice_type("ms32", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms40() + { + assert_choice_type("ms40", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms60() + { + assert_choice_type("ms60", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms64() + { + assert_choice_type("ms64", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms70() + { + assert_choice_type("ms70", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms80() + { + assert_choice_type("ms80", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms128() + { + assert_choice_type("ms128", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms160() + { + assert_choice_type("ms160", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms256() + { + assert_choice_type("ms256", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms320() + { + assert_choice_type("ms320", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms512() + { + assert_choice_type("ms512", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms640() + { + assert_choice_type("ms640", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms1024() + { + assert_choice_type("ms1024", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms1280() + { + assert_choice_type("ms1280", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms2048() + { + assert_choice_type("ms2048", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms2560() + { + assert_choice_type("ms2560", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms5120() + { + assert_choice_type("ms5120", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms10240() + { + assert_choice_type("ms10240", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms10() const + { + assert_choice_type("ms10", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms20() const + { + assert_choice_type("ms20", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms32() const + { + assert_choice_type("ms32", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms40() const + { + assert_choice_type("ms40", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms60() const + { + assert_choice_type("ms60", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms64() const + { + assert_choice_type("ms64", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms70() const + { + assert_choice_type("ms70", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms80() const + { + assert_choice_type("ms80", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms128() const + { + assert_choice_type("ms128", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms160() const + { + assert_choice_type("ms160", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms256() const + { + assert_choice_type("ms256", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms320() const + { + assert_choice_type("ms320", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms512() const + { + assert_choice_type("ms512", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms640() const + { + assert_choice_type("ms640", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms1024() const + { + assert_choice_type("ms1024", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms1280() const + { + assert_choice_type("ms1280", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms2048() const + { + assert_choice_type("ms2048", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms2560() const + { + assert_choice_type("ms2560", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms5120() const { - assert_choice_type("nr", type_.to_string(), "srs-CarrierSwitch"); - return c.get(); + assert_choice_type("ms5120", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); } - eutra_s_& eutra() + const uint16_t& ms10240() const { - assert_choice_type("eutra", type_.to_string(), "srs-CarrierSwitch"); - return c.get(); + assert_choice_type("ms10240", type_.to_string(), "drx-LongCycleStartOffset"); + return c.get(); } - const nr_s_& nr() const + uint8_t& set_ms10() { - assert_choice_type("nr", type_.to_string(), "srs-CarrierSwitch"); - return c.get(); + set(types::ms10); + return c.get(); } - const eutra_s_& eutra() const + uint8_t& set_ms20() { - assert_choice_type("eutra", type_.to_string(), "srs-CarrierSwitch"); - return c.get(); + set(types::ms20); + return c.get(); } - nr_s_& set_nr() + uint8_t& set_ms32() { - set(types::nr); - return c.get(); + set(types::ms32); + return c.get(); } - eutra_s_& set_eutra() + uint8_t& set_ms40() { - set(types::eutra); - return c.get(); + set(types::ms40); + return c.get(); + } + uint8_t& set_ms60() + { + set(types::ms60); + return c.get(); + } + uint8_t& set_ms64() + { + set(types::ms64); + return c.get(); + } + uint8_t& set_ms70() + { + set(types::ms70); + return c.get(); + } + uint8_t& set_ms80() + { + set(types::ms80); + return c.get(); + } + uint8_t& set_ms128() + { + set(types::ms128); + return c.get(); + } + uint8_t& set_ms160() + { + set(types::ms160); + return c.get(); + } + uint16_t& set_ms256() + { + set(types::ms256); + return c.get(); + } + uint16_t& set_ms320() + { + set(types::ms320); + return c.get(); + } + uint16_t& set_ms512() + { + set(types::ms512); + return c.get(); + } + uint16_t& set_ms640() + { + set(types::ms640); + return c.get(); + } + uint16_t& set_ms1024() + { + set(types::ms1024); + return c.get(); + } + uint16_t& set_ms1280() + { + set(types::ms1280); + return c.get(); + } + uint16_t& set_ms2048() + { + set(types::ms2048); + return c.get(); + } + uint16_t& set_ms2560() + { + set(types::ms2560); + return c.get(); + } + uint16_t& set_ms5120() + { + set(types::ms5120); + return c.get(); + } + uint16_t& set_ms10240() + { + set(types::ms10240); + return c.get(); } - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct srs_tx_switch_v1540_s_ { - struct supported_srs_tx_port_switch_opts { - enum options { t1r2, t1r4, t2r4, t1r4_t2r4, t1r1, t2r2, t4r4, not_supported, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated supported_srs_tx_port_switch_e_; - - // member variables - bool tx_switch_impact_to_rx_present = false; - bool tx_switch_with_another_band_present = false; - supported_srs_tx_port_switch_e_ supported_srs_tx_port_switch; - uint8_t tx_switch_impact_to_rx = 1; - uint8_t tx_switch_with_another_band = 1; - }; - - // member variables - bool srs_carrier_switch_present = false; - bool srs_tx_switch_v1540_present = false; - srs_carrier_switch_c_ srs_carrier_switch; - srs_tx_switch_v1540_s_ srs_tx_switch_v1540; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CA-ParametersNR-v1540 ::= SEQUENCE -struct ca_params_nr_v1540_s { - struct csi_rs_im_reception_for_feedback_per_band_comb_s_ { - bool max_num_simul_nzp_csi_rs_act_bwp_all_cc_present = false; - bool total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present = false; - uint8_t max_num_simul_nzp_csi_rs_act_bwp_all_cc = 1; - uint16_t total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc = 2; - }; - - // member variables - bool simul_srs_assoc_csi_rs_all_cc_present = false; - bool csi_rs_im_reception_for_feedback_per_band_comb_present = false; - bool simul_csi_reports_all_cc_present = false; - bool dual_pa_architecture_present = false; - uint8_t simul_srs_assoc_csi_rs_all_cc = 5; - csi_rs_im_reception_for_feedback_per_band_comb_s_ csi_rs_im_reception_for_feedback_per_band_comb; - uint8_t simul_csi_reports_all_cc = 5; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandCombination-v1540 ::= SEQUENCE -struct band_combination_v1540_s { - using band_list_v1540_l_ = dyn_array; - - // member variables - bool ca_params_nr_v1540_present = false; - band_list_v1540_l_ band_list_v1540; - ca_params_nr_v1540_s ca_params_nr_v1540; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CA-ParametersNR-v1550 ::= SEQUENCE -struct ca_params_nr_v1550_s { - bool aperiodic_csi_diff_scs_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandCombination-v1550 ::= SEQUENCE -struct band_combination_v1550_s { - ca_params_nr_v1550_s ca_params_nr_v1550; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandCombinationList ::= SEQUENCE (SIZE (1..65536)) OF BandCombination -using band_combination_list_l = dyn_array; - -// BandCombinationList-v1540 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1540 -using band_combination_list_v1540_l = dyn_array; - -// BandCombinationList-v1550 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1550 -using band_combination_list_v1550_l = dyn_array; - -// SupportedCSI-RS-Resource ::= SEQUENCE -struct supported_csi_rs_res_s { - struct max_num_tx_ports_per_res_opts { - enum options { p2, p4, p8, p12, p16, p24, p32, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_num_tx_ports_per_res_e_; - - // member variables - max_num_tx_ports_per_res_e_ max_num_tx_ports_per_res; - uint8_t max_num_res_per_band = 1; - uint16_t total_num_tx_ports_per_band = 2; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BeamManagementSSB-CSI-RS ::= SEQUENCE -struct beam_management_ssb_csi_rs_s { - struct max_num_ssb_csi_rs_res_one_tx_opts { - enum options { n0, n8, n16, n32, n64, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_num_ssb_csi_rs_res_one_tx_e_; - struct max_num_csi_rs_res_opts { - enum options { n0, n4, n8, n16, n32, n64, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_num_csi_rs_res_e_; - struct max_num_csi_rs_res_two_tx_opts { - enum options { n0, n4, n8, n16, n32, n64, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_num_csi_rs_res_two_tx_e_; - struct supported_csi_rs_density_opts { - enum options { one, three, one_and_three, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated supported_csi_rs_density_e_; - struct max_num_aperiodic_csi_rs_res_opts { - enum options { n0, n1, n4, n8, n16, n32, n64, nulltype } value; - typedef uint8_t number_type; + private: + types type_; + pod_choice_buffer_t c; - std::string to_string() const; - uint8_t to_number() const; + void destroy_(); }; - typedef enumerated max_num_aperiodic_csi_rs_res_e_; - - // member variables - bool supported_csi_rs_density_present = false; - max_num_ssb_csi_rs_res_one_tx_e_ max_num_ssb_csi_rs_res_one_tx; - max_num_csi_rs_res_e_ max_num_csi_rs_res; - max_num_csi_rs_res_two_tx_e_ max_num_csi_rs_res_two_tx; - supported_csi_rs_density_e_ supported_csi_rs_density; - max_num_aperiodic_csi_rs_res_e_ max_num_aperiodic_csi_rs_res; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CSI-RS-ForTracking ::= SEQUENCE -struct csi_rs_for_tracking_s { - uint8_t max_burst_len = 1; - uint8_t max_simul_res_sets_per_cc = 1; - uint8_t max_cfgured_res_sets_per_cc = 1; - uint16_t max_cfgured_res_sets_all_cc = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + struct short_drx_s_ { + struct drx_short_cycle_opts { + enum 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, + nulltype + } value; + typedef uint16_t number_type; -// CSI-RS-IM-ReceptionForFeedback ::= SEQUENCE -struct csi_rs_im_reception_for_feedback_s { - struct max_cfg_num_csi_im_per_cc_opts { - enum options { n1, n2, n4, n8, n16, n32, nulltype } value; - typedef uint8_t number_type; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated drx_short_cycle_e_; - std::string to_string() const; - uint8_t to_number() const; + // member variables + drx_short_cycle_e_ drx_short_cycle; + uint8_t drx_short_cycle_timer = 1; }; - typedef enumerated max_cfg_num_csi_im_per_cc_e_; // member variables - uint8_t max_cfg_num_nzp_csi_rs_per_cc = 1; - uint16_t max_cfg_num_ports_across_nzp_csi_rs_per_cc = 2; - max_cfg_num_csi_im_per_cc_e_ max_cfg_num_csi_im_per_cc; - uint8_t max_num_simul_nzp_csi_rs_per_cc = 1; - uint16_t total_num_ports_simul_nzp_csi_rs_per_cc = 2; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CSI-RS-ProcFrameworkForSRS ::= SEQUENCE -struct csi_rs_proc_framework_for_srs_s { - uint8_t max_num_periodic_srs_assoc_csi_rs_per_bwp = 1; - uint8_t max_num_aperiodic_srs_assoc_csi_rs_per_bwp = 1; - uint8_t max_num_sp_srs_assoc_csi_rs_per_bwp = 0; - uint8_t simul_srs_assoc_csi_rs_per_cc = 1; + bool short_drx_present = false; + drx_on_dur_timer_c_ drx_on_dur_timer; + drx_inactivity_timer_e_ drx_inactivity_timer; + uint8_t drx_harq_rtt_timer_dl = 0; + uint8_t drx_harq_rtt_timer_ul = 0; + drx_retx_timer_dl_e_ drx_retx_timer_dl; + drx_retx_timer_ul_e_ drx_retx_timer_ul; + drx_long_cycle_start_offset_c_ drx_long_cycle_start_offset; + short_drx_s_ short_drx; + uint8_t drx_slot_offset = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -20724,117 +21650,122 @@ struct csi_rs_proc_framework_for_srs_s { void to_json(json_writer& j) const; }; -// CSI-ReportFramework ::= SEQUENCE -struct csi_report_framework_s { - struct max_num_aperiodic_csi_trigger_state_per_cc_opts { - enum options { n3, n7, n15, n31, n63, n128, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_num_aperiodic_csi_trigger_state_per_cc_e_; - - // member variables - uint8_t max_num_periodic_csi_per_bwp_for_csi_report = 1; - uint8_t max_num_aperiodic_csi_per_bwp_for_csi_report = 1; - uint8_t max_num_semi_persistent_csi_per_bwp_for_csi_report = 0; - uint8_t max_num_periodic_csi_per_bwp_for_beam_report = 1; - uint8_t max_num_aperiodic_csi_per_bwp_for_beam_report = 1; - max_num_aperiodic_csi_trigger_state_per_cc_e_ max_num_aperiodic_csi_trigger_state_per_cc; - uint8_t max_num_semi_persistent_csi_per_bwp_for_beam_report = 0; - uint8_t simul_csi_reports_per_cc = 1; +// DataInactivityTimer ::= ENUMERATED +struct data_inactivity_timer_opts { + enum options { s1, s2, s3, s5, s7, s10, s15, s20, s40, s50, s60, s80, s100, s120, s150, s180, nulltype } value; + typedef uint8_t number_type; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + std::string to_string() const; + uint8_t to_number() const; }; +typedef enumerated data_inactivity_timer_e; -// CodebookParameters ::= SEQUENCE -struct codebook_params_s { - struct type1_s_ { - struct single_panel_s_ { - using supported_csi_rs_res_list_l_ = dyn_array; - struct modes_opts { - enum options { mode1, mode1and_mode2, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated modes_e_; - - // member variables - supported_csi_rs_res_list_l_ supported_csi_rs_res_list; - modes_e_ modes; - uint8_t max_num_csi_rs_per_res_set = 1; - }; - struct multi_panel_s_ { - using supported_csi_rs_res_list_l_ = dyn_array; - struct modes_opts { - enum options { mode1, mode2, both, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated modes_e_; - struct nrof_panels_opts { - enum options { n2, n4, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated nrof_panels_e_; +// LogicalChannelConfig ::= SEQUENCE +struct lc_ch_cfg_s { + struct ul_specific_params_s_ { + struct prioritised_bit_rate_opts { + enum options { + kbps0, + kbps8, + kbps16, + kbps32, + kbps64, + kbps128, + kbps256, + kbps512, + kbps1024, + kbps2048, + kbps4096, + kbps8192, + kbps16384, + kbps32768, + kbps65536, + infinity, + nulltype + } value; + typedef int32_t number_type; - // member variables - supported_csi_rs_res_list_l_ supported_csi_rs_res_list; - modes_e_ modes; - nrof_panels_e_ nrof_panels; - uint8_t max_num_csi_rs_per_res_set = 1; + std::string to_string() const; + int32_t to_number() const; }; + typedef enumerated prioritised_bit_rate_e_; + struct bucket_size_dur_opts { + enum options { + ms5, + ms10, + ms20, + ms50, + ms100, + ms150, + ms300, + ms500, + ms1000, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; - // member variables - bool multi_panel_present = false; - single_panel_s_ single_panel; - multi_panel_s_ multi_panel; - }; - struct type2_s_ { - using supported_csi_rs_res_list_l_ = dyn_array; - struct amplitude_scaling_type_opts { - enum options { wideband, wideband_and_subband, nulltype } value; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated bucket_size_dur_e_; + using allowed_serving_cells_l_ = bounded_array; + using allowed_scs_list_l_ = bounded_array; + struct max_pusch_dur_opts { + enum options { ms0p02, ms0p04, ms0p0625, ms0p125, ms0p25, ms0p5, spare2, spare1, nulltype } value; std::string to_string() const; }; - typedef enumerated amplitude_scaling_type_e_; - - // member variables - bool amplitude_subset_restrict_present = false; - supported_csi_rs_res_list_l_ supported_csi_rs_res_list; - uint8_t param_lx = 2; - amplitude_scaling_type_e_ amplitude_scaling_type; - }; - struct type2_port_sel_s_ { - using supported_csi_rs_res_list_l_ = dyn_array; - struct amplitude_scaling_type_opts { - enum options { wideband, wideband_and_subband, nulltype } value; + typedef enumerated max_pusch_dur_e_; + struct bit_rate_query_prohibit_timer_opts { + enum options { s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30, nulltype } value; + typedef float number_type; std::string to_string() const; + float to_number() const; + std::string to_number_string() const; }; - typedef enumerated amplitude_scaling_type_e_; + typedef enumerated bit_rate_query_prohibit_timer_e_; // member variables - supported_csi_rs_res_list_l_ supported_csi_rs_res_list; - uint8_t param_lx = 2; - amplitude_scaling_type_e_ amplitude_scaling_type; + bool ext = false; + bool allowed_serving_cells_present = false; + bool allowed_scs_list_present = false; + bool max_pusch_dur_present = false; + bool cfgured_grant_type1_allowed_present = false; + bool lc_ch_group_present = false; + bool sched_request_id_present = false; + uint8_t prio = 1; + prioritised_bit_rate_e_ prioritised_bit_rate; + bucket_size_dur_e_ bucket_size_dur; + allowed_serving_cells_l_ allowed_serving_cells; + allowed_scs_list_l_ allowed_scs_list; + max_pusch_dur_e_ max_pusch_dur; + uint8_t lc_ch_group = 0; + uint8_t sched_request_id = 0; + bool lc_ch_sr_mask = false; + bool lc_ch_sr_delay_timer_applied = false; + // ... + bool bit_rate_query_prohibit_timer_present = false; + bit_rate_query_prohibit_timer_e_ bit_rate_query_prohibit_timer; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; // member variables - bool type2_present = false; - bool type2_port_sel_present = false; - type1_s_ type1; - type2_s_ type2; - type2_port_sel_s_ type2_port_sel; + bool ext = false; + bool ul_specific_params_present = false; + ul_specific_params_s_ ul_specific_params; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -20842,35 +21773,49 @@ struct codebook_params_s { void to_json(json_writer& j) const; }; -// DummyG ::= SEQUENCE -struct dummy_g_s { - struct max_num_ssb_csi_rs_res_one_tx_opts { - enum options { n8, n16, n32, n64, nulltype } value; - typedef uint8_t number_type; +// PHR-Config ::= SEQUENCE +struct phr_cfg_s { + struct phr_periodic_timer_opts { + enum options { sf10, sf20, sf50, sf100, sf200, sf500, sf1000, infinity, nulltype } value; + typedef int16_t number_type; std::string to_string() const; - uint8_t to_number() const; + int16_t to_number() const; }; - typedef enumerated max_num_ssb_csi_rs_res_one_tx_e_; - struct max_num_ssb_csi_rs_res_two_tx_opts { - enum options { n0, n4, n8, n16, n32, n64, nulltype } value; - typedef uint8_t number_type; + typedef enumerated phr_periodic_timer_e_; + struct phr_prohibit_timer_opts { + enum options { sf0, sf10, sf20, sf50, sf100, sf200, sf500, sf1000, nulltype } value; + typedef uint16_t number_type; std::string to_string() const; - uint8_t to_number() const; + uint16_t to_number() const; }; - typedef enumerated max_num_ssb_csi_rs_res_two_tx_e_; - struct supported_csi_rs_density_opts { - enum options { one, three, one_and_three, nulltype } value; + typedef enumerated phr_prohibit_timer_e_; + struct phr_tx_pwr_factor_change_opts { + enum options { db1, db3, db6, infinity, nulltype } value; + typedef int8_t number_type; std::string to_string() const; + int8_t to_number() const; }; - typedef enumerated supported_csi_rs_density_e_; + typedef enumerated phr_tx_pwr_factor_change_e_; + struct phr_mode_other_cg_opts { + enum options { real, virtual_value, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated phr_mode_other_cg_e_; // member variables - max_num_ssb_csi_rs_res_one_tx_e_ max_num_ssb_csi_rs_res_one_tx; - max_num_ssb_csi_rs_res_two_tx_e_ max_num_ssb_csi_rs_res_two_tx; - supported_csi_rs_density_e_ supported_csi_rs_density; + bool ext = false; + phr_periodic_timer_e_ phr_periodic_timer; + phr_prohibit_timer_e_ phr_prohibit_timer; + phr_tx_pwr_factor_change_e_ phr_tx_pwr_factor_change; + bool multiple_phr = false; + bool dummy = false; + bool phr_type2_other_cell = false; + phr_mode_other_cg_e_ phr_mode_other_cg; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -20878,84 +21823,151 @@ struct dummy_g_s { void to_json(json_writer& j) const; }; -// DummyH ::= SEQUENCE -struct dummy_h_s { - uint8_t burst_len = 1; - uint8_t max_simul_res_sets_per_cc = 1; - uint8_t max_cfgured_res_sets_per_cc = 1; - uint8_t max_cfgured_res_sets_all_cc = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// RLC-Config ::= CHOICE +struct rlc_cfg_c { + struct am_s_ { + ul_am_rlc_s ul_am_rlc; + dl_am_rlc_s dl_am_rlc; + }; + struct um_bi_dir_s_ { + ul_um_rlc_s ul_um_rlc; + dl_um_rlc_s dl_um_rlc; + }; + struct um_uni_dir_ul_s_ { + ul_um_rlc_s ul_um_rlc; + }; + struct um_uni_dir_dl_s_ { + dl_um_rlc_s dl_um_rlc; + }; + struct types_opts { + enum options { am, um_bi_dir, um_uni_dir_ul, um_uni_dir_dl, /*...*/ nulltype } value; -// PTRS-DensityRecommendationDL ::= SEQUENCE -struct ptrs_density_recommendation_dl_s { - uint16_t freq_density1 = 1; - uint16_t freq_density2 = 1; - uint8_t time_density1 = 0; - uint8_t time_density2 = 0; - uint8_t time_density3 = 0; + std::string to_string() const; + }; + typedef enumerated types; - // sequence methods + // choice methods + rlc_cfg_c() = default; + rlc_cfg_c(const rlc_cfg_c& other); + rlc_cfg_c& operator=(const rlc_cfg_c& other); + ~rlc_cfg_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 + am_s_& am() + { + assert_choice_type("am", type_.to_string(), "RLC-Config"); + return c.get(); + } + um_bi_dir_s_& um_bi_dir() + { + assert_choice_type("um-Bi-Directional", type_.to_string(), "RLC-Config"); + return c.get(); + } + um_uni_dir_ul_s_& um_uni_dir_ul() + { + assert_choice_type("um-Uni-Directional-UL", type_.to_string(), "RLC-Config"); + return c.get(); + } + um_uni_dir_dl_s_& um_uni_dir_dl() + { + assert_choice_type("um-Uni-Directional-DL", type_.to_string(), "RLC-Config"); + return c.get(); + } + const am_s_& am() const + { + assert_choice_type("am", type_.to_string(), "RLC-Config"); + return c.get(); + } + const um_bi_dir_s_& um_bi_dir() const + { + assert_choice_type("um-Bi-Directional", type_.to_string(), "RLC-Config"); + return c.get(); + } + const um_uni_dir_ul_s_& um_uni_dir_ul() const + { + assert_choice_type("um-Uni-Directional-UL", type_.to_string(), "RLC-Config"); + return c.get(); + } + const um_uni_dir_dl_s_& um_uni_dir_dl() const + { + assert_choice_type("um-Uni-Directional-DL", type_.to_string(), "RLC-Config"); + return c.get(); + } + am_s_& set_am() + { + set(types::am); + return c.get(); + } + um_bi_dir_s_& set_um_bi_dir() + { + set(types::um_bi_dir); + return c.get(); + } + um_uni_dir_ul_s_& set_um_uni_dir_ul() + { + set(types::um_uni_dir_ul); + return c.get(); + } + um_uni_dir_dl_s_& set_um_uni_dir_dl() + { + set(types::um_uni_dir_dl); + return c.get(); + } -// PTRS-DensityRecommendationUL ::= SEQUENCE -struct ptrs_density_recommendation_ul_s { - uint16_t freq_density1 = 1; - uint16_t freq_density2 = 1; - uint8_t time_density1 = 0; - uint8_t time_density2 = 0; - uint8_t time_density3 = 0; - uint16_t sample_density1 = 1; - uint16_t sample_density2 = 1; - uint16_t sample_density3 = 1; - uint16_t sample_density4 = 1; - uint16_t sample_density5 = 1; +private: + types type_; + choice_buffer_t c; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + void destroy_(); }; -// SpatialRelations ::= SEQUENCE -struct spatial_relations_s { - struct max_num_cfgured_spatial_relations_opts { - enum options { n4, n8, n16, n32, n64, n96, nulltype } value; +// RLF-TimersAndConstants ::= SEQUENCE +struct rlf_timers_and_consts_s { + struct t310_opts { + enum options { ms0, ms50, ms100, ms200, ms500, ms1000, ms2000, ms4000, ms6000, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated t310_e_; + struct n310_opts { + enum options { n1, n2, n3, n4, n6, n8, n10, n20, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated max_num_cfgured_spatial_relations_e_; - struct max_num_active_spatial_relations_opts { - enum options { n1, n2, n4, n8, n14, nulltype } value; + typedef enumerated n310_e_; + struct n311_opts { + enum options { n1, n2, n3, n4, n5, n6, n8, n10, nulltype } value; typedef uint8_t number_type; std::string to_string() const; uint8_t to_number() const; }; - typedef enumerated max_num_active_spatial_relations_e_; - struct max_num_dl_rs_qcl_type_d_opts { - enum options { n1, n2, n4, n8, n14, nulltype } value; - typedef uint8_t number_type; + typedef enumerated n311_e_; + struct t311_opts { + enum options { ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000, nulltype } value; + typedef uint16_t number_type; std::string to_string() const; - uint8_t to_number() const; + uint16_t to_number() const; }; - typedef enumerated max_num_dl_rs_qcl_type_d_e_; + typedef enumerated t311_e_; // member variables - bool add_active_spatial_relation_pucch_present = false; - max_num_cfgured_spatial_relations_e_ max_num_cfgured_spatial_relations; - max_num_active_spatial_relations_e_ max_num_active_spatial_relations; - max_num_dl_rs_qcl_type_d_e_ max_num_dl_rs_qcl_type_d; + bool ext = false; + t310_e_ t310; + n310_e_ n310; + n311_e_ n311; + // ... + // group 0 + t311_e_ t311; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -20963,260 +21975,326 @@ struct spatial_relations_s { void to_json(json_writer& j) const; }; -// MIMO-ParametersPerBand ::= SEQUENCE -struct mimo_params_per_band_s { - struct tci_state_pdsch_s_ { - struct max_num_cfgured_tcistates_per_cc_opts { - enum options { n4, n8, n16, n32, n64, n128, nulltype } value; - typedef uint8_t number_type; +// ReconfigurationWithSync ::= SEQUENCE +struct recfg_with_sync_s { + struct t304_opts { + enum options { ms50, ms100, ms150, ms200, ms500, ms1000, ms2000, ms10000, nulltype } value; + typedef uint16_t number_type; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_num_cfgured_tcistates_per_cc_e_; - struct max_num_active_tci_per_bwp_opts { - enum options { n1, n2, n4, n8, nulltype } value; - typedef uint8_t number_type; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated t304_e_; + struct rach_cfg_ded_c_ { + struct types_opts { + enum options { ul, supplementary_ul, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; - typedef enumerated max_num_active_tci_per_bwp_e_; + typedef enumerated types; - // member variables - bool max_num_cfgured_tcistates_per_cc_present = false; - bool max_num_active_tci_per_bwp_present = false; - max_num_cfgured_tcistates_per_cc_e_ max_num_cfgured_tcistates_per_cc; - max_num_active_tci_per_bwp_e_ max_num_active_tci_per_bwp; - }; - struct pusch_trans_coherence_opts { - enum options { non_coherent, partial_coherent, full_coherent, nulltype } value; + // choice methods + rach_cfg_ded_c_() = default; + rach_cfg_ded_c_(const rach_cfg_ded_c_& other); + rach_cfg_ded_c_& operator=(const rach_cfg_ded_c_& other); + ~rach_cfg_ded_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 + rach_cfg_ded_s& ul() + { + assert_choice_type("uplink", type_.to_string(), "rach-ConfigDedicated"); + return c.get(); + } + rach_cfg_ded_s& supplementary_ul() + { + assert_choice_type("supplementaryUplink", type_.to_string(), "rach-ConfigDedicated"); + return c.get(); + } + const rach_cfg_ded_s& ul() const + { + assert_choice_type("uplink", type_.to_string(), "rach-ConfigDedicated"); + return c.get(); + } + const rach_cfg_ded_s& supplementary_ul() const + { + assert_choice_type("supplementaryUplink", type_.to_string(), "rach-ConfigDedicated"); + return c.get(); + } + rach_cfg_ded_s& set_ul() + { + set(types::ul); + return c.get(); + } + rach_cfg_ded_s& set_supplementary_ul() + { + set(types::supplementary_ul); + return c.get(); + } - std::string to_string() const; + private: + types type_; + choice_buffer_t c; + + void destroy_(); }; - typedef enumerated pusch_trans_coherence_e_; - struct max_num_rx_tx_beam_switch_dl_s_ { - struct scs_minus15k_hz_opts { - enum options { n4, n7, n14, nulltype } value; - typedef uint8_t number_type; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus15k_hz_e_; - struct scs_minus30k_hz_opts { - enum options { n4, n7, n14, nulltype } value; - typedef uint8_t number_type; + // member variables + bool ext = false; + bool sp_cell_cfg_common_present = false; + bool rach_cfg_ded_present = false; + serving_cell_cfg_common_s sp_cell_cfg_common; + uint32_t new_ue_id = 0; + t304_e_ t304; + rach_cfg_ded_c_ rach_cfg_ded; + // ... + // group 0 + copy_ptr smtc; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus30k_hz_e_; - struct scs_minus60k_hz_opts { - enum options { n4, n7, n14, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus60k_hz_e_; - struct scs_minus120k_hz_opts { - enum options { n4, n7, n14, nulltype } value; - typedef uint8_t number_type; +// SchedulingRequestConfig ::= SEQUENCE +struct sched_request_cfg_s { + using sched_request_to_add_mod_list_l_ = dyn_array; + using sched_request_to_release_list_l_ = bounded_array; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus120k_hz_e_; - struct scs_minus240k_hz_opts { - enum options { n4, n7, n14, nulltype } value; - typedef uint8_t number_type; + // member variables + bool sched_request_to_add_mod_list_present = false; + bool sched_request_to_release_list_present = false; + sched_request_to_add_mod_list_l_ sched_request_to_add_mod_list; + sched_request_to_release_list_l_ sched_request_to_release_list; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus240k_hz_e_; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - // member variables - bool scs_minus15k_hz_present = false; - bool scs_minus30k_hz_present = false; - bool scs_minus60k_hz_present = false; - bool scs_minus120k_hz_present = false; - bool scs_minus240k_hz_present = false; - scs_minus15k_hz_e_ scs_minus15k_hz; - scs_minus30k_hz_e_ scs_minus30k_hz; - scs_minus60k_hz_e_ scs_minus60k_hz; - scs_minus120k_hz_e_ scs_minus120k_hz; - scs_minus240k_hz_e_ scs_minus240k_hz; +// ServingCellConfig ::= SEQUENCE +struct serving_cell_cfg_s { + using dl_bwp_to_release_list_l_ = bounded_array; + using dl_bwp_to_add_mod_list_l_ = dyn_array; + struct bwp_inactivity_timer_opts { + enum 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, + nulltype + } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated bwp_inactivity_timer_e_; + struct scell_deactivation_timer_opts { + enum options { + ms20, + ms40, + ms80, + ms160, + ms200, + ms240, + ms320, + ms400, + ms480, + ms520, + ms640, + ms720, + ms840, + ms1280, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; }; - struct max_num_non_group_beam_report_opts { - enum options { n1, n2, n4, nulltype } value; - typedef uint8_t number_type; + typedef enumerated scell_deactivation_timer_e_; + struct pathloss_ref_linking_opts { + enum options { sp_cell, scell, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; - typedef enumerated max_num_non_group_beam_report_e_; - struct ul_beam_management_s_ { - struct max_num_srs_res_per_set_bm_opts { - enum options { n2, n4, n8, n16, nulltype } value; - typedef uint8_t number_type; + typedef enumerated pathloss_ref_linking_e_; + using rate_match_pattern_to_add_mod_list_l_ = dyn_array; + using rate_match_pattern_to_release_list_l_ = bounded_array; + using dl_ch_bw_per_scs_list_l_ = dyn_array; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_num_srs_res_per_set_bm_e_; + // member variables + bool ext = false; + bool tdd_ul_dl_cfg_ded_present = false; + bool init_dl_bwp_present = false; + bool dl_bwp_to_release_list_present = false; + bool dl_bwp_to_add_mod_list_present = false; + bool first_active_dl_bwp_id_present = false; + bool bwp_inactivity_timer_present = false; + bool default_dl_bwp_id_present = false; + bool ul_cfg_present = false; + bool supplementary_ul_present = false; + bool pdcch_serving_cell_cfg_present = false; + bool pdsch_serving_cell_cfg_present = false; + bool csi_meas_cfg_present = false; + bool scell_deactivation_timer_present = false; + bool cross_carrier_sched_cfg_present = false; + bool dummy_present = false; + bool pathloss_ref_linking_present = false; + bool serving_cell_mo_present = false; + tdd_ul_dl_cfg_ded_s tdd_ul_dl_cfg_ded; + bwp_dl_ded_s init_dl_bwp; + dl_bwp_to_release_list_l_ dl_bwp_to_release_list; + dl_bwp_to_add_mod_list_l_ dl_bwp_to_add_mod_list; + uint8_t first_active_dl_bwp_id = 0; + bwp_inactivity_timer_e_ bwp_inactivity_timer; + uint8_t default_dl_bwp_id = 0; + ul_cfg_s ul_cfg; + ul_cfg_s supplementary_ul; + setup_release_c pdcch_serving_cell_cfg; + setup_release_c pdsch_serving_cell_cfg; + setup_release_c csi_meas_cfg; + scell_deactivation_timer_e_ scell_deactivation_timer; + cross_carrier_sched_cfg_s cross_carrier_sched_cfg; + uint8_t tag_id = 0; + pathloss_ref_linking_e_ pathloss_ref_linking; + uint8_t serving_cell_mo = 1; + // ... + // group 0 + copy_ptr > lte_crs_to_match_around; + copy_ptr rate_match_pattern_to_add_mod_list; + copy_ptr rate_match_pattern_to_release_list; + copy_ptr dl_ch_bw_per_scs_list; - // member variables - max_num_srs_res_per_set_bm_e_ max_num_srs_res_per_set_bm; - uint8_t max_num_srs_res_set = 1; - }; - struct beam_report_timing_s_ { - struct scs_minus15k_hz_opts { - enum options { sym2, sym4, sym8, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus15k_hz_e_; - struct scs_minus30k_hz_opts { - enum options { sym4, sym8, sym14, sym28, nulltype } value; - typedef uint8_t number_type; +// TAG-Config ::= SEQUENCE +struct tag_cfg_s { + using tag_to_release_list_l_ = bounded_array; + using tag_to_add_mod_list_l_ = dyn_array; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus30k_hz_e_; - struct scs_minus60k_hz_opts { - enum options { sym8, sym14, sym28, nulltype } value; - typedef uint8_t number_type; + // member variables + bool tag_to_release_list_present = false; + bool tag_to_add_mod_list_present = false; + tag_to_release_list_l_ tag_to_release_list; + tag_to_add_mod_list_l_ tag_to_add_mod_list; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus60k_hz_e_; - struct scs_minus120k_hz_opts { - enum options { sym14, sym28, sym56, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated scs_minus120k_hz_e_; +// MAC-CellGroupConfig ::= SEQUENCE +struct mac_cell_group_cfg_s { + bool ext = false; + bool drx_cfg_present = false; + bool sched_request_cfg_present = false; + bool bsr_cfg_present = false; + bool tag_cfg_present = false; + bool phr_cfg_present = false; + setup_release_c drx_cfg; + sched_request_cfg_s sched_request_cfg; + bsr_cfg_s bsr_cfg; + tag_cfg_s tag_cfg; + setup_release_c phr_cfg; + bool skip_ul_tx_dynamic = false; + // ... + // group 0 + bool csi_mask_present = false; + bool csi_mask = false; + copy_ptr > data_inactivity_timer; - // member variables - bool scs_minus15k_hz_present = false; - bool scs_minus30k_hz_present = false; - bool scs_minus60k_hz_present = false; - bool scs_minus120k_hz_present = false; - scs_minus15k_hz_e_ scs_minus15k_hz; - scs_minus30k_hz_e_ scs_minus30k_hz; - scs_minus60k_hz_e_ scs_minus60k_hz; - scs_minus120k_hz_e_ scs_minus120k_hz; - }; - struct ptrs_density_recommendation_set_dl_s_ { - bool scs_minus15k_hz_present = false; - bool scs_minus30k_hz_present = false; - bool scs_minus60k_hz_present = false; - bool scs_minus120k_hz_present = false; - ptrs_density_recommendation_dl_s scs_minus15k_hz; - ptrs_density_recommendation_dl_s scs_minus30k_hz; - ptrs_density_recommendation_dl_s scs_minus60k_hz; - ptrs_density_recommendation_dl_s scs_minus120k_hz; - }; - struct ptrs_density_recommendation_set_ul_s_ { - bool scs_minus15k_hz_present = false; - bool scs_minus30k_hz_present = false; - bool scs_minus60k_hz_present = false; - bool scs_minus120k_hz_present = false; - ptrs_density_recommendation_ul_s scs_minus15k_hz; - ptrs_density_recommendation_ul_s scs_minus30k_hz; - ptrs_density_recommendation_ul_s scs_minus60k_hz; - ptrs_density_recommendation_ul_s scs_minus120k_hz; - }; - struct beam_switch_timing_s_ { - struct scs_minus60k_hz_opts { - enum options { sym14, sym28, sym48, sym224, sym336, nulltype } value; - typedef uint16_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated scs_minus60k_hz_e_; - struct scs_minus120k_hz_opts { - enum options { sym14, sym28, sym48, sym224, sym336, nulltype } value; - typedef uint16_t number_type; +// PhysicalCellGroupConfig ::= SEQUENCE +struct phys_cell_group_cfg_s { + struct pdsch_harq_ack_codebook_opts { + enum options { semi_static, dynamic_value, nulltype } value; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated scs_minus120k_hz_e_; + std::string to_string() const; + }; + typedef enumerated pdsch_harq_ack_codebook_e_; + struct xscale_opts { + enum options { db0, db6, spare2, spare1, nulltype } value; + typedef uint8_t number_type; - // member variables - bool scs_minus60k_hz_present = false; - bool scs_minus120k_hz_present = false; - scs_minus60k_hz_e_ scs_minus60k_hz; - scs_minus120k_hz_e_ scs_minus120k_hz; + std::string to_string() const; + uint8_t to_number() const; }; - using srs_assoc_csi_rs_l_ = dyn_array; + typedef enumerated xscale_e_; // member variables - bool ext = false; - bool tci_state_pdsch_present = false; - bool add_active_tci_state_pdcch_present = false; - bool pusch_trans_coherence_present = false; - bool beam_correspondence_without_ul_beam_sweeping_present = false; - bool periodic_beam_report_present = false; - bool aperiodic_beam_report_present = false; - bool sp_beam_report_pucch_present = false; - bool sp_beam_report_pusch_present = false; - bool dummy1_present = false; - bool max_num_rx_beam_present = false; - bool max_num_rx_tx_beam_switch_dl_present = false; - bool max_num_non_group_beam_report_present = false; - bool group_beam_report_present = false; - bool ul_beam_management_present = false; - bool max_num_csi_rs_bfd_present = false; - bool max_num_ssb_bfd_present = false; - bool max_num_csi_rs_ssb_cbd_present = false; - bool dummy2_present = false; - bool two_ports_ptrs_ul_present = false; - bool dummy5_present = false; - bool dummy3_present = false; - bool beam_report_timing_present = false; - bool ptrs_density_recommendation_set_dl_present = false; - bool ptrs_density_recommendation_set_ul_present = false; - bool dummy4_present = false; - bool aperiodic_trs_present = false; - tci_state_pdsch_s_ tci_state_pdsch; - pusch_trans_coherence_e_ pusch_trans_coherence; - dummy_g_s dummy1; - uint8_t max_num_rx_beam = 2; - max_num_rx_tx_beam_switch_dl_s_ max_num_rx_tx_beam_switch_dl; - max_num_non_group_beam_report_e_ max_num_non_group_beam_report; - ul_beam_management_s_ ul_beam_management; - uint8_t max_num_csi_rs_bfd = 1; - uint8_t max_num_ssb_bfd = 1; - uint16_t max_num_csi_rs_ssb_cbd = 1; - srs_res_s dummy5; - uint8_t dummy3 = 1; - beam_report_timing_s_ beam_report_timing; - ptrs_density_recommendation_set_dl_s_ ptrs_density_recommendation_set_dl; - ptrs_density_recommendation_set_ul_s_ ptrs_density_recommendation_set_ul; - dummy_h_s dummy4; + bool ext = false; + bool harq_ack_spatial_bundling_pucch_present = false; + bool harq_ack_spatial_bundling_pusch_present = false; + bool p_nr_fr1_present = false; + bool tpc_srs_rnti_present = false; + bool tpc_pucch_rnti_present = false; + bool tpc_pusch_rnti_present = false; + bool sp_csi_rnti_present = false; + bool cs_rnti_present = false; + int8_t p_nr_fr1 = -30; + pdsch_harq_ack_codebook_e_ pdsch_harq_ack_codebook; + uint32_t tpc_srs_rnti = 0; + uint32_t tpc_pucch_rnti = 0; + uint32_t tpc_pusch_rnti = 0; + uint32_t sp_csi_rnti = 0; + setup_release_c > cs_rnti; // ... // group 0 - bool beam_correspondence_ca_present = false; - copy_ptr beam_management_ssb_csi_rs; - copy_ptr beam_switch_timing; - copy_ptr codebook_params; - copy_ptr csi_rs_im_reception_for_feedback; - copy_ptr csi_rs_proc_framework_for_srs; - copy_ptr csi_report_framework; - copy_ptr csi_rs_for_tracking; - copy_ptr srs_assoc_csi_rs; - copy_ptr spatial_relations; + bool mcs_c_rnti_present = false; + bool p_ue_fr1_present = false; + uint32_t mcs_c_rnti = 0; + int8_t p_ue_fr1 = -30; + // group 1 + bool xscale_present = false; + xscale_e_ xscale; + // group 2 + copy_ptr > > pdcch_blind_detection; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -21224,207 +22302,148 @@ struct mimo_params_per_band_s { void to_json(json_writer& j) const; }; -// BandNR ::= SEQUENCE -struct band_nr_s { - struct bwp_same_numerology_opts { - enum options { upto2, upto4, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated bwp_same_numerology_e_; - struct ue_pwr_class_opts { - enum options { pc1, pc2, pc3, pc4, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated ue_pwr_class_e_; - struct ch_bws_dl_v1530_c_ { - struct fr1_s_ { - bool scs_minus15k_hz_present = false; - bool scs_minus30k_hz_present = false; - bool scs_minus60k_hz_present = false; - fixed_bitstring<10> scs_minus15k_hz; - fixed_bitstring<10> scs_minus30k_hz; - fixed_bitstring<10> scs_minus60k_hz; - }; - struct fr2_s_ { - bool scs_minus60k_hz_present = false; - bool scs_minus120k_hz_present = false; - fixed_bitstring<3> scs_minus60k_hz; - fixed_bitstring<3> scs_minus120k_hz; - }; +// RLC-BearerConfig ::= SEQUENCE +struct rlc_bearer_cfg_s { + struct served_radio_bearer_c_ { struct types_opts { - enum options { fr1, fr2, nulltype } value; - typedef uint8_t number_type; + enum options { srb_id, drb_id, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; typedef enumerated types; // choice methods - ch_bws_dl_v1530_c_() = default; - ch_bws_dl_v1530_c_(const ch_bws_dl_v1530_c_& other); - ch_bws_dl_v1530_c_& operator=(const ch_bws_dl_v1530_c_& other); - ~ch_bws_dl_v1530_c_() { destroy_(); } + served_radio_bearer_c_() = default; + served_radio_bearer_c_(const served_radio_bearer_c_& other); + served_radio_bearer_c_& operator=(const served_radio_bearer_c_& other); + ~served_radio_bearer_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 - fr1_s_& fr1() + uint8_t& srb_id() { - assert_choice_type("fr1", type_.to_string(), "channelBWs-DL-v1530"); - return c.get(); + assert_choice_type("srb-Identity", type_.to_string(), "servedRadioBearer"); + return c.get(); } - fr2_s_& fr2() + uint8_t& drb_id() { - assert_choice_type("fr2", type_.to_string(), "channelBWs-DL-v1530"); - return c.get(); + assert_choice_type("drb-Identity", type_.to_string(), "servedRadioBearer"); + return c.get(); } - const fr1_s_& fr1() const + const uint8_t& srb_id() const { - assert_choice_type("fr1", type_.to_string(), "channelBWs-DL-v1530"); - return c.get(); + assert_choice_type("srb-Identity", type_.to_string(), "servedRadioBearer"); + return c.get(); } - const fr2_s_& fr2() const + const uint8_t& drb_id() const { - assert_choice_type("fr2", type_.to_string(), "channelBWs-DL-v1530"); - return c.get(); + assert_choice_type("drb-Identity", type_.to_string(), "servedRadioBearer"); + return c.get(); } - fr1_s_& set_fr1() + uint8_t& set_srb_id() { - set(types::fr1); - return c.get(); + set(types::srb_id); + return c.get(); } - fr2_s_& set_fr2() + uint8_t& set_drb_id() { - set(types::fr2); - return c.get(); + set(types::drb_id); + return c.get(); } private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; - struct ch_bws_ul_v1530_c_ { - struct fr1_s_ { - bool scs_minus15k_hz_present = false; - bool scs_minus30k_hz_present = false; - bool scs_minus60k_hz_present = false; - fixed_bitstring<10> scs_minus15k_hz; - fixed_bitstring<10> scs_minus30k_hz; - fixed_bitstring<10> scs_minus60k_hz; - }; - struct fr2_s_ { - bool scs_minus60k_hz_present = false; - bool scs_minus120k_hz_present = false; - fixed_bitstring<3> scs_minus60k_hz; - fixed_bitstring<3> scs_minus120k_hz; - }; - struct types_opts { - enum options { fr1, fr2, nulltype } value; - typedef uint8_t number_type; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; + // member variables + bool ext = false; + bool served_radio_bearer_present = false; + bool reestablish_rlc_present = false; + bool rlc_cfg_present = false; + bool mac_lc_ch_cfg_present = false; + uint8_t lc_ch_id = 1; + served_radio_bearer_c_ served_radio_bearer; + rlc_cfg_c rlc_cfg; + lc_ch_cfg_s mac_lc_ch_cfg; + // ... - // choice methods - ch_bws_ul_v1530_c_() = default; - ch_bws_ul_v1530_c_(const ch_bws_ul_v1530_c_& other); - ch_bws_ul_v1530_c_& operator=(const ch_bws_ul_v1530_c_& other); - ~ch_bws_ul_v1530_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 - fr1_s_& fr1() - { - assert_choice_type("fr1", type_.to_string(), "channelBWs-UL-v1530"); - return c.get(); - } - fr2_s_& fr2() - { - assert_choice_type("fr2", type_.to_string(), "channelBWs-UL-v1530"); - return c.get(); - } - const fr1_s_& fr1() const - { - assert_choice_type("fr1", type_.to_string(), "channelBWs-UL-v1530"); - return c.get(); - } - const fr2_s_& fr2() const - { - assert_choice_type("fr2", type_.to_string(), "channelBWs-UL-v1530"); - return c.get(); - } - fr1_s_& set_fr1() - { - set(types::fr1); - return c.get(); - } - fr2_s_& set_fr2() - { - set(types::fr2); - return c.get(); - } + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - private: - types type_; - choice_buffer_t c; +// SCellConfig ::= SEQUENCE +struct scell_cfg_s { + bool ext = false; + bool scell_cfg_common_present = false; + bool scell_cfg_ded_present = false; + uint8_t scell_idx = 1; + serving_cell_cfg_common_s scell_cfg_common; + serving_cell_cfg_s scell_cfg_ded; + // ... + // group 0 + copy_ptr smtc; - void destroy_(); - }; - struct max_ul_duty_cycle_pc2_fr1_opts { - enum options { n60, n70, n80, n90, n100, nulltype } value; - typedef uint8_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated max_ul_duty_cycle_pc2_fr1_e_; +// SpCellConfig ::= SEQUENCE +struct sp_cell_cfg_s { + bool ext = false; + bool serv_cell_idx_present = false; + bool recfg_with_sync_present = false; + bool rlf_timers_and_consts_present = false; + bool rlm_in_sync_out_of_sync_thres_present = false; + bool sp_cell_cfg_ded_present = false; + uint8_t serv_cell_idx = 0; + recfg_with_sync_s recfg_with_sync; + setup_release_c rlf_timers_and_consts; + serving_cell_cfg_s sp_cell_cfg_ded; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellGroupConfig ::= SEQUENCE +struct cell_group_cfg_s { + using rlc_bearer_to_add_mod_list_l_ = dyn_array; + using rlc_bearer_to_release_list_l_ = bounded_array; + using scell_to_add_mod_list_l_ = dyn_array; + using scell_to_release_list_l_ = bounded_array; // member variables - bool ext = false; - bool modified_mpr_behaviour_present = false; - bool mimo_params_per_band_present = false; - bool extended_cp_present = false; - bool multiple_tci_present = false; - bool bwp_without_restrict_present = false; - bool bwp_same_numerology_present = false; - bool bwp_diff_numerology_present = false; - bool cross_carrier_sched_same_scs_present = false; - bool pdsch_minus256_qam_fr2_present = false; - bool pusch_minus256_qam_present = false; - bool ue_pwr_class_present = false; - bool rate_matching_lte_crs_present = false; - bool ch_bws_dl_v1530_present = false; - bool ch_bws_ul_v1530_present = false; - uint16_t band_nr = 1; - fixed_bitstring<8> modified_mpr_behaviour; - mimo_params_per_band_s mimo_params_per_band; - bwp_same_numerology_e_ bwp_same_numerology; - ue_pwr_class_e_ ue_pwr_class; - ch_bws_dl_v1530_c_ ch_bws_dl_v1530; - ch_bws_ul_v1530_c_ ch_bws_ul_v1530; + bool ext = false; + bool rlc_bearer_to_add_mod_list_present = false; + bool rlc_bearer_to_release_list_present = false; + bool mac_cell_group_cfg_present = false; + bool phys_cell_group_cfg_present = false; + bool sp_cell_cfg_present = false; + bool scell_to_add_mod_list_present = false; + bool scell_to_release_list_present = false; + uint8_t cell_group_id = 0; + rlc_bearer_to_add_mod_list_l_ rlc_bearer_to_add_mod_list; + rlc_bearer_to_release_list_l_ rlc_bearer_to_release_list; + mac_cell_group_cfg_s mac_cell_group_cfg; + phys_cell_group_cfg_s phys_cell_group_cfg; + sp_cell_cfg_s sp_cell_cfg; + scell_to_add_mod_list_l_ scell_to_add_mod_list; + scell_to_release_list_l_ scell_to_release_list; // ... // group 0 - bool max_ul_duty_cycle_pc2_fr1_present = false; - max_ul_duty_cycle_pc2_fr1_e_ max_ul_duty_cycle_pc2_fr1; - // group 1 - bool pucch_spatial_rel_info_mac_ce_present = false; - bool pwr_boosting_pi2_bpsk_present = false; + bool report_ul_tx_direct_current_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -21441,6 +22460,8 @@ struct eutra_params_common_s { bool rs_sinr_meas_eutra_present = false; fixed_bitstring<32> modified_mpr_behavior_eutra; // ... + // group 0 + bool ne_dc_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -22095,6 +23116,17 @@ struct feature_set_dl_v1540_s { void to_json(json_writer& j) const; }; +// FeatureSetDownlink-v15a0 ::= SEQUENCE +struct feature_set_dl_v15a0_s { + bool supported_srs_res_present = false; + srs_res_s supported_srs_res; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // ModulationOrder ::= ENUMERATED struct mod_order_opts { enum options { bpsk_halfpi, bpsk, qpsk, qam16, qam64, qam256, nulltype } value; @@ -22386,6 +23418,7 @@ struct feature_sets_s { using feature_sets_dl_v1540_l_ = dyn_array; using feature_sets_ul_v1540_l_ = dyn_array; using feature_sets_ul_per_cc_v1540_l_ = dyn_array; + using feature_sets_dl_v15a0_l_ = dyn_array; // member variables bool ext = false; @@ -22402,6 +23435,8 @@ struct feature_sets_s { copy_ptr feature_sets_dl_v1540; copy_ptr feature_sets_ul_v1540; copy_ptr feature_sets_ul_per_cc_v1540; + // group 1 + copy_ptr feature_sets_dl_v15a0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -22535,6 +23570,8 @@ struct ims_params_common_s { bool ext = false; bool voice_over_eutra_minus5_gc_present = false; // ... + // group 0 + bool voice_over_scg_bearer_eutra_minus5_gc_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -22660,6 +23697,11 @@ struct meas_and_mob_params_common_s { max_num_csi_rs_rrm_rs_sinr_e_ max_num_csi_rs_rrm_rs_sinr; // group 2 bool nr_cgi_report_endc_present = false; + // group 3 + bool eutra_cgi_report_nedc_present = false; + bool eutra_cgi_report_nrdc_present = false; + bool nr_cgi_report_nedc_present = false; + bool nr_cgi_report_nrdc_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -22687,9 +23729,9 @@ struct meas_and_mob_params_frx_diff_s { bool csi_rs_rlm_present = false; // ... // group 0 - bool ho_inter_f_present = false; - bool ho_lte_present = false; - bool ho_e_lte_present = false; + bool ho_inter_f_present = false; + bool ho_lte_epc_present = false; + bool ho_lte_minus5_gc_present = false; // group 1 bool max_num_res_csi_rs_rlm_present = false; max_num_res_csi_rs_rlm_e_ max_num_res_csi_rs_rlm; @@ -22709,9 +23751,12 @@ struct meas_and_mob_params_xdd_diff_s { bool event_a_meas_and_report_present = false; // ... // group 0 - bool ho_inter_f_present = false; - bool ho_lte_present = false; - bool ho_e_lte_present = false; + bool ho_inter_f_present = false; + bool ho_lte_epc_present = false; + bool ho_lte_minus5_gc_present = false; + // group 1 + bool sftd_meas_nr_neigh_present = false; + bool sftd_meas_nr_neigh_drx_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -22780,18 +23825,9 @@ struct meas_and_mob_params_mrdc_s { void to_json(json_writer& j) const; }; -// MeasResult2NR ::= SEQUENCE -struct meas_result2_nr_s { - bool ext = false; - bool ssb_freq_present = false; - bool ref_freq_csi_rs_present = false; - bool meas_result_serving_cell_present = false; - bool meas_result_neigh_cell_list_nr_present = false; - uint32_t ssb_freq = 0; - uint32_t ref_freq_csi_rs = 0; - meas_result_nr_s meas_result_serving_cell; - meas_result_list_nr_l meas_result_neigh_cell_list_nr; - // ... +// MeasAndMobParametersMRDC-XDD-Diff-v1560 ::= SEQUENCE +struct meas_and_mob_params_mrdc_xdd_diff_v1560_s { + bool sftd_meas_ps_cell_nedc_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -22799,13 +23835,10 @@ struct meas_result2_nr_s { void to_json(json_writer& j) const; }; -// MeasResultCellSFTD ::= SEQUENCE -struct meas_result_cell_sftd_s { - bool rsrp_result_present = false; - uint16_t pci = 0; - uint16_t sfn_offset_result = 0; - int16_t frame_boundary_offset_result = -30720; - uint8_t rsrp_result = 0; +// MeasAndMobParametersMRDC-v1560 ::= SEQUENCE +struct meas_and_mob_params_mrdc_v1560_s { + bool meas_and_mob_params_mrdc_xdd_diff_v1560_present = false; + meas_and_mob_params_mrdc_xdd_diff_v1560_s meas_and_mob_params_mrdc_xdd_diff_v1560; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -22813,8 +23846,8 @@ struct meas_result_cell_sftd_s { void to_json(json_writer& j) const; }; -// MeasResultCellListSFTD ::= SEQUENCE (SIZE (1..3)) OF MeasResultCellSFTD -using meas_result_cell_list_sftd_l = dyn_array; +// MeasResultCellListSFTD-EUTRA ::= SEQUENCE (SIZE (1..3)) OF MeasResultSFTD-EUTRA +using meas_result_cell_list_sftd_eutra_l = dyn_array; // MeasResultList2NR ::= SEQUENCE (SIZE (1..8)) OF MeasResult2NR using meas_result_list2_nr_l = dyn_array; @@ -22831,6 +23864,86 @@ struct meas_result_scg_fail_s { void to_json(json_writer& j) const; }; +// GeneralParametersMRDC-XDD-Diff ::= SEQUENCE +struct general_params_mrdc_xdd_diff_s { + bool ext = false; + bool split_srb_with_one_ul_path_present = false; + bool split_drb_with_ul_both_mcg_scg_present = false; + bool srb3_present = false; + bool v2x_eutra_present = false; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-MRDC-CapabilityAddFRX-Mode ::= SEQUENCE +struct ue_mrdc_cap_add_frx_mode_s { + meas_and_mob_params_mrdc_frx_diff_s meas_and_mob_params_mrdc_frx_diff; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-MRDC-CapabilityAddXDD-Mode ::= SEQUENCE +struct ue_mrdc_cap_add_xdd_mode_s { + bool meas_and_mob_params_mrdc_xdd_diff_present = false; + bool general_params_mrdc_xdd_diff_present = false; + meas_and_mob_params_mrdc_xdd_diff_s meas_and_mob_params_mrdc_xdd_diff; + general_params_mrdc_xdd_diff_s general_params_mrdc_xdd_diff; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NRDC-Parameters ::= SEQUENCE +struct nrdc_params_s { + bool meas_and_mob_params_nrdc_present = false; + bool general_params_nrdc_present = false; + bool fdd_add_ue_nrdc_cap_present = false; + bool tdd_add_ue_nrdc_cap_present = false; + bool fr1_add_ue_nrdc_cap_present = false; + bool fr2_add_ue_nrdc_cap_present = false; + bool late_non_crit_ext_present = false; + bool dummy_present = false; + meas_and_mob_params_mrdc_s meas_and_mob_params_nrdc; + general_params_mrdc_xdd_diff_s general_params_nrdc; + ue_mrdc_cap_add_xdd_mode_s fdd_add_ue_nrdc_cap; + ue_mrdc_cap_add_xdd_mode_s tdd_add_ue_nrdc_cap; + ue_mrdc_cap_add_frx_mode_s fr1_add_ue_nrdc_cap; + ue_mrdc_cap_add_frx_mode_s fr2_add_ue_nrdc_cap; + dyn_octstring late_non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierAggregationVariant ::= SEQUENCE +struct carrier_aggregation_variant_s { + bool fr1fdd_fr1_tdd_ca_sp_cell_on_fr1_fdd_present = false; + bool fr1fdd_fr1_tdd_ca_sp_cell_on_fr1_tdd_present = false; + bool fr1fdd_fr2_tdd_ca_sp_cell_on_fr1_fdd_present = false; + bool fr1fdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present = false; + bool fr1tdd_fr2_tdd_ca_sp_cell_on_fr1_tdd_present = false; + bool fr1tdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present = false; + bool fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr1_fdd_present = false; + bool fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr1_tdd_present = false; + bool fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // Phy-ParametersCommon ::= SEQUENCE struct phy_params_common_s { struct bwp_switching_delay_opts { @@ -22886,6 +23999,8 @@ struct phy_params_common_s { bool max_num_search_spaces_present = false; bool rate_matching_ctrl_resrc_set_dynamic_present = false; bool max_layers_mimo_ind_present = false; + // group 2 + copy_ptr sp_cell_placement; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23020,6 +24135,10 @@ struct phy_params_frx_diff_s { bool same_symbol_present = false; bool diff_symbol_present = false; }; + struct pdcch_blind_detection_nrdc_s_ { + uint8_t pdcch_blind_detection_mcg_ue = 1; + uint8_t pdcch_blind_detection_scg_ue = 1; + }; // member variables bool ext = false; @@ -23038,8 +24157,8 @@ struct phy_params_frx_diff_s { bool pucch_f2_with_fh_present = false; bool pucch_f3_with_fh_present = false; bool pucch_f4_with_fh_present = false; - bool freq_hop_pucch_f0_minus2_present = false; - bool freq_hop_pucch_f1_minus3_minus4_present = false; + bool pucch_f0_minus2_without_fh_present = false; + bool pucch_f1_minus3_minus4_without_fh_present = false; bool mux_sr_harq_ack_csi_pucch_multi_per_slot_present = false; bool uci_code_block_segmentation_present = false; bool one_pucch_long_and_short_format_present = false; @@ -23085,6 +24204,9 @@ struct phy_params_frx_diff_s { copy_ptr csi_rs_proc_framework_for_srs; copy_ptr csi_report_framework; copy_ptr mux_sr_harq_ack_csi_pucch_once_per_slot; + // group 1 + bool mux_harq_ack_pusch_diff_symbol_present = false; + copy_ptr pdcch_blind_detection_nrdc; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23180,6 +24302,8 @@ struct phy_params_mrdc_s { bool naics_cap_list_present = false; naics_cap_list_l_ naics_cap_list; // ... + // group 0 + copy_ptr sp_cell_placement; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23204,6 +24328,8 @@ struct rf_params_s { copy_ptr supported_band_combination_list_v1540; // group 1 copy_ptr supported_band_combination_list_v1550; + // group 2 + copy_ptr supported_band_combination_list_v1560; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23213,6 +24339,20 @@ struct rf_params_s { // RF-ParametersMRDC ::= SEQUENCE struct rf_params_mrdc_s { + struct supported_band_combination_list_nedc_only_v15a0_s_ { + bool supported_band_combination_list_v1540_present = false; + bool supported_band_combination_list_v1560_present = false; + bool supported_band_combination_list_v1570_present = false; + bool supported_band_combination_list_v1580_present = false; + bool supported_band_combination_list_v1590_present = false; + band_combination_list_v1540_l supported_band_combination_list_v1540; + band_combination_list_v1560_l supported_band_combination_list_v1560; + band_combination_list_v1570_l supported_band_combination_list_v1570; + band_combination_list_v1580_l supported_band_combination_list_v1580; + band_combination_list_v1590_l supported_band_combination_list_v1590; + }; + + // member variables bool ext = false; bool supported_band_combination_list_present = false; bool applied_freq_band_list_filt_present = false; @@ -23224,6 +24364,17 @@ struct rf_params_mrdc_s { copy_ptr supported_band_combination_list_v1540; // group 1 copy_ptr supported_band_combination_list_v1550; + // group 2 + copy_ptr supported_band_combination_list_v1560; + copy_ptr supported_band_combination_list_nedc_only; + // group 3 + copy_ptr supported_band_combination_list_v1570; + // group 4 + copy_ptr supported_band_combination_list_v1580; + // group 5 + copy_ptr supported_band_combination_list_v1590; + // group 6 + copy_ptr supported_band_combination_list_nedc_only_v15a0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23255,14 +24406,10 @@ struct ue_cap_request_filt_nr_s { void to_json(json_writer& j) const; }; -// GeneralParametersMRDC-XDD-Diff ::= SEQUENCE -struct general_params_mrdc_xdd_diff_s { - bool ext = false; - bool split_srb_with_one_ul_path_present = false; - bool split_drb_with_ul_both_mcg_scg_present = false; - bool srb3_present = false; - bool v2x_eutra_v1530_present = false; - // ... +// UE-MRDC-CapabilityAddXDD-Mode-v1560 ::= SEQUENCE +struct ue_mrdc_cap_add_xdd_mode_v1560_s { + bool meas_and_mob_params_mrdc_xdd_diff_v1560_present = false; + meas_and_mob_params_mrdc_xdd_diff_v1560_s meas_and_mob_params_mrdc_xdd_diff_v1560; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23281,22 +24428,17 @@ struct pdcp_params_mrdc_s { void to_json(json_writer& j) const; }; -// UE-MRDC-CapabilityAddFRX-Mode ::= SEQUENCE -struct ue_mrdc_cap_add_frx_mode_s { - meas_and_mob_params_mrdc_frx_diff_s meas_and_mob_params_mrdc_frx_diff; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UE-MRDC-CapabilityAddXDD-Mode ::= SEQUENCE -struct ue_mrdc_cap_add_xdd_mode_s { - bool meas_and_mob_params_mrdc_xdd_diff_present = false; - bool general_params_mrdc_xdd_diff_present = false; - meas_and_mob_params_mrdc_xdd_diff_s meas_and_mob_params_mrdc_xdd_diff; - general_params_mrdc_xdd_diff_s general_params_mrdc_xdd_diff; +// UE-MRDC-Capability-v1560 ::= SEQUENCE +struct ue_mrdc_cap_v1560_s { + bool rx_filts_present = false; + bool meas_and_mob_params_mrdc_v1560_present = false; + bool fdd_add_ue_mrdc_cap_v1560_present = false; + bool tdd_add_ue_mrdc_cap_v1560_present = false; + bool non_crit_ext_present = false; + dyn_octstring rx_filts; + meas_and_mob_params_mrdc_v1560_s meas_and_mob_params_mrdc_v1560; + ue_mrdc_cap_add_xdd_mode_v1560_s fdd_add_ue_mrdc_cap_v1560; + ue_mrdc_cap_add_xdd_mode_v1560_s tdd_add_ue_mrdc_cap_v1560; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23331,6 +24473,44 @@ struct ue_mrdc_cap_s { feature_set_combinations_l_ feature_set_combinations; pdcp_params_mrdc_s pdcp_params_mrdc_v1530; dyn_octstring late_non_crit_ext; + ue_mrdc_cap_v1560_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NRDC-Parameters-v1570 ::= SEQUENCE +struct nrdc_params_v1570_s { + bool sfn_sync_nrdc_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-NR-Capability-v1570 ::= SEQUENCE +struct ue_nr_cap_v1570_s { + bool nrdc_params_v1570_present = false; + bool non_crit_ext_present = false; + nrdc_params_v1570_s nrdc_params_v1570; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-NR-Capability-v1560 ::= SEQUENCE +struct ue_nr_cap_v1560_s { + bool nrdc_params_present = false; + bool rx_filts_present = false; + bool non_crit_ext_present = false; + nrdc_params_s nrdc_params; + dyn_octstring rx_filts; + ue_nr_cap_v1570_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23352,8 +24532,9 @@ struct sdap_params_s { // UE-NR-Capability-v1550 ::= SEQUENCE struct ue_nr_cap_v1550_s { - bool reduced_cp_latency_present = false; - bool non_crit_ext_present = false; + bool reduced_cp_latency_present = false; + bool non_crit_ext_present = false; + ue_nr_cap_v1560_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23573,11 +24754,52 @@ struct ue_nr_cap_s { void to_json(json_writer& j) const; }; +// UE-CapabilityRequestFilterCommon ::= SEQUENCE +struct ue_cap_request_filt_common_s { + struct mrdc_request_s_ { + bool omit_en_dc_present = false; + bool include_nr_dc_present = false; + bool include_ne_dc_present = false; + }; + + // member variables + bool ext = false; + bool mrdc_request_present = false; + mrdc_request_s_ mrdc_request; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityEnquiry-v1560-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1560_ies_s { + bool cap_request_filt_common_present = false; + bool non_crit_ext_present = false; + ue_cap_request_filt_common_s cap_request_filt_common; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // AS-Config ::= SEQUENCE struct as_cfg_s { bool ext = false; dyn_octstring rrc_recfg; // ... + // group 0 + bool source_rb_sn_cfg_present = false; + bool source_scg_nr_cfg_present = false; + bool source_scg_eutra_cfg_present = false; + dyn_octstring source_rb_sn_cfg; + dyn_octstring source_scg_nr_cfg; + dyn_octstring source_scg_eutra_cfg; + // group 1 + bool source_scg_cfgured_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23617,6 +24839,20 @@ using band_combination_info_list_l = dyn_array; // ReestabNCellInfoList ::= SEQUENCE (SIZE (1..32)) OF ReestabNCellInfo using reestab_ncell_info_list_l = dyn_array; +// SelectedBandEntriesMN ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..32) +using sel_band_entries_mn_l = bounded_array; + +// BandCombinationInfoSN ::= SEQUENCE +struct band_combination_info_sn_s { + uint32_t band_combination_idx = 1; + uint8_t requested_feature_sets = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // ConfigRestrictInfoSCG ::= SEQUENCE struct cfg_restrict_info_scg_s { struct pwr_coordination_fr1_s_ { @@ -23631,20 +24867,32 @@ struct cfg_restrict_info_scg_s { uint8_t low_bound = 0; uint8_t up_bound = 0; }; + using sel_band_entries_mn_list_l_ = dyn_array; // member variables - bool ext = false; - bool allowed_bc_list_mrdc_present = false; - bool pwr_coordination_fr1_present = false; - bool serv_cell_idx_range_scg_present = false; - bool max_meas_freqs_scg_nr_present = false; - bool max_meas_identities_scg_nr_present = false; + bool ext = false; + bool allowed_bc_list_mrdc_present = false; + bool pwr_coordination_fr1_present = false; + bool serv_cell_idx_range_scg_present = false; + bool max_meas_freqs_scg_present = false; + bool dummy_present = false; band_combination_info_list_l allowed_bc_list_mrdc; pwr_coordination_fr1_s_ pwr_coordination_fr1; serv_cell_idx_range_scg_s_ serv_cell_idx_range_scg; - uint8_t max_meas_freqs_scg_nr = 1; - uint8_t max_meas_identities_scg_nr = 1; + uint8_t max_meas_freqs_scg = 1; + uint8_t dummy = 1; // ... + // group 0 + bool pdcch_blind_detection_scg_present = false; + bool max_num_rohc_context_sessions_sn_present = false; + copy_ptr sel_band_entries_mn_list; + uint8_t pdcch_blind_detection_scg = 1; + uint16_t max_num_rohc_context_sessions_sn = 0; + // group 1 + bool max_intra_freq_meas_identities_scg_present = false; + bool max_inter_freq_meas_identities_scg_present = false; + uint8_t max_intra_freq_meas_identities_scg = 1; + uint8_t max_inter_freq_meas_identities_scg = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23678,6 +24926,8 @@ struct as_context_s { // group 1 bool ue_assist_info_present = false; dyn_octstring ue_assist_info; + // group 2 + copy_ptr sel_band_combination_sn; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23732,17 +24982,6 @@ struct affected_carrier_freq_comb_info_mrdc_s { void to_json(json_writer& j) const; }; -// BandCombinationInfoSN ::= SEQUENCE -struct band_combination_info_sn_s { - uint32_t band_combination_idx = 1; - uint8_t requested_feature_sets = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // PH-UplinkCarrierSCG ::= SEQUENCE struct ph_ul_carrier_scg_s { struct ph_type1or3_opts { @@ -23765,6 +25004,27 @@ struct ph_ul_carrier_scg_s { void to_json(json_writer& j) const; }; +// CG-Config-v1590-IEs ::= SEQUENCE +struct cg_cfg_v1590_ies_s { + using scell_frequencies_sn_nr_l_ = bounded_array; + using scell_frequencies_sn_eutra_l_ = bounded_array; + + // member variables + bool scell_frequencies_sn_nr_present = false; + bool scell_frequencies_sn_eutra_present = false; + bool non_crit_ext_present = false; + scell_frequencies_sn_nr_l_ scell_frequencies_sn_nr; + scell_frequencies_sn_eutra_l_ scell_frequencies_sn_eutra; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CandidateServingFreqListEUTRA ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..262143) +using candidate_serving_freq_list_eutra_l = bounded_array; + // PH-InfoSCG ::= SEQUENCE struct ph_info_scg_s { bool ext = false; @@ -23780,6 +25040,42 @@ struct ph_info_scg_s { void to_json(json_writer& j) const; }; +// CG-Config-v1560-IEs ::= SEQUENCE +struct cg_cfg_v1560_ies_s { + struct report_cgi_request_eutra_s_ { + struct requested_cell_info_eutra_s_ { + uint32_t eutra_freq = 0; + uint16_t cell_for_which_to_report_cgi_eutra = 0; + }; + + // member variables + bool requested_cell_info_eutra_present = false; + requested_cell_info_eutra_s_ requested_cell_info_eutra; + }; + + // member variables + bool pscell_freq_eutra_present = false; + bool scg_cell_group_cfg_eutra_present = false; + bool candidate_cell_info_list_sn_eutra_present = false; + bool candidate_serving_freq_list_eutra_present = false; + bool need_for_gaps_present = false; + bool drx_cfg_scg_present = false; + bool report_cgi_request_eutra_present = false; + bool non_crit_ext_present = false; + uint32_t pscell_freq_eutra = 0; + dyn_octstring scg_cell_group_cfg_eutra; + dyn_octstring candidate_cell_info_list_sn_eutra; + candidate_serving_freq_list_eutra_l candidate_serving_freq_list_eutra; + drx_cfg_s drx_cfg_scg; + report_cgi_request_eutra_s_ report_cgi_request_eutra; + cg_cfg_v1590_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // FR-Info ::= SEQUENCE struct fr_info_s { struct fr_type_opts { @@ -23819,7 +25115,7 @@ using ph_type_list_scg_l = dyn_array; // CG-Config-v1540-IEs ::= SEQUENCE struct cg_cfg_v1540_ies_s { - struct report_cgi_request_s_ { + struct report_cgi_request_nr_s_ { struct requested_cell_info_s_ { uint32_t ssb_freq = 0; uint16_t cell_for_which_to_report_cgi = 0; @@ -23831,13 +25127,14 @@ struct cg_cfg_v1540_ies_s { }; // member variables - bool pscell_freq_present = false; - bool report_cgi_request_present = false; - bool ph_info_scg_present = false; - bool non_crit_ext_present = false; - uint32_t pscell_freq = 0; - report_cgi_request_s_ report_cgi_request; - ph_type_list_scg_l ph_info_scg; + bool pscell_freq_present = false; + bool report_cgi_request_nr_present = false; + bool ph_info_scg_present = false; + bool non_crit_ext_present = false; + uint32_t pscell_freq = 0; + report_cgi_request_nr_s_ report_cgi_request_nr; + ph_type_list_scg_l ph_info_scg; + cg_cfg_v1560_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -23856,6 +25153,11 @@ struct cfg_restrict_mod_req_scg_s { band_combination_info_sn_s requested_bc_mrdc; int8_t requested_p_max_fr1 = -30; // ... + // group 0 + bool requested_pdcch_blind_detection_scg_present = false; + bool requested_p_max_eutra_present = false; + uint8_t requested_pdcch_blind_detection_scg = 1; + int8_t requested_p_max_eutra = -30; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -24302,7 +25604,7 @@ struct cg_cfg_ies_s { bool drx_info_scg_present = false; bool candidate_cell_info_list_sn_present = false; bool meas_cfg_sn_present = false; - bool sel_band_combination_nr_present = false; + bool sel_band_combination_present = false; bool fr_info_list_scg_present = false; bool candidate_serving_freq_list_nr_present = false; bool non_crit_ext_present = false; @@ -24312,7 +25614,7 @@ struct cg_cfg_ies_s { drx_info_s drx_info_scg; dyn_octstring candidate_cell_info_list_sn; meas_cfg_sn_s meas_cfg_sn; - band_combination_info_sn_s sel_band_combination_nr; + band_combination_info_sn_s sel_band_combination; fr_info_list_l fr_info_list_scg; candidate_serving_freq_list_nr_l candidate_serving_freq_list_nr; cg_cfg_v1540_ies_s non_crit_ext; @@ -24414,6 +25716,21 @@ struct cg_cfg_s { void to_json(json_writer& j) const; }; +// CG-ConfigInfo-v1590-IEs ::= SEQUENCE +struct cg_cfg_info_v1590_ies_s { + using serv_frequencies_mn_nr_l_ = bounded_array; + + // member variables + bool serv_frequencies_mn_nr_present = false; + bool non_crit_ext_present = false; + serv_frequencies_mn_nr_l_ serv_frequencies_mn_nr; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // PH-UplinkCarrierMCG ::= SEQUENCE struct ph_ul_carrier_mcg_s { struct ph_type1or3_opts { @@ -24436,6 +25753,27 @@ struct ph_ul_carrier_mcg_s { void to_json(json_writer& j) const; }; +// SFTD-FrequencyList-EUTRA ::= SEQUENCE (SIZE (1..3)) OF INTEGER (0..262143) +using sftd_freq_list_eutra_l = bounded_array; + +// SFTD-FrequencyList-NR ::= SEQUENCE (SIZE (1..3)) OF INTEGER (0..3279165) +using sftd_freq_list_nr_l = bounded_array; + +// CG-ConfigInfo-v1570-IEs ::= SEQUENCE +struct cg_cfg_info_v1570_ies_s { + bool sftd_freq_list_nr_present = false; + bool sftd_freq_list_eutra_present = false; + bool non_crit_ext_present = false; + sftd_freq_list_nr_l sftd_freq_list_nr; + sftd_freq_list_eutra_l sftd_freq_list_eutra; + cg_cfg_info_v1590_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // PH-InfoMCG ::= SEQUENCE struct ph_info_mcg_s { bool ext = false; @@ -24451,15 +25789,63 @@ struct ph_info_mcg_s { void to_json(json_writer& j) const; }; +// CG-ConfigInfo-v1560-IEs ::= SEQUENCE +struct cg_cfg_info_v1560_ies_s { + struct scg_fail_info_eutra_s_ { + struct fail_type_eutra_opts { + enum options { t313_expiry, random_access_problem, rlc_max_num_retx, scg_change_fail, nulltype } value; + typedef uint16_t number_type; + + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated fail_type_eutra_e_; + + // member variables + fail_type_eutra_e_ fail_type_eutra; + dyn_octstring meas_result_scg_eutra; + }; + struct meas_result_report_cgi_eutra_s_ { + uint32_t eutra_freq = 0; + uint16_t cell_for_which_to_report_cgi_eutra = 0; + cgi_info_eutra_s cgi_info_eutra; + }; + + // member variables + bool candidate_cell_info_list_mn_eutra_present = false; + bool candidate_cell_info_list_sn_eutra_present = false; + bool source_cfg_scg_eutra_present = false; + bool scg_fail_info_eutra_present = false; + bool drx_cfg_mcg_present = false; + bool meas_result_report_cgi_eutra_present = false; + bool meas_result_cell_list_sftd_eutra_present = false; + bool fr_info_list_mcg_present = false; + bool non_crit_ext_present = false; + dyn_octstring candidate_cell_info_list_mn_eutra; + dyn_octstring candidate_cell_info_list_sn_eutra; + dyn_octstring source_cfg_scg_eutra; + scg_fail_info_eutra_s_ scg_fail_info_eutra; + drx_cfg_s drx_cfg_mcg; + meas_result_report_cgi_eutra_s_ meas_result_report_cgi_eutra; + meas_result_cell_list_sftd_eutra_l meas_result_cell_list_sftd_eutra; + fr_info_list_l fr_info_list_mcg; + cg_cfg_info_v1570_ies_s non_crit_ext; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // PH-TypeListMCG ::= SEQUENCE (SIZE (1..32)) OF PH-InfoMCG using ph_type_list_mcg_l = dyn_array; // CG-ConfigInfo-v1540-IEs ::= SEQUENCE struct cg_cfg_info_v1540_ies_s { struct meas_result_report_cgi_s_ { - uint32_t ssb_freq = 0; - uint16_t cell_for_which_to_report_cgi = 0; - cgi_info_s cgi_info; + uint32_t ssb_freq = 0; + uint16_t cell_for_which_to_report_cgi = 0; + cgi_info_nr_s cgi_info; }; // member variables @@ -24468,6 +25854,7 @@ struct cg_cfg_info_v1540_ies_s { bool non_crit_ext_present = false; ph_type_list_mcg_l ph_info_mcg; meas_result_report_cgi_s_ meas_result_report_cgi; + cg_cfg_info_v1560_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -24511,6 +25898,8 @@ struct meas_cfg_mn_s { setup_release_c meas_gap_cfg; gap_purpose_e_ gap_purpose; // ... + // group 0 + copy_ptr > meas_gap_cfg_fr2; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -24544,32 +25933,32 @@ struct cg_cfg_info_ies_s { }; // member variables - bool ue_cap_info_present = false; - bool candidate_cell_info_list_mn_present = false; - bool candidate_cell_info_list_sn_present = false; - bool meas_result_cell_list_sftd_present = false; - bool scg_fail_info_present = false; - bool cfg_restrict_info_present = false; - bool drx_info_mcg_present = false; - bool meas_cfg_mn_present = false; - bool source_cfg_scg_present = false; - bool scg_rb_cfg_present = false; - bool mcg_rb_cfg_present = false; - bool mrdc_assist_info_present = false; - bool non_crit_ext_present = false; - dyn_octstring ue_cap_info; - meas_result_list2_nr_l candidate_cell_info_list_mn; - dyn_octstring candidate_cell_info_list_sn; - meas_result_cell_list_sftd_l meas_result_cell_list_sftd; - scg_fail_info_s_ scg_fail_info; - cfg_restrict_info_scg_s cfg_restrict_info; - drx_info_s drx_info_mcg; - meas_cfg_mn_s meas_cfg_mn; - dyn_octstring source_cfg_scg; - dyn_octstring scg_rb_cfg; - dyn_octstring mcg_rb_cfg; - mrdc_assist_info_s mrdc_assist_info; - cg_cfg_info_v1540_ies_s non_crit_ext; + bool ue_cap_info_present = false; + bool candidate_cell_info_list_mn_present = false; + bool candidate_cell_info_list_sn_present = false; + bool meas_result_cell_list_sftd_nr_present = false; + bool scg_fail_info_present = false; + bool cfg_restrict_info_present = false; + bool drx_info_mcg_present = false; + bool meas_cfg_mn_present = false; + bool source_cfg_scg_present = false; + bool scg_rb_cfg_present = false; + bool mcg_rb_cfg_present = false; + bool mrdc_assist_info_present = false; + bool non_crit_ext_present = false; + dyn_octstring ue_cap_info; + meas_result_list2_nr_l candidate_cell_info_list_mn; + dyn_octstring candidate_cell_info_list_sn; + meas_result_cell_list_sftd_nr_l meas_result_cell_list_sftd_nr; + scg_fail_info_s_ scg_fail_info; + cfg_restrict_info_scg_s cfg_restrict_info; + drx_info_s drx_info_mcg; + meas_cfg_mn_s meas_cfg_mn; + dyn_octstring source_cfg_scg; + dyn_octstring scg_rb_cfg; + dyn_octstring mcg_rb_cfg; + mrdc_assist_info_s mrdc_assist_info; + cg_cfg_info_v1540_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -24912,6 +26301,8 @@ struct rrm_cfg_s { ue_inactive_time_e_ ue_inactive_time; meas_result_list2_nr_l candidate_cell_info_list; // ... + // group 0 + copy_ptr candidate_cell_info_list_sn_eutra; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -25044,7 +26435,7 @@ struct meas_timing_s { // ... // group 0 bool pci_present = false; - copy_ptr ssb_to_measure_v1540; + copy_ptr ssb_to_measure; uint16_t pci = 0; // sequence methods diff --git a/lib/src/asn1/rrc_nr.cc b/lib/src/asn1/rrc_nr.cc index c9e2a3e5b..2499cdf64 100644 --- a/lib/src/asn1/rrc_nr.cc +++ b/lib/src/asn1/rrc_nr.cc @@ -377,7 +377,7 @@ SRSASN_CODE eutra_freq_neigh_cell_info_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(q_qual_min_offset_cell_present, 1)); HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(q_offset_cell.pack(bref)); + HANDLE_CODE(dummy.pack(bref)); if (q_rx_lev_min_offset_cell_present) { HANDLE_CODE(pack_integer(bref, q_rx_lev_min_offset_cell, (uint8_t)1u, (uint8_t)8u)); } @@ -393,7 +393,7 @@ SRSASN_CODE eutra_freq_neigh_cell_info_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(q_qual_min_offset_cell_present, 1)); HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(q_offset_cell.unpack(bref)); + HANDLE_CODE(dummy.unpack(bref)); if (q_rx_lev_min_offset_cell_present) { HANDLE_CODE(unpack_integer(q_rx_lev_min_offset_cell, bref, (uint8_t)1u, (uint8_t)8u)); } @@ -407,7 +407,7 @@ void eutra_freq_neigh_cell_info_s::to_json(json_writer& j) const { j.start_obj(); j.write_int("physCellId", pci); - j.write_str("q-OffsetCell", q_offset_cell.to_string()); + j.write_str("dummy", dummy.to_string()); if (q_rx_lev_min_offset_cell_present) { j.write_int("q-RxLevMinOffsetCell", q_rx_lev_min_offset_cell); } @@ -1144,8 +1144,8 @@ ssb_mtc_s::periodicity_and_offset_c_::periodicity_and_offset_c_(const ssb_mtc_s: log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); } } -ssb_mtc_s::periodicity_and_offset_c_& ssb_mtc_s::periodicity_and_offset_c_:: - operator=(const ssb_mtc_s::periodicity_and_offset_c_& other) +ssb_mtc_s::periodicity_and_offset_c_& +ssb_mtc_s::periodicity_and_offset_c_::operator=(const ssb_mtc_s::periodicity_and_offset_c_& other) { if (this == &other) { return *this; @@ -1597,8 +1597,9 @@ search_space_s::monitoring_slot_periodicity_and_offset_c_::monitoring_slot_perio log_invalid_choice_id(type_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); } } -search_space_s::monitoring_slot_periodicity_and_offset_c_& search_space_s::monitoring_slot_periodicity_and_offset_c_:: - operator=(const search_space_s::monitoring_slot_periodicity_and_offset_c_& other) +search_space_s::monitoring_slot_periodicity_and_offset_c_& +search_space_s::monitoring_slot_periodicity_and_offset_c_::operator=( + const search_space_s::monitoring_slot_periodicity_and_offset_c_& other) { if (this == &other) { return *this; @@ -1947,8 +1948,8 @@ search_space_s::search_space_type_c_::search_space_type_c_(const search_space_s: log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); } } -search_space_s::search_space_type_c_& search_space_s::search_space_type_c_:: - operator=(const search_space_s::search_space_type_c_& other) +search_space_s::search_space_type_c_& +search_space_s::search_space_type_c_::operator=(const search_space_s::search_space_type_c_& other) { if (this == &other) { return *this; @@ -3158,8 +3159,8 @@ pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::first_pdcch_monito } } pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: -operator=(const pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_& other) +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::operator=( + const pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_& other) { if (this == &other) { return *this; @@ -3769,8 +3770,8 @@ rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::ssb_per_rach } } rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_:: -operator=(const rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& other) +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::operator=( + const rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& other) { if (this == &other) { return *this; @@ -4071,8 +4072,8 @@ rach_cfg_common_s::prach_root_seq_idx_c_::prach_root_seq_idx_c_(const rach_cfg_c log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); } } -rach_cfg_common_s::prach_root_seq_idx_c_& rach_cfg_common_s::prach_root_seq_idx_c_:: - operator=(const rach_cfg_common_s::prach_root_seq_idx_c_& other) +rach_cfg_common_s::prach_root_seq_idx_c_& +rach_cfg_common_s::prach_root_seq_idx_c_::operator=(const rach_cfg_common_s::prach_root_seq_idx_c_& other) { if (this == &other) { return *this; @@ -4170,15 +4171,15 @@ SRSASN_CODE scs_specific_carrier_s::pack(bit_ref& bref) const if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= tx_direct_current_location_v1530_present; + group_flags[0] |= tx_direct_current_location_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(tx_direct_current_location_v1530_present, 1)); - if (tx_direct_current_location_v1530_present) { - HANDLE_CODE(pack_integer(bref, tx_direct_current_location_v1530, (uint16_t)0u, (uint16_t)4095u)); + HANDLE_CODE(bref.pack(tx_direct_current_location_present, 1)); + if (tx_direct_current_location_present) { + HANDLE_CODE(pack_integer(bref, tx_direct_current_location, (uint16_t)0u, (uint16_t)4095u)); } } } @@ -4198,9 +4199,9 @@ SRSASN_CODE scs_specific_carrier_s::unpack(cbit_ref& bref) if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(tx_direct_current_location_v1530_present, 1)); - if (tx_direct_current_location_v1530_present) { - HANDLE_CODE(unpack_integer(tx_direct_current_location_v1530, bref, (uint16_t)0u, (uint16_t)4095u)); + HANDLE_CODE(bref.unpack(tx_direct_current_location_present, 1)); + if (tx_direct_current_location_present) { + HANDLE_CODE(unpack_integer(tx_direct_current_location, bref, (uint16_t)0u, (uint16_t)4095u)); } } } @@ -4213,8 +4214,8 @@ void scs_specific_carrier_s::to_json(json_writer& j) const j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); j.write_int("carrierBandwidth", carrier_bw); if (ext) { - if (tx_direct_current_location_v1530_present) { - j.write_int("txDirectCurrentLocation-v1530", tx_direct_current_location_v1530); + if (tx_direct_current_location_present) { + j.write_int("txDirectCurrentLocation", tx_direct_current_location); } } j.end_obj(); @@ -4741,8 +4742,8 @@ pcch_cfg_s::nand_paging_frame_offset_c_::nand_paging_frame_offset_c_( log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); } } -pcch_cfg_s::nand_paging_frame_offset_c_& pcch_cfg_s::nand_paging_frame_offset_c_:: - operator=(const pcch_cfg_s::nand_paging_frame_offset_c_& other) +pcch_cfg_s::nand_paging_frame_offset_c_& +pcch_cfg_s::nand_paging_frame_offset_c_::operator=(const pcch_cfg_s::nand_paging_frame_offset_c_& other) { if (this == &other) { return *this; @@ -4973,8 +4974,8 @@ pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::first_pdcch_monitoring_occ log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); } } -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_& pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - operator=(const pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_& other) +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_& pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::operator=( + const pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_& other) { if (this == &other) { return *this; @@ -6543,8 +6544,8 @@ uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::uac_ac_barr_list_type_c_( log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); } } -uac_barr_per_plmn_s::uac_ac_barr_list_type_c_& uac_barr_per_plmn_s::uac_ac_barr_list_type_c_:: - operator=(const uac_barr_per_plmn_s::uac_ac_barr_list_type_c_& other) +uac_barr_per_plmn_s::uac_ac_barr_list_type_c_& +uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::operator=(const uac_barr_per_plmn_s::uac_ac_barr_list_type_c_& other) { if (this == &other) { return *this; @@ -7093,8 +7094,8 @@ sys_info_ies_s::sib_type_and_info_item_c_::sib_type_and_info_item_c_( log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); } } -sys_info_ies_s::sib_type_and_info_item_c_& sys_info_ies_s::sib_type_and_info_item_c_:: - operator=(const sys_info_ies_s::sib_type_and_info_item_c_& other) +sys_info_ies_s::sib_type_and_info_item_c_& +sys_info_ies_s::sib_type_and_info_item_c_::operator=(const sys_info_ies_s::sib_type_and_info_item_c_& other) { if (this == &other) { return *this; @@ -7646,8 +7647,8 @@ sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::uac_access_ca } } sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_& -sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_:: -operator=(const sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_& other) +sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::operator=( + const sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_& other) { if (this == &other) { return *this; @@ -7753,7 +7754,7 @@ void sys_info_s::to_json(json_writer& j) const void sys_info_s::crit_exts_c_::destroy_() { switch (type_) { - case types::sys_info_r15: + case types::sys_info: c.destroy(); break; default: @@ -7765,7 +7766,7 @@ void sys_info_s::crit_exts_c_::set(types::options e) destroy_(); type_ = e; switch (type_) { - case types::sys_info_r15: + case types::sys_info: c.init(); break; case types::crit_exts_future: @@ -7780,7 +7781,7 @@ sys_info_s::crit_exts_c_::crit_exts_c_(const sys_info_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::sys_info_r15: + case types::sys_info: c.init(other.c.get()); break; case types::crit_exts_future: @@ -7798,7 +7799,7 @@ sys_info_s::crit_exts_c_& sys_info_s::crit_exts_c_::operator=(const sys_info_s:: } set(other.type()); switch (type_) { - case types::sys_info_r15: + case types::sys_info: c.set(other.c.get()); break; case types::crit_exts_future: @@ -7815,8 +7816,8 @@ void sys_info_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::sys_info_r15: - j.write_fieldname("systemInformation-r15"); + case types::sys_info: + j.write_fieldname("systemInformation"); c.get().to_json(j); break; case types::crit_exts_future: @@ -7830,7 +7831,7 @@ SRSASN_CODE sys_info_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::sys_info_r15: + case types::sys_info: HANDLE_CODE(c.get().pack(bref)); break; case types::crit_exts_future: @@ -7847,7 +7848,7 @@ SRSASN_CODE sys_info_s::crit_exts_c_::unpack(cbit_ref& bref) e.unpack(bref); set(e); switch (type_) { - case types::sys_info_r15: + case types::sys_info: HANDLE_CODE(c.get().unpack(bref)); break; case types::crit_exts_future: @@ -7861,7 +7862,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 const char* options[] = {"systemInformation-r15", "criticalExtensionsFuture"}; + static const char* options[] = {"systemInformation", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "sys_info_s::crit_exts_c_::types"); } @@ -8148,1614 +8149,1837 @@ void bcch_dl_sch_msg_s::to_json(json_writer& j) const j.end_array(); } -// Alpha ::= ENUMERATED -std::string alpha_opts::to_string() const -{ - 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 +// UL-DataSplitThreshold ::= ENUMERATED +std::string ul_data_split_thres_opts::to_string() const { - 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"); + 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"); } -std::string alpha_opts::to_number_string() const +int32_t ul_data_split_thres_opts::to_number() const { - 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"); + 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"); } -// BFR-CSIRS-Resource ::= SEQUENCE -SRSASN_CODE bfr_csirs_res_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ra_occasion_list_present, 1)); - HANDLE_CODE(bref.pack(ra_preamb_idx_present, 1)); - - HANDLE_CODE(pack_integer(bref, csi_rs, (uint8_t)0u, (uint8_t)191u)); - if (ra_occasion_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ra_occasion_list, 1, 64, integer_packer(0, 511))); - } - if (ra_preamb_idx_present) { - HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE bfr_csirs_res_s::unpack(cbit_ref& bref) +// CipheringAlgorithm ::= ENUMERATED +std::string ciphering_algorithm_opts::to_string() const { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ra_occasion_list_present, 1)); - HANDLE_CODE(bref.unpack(ra_preamb_idx_present, 1)); - - HANDLE_CODE(unpack_integer(csi_rs, bref, (uint8_t)0u, (uint8_t)191u)); - if (ra_occasion_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ra_occasion_list, bref, 1, 64, integer_packer(0, 511))); - } - if (ra_preamb_idx_present) { - HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); - } - - return SRSASN_SUCCESS; + static const char* options[] = {"nea0", "nea1", "nea2", "nea3", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(options, 8, value, "ciphering_algorithm_e"); } -void bfr_csirs_res_s::to_json(json_writer& j) const +uint8_t ciphering_algorithm_opts::to_number() const { - j.start_obj(); - j.write_int("csi-RS", csi_rs); - if (ra_occasion_list_present) { - j.start_array("ra-OccasionList"); - for (const auto& e1 : ra_occasion_list) { - j.write_int(e1); - } - j.end_array(); - } - if (ra_preamb_idx_present) { - j.write_int("ra-PreambleIndex", ra_preamb_idx); - } - j.end_obj(); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "ciphering_algorithm_e"); } -// BFR-SSB-Resource ::= SEQUENCE -SRSASN_CODE bfr_ssb_res_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, ssb, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE bfr_ssb_res_s::unpack(cbit_ref& bref) +// IntegrityProtAlgorithm ::= ENUMERATED +std::string integrity_prot_algorithm_opts::to_string() const { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(ssb, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); - - return SRSASN_SUCCESS; + static const char* options[] = {"nia0", "nia1", "nia2", "nia3", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(options, 8, value, "integrity_prot_algorithm_e"); } -void bfr_ssb_res_s::to_json(json_writer& j) const +uint8_t integrity_prot_algorithm_opts::to_number() const { - j.start_obj(); - j.write_int("ssb", ssb); - j.write_int("ra-PreambleIndex", ra_preamb_idx); - j.end_obj(); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "integrity_prot_algorithm_e"); } -// BetaOffsets ::= SEQUENCE -SRSASN_CODE beta_offsets_s::pack(bit_ref& bref) const +// PDCP-Config ::= SEQUENCE +SRSASN_CODE pdcp_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(beta_offset_ack_idx1_present, 1)); - HANDLE_CODE(bref.pack(beta_offset_ack_idx2_present, 1)); - HANDLE_CODE(bref.pack(beta_offset_ack_idx3_present, 1)); - HANDLE_CODE(bref.pack(beta_offset_csi_part1_idx1_present, 1)); - HANDLE_CODE(bref.pack(beta_offset_csi_part1_idx2_present, 1)); - HANDLE_CODE(bref.pack(beta_offset_csi_part2_idx1_present, 1)); - HANDLE_CODE(bref.pack(beta_offset_csi_part2_idx2_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(drb_present, 1)); + HANDLE_CODE(bref.pack(more_than_one_rlc_present, 1)); + HANDLE_CODE(bref.pack(t_reordering_present, 1)); - if (beta_offset_ack_idx1_present) { - HANDLE_CODE(pack_integer(bref, beta_offset_ack_idx1, (uint8_t)0u, (uint8_t)31u)); - } - if (beta_offset_ack_idx2_present) { - HANDLE_CODE(pack_integer(bref, beta_offset_ack_idx2, (uint8_t)0u, (uint8_t)31u)); - } - if (beta_offset_ack_idx3_present) { - HANDLE_CODE(pack_integer(bref, beta_offset_ack_idx3, (uint8_t)0u, (uint8_t)31u)); - } - if (beta_offset_csi_part1_idx1_present) { - HANDLE_CODE(pack_integer(bref, beta_offset_csi_part1_idx1, (uint8_t)0u, (uint8_t)31u)); - } - if (beta_offset_csi_part1_idx2_present) { - HANDLE_CODE(pack_integer(bref, beta_offset_csi_part1_idx2, (uint8_t)0u, (uint8_t)31u)); + if (drb_present) { + HANDLE_CODE(bref.pack(drb.discard_timer_present, 1)); + HANDLE_CODE(bref.pack(drb.pdcp_sn_size_ul_present, 1)); + HANDLE_CODE(bref.pack(drb.pdcp_sn_size_dl_present, 1)); + HANDLE_CODE(bref.pack(drb.integrity_protection_present, 1)); + HANDLE_CODE(bref.pack(drb.status_report_required_present, 1)); + HANDLE_CODE(bref.pack(drb.out_of_order_delivery_present, 1)); + if (drb.discard_timer_present) { + HANDLE_CODE(drb.discard_timer.pack(bref)); + } + if (drb.pdcp_sn_size_ul_present) { + HANDLE_CODE(drb.pdcp_sn_size_ul.pack(bref)); + } + if (drb.pdcp_sn_size_dl_present) { + HANDLE_CODE(drb.pdcp_sn_size_dl.pack(bref)); + } + HANDLE_CODE(drb.hdr_compress.pack(bref)); } - if (beta_offset_csi_part2_idx1_present) { - HANDLE_CODE(pack_integer(bref, beta_offset_csi_part2_idx1, (uint8_t)0u, (uint8_t)31u)); + if (more_than_one_rlc_present) { + HANDLE_CODE(bref.pack(more_than_one_rlc.ul_data_split_thres_present, 1)); + HANDLE_CODE(bref.pack(more_than_one_rlc.pdcp_dupl_present, 1)); + HANDLE_CODE(bref.pack(more_than_one_rlc.primary_path.cell_group_present, 1)); + HANDLE_CODE(bref.pack(more_than_one_rlc.primary_path.lc_ch_present, 1)); + if (more_than_one_rlc.primary_path.cell_group_present) { + HANDLE_CODE(pack_integer(bref, more_than_one_rlc.primary_path.cell_group, (uint8_t)0u, (uint8_t)3u)); + } + if (more_than_one_rlc.primary_path.lc_ch_present) { + HANDLE_CODE(pack_integer(bref, more_than_one_rlc.primary_path.lc_ch, (uint8_t)1u, (uint8_t)32u)); + } + if (more_than_one_rlc.ul_data_split_thres_present) { + HANDLE_CODE(more_than_one_rlc.ul_data_split_thres.pack(bref)); + } + if (more_than_one_rlc.pdcp_dupl_present) { + HANDLE_CODE(bref.pack(more_than_one_rlc.pdcp_dupl, 1)); + } } - if (beta_offset_csi_part2_idx2_present) { - HANDLE_CODE(pack_integer(bref, beta_offset_csi_part2_idx2, (uint8_t)0u, (uint8_t)31u)); + if (t_reordering_present) { + HANDLE_CODE(t_reordering.pack(bref)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ciphering_disabled_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ciphering_disabled_present, 1)); + } + } return SRSASN_SUCCESS; } -SRSASN_CODE beta_offsets_s::unpack(cbit_ref& bref) +SRSASN_CODE pdcp_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(beta_offset_ack_idx1_present, 1)); - HANDLE_CODE(bref.unpack(beta_offset_ack_idx2_present, 1)); - HANDLE_CODE(bref.unpack(beta_offset_ack_idx3_present, 1)); - HANDLE_CODE(bref.unpack(beta_offset_csi_part1_idx1_present, 1)); - HANDLE_CODE(bref.unpack(beta_offset_csi_part1_idx2_present, 1)); - HANDLE_CODE(bref.unpack(beta_offset_csi_part2_idx1_present, 1)); - HANDLE_CODE(bref.unpack(beta_offset_csi_part2_idx2_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(drb_present, 1)); + HANDLE_CODE(bref.unpack(more_than_one_rlc_present, 1)); + HANDLE_CODE(bref.unpack(t_reordering_present, 1)); - if (beta_offset_ack_idx1_present) { - HANDLE_CODE(unpack_integer(beta_offset_ack_idx1, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (beta_offset_ack_idx2_present) { - HANDLE_CODE(unpack_integer(beta_offset_ack_idx2, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (beta_offset_ack_idx3_present) { - HANDLE_CODE(unpack_integer(beta_offset_ack_idx3, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (beta_offset_csi_part1_idx1_present) { - HANDLE_CODE(unpack_integer(beta_offset_csi_part1_idx1, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (beta_offset_csi_part1_idx2_present) { - HANDLE_CODE(unpack_integer(beta_offset_csi_part1_idx2, bref, (uint8_t)0u, (uint8_t)31u)); + if (drb_present) { + HANDLE_CODE(bref.unpack(drb.discard_timer_present, 1)); + HANDLE_CODE(bref.unpack(drb.pdcp_sn_size_ul_present, 1)); + HANDLE_CODE(bref.unpack(drb.pdcp_sn_size_dl_present, 1)); + HANDLE_CODE(bref.unpack(drb.integrity_protection_present, 1)); + HANDLE_CODE(bref.unpack(drb.status_report_required_present, 1)); + HANDLE_CODE(bref.unpack(drb.out_of_order_delivery_present, 1)); + if (drb.discard_timer_present) { + HANDLE_CODE(drb.discard_timer.unpack(bref)); + } + if (drb.pdcp_sn_size_ul_present) { + HANDLE_CODE(drb.pdcp_sn_size_ul.unpack(bref)); + } + if (drb.pdcp_sn_size_dl_present) { + HANDLE_CODE(drb.pdcp_sn_size_dl.unpack(bref)); + } + HANDLE_CODE(drb.hdr_compress.unpack(bref)); } - if (beta_offset_csi_part2_idx1_present) { - HANDLE_CODE(unpack_integer(beta_offset_csi_part2_idx1, bref, (uint8_t)0u, (uint8_t)31u)); + if (more_than_one_rlc_present) { + HANDLE_CODE(bref.unpack(more_than_one_rlc.ul_data_split_thres_present, 1)); + HANDLE_CODE(bref.unpack(more_than_one_rlc.pdcp_dupl_present, 1)); + HANDLE_CODE(bref.unpack(more_than_one_rlc.primary_path.cell_group_present, 1)); + HANDLE_CODE(bref.unpack(more_than_one_rlc.primary_path.lc_ch_present, 1)); + if (more_than_one_rlc.primary_path.cell_group_present) { + HANDLE_CODE(unpack_integer(more_than_one_rlc.primary_path.cell_group, bref, (uint8_t)0u, (uint8_t)3u)); + } + if (more_than_one_rlc.primary_path.lc_ch_present) { + HANDLE_CODE(unpack_integer(more_than_one_rlc.primary_path.lc_ch, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (more_than_one_rlc.ul_data_split_thres_present) { + HANDLE_CODE(more_than_one_rlc.ul_data_split_thres.unpack(bref)); + } + if (more_than_one_rlc.pdcp_dupl_present) { + HANDLE_CODE(bref.unpack(more_than_one_rlc.pdcp_dupl, 1)); + } } - if (beta_offset_csi_part2_idx2_present) { - HANDLE_CODE(unpack_integer(beta_offset_csi_part2_idx2, bref, (uint8_t)0u, (uint8_t)31u)); + if (t_reordering_present) { + HANDLE_CODE(t_reordering.unpack(bref)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ciphering_disabled_present, 1)); + } + } return SRSASN_SUCCESS; } -void beta_offsets_s::to_json(json_writer& j) const +void pdcp_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (beta_offset_ack_idx1_present) { - j.write_int("betaOffsetACK-Index1", beta_offset_ack_idx1); - } - if (beta_offset_ack_idx2_present) { - j.write_int("betaOffsetACK-Index2", beta_offset_ack_idx2); - } - if (beta_offset_ack_idx3_present) { - j.write_int("betaOffsetACK-Index3", beta_offset_ack_idx3); - } - if (beta_offset_csi_part1_idx1_present) { - j.write_int("betaOffsetCSI-Part1-Index1", beta_offset_csi_part1_idx1); + if (drb_present) { + j.write_fieldname("drb"); + j.start_obj(); + if (drb.discard_timer_present) { + j.write_str("discardTimer", drb.discard_timer.to_string()); + } + if (drb.pdcp_sn_size_ul_present) { + j.write_str("pdcp-SN-SizeUL", drb.pdcp_sn_size_ul.to_string()); + } + if (drb.pdcp_sn_size_dl_present) { + j.write_str("pdcp-SN-SizeDL", drb.pdcp_sn_size_dl.to_string()); + } + j.write_fieldname("headerCompression"); + drb.hdr_compress.to_json(j); + if (drb.integrity_protection_present) { + j.write_str("integrityProtection", "enabled"); + } + if (drb.status_report_required_present) { + j.write_str("statusReportRequired", "true"); + } + if (drb.out_of_order_delivery_present) { + j.write_str("outOfOrderDelivery", "true"); + } + j.end_obj(); } - if (beta_offset_csi_part1_idx2_present) { - j.write_int("betaOffsetCSI-Part1-Index2", beta_offset_csi_part1_idx2); + if (more_than_one_rlc_present) { + j.write_fieldname("moreThanOneRLC"); + j.start_obj(); + j.write_fieldname("primaryPath"); + j.start_obj(); + if (more_than_one_rlc.primary_path.cell_group_present) { + j.write_int("cellGroup", more_than_one_rlc.primary_path.cell_group); + } + if (more_than_one_rlc.primary_path.lc_ch_present) { + j.write_int("logicalChannel", more_than_one_rlc.primary_path.lc_ch); + } + j.end_obj(); + if (more_than_one_rlc.ul_data_split_thres_present) { + j.write_str("ul-DataSplitThreshold", more_than_one_rlc.ul_data_split_thres.to_string()); + } + if (more_than_one_rlc.pdcp_dupl_present) { + j.write_bool("pdcp-Duplication", more_than_one_rlc.pdcp_dupl); + } + j.end_obj(); } - if (beta_offset_csi_part2_idx1_present) { - j.write_int("betaOffsetCSI-Part2-Index1", beta_offset_csi_part2_idx1); + if (t_reordering_present) { + j.write_str("t-Reordering", t_reordering.to_string()); } - if (beta_offset_csi_part2_idx2_present) { - j.write_int("betaOffsetCSI-Part2-Index2", beta_offset_csi_part2_idx2); + if (ext) { + if (ciphering_disabled_present) { + j.write_str("cipheringDisabled", "true"); + } } j.end_obj(); } -// CSI-FrequencyOccupation ::= SEQUENCE -SRSASN_CODE csi_freq_occupation_s::pack(bit_ref& bref) const +std::string pdcp_cfg_s::drb_s_::discard_timer_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, start_rb, (uint16_t)0u, (uint16_t)274u)); - HANDLE_CODE(pack_integer(bref, nrof_rbs, (uint16_t)24u, (uint16_t)276u)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE csi_freq_occupation_s::unpack(cbit_ref& bref) +int16_t pdcp_cfg_s::drb_s_::discard_timer_opts::to_number() const { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(start_rb, bref, (uint16_t)0u, (uint16_t)274u)); - HANDLE_CODE(unpack_integer(nrof_rbs, bref, (uint16_t)24u, (uint16_t)276u)); + 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_"); +} - return SRSASN_SUCCESS; +std::string pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_opts::to_string() const +{ + static const char* options[] = {"len12bits", "len18bits"}; + return convert_enum_idx(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_e_"); } -void csi_freq_occupation_s::to_json(json_writer& j) const +uint8_t pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_opts::to_number() const { - j.start_obj(); - j.write_int("startingRB", start_rb); - j.write_int("nrofRBs", nrof_rbs); - j.end_obj(); + static const uint8_t options[] = {12, 18}; + return map_enum_number(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_e_"); } -// P0-PUCCH ::= SEQUENCE -SRSASN_CODE p0_pucch_s::pack(bit_ref& bref) const +std::string pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, p0_pucch_id, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pack_integer(bref, p0_pucch_value, (int8_t)-16, (int8_t)15)); - - return SRSASN_SUCCESS; + static const char* options[] = {"len12bits", "len18bits"}; + return convert_enum_idx(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_e_"); } -SRSASN_CODE p0_pucch_s::unpack(cbit_ref& bref) +uint8_t pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_opts::to_number() const { - HANDLE_CODE(unpack_integer(p0_pucch_id, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(unpack_integer(p0_pucch_value, bref, (int8_t)-16, (int8_t)15)); - - return SRSASN_SUCCESS; + 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 p0_pucch_s::to_json(json_writer& j) const + +void pdcp_cfg_s::drb_s_::hdr_compress_c_::destroy_() { - j.start_obj(); - j.write_int("p0-PUCCH-Id", p0_pucch_id); - j.write_int("p0-PUCCH-Value", p0_pucch_value); - j.end_obj(); + switch (type_) { + case types::rohc: + c.destroy(); + break; + case types::ul_only_rohc: + c.destroy(); + break; + default: + break; + } } - -// P0-PUSCH-AlphaSet ::= SEQUENCE -SRSASN_CODE p0_pusch_alpha_set_s::pack(bit_ref& bref) const +void pdcp_cfg_s::drb_s_::hdr_compress_c_::set(types::options e) { - HANDLE_CODE(bref.pack(p0_present, 1)); - HANDLE_CODE(bref.pack(alpha_present, 1)); - - HANDLE_CODE(pack_integer(bref, p0_pusch_alpha_set_id, (uint8_t)0u, (uint8_t)29u)); - if (p0_present) { - HANDLE_CODE(pack_integer(bref, p0, (int8_t)-16, (int8_t)15)); + destroy_(); + type_ = e; + switch (type_) { + case types::not_used: + break; + case types::rohc: + c.init(); + break; + case types::ul_only_rohc: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); } - if (alpha_present) { - HANDLE_CODE(alpha.pack(bref)); +} +pdcp_cfg_s::drb_s_::hdr_compress_c_::hdr_compress_c_(const pdcp_cfg_s::drb_s_::hdr_compress_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::not_used: + break; + case types::rohc: + c.init(other.c.get()); + break; + case types::ul_only_rohc: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE p0_pusch_alpha_set_s::unpack(cbit_ref& bref) +pdcp_cfg_s::drb_s_::hdr_compress_c_& +pdcp_cfg_s::drb_s_::hdr_compress_c_::operator=(const pdcp_cfg_s::drb_s_::hdr_compress_c_& other) { - HANDLE_CODE(bref.unpack(p0_present, 1)); - HANDLE_CODE(bref.unpack(alpha_present, 1)); - - HANDLE_CODE(unpack_integer(p0_pusch_alpha_set_id, bref, (uint8_t)0u, (uint8_t)29u)); - if (p0_present) { - HANDLE_CODE(unpack_integer(p0, bref, (int8_t)-16, (int8_t)15)); + if (this == &other) { + return *this; } - if (alpha_present) { - HANDLE_CODE(alpha.unpack(bref)); + set(other.type()); + switch (type_) { + case types::not_used: + break; + case types::rohc: + c.set(other.c.get()); + break; + case types::ul_only_rohc: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); } - return SRSASN_SUCCESS; + return *this; } -void p0_pusch_alpha_set_s::to_json(json_writer& j) const +void pdcp_cfg_s::drb_s_::hdr_compress_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_int("p0-PUSCH-AlphaSetId", p0_pusch_alpha_set_id); - if (p0_present) { - j.write_int("p0", p0); - } - if (alpha_present) { - j.write_str("alpha", alpha.to_string()); - } - j.end_obj(); -} + switch (type_) { + case types::not_used: + break; + case types::rohc: + j.write_fieldname("rohc"); + j.start_obj(); + if (c.get().max_cid_present) { + j.write_int("maxCID", c.get().max_cid); + } + j.write_fieldname("profiles"); + j.start_obj(); + j.write_bool("profile0x0001", c.get().profiles.profile0x0001); + j.write_bool("profile0x0002", c.get().profiles.profile0x0002); + j.write_bool("profile0x0003", c.get().profiles.profile0x0003); + j.write_bool("profile0x0004", c.get().profiles.profile0x0004); + j.write_bool("profile0x0006", c.get().profiles.profile0x0006); + j.write_bool("profile0x0101", c.get().profiles.profile0x0101); + j.write_bool("profile0x0102", c.get().profiles.profile0x0102); + j.write_bool("profile0x0103", c.get().profiles.profile0x0103); + j.write_bool("profile0x0104", c.get().profiles.profile0x0104); + j.end_obj(); + if (c.get().drb_continue_rohc_present) { + j.write_str("drb-ContinueROHC", "true"); + } + j.end_obj(); + break; + case types::ul_only_rohc: + j.write_fieldname("uplinkOnlyROHC"); + j.start_obj(); + if (c.get().max_cid_present) { + j.write_int("maxCID", c.get().max_cid); + } + j.write_fieldname("profiles"); + j.start_obj(); + j.write_bool("profile0x0006", c.get().profiles.profile0x0006); + j.end_obj(); + if (c.get().drb_continue_rohc_present) { + j.write_str("drb-ContinueROHC", "true"); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcp_cfg_s::drb_s_::hdr_compress_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::not_used: + break; + case types::rohc: + HANDLE_CODE(bref.pack(c.get().max_cid_present, 1)); + HANDLE_CODE(bref.pack(c.get().drb_continue_rohc_present, 1)); + if (c.get().max_cid_present) { + HANDLE_CODE(pack_integer(bref, c.get().max_cid, (uint16_t)1u, (uint16_t)16383u)); + } + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0001, 1)); + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0002, 1)); + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0003, 1)); + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0004, 1)); + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0006, 1)); + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0101, 1)); + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0102, 1)); + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0103, 1)); + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0104, 1)); + break; + case types::ul_only_rohc: + HANDLE_CODE(bref.pack(c.get().max_cid_present, 1)); + HANDLE_CODE(bref.pack(c.get().drb_continue_rohc_present, 1)); + if (c.get().max_cid_present) { + HANDLE_CODE(pack_integer(bref, c.get().max_cid, (uint16_t)1u, (uint16_t)16383u)); + } + HANDLE_CODE(bref.pack(c.get().profiles.profile0x0006, 1)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_s::drb_s_::hdr_compress_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::not_used: + break; + case types::rohc: + HANDLE_CODE(bref.unpack(c.get().max_cid_present, 1)); + HANDLE_CODE(bref.unpack(c.get().drb_continue_rohc_present, 1)); + if (c.get().max_cid_present) { + HANDLE_CODE(unpack_integer(c.get().max_cid, bref, (uint16_t)1u, (uint16_t)16383u)); + } + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0001, 1)); + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0002, 1)); + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0003, 1)); + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0004, 1)); + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0006, 1)); + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0101, 1)); + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0102, 1)); + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0103, 1)); + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0104, 1)); + break; + case types::ul_only_rohc: + HANDLE_CODE(bref.unpack(c.get().max_cid_present, 1)); + HANDLE_CODE(bref.unpack(c.get().drb_continue_rohc_present, 1)); + if (c.get().max_cid_present) { + HANDLE_CODE(unpack_integer(c.get().max_cid, bref, (uint16_t)1u, (uint16_t)16383u)); + } + HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0006, 1)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} -// PTRS-UplinkConfig ::= SEQUENCE -SRSASN_CODE ptrs_ul_cfg_s::pack(bit_ref& bref) const +std::string pdcp_cfg_s::drb_s_::hdr_compress_c_::types_opts::to_string() const +{ + 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 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", + "ms1750", "ms2000", "ms2250", "ms2500", "ms2750", "ms3000", "spare28", "spare27", "spare26", "spare25", + "spare24", "spare23", "spare22", "spare21", "spare20", "spare19", "spare18", "spare17", "spare16", "spare15", + "spare14", "spare13", "spare12", "spare11", "spare10", "spare09", "spare08", "spare07", "spare06", "spare05", + "spare04", "spare03", "spare02", "spare01"}; + return convert_enum_idx(options, 64, value, "pdcp_cfg_s::t_reordering_e_"); +} +uint16_t pdcp_cfg_s::t_reordering_opts::to_number() const +{ + 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_"); +} + +// SDAP-Config ::= SEQUENCE +SRSASN_CODE sdap_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(transform_precoder_disabled_present, 1)); - HANDLE_CODE(bref.pack(transform_precoder_enabled_present, 1)); + HANDLE_CODE(bref.pack(mapped_qos_flows_to_add_present, 1)); + HANDLE_CODE(bref.pack(mapped_qos_flows_to_release_present, 1)); - if (transform_precoder_disabled_present) { - HANDLE_CODE(bref.pack(transform_precoder_disabled.freq_density_present, 1)); - HANDLE_CODE(bref.pack(transform_precoder_disabled.time_density_present, 1)); - HANDLE_CODE(bref.pack(transform_precoder_disabled.res_elem_offset_present, 1)); - if (transform_precoder_disabled.freq_density_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(transform_precoder_disabled.freq_density)[0], - transform_precoder_disabled.freq_density.size(), - integer_packer(1, 276))); - } - if (transform_precoder_disabled.time_density_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(transform_precoder_disabled.time_density)[0], - transform_precoder_disabled.time_density.size(), - integer_packer(0, 29))); - } - HANDLE_CODE(transform_precoder_disabled.max_nrof_ports.pack(bref)); - if (transform_precoder_disabled.res_elem_offset_present) { - HANDLE_CODE(transform_precoder_disabled.res_elem_offset.pack(bref)); - } - HANDLE_CODE(transform_precoder_disabled.ptrs_pwr.pack(bref)); + HANDLE_CODE(pack_integer(bref, pdu_session, (uint16_t)0u, (uint16_t)255u)); + HANDLE_CODE(sdap_hdr_dl.pack(bref)); + HANDLE_CODE(sdap_hdr_ul.pack(bref)); + HANDLE_CODE(bref.pack(default_drb, 1)); + if (mapped_qos_flows_to_add_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mapped_qos_flows_to_add, 1, 64, integer_packer(0, 63))); } - if (transform_precoder_enabled_present) { - HANDLE_CODE(bref.pack(transform_precoder_enabled.time_density_transform_precoding_present, 1)); - HANDLE_CODE(pack_fixed_seq_of(bref, - &(transform_precoder_enabled.sample_density)[0], - transform_precoder_enabled.sample_density.size(), - integer_packer(1, 276))); + if (mapped_qos_flows_to_release_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mapped_qos_flows_to_release, 1, 64, integer_packer(0, 63))); } return SRSASN_SUCCESS; } -SRSASN_CODE ptrs_ul_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE sdap_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(transform_precoder_disabled_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoder_enabled_present, 1)); + HANDLE_CODE(bref.unpack(mapped_qos_flows_to_add_present, 1)); + HANDLE_CODE(bref.unpack(mapped_qos_flows_to_release_present, 1)); - if (transform_precoder_disabled_present) { - HANDLE_CODE(bref.unpack(transform_precoder_disabled.freq_density_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoder_disabled.time_density_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoder_disabled.res_elem_offset_present, 1)); - if (transform_precoder_disabled.freq_density_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(transform_precoder_disabled.freq_density)[0], - bref, - transform_precoder_disabled.freq_density.size(), - integer_packer(1, 276))); - } - if (transform_precoder_disabled.time_density_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(transform_precoder_disabled.time_density)[0], - bref, - transform_precoder_disabled.time_density.size(), - integer_packer(0, 29))); - } - HANDLE_CODE(transform_precoder_disabled.max_nrof_ports.unpack(bref)); - if (transform_precoder_disabled.res_elem_offset_present) { - HANDLE_CODE(transform_precoder_disabled.res_elem_offset.unpack(bref)); - } - HANDLE_CODE(transform_precoder_disabled.ptrs_pwr.unpack(bref)); + HANDLE_CODE(unpack_integer(pdu_session, bref, (uint16_t)0u, (uint16_t)255u)); + HANDLE_CODE(sdap_hdr_dl.unpack(bref)); + HANDLE_CODE(sdap_hdr_ul.unpack(bref)); + HANDLE_CODE(bref.unpack(default_drb, 1)); + if (mapped_qos_flows_to_add_present) { + HANDLE_CODE(unpack_dyn_seq_of(mapped_qos_flows_to_add, bref, 1, 64, integer_packer(0, 63))); } - if (transform_precoder_enabled_present) { - HANDLE_CODE(bref.unpack(transform_precoder_enabled.time_density_transform_precoding_present, 1)); - HANDLE_CODE(unpack_fixed_seq_of(&(transform_precoder_enabled.sample_density)[0], - bref, - transform_precoder_enabled.sample_density.size(), - integer_packer(1, 276))); + if (mapped_qos_flows_to_release_present) { + HANDLE_CODE(unpack_dyn_seq_of(mapped_qos_flows_to_release, bref, 1, 64, integer_packer(0, 63))); } return SRSASN_SUCCESS; } -void ptrs_ul_cfg_s::to_json(json_writer& j) const +void sdap_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (transform_precoder_disabled_present) { - j.write_fieldname("transformPrecoderDisabled"); - j.start_obj(); - if (transform_precoder_disabled.freq_density_present) { - j.start_array("frequencyDensity"); - 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 (const auto& e1 : transform_precoder_disabled.time_density) { - j.write_int(e1); - } - j.end_array(); - } - j.write_str("maxNrofPorts", transform_precoder_disabled.max_nrof_ports.to_string()); - if (transform_precoder_disabled.res_elem_offset_present) { - j.write_str("resourceElementOffset", transform_precoder_disabled.res_elem_offset.to_string()); + j.write_int("pdu-Session", pdu_session); + j.write_str("sdap-HeaderDL", sdap_hdr_dl.to_string()); + j.write_str("sdap-HeaderUL", sdap_hdr_ul.to_string()); + j.write_bool("defaultDRB", default_drb); + if (mapped_qos_flows_to_add_present) { + j.start_array("mappedQoS-FlowsToAdd"); + for (const auto& e1 : mapped_qos_flows_to_add) { + j.write_int(e1); } - j.write_str("ptrs-Power", transform_precoder_disabled.ptrs_pwr.to_string()); - j.end_obj(); + j.end_array(); } - if (transform_precoder_enabled_present) { - j.write_fieldname("transformPrecoderEnabled"); - j.start_obj(); - j.start_array("sampleDensity"); - for (const auto& e1 : transform_precoder_enabled.sample_density) { + if (mapped_qos_flows_to_release_present) { + j.start_array("mappedQoS-FlowsToRelease"); + for (const auto& e1 : mapped_qos_flows_to_release) { j.write_int(e1); } j.end_array(); - if (transform_precoder_enabled.time_density_transform_precoding_present) { - j.write_str("timeDensityTransformPrecoding", "d2"); - } - j.end_obj(); } j.end_obj(); } -std::string ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_opts::to_string() const -{ - 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 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 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 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 +std::string sdap_cfg_s::sdap_hdr_dl_opts::to_string() const { - 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_"); + static const char* options[] = {"present", "absent"}; + return convert_enum_idx(options, 2, value, "sdap_cfg_s::sdap_hdr_dl_e_"); } -std::string ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_opts::to_string() const -{ - 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 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 +std::string sdap_cfg_s::sdap_hdr_ul_opts::to_string() const { - 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_"); + static const char* options[] = {"present", "absent"}; + return convert_enum_idx(options, 2, value, "sdap_cfg_s::sdap_hdr_ul_e_"); } -// PUCCH-MaxCodeRate ::= ENUMERATED -std::string pucch_max_code_rate_opts::to_string() const -{ - 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 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 +// DRB-ToAddMod ::= SEQUENCE +SRSASN_CODE drb_to_add_mod_s::pack(bit_ref& bref) const { - 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"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cn_assoc_present, 1)); + HANDLE_CODE(bref.pack(reestablish_pdcp_present, 1)); + HANDLE_CODE(bref.pack(recover_pdcp_present, 1)); + HANDLE_CODE(bref.pack(pdcp_cfg_present, 1)); -// PUCCH-PathlossReferenceRS ::= SEQUENCE -SRSASN_CODE pucch_pathloss_ref_rs_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(ref_sig.pack(bref)); + if (cn_assoc_present) { + HANDLE_CODE(cn_assoc.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, drb_id, (uint8_t)1u, (uint8_t)32u)); + if (pdcp_cfg_present) { + HANDLE_CODE(pdcp_cfg.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_pathloss_ref_rs_s::unpack(cbit_ref& bref) +SRSASN_CODE drb_to_add_mod_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(ref_sig.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cn_assoc_present, 1)); + HANDLE_CODE(bref.unpack(reestablish_pdcp_present, 1)); + HANDLE_CODE(bref.unpack(recover_pdcp_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_cfg_present, 1)); + + if (cn_assoc_present) { + HANDLE_CODE(cn_assoc.unpack(bref)); + } + HANDLE_CODE(unpack_integer(drb_id, bref, (uint8_t)1u, (uint8_t)32u)); + if (pdcp_cfg_present) { + HANDLE_CODE(pdcp_cfg.unpack(bref)); + } return SRSASN_SUCCESS; } -void pucch_pathloss_ref_rs_s::to_json(json_writer& j) const +void drb_to_add_mod_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("pucch-PathlossReferenceRS-Id", pucch_pathloss_ref_rs_id); - j.write_fieldname("referenceSignal"); - ref_sig.to_json(j); + if (cn_assoc_present) { + j.write_fieldname("cnAssociation"); + cn_assoc.to_json(j); + } + j.write_int("drb-Identity", drb_id); + if (reestablish_pdcp_present) { + j.write_str("reestablishPDCP", "true"); + } + if (recover_pdcp_present) { + j.write_str("recoverPDCP", "true"); + } + if (pdcp_cfg_present) { + j.write_fieldname("pdcp-Config"); + pdcp_cfg.to_json(j); + } j.end_obj(); } -void pucch_pathloss_ref_rs_s::ref_sig_c_::destroy_() {} -void pucch_pathloss_ref_rs_s::ref_sig_c_::set(types::options e) +void drb_to_add_mod_s::cn_assoc_c_::destroy_() +{ + switch (type_) { + case types::sdap_cfg: + c.destroy(); + break; + default: + break; + } +} +void drb_to_add_mod_s::cn_assoc_c_::set(types::options e) { destroy_(); type_ = e; + switch (type_) { + case types::eps_bearer_id: + break; + case types::sdap_cfg: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + } } -pucch_pathloss_ref_rs_s::ref_sig_c_::ref_sig_c_(const pucch_pathloss_ref_rs_s::ref_sig_c_& other) +drb_to_add_mod_s::cn_assoc_c_::cn_assoc_c_(const drb_to_add_mod_s::cn_assoc_c_& other) { type_ = other.type(); switch (type_) { - case types::ssb_idx: + case types::eps_bearer_id: c.init(other.c.get()); break; - case types::csi_rs_idx: - c.init(other.c.get()); + case types::sdap_cfg: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); } } -pucch_pathloss_ref_rs_s::ref_sig_c_& pucch_pathloss_ref_rs_s::ref_sig_c_:: - operator=(const pucch_pathloss_ref_rs_s::ref_sig_c_& other) +drb_to_add_mod_s::cn_assoc_c_& drb_to_add_mod_s::cn_assoc_c_::operator=(const drb_to_add_mod_s::cn_assoc_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb_idx: + case types::eps_bearer_id: c.set(other.c.get()); break; - case types::csi_rs_idx: - c.set(other.c.get()); + case types::sdap_cfg: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); } return *this; } -void pucch_pathloss_ref_rs_s::ref_sig_c_::to_json(json_writer& j) const +void drb_to_add_mod_s::cn_assoc_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb_idx: - j.write_int("ssb-Index", c.get()); + case types::eps_bearer_id: + j.write_int("eps-BearerIdentity", c.get()); break; - case types::csi_rs_idx: - j.write_int("csi-RS-Index", c.get()); + case types::sdap_cfg: + j.write_fieldname("sdap-Config"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); } j.end_obj(); } -SRSASN_CODE pucch_pathloss_ref_rs_s::ref_sig_c_::pack(bit_ref& bref) const +SRSASN_CODE drb_to_add_mod_s::cn_assoc_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + case types::eps_bearer_id: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); break; - case types::csi_rs_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + case types::sdap_cfg: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_pathloss_ref_rs_s::ref_sig_c_::unpack(cbit_ref& bref) +SRSASN_CODE drb_to_add_mod_s::cn_assoc_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + case types::eps_bearer_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); break; - case types::csi_rs_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + case types::sdap_cfg: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string pucch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const +std::string drb_to_add_mod_s::cn_assoc_c_::types_opts::to_string() const { - 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"); + static const char* options[] = {"eps-BearerIdentity", "sdap-Config"}; + return convert_enum_idx(options, 2, value, "drb_to_add_mod_s::cn_assoc_c_::types"); } -// PUCCH-format0 ::= SEQUENCE -SRSASN_CODE pucch_format0_s::pack(bit_ref& bref) const +// SRB-ToAddMod ::= SEQUENCE +SRSASN_CODE srb_to_add_mod_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, init_cyclic_shift, (uint8_t)0u, (uint8_t)11u)); - HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)13u)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(reestablish_pdcp_present, 1)); + HANDLE_CODE(bref.pack(discard_on_pdcp_present, 1)); + HANDLE_CODE(bref.pack(pdcp_cfg_present, 1)); + + HANDLE_CODE(pack_integer(bref, srb_id, (uint8_t)1u, (uint8_t)3u)); + if (pdcp_cfg_present) { + HANDLE_CODE(pdcp_cfg.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_format0_s::unpack(cbit_ref& bref) +SRSASN_CODE srb_to_add_mod_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(init_cyclic_shift, bref, (uint8_t)0u, (uint8_t)11u)); - HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)13u)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(reestablish_pdcp_present, 1)); + HANDLE_CODE(bref.unpack(discard_on_pdcp_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_cfg_present, 1)); + + HANDLE_CODE(unpack_integer(srb_id, bref, (uint8_t)1u, (uint8_t)3u)); + if (pdcp_cfg_present) { + HANDLE_CODE(pdcp_cfg.unpack(bref)); + } return SRSASN_SUCCESS; } -void pucch_format0_s::to_json(json_writer& j) const +void srb_to_add_mod_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("initialCyclicShift", init_cyclic_shift); - j.write_int("nrofSymbols", nrof_symbols); - j.write_int("startingSymbolIndex", start_symbol_idx); - j.end_obj(); + j.write_int("srb-Identity", srb_id); + if (reestablish_pdcp_present) { + j.write_str("reestablishPDCP", "true"); + } + if (discard_on_pdcp_present) { + j.write_str("discardOnPDCP", "true"); + } + if (pdcp_cfg_present) { + j.write_fieldname("pdcp-Config"); + pdcp_cfg.to_json(j); + } + j.end_obj(); } -// PUCCH-format1 ::= SEQUENCE -SRSASN_CODE pucch_format1_s::pack(bit_ref& bref) const +// SecurityAlgorithmConfig ::= SEQUENCE +SRSASN_CODE security_algorithm_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, init_cyclic_shift, (uint8_t)0u, (uint8_t)11u)); - HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)4u, (uint8_t)14u)); - HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)10u)); - HANDLE_CODE(pack_integer(bref, time_domain_occ, (uint8_t)0u, (uint8_t)6u)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(integrity_prot_algorithm_present, 1)); + + HANDLE_CODE(ciphering_algorithm.pack(bref)); + if (integrity_prot_algorithm_present) { + HANDLE_CODE(integrity_prot_algorithm.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_format1_s::unpack(cbit_ref& bref) +SRSASN_CODE security_algorithm_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(init_cyclic_shift, bref, (uint8_t)0u, (uint8_t)11u)); - HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)4u, (uint8_t)14u)); - HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)10u)); - HANDLE_CODE(unpack_integer(time_domain_occ, bref, (uint8_t)0u, (uint8_t)6u)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(integrity_prot_algorithm_present, 1)); + + HANDLE_CODE(ciphering_algorithm.unpack(bref)); + if (integrity_prot_algorithm_present) { + HANDLE_CODE(integrity_prot_algorithm.unpack(bref)); + } return SRSASN_SUCCESS; } -void pucch_format1_s::to_json(json_writer& j) const +void security_algorithm_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("initialCyclicShift", init_cyclic_shift); - j.write_int("nrofSymbols", nrof_symbols); - j.write_int("startingSymbolIndex", start_symbol_idx); - j.write_int("timeDomainOCC", time_domain_occ); + j.write_str("cipheringAlgorithm", ciphering_algorithm.to_string()); + if (integrity_prot_algorithm_present) { + j.write_str("integrityProtAlgorithm", integrity_prot_algorithm.to_string()); + } j.end_obj(); } -// PUCCH-format2 ::= SEQUENCE -SRSASN_CODE pucch_format2_s::pack(bit_ref& bref) const +// SecurityConfig ::= SEQUENCE +SRSASN_CODE security_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, nrof_prbs, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)13u)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(security_algorithm_cfg_present, 1)); + HANDLE_CODE(bref.pack(key_to_use_present, 1)); + + if (security_algorithm_cfg_present) { + HANDLE_CODE(security_algorithm_cfg.pack(bref)); + } + if (key_to_use_present) { + HANDLE_CODE(key_to_use.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_format2_s::unpack(cbit_ref& bref) +SRSASN_CODE security_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(nrof_prbs, bref, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)13u)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(security_algorithm_cfg_present, 1)); + HANDLE_CODE(bref.unpack(key_to_use_present, 1)); + + if (security_algorithm_cfg_present) { + HANDLE_CODE(security_algorithm_cfg.unpack(bref)); + } + if (key_to_use_present) { + HANDLE_CODE(key_to_use.unpack(bref)); + } return SRSASN_SUCCESS; } -void pucch_format2_s::to_json(json_writer& j) const +void security_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("nrofPRBs", nrof_prbs); - j.write_int("nrofSymbols", nrof_symbols); - j.write_int("startingSymbolIndex", start_symbol_idx); + if (security_algorithm_cfg_present) { + j.write_fieldname("securityAlgorithmConfig"); + security_algorithm_cfg.to_json(j); + } + if (key_to_use_present) { + j.write_str("keyToUse", key_to_use.to_string()); + } j.end_obj(); } -// PUCCH-format3 ::= SEQUENCE -SRSASN_CODE pucch_format3_s::pack(bit_ref& bref) const +std::string security_cfg_s::key_to_use_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, nrof_prbs, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)4u, (uint8_t)14u)); - HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)10u)); + static const char* options[] = {"master", "secondary"}; + return convert_enum_idx(options, 2, value, "security_cfg_s::key_to_use_e_"); +} + +// RadioBearerConfig ::= SEQUENCE +SRSASN_CODE radio_bearer_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(srb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(srb3_to_release_present, 1)); + HANDLE_CODE(bref.pack(drb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(drb_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(security_cfg_present, 1)); + + if (srb_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srb_to_add_mod_list, 1, 2)); + } + if (drb_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_add_mod_list, 1, 29)); + } + if (drb_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_release_list, 1, 29, integer_packer(1, 32))); + } + if (security_cfg_present) { + HANDLE_CODE(security_cfg.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_format3_s::unpack(cbit_ref& bref) +SRSASN_CODE radio_bearer_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(nrof_prbs, bref, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)4u, (uint8_t)14u)); - HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)10u)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(srb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(srb3_to_release_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(security_cfg_present, 1)); + + if (srb_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(srb_to_add_mod_list, bref, 1, 2)); + } + if (drb_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_to_add_mod_list, bref, 1, 29)); + } + if (drb_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_to_release_list, bref, 1, 29, integer_packer(1, 32))); + } + if (security_cfg_present) { + HANDLE_CODE(security_cfg.unpack(bref)); + } return SRSASN_SUCCESS; } -void pucch_format3_s::to_json(json_writer& j) const +void radio_bearer_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("nrofPRBs", nrof_prbs); - j.write_int("nrofSymbols", nrof_symbols); - j.write_int("startingSymbolIndex", start_symbol_idx); + if (srb_to_add_mod_list_present) { + j.start_array("srb-ToAddModList"); + for (const auto& e1 : srb_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); + } + if (srb3_to_release_present) { + j.write_str("srb3-ToRelease", "true"); + } + if (drb_to_add_mod_list_present) { + j.start_array("drb-ToAddModList"); + 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 (const auto& e1 : drb_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (security_cfg_present) { + j.write_fieldname("securityConfig"); + security_cfg.to_json(j); + } j.end_obj(); } -// PUCCH-format4 ::= SEQUENCE -SRSASN_CODE pucch_format4_s::pack(bit_ref& bref) const +// RRCReject-IEs ::= SEQUENCE +SRSASN_CODE rrc_reject_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)4u, (uint8_t)14u)); - HANDLE_CODE(occ_len.pack(bref)); - HANDLE_CODE(occ_idx.pack(bref)); - HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)10u)); + HANDLE_CODE(bref.pack(wait_time_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (wait_time_present) { + HANDLE_CODE(pack_integer(bref, wait_time, (uint8_t)1u, (uint8_t)16u)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_format4_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_reject_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)4u, (uint8_t)14u)); - HANDLE_CODE(occ_len.unpack(bref)); - HANDLE_CODE(occ_idx.unpack(bref)); - HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)10u)); + HANDLE_CODE(bref.unpack(wait_time_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (wait_time_present) { + HANDLE_CODE(unpack_integer(wait_time, bref, (uint8_t)1u, (uint8_t)16u)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } -void pucch_format4_s::to_json(json_writer& j) const +void rrc_reject_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("nrofSymbols", nrof_symbols); - j.write_str("occ-Length", occ_len.to_string()); - j.write_str("occ-Index", occ_idx.to_string()); - j.write_int("startingSymbolIndex", start_symbol_idx); + if (wait_time_present) { + j.write_int("waitTime", wait_time); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } j.end_obj(); } -std::string pucch_format4_s::occ_len_opts::to_string() const +// RRCSetup-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_ies_s::pack(bit_ref& bref) const { - static const char* options[] = {"n2", "n4"}; - return convert_enum_idx(options, 2, value, "pucch_format4_s::occ_len_e_"); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(radio_bearer_cfg.pack(bref)); + HANDLE_CODE(master_cell_group.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t pucch_format4_s::occ_len_opts::to_number() const +SRSASN_CODE rrc_setup_ies_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {2, 4}; - return map_enum_number(options, 2, value, "pucch_format4_s::occ_len_e_"); -} + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); -std::string pucch_format4_s::occ_idx_opts::to_string() const -{ - static const char* options[] = {"n0", "n1", "n2", "n3"}; - return convert_enum_idx(options, 4, value, "pucch_format4_s::occ_idx_e_"); + HANDLE_CODE(radio_bearer_cfg.unpack(bref)); + HANDLE_CODE(master_cell_group.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t pucch_format4_s::occ_idx_opts::to_number() const +void rrc_setup_ies_s::to_json(json_writer& j) const { - static const uint8_t options[] = {0, 1, 2, 3}; - return map_enum_number(options, 4, value, "pucch_format4_s::occ_idx_e_"); + j.start_obj(); + j.write_fieldname("radioBearerConfig"); + radio_bearer_cfg.to_json(j); + j.write_str("masterCellGroup", master_cell_group.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); } -// PUSCH-PathlossReferenceRS ::= SEQUENCE -SRSASN_CODE pusch_pathloss_ref_rs_s::pack(bit_ref& bref) const +// RRCReject ::= SEQUENCE +SRSASN_CODE rrc_reject_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, pusch_pathloss_ref_rs_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(ref_sig.pack(bref)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE pusch_pathloss_ref_rs_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_reject_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(pusch_pathloss_ref_rs_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(ref_sig.unpack(bref)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void pusch_pathloss_ref_rs_s::to_json(json_writer& j) const +void rrc_reject_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("pusch-PathlossReferenceRS-Id", pusch_pathloss_ref_rs_id); - j.write_fieldname("referenceSignal"); - ref_sig.to_json(j); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -void pusch_pathloss_ref_rs_s::ref_sig_c_::destroy_() {} -void pusch_pathloss_ref_rs_s::ref_sig_c_::set(types::options e) +void rrc_reject_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_reject: + c.destroy(); + break; + default: + break; + } +} +void rrc_reject_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; + switch (type_) { + case types::rrc_reject: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); + } } -pusch_pathloss_ref_rs_s::ref_sig_c_::ref_sig_c_(const pusch_pathloss_ref_rs_s::ref_sig_c_& other) +rrc_reject_s::crit_exts_c_::crit_exts_c_(const rrc_reject_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::ssb_idx: - c.init(other.c.get()); + case types::rrc_reject: + c.init(other.c.get()); break; - case types::csi_rs_idx: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); } } -pusch_pathloss_ref_rs_s::ref_sig_c_& pusch_pathloss_ref_rs_s::ref_sig_c_:: - operator=(const pusch_pathloss_ref_rs_s::ref_sig_c_& other) +rrc_reject_s::crit_exts_c_& rrc_reject_s::crit_exts_c_::operator=(const rrc_reject_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb_idx: - c.set(other.c.get()); + case types::rrc_reject: + c.set(other.c.get()); break; - case types::csi_rs_idx: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); } return *this; } -void pusch_pathloss_ref_rs_s::ref_sig_c_::to_json(json_writer& j) const +void rrc_reject_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb_idx: - j.write_int("ssb-Index", c.get()); + case types::rrc_reject: + j.write_fieldname("rrcReject"); + c.get().to_json(j); break; - case types::csi_rs_idx: - j.write_int("csi-RS-Index", c.get()); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE pusch_pathloss_ref_rs_s::ref_sig_c_::pack(bit_ref& bref) const +SRSASN_CODE rrc_reject_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + case types::rrc_reject: + HANDLE_CODE(c.get().pack(bref)); break; - case types::csi_rs_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE pusch_pathloss_ref_rs_s::ref_sig_c_::unpack(cbit_ref& bref) +SRSASN_CODE rrc_reject_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + case types::rrc_reject: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::csi_rs_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string pusch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const +std::string rrc_reject_s::crit_exts_c_::types_opts::to_string() const { - 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"); + static const char* options[] = {"rrcReject", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_reject_s::crit_exts_c_::types"); } -// SRI-PUSCH-PowerControl ::= SEQUENCE -SRSASN_CODE sri_pusch_pwr_ctrl_s::pack(bit_ref& bref) const +// RRCSetup ::= SEQUENCE +SRSASN_CODE rrc_setup_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, sri_pusch_pwr_ctrl_id, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(pack_integer(bref, sri_pusch_pathloss_ref_rs_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pack_integer(bref, sri_p0_pusch_alpha_set_id, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(sri_pusch_closed_loop_idx.pack(bref)); + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE sri_pusch_pwr_ctrl_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_setup_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(sri_pusch_pwr_ctrl_id, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(unpack_integer(sri_pusch_pathloss_ref_rs_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(unpack_integer(sri_p0_pusch_alpha_set_id, bref, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(sri_pusch_closed_loop_idx.unpack(bref)); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void sri_pusch_pwr_ctrl_s::to_json(json_writer& j) const +void rrc_setup_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("sri-PUSCH-PowerControlId", sri_pusch_pwr_ctrl_id); - j.write_int("sri-PUSCH-PathlossReferenceRS-Id", sri_pusch_pathloss_ref_rs_id); - j.write_int("sri-P0-PUSCH-AlphaSetId", sri_p0_pusch_alpha_set_id); - j.write_str("sri-PUSCH-ClosedLoopIndex", sri_pusch_closed_loop_idx.to_string()); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -std::string sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_string() const -{ - 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 +void rrc_setup_s::crit_exts_c_::destroy_() { - 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_"); + switch (type_) { + case types::rrc_setup: + c.destroy(); + break; + default: + break; + } } - -// SRS-PeriodicityAndOffset ::= CHOICE -void srs_periodicity_and_offset_c::destroy_() {} -void srs_periodicity_and_offset_c::set(types::options e) +void rrc_setup_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; -} -srs_periodicity_and_offset_c::srs_periodicity_and_offset_c(const srs_periodicity_and_offset_c& other) -{ - type_ = other.type(); switch (type_) { - case types::sl1: - break; - case types::sl2: - c.init(other.c.get()); - break; - case types::sl4: - c.init(other.c.get()); - break; - case types::sl5: - c.init(other.c.get()); - break; - case types::sl8: - c.init(other.c.get()); - break; - case types::sl10: - c.init(other.c.get()); - break; - case types::sl16: - c.init(other.c.get()); - break; - case types::sl20: - c.init(other.c.get()); - break; - case types::sl32: - c.init(other.c.get()); - break; - case types::sl40: - c.init(other.c.get()); - break; - case types::sl64: - c.init(other.c.get()); - break; - case types::sl80: - c.init(other.c.get()); - break; - case types::sl160: - c.init(other.c.get()); + case types::rrc_setup: + c.init(); break; - case types::sl320: - c.init(other.c.get()); + case types::crit_exts_future: break; - case types::sl640: - c.init(other.c.get()); + case types::nulltype: break; - case types::sl1280: - c.init(other.c.get()); + default: + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); + } +} +rrc_setup_s::crit_exts_c_::crit_exts_c_(const rrc_setup_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_setup: + c.init(other.c.get()); break; - case types::sl2560: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); } } -srs_periodicity_and_offset_c& srs_periodicity_and_offset_c::operator=(const srs_periodicity_and_offset_c& other) +rrc_setup_s::crit_exts_c_& rrc_setup_s::crit_exts_c_::operator=(const rrc_setup_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::sl1: + case types::rrc_setup: + c.set(other.c.get()); break; - case types::sl2: - c.set(other.c.get()); - break; - case types::sl4: - c.set(other.c.get()); - break; - case types::sl5: - c.set(other.c.get()); - break; - case types::sl8: - c.set(other.c.get()); - break; - case types::sl10: - c.set(other.c.get()); - break; - case types::sl16: - c.set(other.c.get()); - break; - case types::sl20: - c.set(other.c.get()); - break; - case types::sl32: - c.set(other.c.get()); - break; - case types::sl40: - c.set(other.c.get()); - break; - case types::sl64: - c.set(other.c.get()); - break; - case types::sl80: - c.set(other.c.get()); - break; - case types::sl160: - c.set(other.c.get()); - break; - case types::sl320: - c.set(other.c.get()); - break; - case types::sl640: - c.set(other.c.get()); - break; - case types::sl1280: - c.set(other.c.get()); - break; - case types::sl2560: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); } return *this; } -void srs_periodicity_and_offset_c::to_json(json_writer& j) const +void rrc_setup_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::sl1: - break; - case types::sl2: - j.write_int("sl2", c.get()); - break; - case types::sl4: - j.write_int("sl4", c.get()); - break; - case types::sl5: - j.write_int("sl5", c.get()); - break; - case types::sl8: - j.write_int("sl8", c.get()); - break; - case types::sl10: - j.write_int("sl10", c.get()); - break; - case types::sl16: - j.write_int("sl16", c.get()); - break; - case types::sl20: - j.write_int("sl20", c.get()); - break; - case types::sl32: - j.write_int("sl32", c.get()); - break; - case types::sl40: - j.write_int("sl40", c.get()); - break; - case types::sl64: - j.write_int("sl64", c.get()); - break; - case types::sl80: - j.write_int("sl80", c.get()); - break; - case types::sl160: - j.write_int("sl160", c.get()); - break; - case types::sl320: - j.write_int("sl320", c.get()); - break; - case types::sl640: - j.write_int("sl640", c.get()); - break; - case types::sl1280: - j.write_int("sl1280", c.get()); + case types::rrc_setup: + j.write_fieldname("rrcSetup"); + c.get().to_json(j); break; - case types::sl2560: - j.write_int("sl2560", c.get()); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE srs_periodicity_and_offset_c::pack(bit_ref& bref) const +SRSASN_CODE rrc_setup_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::sl1: - break; - case types::sl2: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)1u)); - break; - case types::sl4: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - case types::sl5: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); - break; - case types::sl8: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); - break; - case types::sl10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::sl16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); - break; - case types::sl20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::sl32: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); - break; - case types::sl40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::sl64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::sl80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::sl160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::sl320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::sl640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::sl1280: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + case types::rrc_setup: + HANDLE_CODE(c.get().pack(bref)); break; - case types::sl2560: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE srs_periodicity_and_offset_c::unpack(cbit_ref& bref) +SRSASN_CODE rrc_setup_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::sl1: - break; - case types::sl2: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)1u)); - break; - case types::sl4: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - case types::sl5: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); - break; - case types::sl8: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); - break; - case types::sl10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::sl16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::sl20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::sl32: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::sl40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::sl64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::sl80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::sl160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::sl320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::sl640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::sl1280: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + case types::rrc_setup: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::sl2560: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string srs_periodicity_and_offset_c::types_opts::to_string() const -{ - 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 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 -SRSASN_CODE srs_spatial_relation_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(serving_cell_id_present, 1)); - - if (serving_cell_id_present) { - HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(ref_sig.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE srs_spatial_relation_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(serving_cell_id_present, 1)); - - if (serving_cell_id_present) { - HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(ref_sig.unpack(bref)); - - return SRSASN_SUCCESS; -} -void srs_spatial_relation_info_s::to_json(json_writer& j) const +std::string rrc_setup_s::crit_exts_c_::types_opts::to_string() const { - j.start_obj(); - if (serving_cell_id_present) { - j.write_int("servingCellId", serving_cell_id); - } - j.write_fieldname("referenceSignal"); - ref_sig.to_json(j); - j.end_obj(); + static const char* options[] = {"rrcSetup", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_setup_s::crit_exts_c_::types"); } -void srs_spatial_relation_info_s::ref_sig_c_::destroy_() +// DL-CCCH-MessageType ::= CHOICE +void dl_ccch_msg_type_c::destroy_() { switch (type_) { - case types::srs: - c.destroy(); + case types::c1: + c.destroy(); break; default: break; } } -void srs_spatial_relation_info_s::ref_sig_c_::set(types::options e) +void dl_ccch_msg_type_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ssb_idx: - break; - case types::csi_rs_idx: + case types::c1: + c.init(); break; - case types::srs: - c.init(); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); } } -srs_spatial_relation_info_s::ref_sig_c_::ref_sig_c_(const srs_spatial_relation_info_s::ref_sig_c_& other) +dl_ccch_msg_type_c::dl_ccch_msg_type_c(const dl_ccch_msg_type_c& other) { type_ = other.type(); switch (type_) { - case types::ssb_idx: - c.init(other.c.get()); - break; - case types::csi_rs_idx: - c.init(other.c.get()); + case types::c1: + c.init(other.c.get()); break; - case types::srs: - c.init(other.c.get()); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); } } -srs_spatial_relation_info_s::ref_sig_c_& srs_spatial_relation_info_s::ref_sig_c_:: - operator=(const srs_spatial_relation_info_s::ref_sig_c_& other) +dl_ccch_msg_type_c& dl_ccch_msg_type_c::operator=(const dl_ccch_msg_type_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb_idx: - c.set(other.c.get()); - break; - case types::csi_rs_idx: - c.set(other.c.get()); + case types::c1: + c.set(other.c.get()); break; - case types::srs: - c.set(other.c.get()); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); } return *this; } -void srs_spatial_relation_info_s::ref_sig_c_::to_json(json_writer& j) const +void dl_ccch_msg_type_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb_idx: - j.write_int("ssb-Index", c.get()); - break; - case types::csi_rs_idx: - j.write_int("csi-RS-Index", c.get()); + case types::c1: + j.write_fieldname("c1"); + c.get().to_json(j); break; - case types::srs: - j.write_fieldname("srs"); - j.start_obj(); - j.write_int("resourceId", c.get().res_id); - j.write_int("uplinkBWP", c.get().ul_bwp); - j.end_obj(); + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); } j.end_obj(); } -SRSASN_CODE srs_spatial_relation_info_s::ref_sig_c_::pack(bit_ref& bref) const +SRSASN_CODE dl_ccch_msg_type_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + case types::c1: + HANDLE_CODE(c.get().pack(bref)); break; - case types::srs: - HANDLE_CODE(pack_integer(bref, c.get().res_id, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, c.get().ul_bwp, (uint8_t)0u, (uint8_t)4u)); + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE srs_spatial_relation_info_s::ref_sig_c_::unpack(cbit_ref& bref) +SRSASN_CODE dl_ccch_msg_type_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::srs: - HANDLE_CODE(unpack_integer(c.get().res_id, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(c.get().ul_bwp, bref, (uint8_t)0u, (uint8_t)4u)); + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string srs_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const -{ - 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"); -} - -// CG-UCI-OnPUSCH ::= CHOICE -void cg_uci_on_pusch_c::destroy_() +void dl_ccch_msg_type_c::c1_c_::destroy_() { switch (type_) { - case types::dynamic_type: - c.destroy(); + case types::rrc_reject: + c.destroy(); break; - case types::semi_static: - c.destroy(); + case types::rrc_setup: + c.destroy(); break; default: break; } } -void cg_uci_on_pusch_c::set(types::options e) +void dl_ccch_msg_type_c::c1_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::dynamic_type: - c.init(); + case types::rrc_reject: + c.init(); break; - case types::semi_static: - c.init(); + case types::rrc_setup: + c.init(); + break; + case types::spare2: + break; + case types::spare1: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); } } -cg_uci_on_pusch_c::cg_uci_on_pusch_c(const cg_uci_on_pusch_c& other) +dl_ccch_msg_type_c::c1_c_::c1_c_(const dl_ccch_msg_type_c::c1_c_& other) { type_ = other.type(); switch (type_) { - case types::dynamic_type: - c.init(other.c.get()); + case types::rrc_reject: + c.init(other.c.get()); break; - case types::semi_static: - c.init(other.c.get()); + case types::rrc_setup: + c.init(other.c.get()); + break; + case types::spare2: + break; + case types::spare1: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); } } -cg_uci_on_pusch_c& cg_uci_on_pusch_c::operator=(const cg_uci_on_pusch_c& other) +dl_ccch_msg_type_c::c1_c_& dl_ccch_msg_type_c::c1_c_::operator=(const dl_ccch_msg_type_c::c1_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::dynamic_type: - c.set(other.c.get()); + case types::rrc_reject: + c.set(other.c.get()); break; - case types::semi_static: - c.set(other.c.get()); + case types::rrc_setup: + c.set(other.c.get()); + break; + case types::spare2: + break; + case types::spare1: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); } return *this; } -void cg_uci_on_pusch_c::to_json(json_writer& j) const +void dl_ccch_msg_type_c::c1_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::dynamic_type: - j.start_array("dynamic"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::rrc_reject: + j.write_fieldname("rrcReject"); + c.get().to_json(j); break; - case types::semi_static: - j.write_fieldname("semiStatic"); - c.get().to_json(j); + case types::rrc_setup: + j.write_fieldname("rrcSetup"); + c.get().to_json(j); + break; + case types::spare2: + break; + case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); } j.end_obj(); } -SRSASN_CODE cg_uci_on_pusch_c::pack(bit_ref& bref) const +SRSASN_CODE dl_ccch_msg_type_c::c1_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::dynamic_type: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4)); + case types::rrc_reject: + HANDLE_CODE(c.get().pack(bref)); break; - case types::semi_static: - HANDLE_CODE(c.get().pack(bref)); + case types::rrc_setup: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::spare2: + break; + case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE cg_uci_on_pusch_c::unpack(cbit_ref& bref) +SRSASN_CODE dl_ccch_msg_type_c::c1_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::dynamic_type: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4)); + case types::rrc_reject: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::semi_static: - HANDLE_CODE(c.get().unpack(bref)); + case types::rrc_setup: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::spare2: + break; + case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string cg_uci_on_pusch_c::types_opts::to_string() const +std::string dl_ccch_msg_type_c::c1_c_::types_opts::to_string() const { - static const char* options[] = {"dynamic", "semiStatic"}; - return convert_enum_idx(options, 2, value, "cg_uci_on_pusch_c::types"); + static const char* options[] = {"rrcReject", "rrcSetup", "spare2", "spare1"}; + return convert_enum_idx(options, 4, value, "dl_ccch_msg_type_c::c1_c_::types"); } -// CSI-RS-ResourceMapping ::= SEQUENCE -SRSASN_CODE csi_rs_res_map_s::pack(bit_ref& bref) const +std::string dl_ccch_msg_type_c::types_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(first_ofdm_symbol_in_time_domain2_present, 1)); - - HANDLE_CODE(freq_domain_alloc.pack(bref)); - HANDLE_CODE(nrof_ports.pack(bref)); - HANDLE_CODE(pack_integer(bref, first_ofdm_symbol_in_time_domain, (uint8_t)0u, (uint8_t)13u)); - if (first_ofdm_symbol_in_time_domain2_present) { - HANDLE_CODE(pack_integer(bref, first_ofdm_symbol_in_time_domain2, (uint8_t)2u, (uint8_t)12u)); - } - HANDLE_CODE(cdm_type.pack(bref)); - HANDLE_CODE(density.pack(bref)); - HANDLE_CODE(freq_band.pack(bref)); - - return SRSASN_SUCCESS; + static const char* options[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(options, 2, value, "dl_ccch_msg_type_c::types"); } -SRSASN_CODE csi_rs_res_map_s::unpack(cbit_ref& bref) +uint8_t dl_ccch_msg_type_c::types_opts::to_number() const +{ + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "dl_ccch_msg_type_c::types"); +} + +// DL-CCCH-Message ::= SEQUENCE +SRSASN_CODE dl_ccch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ccch_msg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void dl_ccch_msg_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("DL-CCCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// CSI-RS-Resource-Mobility ::= SEQUENCE +SRSASN_CODE csi_rs_res_mob_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(associated_ssb_present, 1)); + + HANDLE_CODE(pack_integer(bref, csi_rs_idx, (uint8_t)0u, (uint8_t)95u)); + HANDLE_CODE(slot_cfg.pack(bref)); + if (associated_ssb_present) { + HANDLE_CODE(pack_integer(bref, associated_ssb.ssb_idx, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(bref.pack(associated_ssb.is_quasi_colocated, 1)); + } + HANDLE_CODE(freq_domain_alloc.pack(bref)); + HANDLE_CODE(pack_integer(bref, first_ofdm_symbol_in_time_domain, (uint8_t)0u, (uint8_t)13u)); + HANDLE_CODE(pack_integer(bref, seq_generation_cfg, (uint16_t)0u, (uint16_t)1023u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_res_mob_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(first_ofdm_symbol_in_time_domain2_present, 1)); + HANDLE_CODE(bref.unpack(associated_ssb_present, 1)); + HANDLE_CODE(unpack_integer(csi_rs_idx, bref, (uint8_t)0u, (uint8_t)95u)); + HANDLE_CODE(slot_cfg.unpack(bref)); + if (associated_ssb_present) { + HANDLE_CODE(unpack_integer(associated_ssb.ssb_idx, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(bref.unpack(associated_ssb.is_quasi_colocated, 1)); + } HANDLE_CODE(freq_domain_alloc.unpack(bref)); - HANDLE_CODE(nrof_ports.unpack(bref)); HANDLE_CODE(unpack_integer(first_ofdm_symbol_in_time_domain, bref, (uint8_t)0u, (uint8_t)13u)); - if (first_ofdm_symbol_in_time_domain2_present) { - HANDLE_CODE(unpack_integer(first_ofdm_symbol_in_time_domain2, bref, (uint8_t)2u, (uint8_t)12u)); - } - HANDLE_CODE(cdm_type.unpack(bref)); - HANDLE_CODE(density.unpack(bref)); - HANDLE_CODE(freq_band.unpack(bref)); + HANDLE_CODE(unpack_integer(seq_generation_cfg, bref, (uint16_t)0u, (uint16_t)1023u)); return SRSASN_SUCCESS; } -void csi_rs_res_map_s::to_json(json_writer& j) const +void csi_rs_res_mob_s::to_json(json_writer& j) const { j.start_obj(); + j.write_int("csi-RS-Index", csi_rs_idx); + j.write_fieldname("slotConfig"); + slot_cfg.to_json(j); + if (associated_ssb_present) { + j.write_fieldname("associatedSSB"); + j.start_obj(); + j.write_int("ssb-Index", associated_ssb.ssb_idx); + j.write_bool("isQuasiColocated", associated_ssb.is_quasi_colocated); + j.end_obj(); + } j.write_fieldname("frequencyDomainAllocation"); freq_domain_alloc.to_json(j); - j.write_str("nrofPorts", nrof_ports.to_string()); j.write_int("firstOFDMSymbolInTimeDomain", first_ofdm_symbol_in_time_domain); - if (first_ofdm_symbol_in_time_domain2_present) { - j.write_int("firstOFDMSymbolInTimeDomain2", first_ofdm_symbol_in_time_domain2); + j.write_int("sequenceGenerationConfig", seq_generation_cfg); + j.end_obj(); +} + +void csi_rs_res_mob_s::slot_cfg_c_::destroy_() {} +void csi_rs_res_mob_s::slot_cfg_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +csi_rs_res_mob_s::slot_cfg_c_::slot_cfg_c_(const csi_rs_res_mob_s::slot_cfg_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ms4: + c.init(other.c.get()); + break; + case types::ms5: + c.init(other.c.get()); + break; + case types::ms10: + c.init(other.c.get()); + break; + case types::ms20: + c.init(other.c.get()); + break; + case types::ms40: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); + } +} +csi_rs_res_mob_s::slot_cfg_c_& csi_rs_res_mob_s::slot_cfg_c_::operator=(const csi_rs_res_mob_s::slot_cfg_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ms4: + c.set(other.c.get()); + break; + case types::ms5: + c.set(other.c.get()); + break; + case types::ms10: + c.set(other.c.get()); + break; + case types::ms20: + c.set(other.c.get()); + break; + case types::ms40: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); + } + + return *this; +} +void csi_rs_res_mob_s::slot_cfg_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ms4: + j.write_int("ms4", c.get()); + break; + case types::ms5: + j.write_int("ms5", c.get()); + break; + case types::ms10: + j.write_int("ms10", c.get()); + break; + case types::ms20: + j.write_int("ms20", c.get()); + break; + case types::ms40: + j.write_int("ms40", c.get()); + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); } - j.write_str("cdm-Type", cdm_type.to_string()); - j.write_fieldname("density"); - density.to_json(j); - j.write_fieldname("freqBand"); - freq_band.to_json(j); j.end_obj(); } +SRSASN_CODE csi_rs_res_mob_s::slot_cfg_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ms4: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::ms5: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::ms10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::ms20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::ms40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_res_mob_s::slot_cfg_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ms4: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::ms5: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::ms10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::ms20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::ms40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} -void csi_rs_res_map_s::freq_domain_alloc_c_::destroy_() +std::string csi_rs_res_mob_s::slot_cfg_c_::types_opts::to_string() const +{ + 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 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_() { switch (type_) { case types::row1: @@ -9764,17 +9988,11 @@ void csi_rs_res_map_s::freq_domain_alloc_c_::destroy_() case types::row2: c.destroy >(); break; - case types::row4: - c.destroy >(); - break; - case types::other: - c.destroy >(); - break; default: break; } } -void csi_rs_res_map_s::freq_domain_alloc_c_::set(types::options e) +void csi_rs_res_mob_s::freq_domain_alloc_c_::set(types::options e) { destroy_(); type_ = e; @@ -9785,19 +10003,13 @@ void csi_rs_res_map_s::freq_domain_alloc_c_::set(types::options e) case types::row2: c.init >(); break; - case types::row4: - c.init >(); - break; - case types::other: - c.init >(); - break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); } } -csi_rs_res_map_s::freq_domain_alloc_c_::freq_domain_alloc_c_(const csi_rs_res_map_s::freq_domain_alloc_c_& other) +csi_rs_res_mob_s::freq_domain_alloc_c_::freq_domain_alloc_c_(const csi_rs_res_mob_s::freq_domain_alloc_c_& other) { type_ = other.type(); switch (type_) { @@ -9807,20 +10019,14 @@ csi_rs_res_map_s::freq_domain_alloc_c_::freq_domain_alloc_c_(const csi_rs_res_ma case types::row2: c.init(other.c.get >()); break; - case types::row4: - c.init(other.c.get >()); - break; - case types::other: - c.init(other.c.get >()); - break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); } } -csi_rs_res_map_s::freq_domain_alloc_c_& csi_rs_res_map_s::freq_domain_alloc_c_:: - operator=(const csi_rs_res_map_s::freq_domain_alloc_c_& other) +csi_rs_res_mob_s::freq_domain_alloc_c_& +csi_rs_res_mob_s::freq_domain_alloc_c_::operator=(const csi_rs_res_mob_s::freq_domain_alloc_c_& other) { if (this == &other) { return *this; @@ -9833,21 +10039,15 @@ csi_rs_res_map_s::freq_domain_alloc_c_& csi_rs_res_map_s::freq_domain_alloc_c_:: case types::row2: c.set(other.c.get >()); break; - case types::row4: - c.set(other.c.get >()); - break; - case types::other: - c.set(other.c.get >()); - break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); } return *this; } -void csi_rs_res_map_s::freq_domain_alloc_c_::to_json(json_writer& j) const +void csi_rs_res_mob_s::freq_domain_alloc_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { @@ -9857,18 +10057,12 @@ void csi_rs_res_map_s::freq_domain_alloc_c_::to_json(json_writer& j) const case types::row2: j.write_str("row2", c.get >().to_string()); break; - case types::row4: - j.write_str("row4", c.get >().to_string()); - break; - case types::other: - j.write_str("other", c.get >().to_string()); - break; default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); } j.end_obj(); } -SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::pack(bit_ref& bref) const +SRSASN_CODE csi_rs_res_mob_s::freq_domain_alloc_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { @@ -9878,19 +10072,13 @@ SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::pack(bit_ref& bref) const case types::row2: HANDLE_CODE(c.get >().pack(bref)); break; - case types::row4: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::other: - HANDLE_CODE(c.get >().pack(bref)); - break; default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) +SRSASN_CODE csi_rs_res_mob_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); @@ -9902,2543 +10090,2305 @@ SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) case types::row2: HANDLE_CODE(c.get >().unpack(bref)); break; - case types::row4: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::other: - HANDLE_CODE(c.get >().unpack(bref)); - break; default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_rs_res_map_s::freq_domain_alloc_c_::types_opts::to_string() const +std::string csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_string() const { - 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"); + 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_map_s::freq_domain_alloc_c_::types_opts::to_number() const +uint8_t csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_number() const { - 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"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); } -std::string csi_rs_res_map_s::nrof_ports_opts::to_string() const -{ - 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 +// CSI-RS-CellMobility ::= SEQUENCE +SRSASN_CODE csi_rs_cell_mob_s::pack(bit_ref& bref) const { - 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_"); -} + HANDLE_CODE(bref.pack(density_present, 1)); -std::string csi_rs_res_map_s::cdm_type_opts::to_string() const -{ - 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_"); + HANDLE_CODE(pack_integer(bref, cell_id, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(csi_rs_meas_bw.nrof_prbs.pack(bref)); + HANDLE_CODE(pack_integer(bref, csi_rs_meas_bw.start_prb, (uint16_t)0u, (uint16_t)2169u)); + if (density_present) { + HANDLE_CODE(density.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_res_list_mob, 1, 96)); + + return SRSASN_SUCCESS; } -uint8_t csi_rs_res_map_s::cdm_type_opts::to_number() const +SRSASN_CODE csi_rs_cell_mob_s::unpack(cbit_ref& bref) { - switch (value) { - case fd_cdm2: - return 2; - case cdm4_fd2_td2: - return 4; - case cdm8_fd2_td4: - return 8; - default: - invalid_enum_number(value, "csi_rs_res_map_s::cdm_type_e_"); + HANDLE_CODE(bref.unpack(density_present, 1)); + + HANDLE_CODE(unpack_integer(cell_id, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(csi_rs_meas_bw.nrof_prbs.unpack(bref)); + HANDLE_CODE(unpack_integer(csi_rs_meas_bw.start_prb, bref, (uint16_t)0u, (uint16_t)2169u)); + if (density_present) { + HANDLE_CODE(density.unpack(bref)); } - return 0; -} + HANDLE_CODE(unpack_dyn_seq_of(csi_rs_res_list_mob, bref, 1, 96)); -void csi_rs_res_map_s::density_c_::set(types::options e) -{ - type_ = e; + return SRSASN_SUCCESS; } -void csi_rs_res_map_s::density_c_::to_json(json_writer& j) const +void csi_rs_cell_mob_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::dot5: - j.write_str("dot5", c.to_string()); - break; - case types::one: - break; - case types::three: - break; - case types::spare: - break; - default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::density_c_"); - } + j.write_int("cellId", cell_id); + j.write_fieldname("csi-rs-MeasurementBW"); + j.start_obj(); + j.write_str("nrofPRBs", csi_rs_meas_bw.nrof_prbs.to_string()); + j.write_int("startPRB", csi_rs_meas_bw.start_prb); j.end_obj(); -} -SRSASN_CODE csi_rs_res_map_s::density_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dot5: - HANDLE_CODE(c.pack(bref)); - break; - case types::one: - break; - case types::three: - break; - case types::spare: - break; - default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::density_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (density_present) { + j.write_str("density", density.to_string()); } - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_rs_res_map_s::density_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dot5: - HANDLE_CODE(c.unpack(bref)); - break; - case types::one: - break; - case types::three: - break; - case types::spare: - break; - default: - log_invalid_choice_id(type_, "csi_rs_res_map_s::density_c_"); - return SRSASN_ERROR_DECODE_FAIL; + j.start_array("csi-rs-ResourceList-Mobility"); + for (const auto& e1 : csi_rs_res_list_mob) { + e1.to_json(j); } - return SRSASN_SUCCESS; + j.end_array(); + j.end_obj(); } -std::string csi_rs_res_map_s::density_c_::dot5_opts::to_string() const +std::string csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_opts::to_string() const { - static const char* options[] = {"evenPRBs", "oddPRBs"}; - return convert_enum_idx(options, 2, value, "csi_rs_res_map_s::density_c_::dot5_e_"); + 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 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_res_map_s::density_c_::types_opts::to_string() const +std::string csi_rs_cell_mob_s::density_opts::to_string() const { - static const char* options[] = {"dot5", "one", "three", "spare"}; - return convert_enum_idx(options, 4, value, "csi_rs_res_map_s::density_c_::types"); + static const char* options[] = {"d1", "d3"}; + return convert_enum_idx(options, 2, value, "csi_rs_cell_mob_s::density_e_"); } -uint8_t csi_rs_res_map_s::density_c_::types_opts::to_number() const +uint8_t csi_rs_cell_mob_s::density_opts::to_number() const { - static const uint8_t options[] = {5, 1, 3}; - return map_enum_number(options, 3, value, "csi_rs_res_map_s::density_c_::types"); + static const uint8_t options[] = {1, 3}; + return map_enum_number(options, 2, value, "csi_rs_cell_mob_s::density_e_"); } -// CSI-ResourcePeriodicityAndOffset ::= CHOICE -void csi_res_periodicity_and_offset_c::destroy_() {} -void csi_res_periodicity_and_offset_c::set(types::options e) +// Q-OffsetRangeList ::= SEQUENCE +SRSASN_CODE q_offset_range_list_s::pack(bit_ref& bref) const { - destroy_(); - type_ = e; + HANDLE_CODE(bref.pack(rsrp_offset_ssb_present, 1)); + HANDLE_CODE(bref.pack(rsrq_offset_ssb_present, 1)); + HANDLE_CODE(bref.pack(sinr_offset_ssb_present, 1)); + HANDLE_CODE(bref.pack(rsrp_offset_csi_rs_present, 1)); + HANDLE_CODE(bref.pack(rsrq_offset_csi_rs_present, 1)); + HANDLE_CODE(bref.pack(sinr_offset_csi_rs_present, 1)); + + if (rsrp_offset_ssb_present) { + HANDLE_CODE(rsrp_offset_ssb.pack(bref)); + } + if (rsrq_offset_ssb_present) { + HANDLE_CODE(rsrq_offset_ssb.pack(bref)); + } + if (sinr_offset_ssb_present) { + HANDLE_CODE(sinr_offset_ssb.pack(bref)); + } + if (rsrp_offset_csi_rs_present) { + HANDLE_CODE(rsrp_offset_csi_rs.pack(bref)); + } + if (rsrq_offset_csi_rs_present) { + HANDLE_CODE(rsrq_offset_csi_rs.pack(bref)); + } + if (sinr_offset_csi_rs_present) { + HANDLE_CODE(sinr_offset_csi_rs.pack(bref)); + } + + return SRSASN_SUCCESS; } -csi_res_periodicity_and_offset_c::csi_res_periodicity_and_offset_c(const csi_res_periodicity_and_offset_c& other) +SRSASN_CODE q_offset_range_list_s::unpack(cbit_ref& bref) { - type_ = other.type(); - switch (type_) { - case types::slots4: - c.init(other.c.get()); - break; - case types::slots5: - c.init(other.c.get()); - break; - case types::slots8: - c.init(other.c.get()); - break; - case types::slots10: - c.init(other.c.get()); - break; - case types::slots16: - c.init(other.c.get()); - break; - case types::slots20: - c.init(other.c.get()); - break; - case types::slots32: - c.init(other.c.get()); - break; - case types::slots40: - c.init(other.c.get()); - break; - case types::slots64: + HANDLE_CODE(bref.unpack(rsrp_offset_ssb_present, 1)); + HANDLE_CODE(bref.unpack(rsrq_offset_ssb_present, 1)); + HANDLE_CODE(bref.unpack(sinr_offset_ssb_present, 1)); + HANDLE_CODE(bref.unpack(rsrp_offset_csi_rs_present, 1)); + HANDLE_CODE(bref.unpack(rsrq_offset_csi_rs_present, 1)); + HANDLE_CODE(bref.unpack(sinr_offset_csi_rs_present, 1)); + + if (rsrp_offset_ssb_present) { + HANDLE_CODE(rsrp_offset_ssb.unpack(bref)); + } + if (rsrq_offset_ssb_present) { + HANDLE_CODE(rsrq_offset_ssb.unpack(bref)); + } + if (sinr_offset_ssb_present) { + HANDLE_CODE(sinr_offset_ssb.unpack(bref)); + } + if (rsrp_offset_csi_rs_present) { + HANDLE_CODE(rsrp_offset_csi_rs.unpack(bref)); + } + if (rsrq_offset_csi_rs_present) { + HANDLE_CODE(rsrq_offset_csi_rs.unpack(bref)); + } + if (sinr_offset_csi_rs_present) { + HANDLE_CODE(sinr_offset_csi_rs.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void q_offset_range_list_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rsrp_offset_ssb_present) { + j.write_str("rsrpOffsetSSB", rsrp_offset_ssb.to_string()); + } + if (rsrq_offset_ssb_present) { + j.write_str("rsrqOffsetSSB", rsrq_offset_ssb.to_string()); + } + if (sinr_offset_ssb_present) { + j.write_str("sinrOffsetSSB", sinr_offset_ssb.to_string()); + } + if (rsrp_offset_csi_rs_present) { + j.write_str("rsrpOffsetCSI-RS", rsrp_offset_csi_rs.to_string()); + } + if (rsrq_offset_csi_rs_present) { + j.write_str("rsrqOffsetCSI-RS", rsrq_offset_csi_rs.to_string()); + } + if (sinr_offset_csi_rs_present) { + j.write_str("sinrOffsetCSI-RS", sinr_offset_csi_rs.to_string()); + } + j.end_obj(); +} + +// CSI-RS-ResourceConfigMobility ::= SEQUENCE +SRSASN_CODE csi_rs_res_cfg_mob_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(subcarrier_spacing.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_cell_list_mob, 1, 96)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ref_serv_cell_idx_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ref_serv_cell_idx_present, 1)); + if (ref_serv_cell_idx_present) { + HANDLE_CODE(pack_integer(bref, ref_serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_res_cfg_mob_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(subcarrier_spacing.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(csi_rs_cell_list_mob, bref, 1, 96)); + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ref_serv_cell_idx_present, 1)); + if (ref_serv_cell_idx_present) { + HANDLE_CODE(unpack_integer(ref_serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); + } + } + } + return SRSASN_SUCCESS; +} +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 (const auto& e1 : csi_rs_cell_list_mob) { + e1.to_json(j); + } + j.end_array(); + if (ext) { + if (ref_serv_cell_idx_present) { + j.write_int("refServCellIndex", ref_serv_cell_idx); + } + } + j.end_obj(); +} + +// CellsToAddMod ::= SEQUENCE +SRSASN_CODE cells_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(cell_individual_offset.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_to_add_mod_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(cell_individual_offset.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cells_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId", pci); + j.write_fieldname("cellIndividualOffset"); + cell_individual_offset.to_json(j); + j.end_obj(); +} + +// FilterCoefficient ::= ENUMERATED +std::string filt_coef_opts::to_string() const +{ + 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 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 +SRSASN_CODE meas_report_quant_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rsrp, 1)); + HANDLE_CODE(bref.pack(rsrq, 1)); + HANDLE_CODE(bref.pack(sinr, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_quant_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rsrp, 1)); + HANDLE_CODE(bref.unpack(rsrq, 1)); + HANDLE_CODE(bref.unpack(sinr, 1)); + + return SRSASN_SUCCESS; +} +void meas_report_quant_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("rsrp", rsrp); + j.write_bool("rsrq", rsrq); + j.write_bool("sinr", sinr); + j.end_obj(); +} + +// MeasTriggerQuantity ::= CHOICE +void meas_trigger_quant_c::destroy_() {} +void meas_trigger_quant_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_trigger_quant_c::meas_trigger_quant_c(const meas_trigger_quant_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::rsrp: c.init(other.c.get()); break; - case types::slots80: + case types::rsrq: c.init(other.c.get()); break; - case types::slots160: + case types::sinr: c.init(other.c.get()); break; - case types::slots320: - c.init(other.c.get()); - break; - case types::slots640: - c.init(other.c.get()); - break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_c"); } } -csi_res_periodicity_and_offset_c& csi_res_periodicity_and_offset_c:: - operator=(const csi_res_periodicity_and_offset_c& other) +meas_trigger_quant_c& meas_trigger_quant_c::operator=(const meas_trigger_quant_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::slots4: - c.set(other.c.get()); - break; - case types::slots5: - c.set(other.c.get()); - break; - case types::slots8: - c.set(other.c.get()); - break; - case types::slots10: - c.set(other.c.get()); - break; - case types::slots16: - c.set(other.c.get()); - break; - case types::slots20: - c.set(other.c.get()); - break; - case types::slots32: - c.set(other.c.get()); - break; - case types::slots40: - c.set(other.c.get()); - break; - case types::slots64: + case types::rsrp: c.set(other.c.get()); break; - case types::slots80: + case types::rsrq: c.set(other.c.get()); break; - case types::slots160: + case types::sinr: c.set(other.c.get()); break; - case types::slots320: - c.set(other.c.get()); - break; - case types::slots640: - c.set(other.c.get()); - break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_c"); } return *this; } -void csi_res_periodicity_and_offset_c::to_json(json_writer& j) const +void meas_trigger_quant_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::slots4: - j.write_int("slots4", c.get()); + case types::rsrp: + j.write_int("rsrp", c.get()); break; - case types::slots5: - j.write_int("slots5", c.get()); + case types::rsrq: + j.write_int("rsrq", c.get()); break; - case types::slots8: - j.write_int("slots8", c.get()); + case types::sinr: + j.write_int("sinr", c.get()); break; - case types::slots10: - j.write_int("slots10", c.get()); + default: + log_invalid_choice_id(type_, "meas_trigger_quant_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_trigger_quant_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rsrp: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); break; - case types::slots16: - j.write_int("slots16", c.get()); + case types::rsrq: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); break; - case types::slots20: - j.write_int("slots20", c.get()); + case types::sinr: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); break; - case types::slots32: - j.write_int("slots32", c.get()); + default: + log_invalid_choice_id(type_, "meas_trigger_quant_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_trigger_quant_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rsrp: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); break; - case types::slots40: - j.write_int("slots40", c.get()); + case types::rsrq: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); break; - case types::slots64: - j.write_int("slots64", c.get()); + case types::sinr: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); break; - case types::slots80: - j.write_int("slots80", c.get()); + default: + log_invalid_choice_id(type_, "meas_trigger_quant_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string meas_trigger_quant_c::types_opts::to_string() const +{ + static const char* options[] = {"rsrp", "rsrq", "sinr"}; + return convert_enum_idx(options, 3, value, "meas_trigger_quant_c::types"); +} + +// MeasTriggerQuantityEUTRA ::= CHOICE +void meas_trigger_quant_eutra_c::destroy_() {} +void meas_trigger_quant_eutra_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_trigger_quant_eutra_c::meas_trigger_quant_eutra_c(const meas_trigger_quant_eutra_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::rsrp: + c.init(other.c.get()); break; - case types::slots160: - j.write_int("slots160", c.get()); + case types::rsrq: + c.init(other.c.get()); break; - case types::slots320: - j.write_int("slots320", c.get()); + case types::sinr: + c.init(other.c.get()); break; - case types::slots640: - j.write_int("slots640", c.get()); + case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); } - j.end_obj(); } -SRSASN_CODE csi_res_periodicity_and_offset_c::pack(bit_ref& bref) const +meas_trigger_quant_eutra_c& meas_trigger_quant_eutra_c::operator=(const meas_trigger_quant_eutra_c& other) { - type_.pack(bref); + if (this == &other) { + return *this; + } + set(other.type()); switch (type_) { - case types::slots4: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - case types::slots5: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); - break; - case types::slots8: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); - break; - case types::slots10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + case types::rsrp: + c.set(other.c.get()); break; - case types::slots16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + case types::rsrq: + c.set(other.c.get()); break; - case types::slots20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + case types::sinr: + c.set(other.c.get()); break; - case types::slots32: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + case types::nulltype: break; - case types::slots40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + default: + log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + } + + return *this; +} +void meas_trigger_quant_eutra_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rsrp: + j.write_int("rsrp", c.get()); break; - case types::slots64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + case types::rsrq: + j.write_int("rsrq", c.get()); break; - case types::slots80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + case types::sinr: + j.write_int("sinr", c.get()); break; - case types::slots160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + default: + log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_trigger_quant_eutra_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rsrp: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)97u)); break; - case types::slots320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + case types::rsrq: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)34u)); break; - case types::slots640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + case types::sinr: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); break; default: - log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_res_periodicity_and_offset_c::unpack(cbit_ref& bref) +SRSASN_CODE meas_trigger_quant_eutra_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::slots4: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - case types::slots5: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); - break; - case types::slots8: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); - break; - case types::slots10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::slots16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::slots20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::slots32: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::slots40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::slots64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::slots80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::slots160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + case types::rsrp: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)97u)); break; - case types::slots320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + case types::rsrq: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)34u)); break; - case types::slots640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + case types::sinr: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); break; default: - log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_res_periodicity_and_offset_c::types_opts::to_string() const +std::string meas_trigger_quant_eutra_c::types_opts::to_string() const { - 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"); + static const char* options[] = {"rsrp", "rsrq", "sinr"}; + return convert_enum_idx(options, 3, value, "meas_trigger_quant_eutra_c::types"); } -uint16_t csi_res_periodicity_and_offset_c::types_opts::to_number() const + +// MeasTriggerQuantityOffset ::= CHOICE +void meas_trigger_quant_offset_c::destroy_() {} +void meas_trigger_quant_offset_c::set(types::options e) { - 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"); + destroy_(); + type_ = e; } - -// DMRS-UplinkConfig ::= SEQUENCE -SRSASN_CODE dmrs_ul_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(dmrs_type_present, 1)); - HANDLE_CODE(bref.pack(dmrs_add_position_present, 1)); - HANDLE_CODE(bref.pack(phase_tracking_rs_present, 1)); - HANDLE_CODE(bref.pack(max_len_present, 1)); - HANDLE_CODE(bref.pack(transform_precoding_disabled_present, 1)); - HANDLE_CODE(bref.pack(transform_precoding_enabled_present, 1)); - - if (dmrs_add_position_present) { - HANDLE_CODE(dmrs_add_position.pack(bref)); - } - if (phase_tracking_rs_present) { - HANDLE_CODE(phase_tracking_rs.pack(bref)); - } - if (transform_precoding_disabled_present) { - bref.pack(transform_precoding_disabled.ext, 1); - HANDLE_CODE(bref.pack(transform_precoding_disabled.scrambling_id0_present, 1)); - HANDLE_CODE(bref.pack(transform_precoding_disabled.scrambling_id1_present, 1)); - if (transform_precoding_disabled.scrambling_id0_present) { - HANDLE_CODE(pack_integer(bref, transform_precoding_disabled.scrambling_id0, (uint32_t)0u, (uint32_t)65535u)); - } - if (transform_precoding_disabled.scrambling_id1_present) { - HANDLE_CODE(pack_integer(bref, transform_precoding_disabled.scrambling_id1, (uint32_t)0u, (uint32_t)65535u)); - } - } - if (transform_precoding_enabled_present) { - bref.pack(transform_precoding_enabled.ext, 1); - HANDLE_CODE(bref.pack(transform_precoding_enabled.npusch_id_present, 1)); - HANDLE_CODE(bref.pack(transform_precoding_enabled.seq_group_hop_present, 1)); - HANDLE_CODE(bref.pack(transform_precoding_enabled.seq_hop_present, 1)); - if (transform_precoding_enabled.npusch_id_present) { - HANDLE_CODE(pack_integer(bref, transform_precoding_enabled.npusch_id, (uint16_t)0u, (uint16_t)1007u)); - } - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dmrs_ul_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(dmrs_type_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_add_position_present, 1)); - HANDLE_CODE(bref.unpack(phase_tracking_rs_present, 1)); - HANDLE_CODE(bref.unpack(max_len_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoding_disabled_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoding_enabled_present, 1)); - - if (dmrs_add_position_present) { - HANDLE_CODE(dmrs_add_position.unpack(bref)); - } - if (phase_tracking_rs_present) { - HANDLE_CODE(phase_tracking_rs.unpack(bref)); - } - if (transform_precoding_disabled_present) { - bref.unpack(transform_precoding_disabled.ext, 1); - HANDLE_CODE(bref.unpack(transform_precoding_disabled.scrambling_id0_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoding_disabled.scrambling_id1_present, 1)); - if (transform_precoding_disabled.scrambling_id0_present) { - HANDLE_CODE(unpack_integer(transform_precoding_disabled.scrambling_id0, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (transform_precoding_disabled.scrambling_id1_present) { - HANDLE_CODE(unpack_integer(transform_precoding_disabled.scrambling_id1, bref, (uint32_t)0u, (uint32_t)65535u)); - } - } - if (transform_precoding_enabled_present) { - bref.unpack(transform_precoding_enabled.ext, 1); - HANDLE_CODE(bref.unpack(transform_precoding_enabled.npusch_id_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoding_enabled.seq_group_hop_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoding_enabled.seq_hop_present, 1)); - if (transform_precoding_enabled.npusch_id_present) { - HANDLE_CODE(unpack_integer(transform_precoding_enabled.npusch_id, bref, (uint16_t)0u, (uint16_t)1007u)); - } - } - - return SRSASN_SUCCESS; -} -void dmrs_ul_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (dmrs_type_present) { - j.write_str("dmrs-Type", "type2"); - } - if (dmrs_add_position_present) { - j.write_str("dmrs-AdditionalPosition", dmrs_add_position.to_string()); - } - if (phase_tracking_rs_present) { - j.write_fieldname("phaseTrackingRS"); - phase_tracking_rs.to_json(j); - } - if (max_len_present) { - j.write_str("maxLength", "len2"); - } - if (transform_precoding_disabled_present) { - j.write_fieldname("transformPrecodingDisabled"); - j.start_obj(); - if (transform_precoding_disabled.scrambling_id0_present) { - j.write_int("scramblingID0", transform_precoding_disabled.scrambling_id0); - } - if (transform_precoding_disabled.scrambling_id1_present) { - j.write_int("scramblingID1", transform_precoding_disabled.scrambling_id1); - } - j.end_obj(); - } - if (transform_precoding_enabled_present) { - j.write_fieldname("transformPrecodingEnabled"); - j.start_obj(); - if (transform_precoding_enabled.npusch_id_present) { - j.write_int("nPUSCH-Identity", transform_precoding_enabled.npusch_id); - } - if (transform_precoding_enabled.seq_group_hop_present) { - j.write_str("sequenceGroupHopping", "disabled"); - } - if (transform_precoding_enabled.seq_hop_present) { - j.write_str("sequenceHopping", "enabled"); - } - j.end_obj(); - } - j.end_obj(); -} - -std::string dmrs_ul_cfg_s::dmrs_add_position_opts::to_string() const -{ - 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 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 -SRSASN_CODE int_cfg_per_serving_cell_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, position_in_dci, (uint8_t)0u, (uint8_t)125u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE int_cfg_per_serving_cell_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(position_in_dci, bref, (uint8_t)0u, (uint8_t)125u)); - - return SRSASN_SUCCESS; -} -void int_cfg_per_serving_cell_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servingCellId", serving_cell_id); - j.write_int("positionInDCI", position_in_dci); - j.end_obj(); -} - -// PRACH-ResourceDedicatedBFR ::= CHOICE -void prach_res_ded_bfr_c::destroy_() -{ - switch (type_) { - case types::ssb: - c.destroy(); - break; - case types::csi_rs: - c.destroy(); - break; - default: - break; - } -} -void prach_res_ded_bfr_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ssb: - c.init(); - break; - case types::csi_rs: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); - } -} -prach_res_ded_bfr_c::prach_res_ded_bfr_c(const prach_res_ded_bfr_c& other) +meas_trigger_quant_offset_c::meas_trigger_quant_offset_c(const meas_trigger_quant_offset_c& other) { type_ = other.type(); switch (type_) { - case types::ssb: - c.init(other.c.get()); + case types::rsrp: + c.init(other.c.get()); break; - case types::csi_rs: - c.init(other.c.get()); + case types::rsrq: + c.init(other.c.get()); + break; + case types::sinr: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); } } -prach_res_ded_bfr_c& prach_res_ded_bfr_c::operator=(const prach_res_ded_bfr_c& other) +meas_trigger_quant_offset_c& meas_trigger_quant_offset_c::operator=(const meas_trigger_quant_offset_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb: - c.set(other.c.get()); + case types::rsrp: + c.set(other.c.get()); break; - case types::csi_rs: - c.set(other.c.get()); + case types::rsrq: + c.set(other.c.get()); + break; + case types::sinr: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); } return *this; } -void prach_res_ded_bfr_c::to_json(json_writer& j) const +void meas_trigger_quant_offset_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb: - j.write_fieldname("ssb"); - c.get().to_json(j); + case types::rsrp: + j.write_int("rsrp", c.get()); break; - case types::csi_rs: - j.write_fieldname("csi-RS"); - c.get().to_json(j); + case types::rsrq: + j.write_int("rsrq", c.get()); + break; + case types::sinr: + j.write_int("sinr", c.get()); break; default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); } j.end_obj(); } -SRSASN_CODE prach_res_ded_bfr_c::pack(bit_ref& bref) const +SRSASN_CODE meas_trigger_quant_offset_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb: - HANDLE_CODE(c.get().pack(bref)); + case types::rsrp: + HANDLE_CODE(pack_integer(bref, c.get(), (int8_t)-30, (int8_t)30)); break; - case types::csi_rs: - HANDLE_CODE(c.get().pack(bref)); + case types::rsrq: + HANDLE_CODE(pack_integer(bref, c.get(), (int8_t)-30, (int8_t)30)); + break; + case types::sinr: + HANDLE_CODE(pack_integer(bref, c.get(), (int8_t)-30, (int8_t)30)); break; default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE prach_res_ded_bfr_c::unpack(cbit_ref& bref) +SRSASN_CODE meas_trigger_quant_offset_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb: - HANDLE_CODE(c.get().unpack(bref)); + case types::rsrp: + HANDLE_CODE(unpack_integer(c.get(), bref, (int8_t)-30, (int8_t)30)); break; - case types::csi_rs: - HANDLE_CODE(c.get().unpack(bref)); + case types::rsrq: + HANDLE_CODE(unpack_integer(c.get(), bref, (int8_t)-30, (int8_t)30)); + break; + case types::sinr: + HANDLE_CODE(unpack_integer(c.get(), bref, (int8_t)-30, (int8_t)30)); break; default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string prach_res_ded_bfr_c::types_opts::to_string() const +std::string meas_trigger_quant_offset_c::types_opts::to_string() const { - static const char* options[] = {"ssb", "csi-RS"}; - return convert_enum_idx(options, 2, value, "prach_res_ded_bfr_c::types"); + static const char* options[] = {"rsrp", "rsrq", "sinr"}; + return convert_enum_idx(options, 3, value, "meas_trigger_quant_offset_c::types"); } -// PTRS-DownlinkConfig ::= SEQUENCE -SRSASN_CODE ptrs_dl_cfg_s::pack(bit_ref& bref) const +// NR-RS-Type ::= ENUMERATED +std::string nr_rs_type_opts::to_string() const +{ + 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 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 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 +SRSASN_CODE ssb_cfg_mob_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_density_present, 1)); - HANDLE_CODE(bref.pack(time_density_present, 1)); - HANDLE_CODE(bref.pack(epre_ratio_present, 1)); - HANDLE_CODE(bref.pack(res_elem_offset_present, 1)); + HANDLE_CODE(bref.pack(ssb_to_measure_present, 1)); + HANDLE_CODE(bref.pack(ss_rssi_meas_present, 1)); - if (freq_density_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, &(freq_density)[0], freq_density.size(), integer_packer(1, 276))); - } - if (time_density_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, &(time_density)[0], time_density.size(), integer_packer(0, 29))); - } - if (epre_ratio_present) { - HANDLE_CODE(pack_integer(bref, epre_ratio, (uint8_t)0u, (uint8_t)3u)); + if (ssb_to_measure_present) { + HANDLE_CODE(ssb_to_measure.pack(bref)); } - if (res_elem_offset_present) { - HANDLE_CODE(res_elem_offset.pack(bref)); + HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell, 1)); + if (ss_rssi_meas_present) { + HANDLE_CODE(ss_rssi_meas.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE ptrs_dl_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE ssb_cfg_mob_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(freq_density_present, 1)); - HANDLE_CODE(bref.unpack(time_density_present, 1)); - HANDLE_CODE(bref.unpack(epre_ratio_present, 1)); - HANDLE_CODE(bref.unpack(res_elem_offset_present, 1)); + HANDLE_CODE(bref.unpack(ssb_to_measure_present, 1)); + HANDLE_CODE(bref.unpack(ss_rssi_meas_present, 1)); - if (freq_density_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(freq_density)[0], bref, freq_density.size(), integer_packer(1, 276))); - } - if (time_density_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(time_density)[0], bref, time_density.size(), integer_packer(0, 29))); - } - if (epre_ratio_present) { - HANDLE_CODE(unpack_integer(epre_ratio, bref, (uint8_t)0u, (uint8_t)3u)); + if (ssb_to_measure_present) { + HANDLE_CODE(ssb_to_measure.unpack(bref)); } - if (res_elem_offset_present) { - HANDLE_CODE(res_elem_offset.unpack(bref)); + HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell, 1)); + if (ss_rssi_meas_present) { + HANDLE_CODE(ss_rssi_meas.unpack(bref)); } return SRSASN_SUCCESS; } -void ptrs_dl_cfg_s::to_json(json_writer& j) const +void ssb_cfg_mob_s::to_json(json_writer& j) const { j.start_obj(); - if (freq_density_present) { - j.start_array("frequencyDensity"); - for (const auto& e1 : freq_density) { - j.write_int(e1); - } - j.end_array(); - } - if (time_density_present) { - j.start_array("timeDensity"); - for (const auto& e1 : time_density) { - j.write_int(e1); - } - j.end_array(); - } - if (epre_ratio_present) { - j.write_int("epre-Ratio", epre_ratio); + if (ssb_to_measure_present) { + j.write_fieldname("ssb-ToMeasure"); + ssb_to_measure.to_json(j); } - if (res_elem_offset_present) { - j.write_str("resourceElementOffset", res_elem_offset.to_string()); + j.write_bool("deriveSSB-IndexFromCell", derive_ssb_idx_from_cell); + if (ss_rssi_meas_present) { + j.write_fieldname("ss-RSSI-Measurement"); + ss_rssi_meas.to_json(j); } j.end_obj(); } -std::string ptrs_dl_cfg_s::res_elem_offset_opts::to_string() const -{ - 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 +// TimeToTrigger ::= ENUMERATED +std::string time_to_trigger_opts::to_string() const { - 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_"); + 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"); } -std::string ptrs_dl_cfg_s::res_elem_offset_opts::to_number_string() const +uint16_t time_to_trigger_opts::to_number() const { - 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_"); + 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"); } -// PUCCH-FormatConfig ::= SEQUENCE -SRSASN_CODE pucch_format_cfg_s::pack(bit_ref& bref) const +// EUTRA-BlackCell ::= SEQUENCE +SRSASN_CODE eutra_black_cell_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(interslot_freq_hop_present, 1)); - HANDLE_CODE(bref.pack(add_dmrs_present, 1)); - HANDLE_CODE(bref.pack(max_code_rate_present, 1)); - HANDLE_CODE(bref.pack(nrof_slots_present, 1)); - HANDLE_CODE(bref.pack(pi2_bpsk_present, 1)); - HANDLE_CODE(bref.pack(simul_harq_ack_csi_present, 1)); - - if (max_code_rate_present) { - HANDLE_CODE(max_code_rate.pack(bref)); - } - if (nrof_slots_present) { - HANDLE_CODE(nrof_slots.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, cell_idx_eutra, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pci_range.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE pucch_format_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE eutra_black_cell_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(interslot_freq_hop_present, 1)); - HANDLE_CODE(bref.unpack(add_dmrs_present, 1)); - HANDLE_CODE(bref.unpack(max_code_rate_present, 1)); - HANDLE_CODE(bref.unpack(nrof_slots_present, 1)); - HANDLE_CODE(bref.unpack(pi2_bpsk_present, 1)); - HANDLE_CODE(bref.unpack(simul_harq_ack_csi_present, 1)); - - if (max_code_rate_present) { - HANDLE_CODE(max_code_rate.unpack(bref)); - } - if (nrof_slots_present) { - HANDLE_CODE(nrof_slots.unpack(bref)); - } + HANDLE_CODE(unpack_integer(cell_idx_eutra, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pci_range.unpack(bref)); return SRSASN_SUCCESS; } -void pucch_format_cfg_s::to_json(json_writer& j) const +void eutra_black_cell_s::to_json(json_writer& j) const { j.start_obj(); - if (interslot_freq_hop_present) { - j.write_str("interslotFrequencyHopping", "enabled"); - } - if (add_dmrs_present) { - j.write_str("additionalDMRS", "true"); - } - if (max_code_rate_present) { - j.write_str("maxCodeRate", max_code_rate.to_string()); - } - if (nrof_slots_present) { - j.write_str("nrofSlots", nrof_slots.to_string()); - } - if (pi2_bpsk_present) { - j.write_str("pi2BPSK", "enabled"); - } - if (simul_harq_ack_csi_present) { - j.write_str("simultaneousHARQ-ACK-CSI", "true"); - } + j.write_int("cellIndexEUTRA", cell_idx_eutra); + j.write_fieldname("physCellIdRange"); + pci_range.to_json(j); j.end_obj(); } -std::string pucch_format_cfg_s::nrof_slots_opts::to_string() const +// EUTRA-Cell ::= SEQUENCE +SRSASN_CODE eutra_cell_s::pack(bit_ref& bref) const { - static const char* options[] = {"n2", "n4", "n8"}; - return convert_enum_idx(options, 3, value, "pucch_format_cfg_s::nrof_slots_e_"); + HANDLE_CODE(pack_integer(bref, cell_idx_eutra, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(cell_individual_offset.pack(bref)); + + return SRSASN_SUCCESS; } -uint8_t pucch_format_cfg_s::nrof_slots_opts::to_number() const +SRSASN_CODE eutra_cell_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {2, 4, 8}; - return map_enum_number(options, 3, value, "pucch_format_cfg_s::nrof_slots_e_"); + HANDLE_CODE(unpack_integer(cell_idx_eutra, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(cell_individual_offset.unpack(bref)); + + return SRSASN_SUCCESS; +} +void eutra_cell_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndexEUTRA", cell_idx_eutra); + j.write_int("physCellId", pci); + j.write_str("cellIndividualOffset", cell_individual_offset.to_string()); + j.end_obj(); } -// PUCCH-PowerControl ::= SEQUENCE -SRSASN_CODE pucch_pwr_ctrl_s::pack(bit_ref& bref) const +// EventTriggerConfig ::= SEQUENCE +SRSASN_CODE event_trigger_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(delta_f_pucch_f0_present, 1)); - HANDLE_CODE(bref.pack(delta_f_pucch_f1_present, 1)); - HANDLE_CODE(bref.pack(delta_f_pucch_f2_present, 1)); - HANDLE_CODE(bref.pack(delta_f_pucch_f3_present, 1)); - HANDLE_CODE(bref.pack(delta_f_pucch_f4_present, 1)); - HANDLE_CODE(bref.pack(p0_set_present, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rss_present, 1)); - HANDLE_CODE(bref.pack(two_pucch_pc_adjustment_states_present, 1)); + HANDLE_CODE(bref.pack(report_quant_rs_idxes_present, 1)); + HANDLE_CODE(bref.pack(max_nrof_rs_idxes_to_report_present, 1)); + HANDLE_CODE(bref.pack(report_add_neigh_meas_present, 1)); - if (delta_f_pucch_f0_present) { - HANDLE_CODE(pack_integer(bref, delta_f_pucch_f0, (int8_t)-16, (int8_t)15)); + HANDLE_CODE(event_id.pack(bref)); + HANDLE_CODE(rs_type.pack(bref)); + HANDLE_CODE(report_interv.pack(bref)); + HANDLE_CODE(report_amount.pack(bref)); + HANDLE_CODE(report_quant_cell.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_report_cells, (uint8_t)1u, (uint8_t)8u)); + if (report_quant_rs_idxes_present) { + HANDLE_CODE(report_quant_rs_idxes.pack(bref)); } - if (delta_f_pucch_f1_present) { - HANDLE_CODE(pack_integer(bref, delta_f_pucch_f1, (int8_t)-16, (int8_t)15)); - } - if (delta_f_pucch_f2_present) { - HANDLE_CODE(pack_integer(bref, delta_f_pucch_f2, (int8_t)-16, (int8_t)15)); - } - if (delta_f_pucch_f3_present) { - HANDLE_CODE(pack_integer(bref, delta_f_pucch_f3, (int8_t)-16, (int8_t)15)); - } - if (delta_f_pucch_f4_present) { - HANDLE_CODE(pack_integer(bref, delta_f_pucch_f4, (int8_t)-16, (int8_t)15)); - } - if (p0_set_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, p0_set, 1, 8)); - } - if (pathloss_ref_rss_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rss, 1, 4)); + if (max_nrof_rs_idxes_to_report_present) { + HANDLE_CODE(pack_integer(bref, max_nrof_rs_idxes_to_report, (uint8_t)1u, (uint8_t)32u)); } + HANDLE_CODE(bref.pack(include_beam_meass, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE pucch_pwr_ctrl_s::unpack(cbit_ref& bref) +SRSASN_CODE event_trigger_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(delta_f_pucch_f0_present, 1)); - HANDLE_CODE(bref.unpack(delta_f_pucch_f1_present, 1)); - HANDLE_CODE(bref.unpack(delta_f_pucch_f2_present, 1)); - HANDLE_CODE(bref.unpack(delta_f_pucch_f3_present, 1)); - HANDLE_CODE(bref.unpack(delta_f_pucch_f4_present, 1)); - HANDLE_CODE(bref.unpack(p0_set_present, 1)); - HANDLE_CODE(bref.unpack(pathloss_ref_rss_present, 1)); - HANDLE_CODE(bref.unpack(two_pucch_pc_adjustment_states_present, 1)); + HANDLE_CODE(bref.unpack(report_quant_rs_idxes_present, 1)); + HANDLE_CODE(bref.unpack(max_nrof_rs_idxes_to_report_present, 1)); + HANDLE_CODE(bref.unpack(report_add_neigh_meas_present, 1)); - if (delta_f_pucch_f0_present) { - HANDLE_CODE(unpack_integer(delta_f_pucch_f0, bref, (int8_t)-16, (int8_t)15)); - } - if (delta_f_pucch_f1_present) { - HANDLE_CODE(unpack_integer(delta_f_pucch_f1, bref, (int8_t)-16, (int8_t)15)); - } - if (delta_f_pucch_f2_present) { - HANDLE_CODE(unpack_integer(delta_f_pucch_f2, bref, (int8_t)-16, (int8_t)15)); - } - if (delta_f_pucch_f3_present) { - HANDLE_CODE(unpack_integer(delta_f_pucch_f3, bref, (int8_t)-16, (int8_t)15)); - } - if (delta_f_pucch_f4_present) { - HANDLE_CODE(unpack_integer(delta_f_pucch_f4, bref, (int8_t)-16, (int8_t)15)); - } - if (p0_set_present) { - HANDLE_CODE(unpack_dyn_seq_of(p0_set, bref, 1, 8)); + HANDLE_CODE(event_id.unpack(bref)); + HANDLE_CODE(rs_type.unpack(bref)); + HANDLE_CODE(report_interv.unpack(bref)); + HANDLE_CODE(report_amount.unpack(bref)); + HANDLE_CODE(report_quant_cell.unpack(bref)); + HANDLE_CODE(unpack_integer(max_report_cells, bref, (uint8_t)1u, (uint8_t)8u)); + if (report_quant_rs_idxes_present) { + HANDLE_CODE(report_quant_rs_idxes.unpack(bref)); } - if (pathloss_ref_rss_present) { - HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rss, bref, 1, 4)); + if (max_nrof_rs_idxes_to_report_present) { + HANDLE_CODE(unpack_integer(max_nrof_rs_idxes_to_report, bref, (uint8_t)1u, (uint8_t)32u)); } + HANDLE_CODE(bref.unpack(include_beam_meass, 1)); return SRSASN_SUCCESS; } -void pucch_pwr_ctrl_s::to_json(json_writer& j) const +void event_trigger_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (delta_f_pucch_f0_present) { - j.write_int("deltaF-PUCCH-f0", delta_f_pucch_f0); - } - if (delta_f_pucch_f1_present) { - j.write_int("deltaF-PUCCH-f1", delta_f_pucch_f1); - } - if (delta_f_pucch_f2_present) { - j.write_int("deltaF-PUCCH-f2", delta_f_pucch_f2); - } - if (delta_f_pucch_f3_present) { - j.write_int("deltaF-PUCCH-f3", delta_f_pucch_f3); - } - if (delta_f_pucch_f4_present) { - j.write_int("deltaF-PUCCH-f4", delta_f_pucch_f4); - } - if (p0_set_present) { - j.start_array("p0-Set"); - for (const auto& e1 : p0_set) { - e1.to_json(j); - } - j.end_array(); - } - if (pathloss_ref_rss_present) { - j.start_array("pathlossReferenceRSs"); - for (const auto& e1 : pathloss_ref_rss) { - e1.to_json(j); - } - j.end_array(); - } - if (two_pucch_pc_adjustment_states_present) { - j.write_str("twoPUCCH-PC-AdjustmentStates", "twoStates"); - } - j.end_obj(); -} - -// PUCCH-Resource ::= SEQUENCE -SRSASN_CODE pucch_res_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(intra_slot_freq_hop_present, 1)); - HANDLE_CODE(bref.pack(second_hop_prb_present, 1)); - - HANDLE_CODE(pack_integer(bref, pucch_res_id, (uint8_t)0u, (uint8_t)127u)); - HANDLE_CODE(pack_integer(bref, start_prb, (uint16_t)0u, (uint16_t)274u)); - if (second_hop_prb_present) { - HANDLE_CODE(pack_integer(bref, second_hop_prb, (uint16_t)0u, (uint16_t)274u)); - } - HANDLE_CODE(format.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_res_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(intra_slot_freq_hop_present, 1)); - HANDLE_CODE(bref.unpack(second_hop_prb_present, 1)); - - HANDLE_CODE(unpack_integer(pucch_res_id, bref, (uint8_t)0u, (uint8_t)127u)); - HANDLE_CODE(unpack_integer(start_prb, bref, (uint16_t)0u, (uint16_t)274u)); - if (second_hop_prb_present) { - HANDLE_CODE(unpack_integer(second_hop_prb, bref, (uint16_t)0u, (uint16_t)274u)); + j.write_fieldname("eventId"); + event_id.to_json(j); + j.write_str("rsType", rs_type.to_string()); + j.write_str("reportInterval", report_interv.to_string()); + j.write_str("reportAmount", report_amount.to_string()); + j.write_fieldname("reportQuantityCell"); + report_quant_cell.to_json(j); + j.write_int("maxReportCells", max_report_cells); + if (report_quant_rs_idxes_present) { + j.write_fieldname("reportQuantityRS-Indexes"); + report_quant_rs_idxes.to_json(j); } - HANDLE_CODE(format.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pucch_res_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pucch-ResourceId", pucch_res_id); - j.write_int("startingPRB", start_prb); - if (intra_slot_freq_hop_present) { - j.write_str("intraSlotFrequencyHopping", "enabled"); + if (max_nrof_rs_idxes_to_report_present) { + j.write_int("maxNrofRS-IndexesToReport", max_nrof_rs_idxes_to_report); } - if (second_hop_prb_present) { - j.write_int("secondHopPRB", second_hop_prb); + j.write_bool("includeBeamMeasurements", include_beam_meass); + if (report_add_neigh_meas_present) { + j.write_str("reportAddNeighMeas", "setup"); } - j.write_fieldname("format"); - format.to_json(j); j.end_obj(); } -void pucch_res_s::format_c_::destroy_() +void event_trigger_cfg_s::event_id_c_::destroy_() { switch (type_) { - case types::format0: - c.destroy(); + case types::event_a1: + c.destroy(); break; - case types::format1: - c.destroy(); + case types::event_a2: + c.destroy(); break; - case types::format2: - c.destroy(); + case types::event_a3: + c.destroy(); break; - case types::format3: - c.destroy(); + case types::event_a4: + c.destroy(); break; - case types::format4: - c.destroy(); + case types::event_a5: + c.destroy(); + break; + case types::event_a6: + c.destroy(); break; default: break; } } -void pucch_res_s::format_c_::set(types::options e) +void event_trigger_cfg_s::event_id_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::format0: - c.init(); + case types::event_a1: + c.init(); break; - case types::format1: - c.init(); + case types::event_a2: + c.init(); break; - case types::format2: - c.init(); + case types::event_a3: + c.init(); break; - case types::format3: - c.init(); + case types::event_a4: + c.init(); break; - case types::format4: - c.init(); + case types::event_a5: + c.init(); + break; + case types::event_a6: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pucch_res_s::format_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); } } -pucch_res_s::format_c_::format_c_(const pucch_res_s::format_c_& other) +event_trigger_cfg_s::event_id_c_::event_id_c_(const event_trigger_cfg_s::event_id_c_& other) { type_ = other.type(); switch (type_) { - case types::format0: - c.init(other.c.get()); + case types::event_a1: + c.init(other.c.get()); break; - case types::format1: - c.init(other.c.get()); + case types::event_a2: + c.init(other.c.get()); break; - case types::format2: - c.init(other.c.get()); + case types::event_a3: + c.init(other.c.get()); break; - case types::format3: - c.init(other.c.get()); + case types::event_a4: + c.init(other.c.get()); break; - case types::format4: - c.init(other.c.get()); + case types::event_a5: + c.init(other.c.get()); + break; + case types::event_a6: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pucch_res_s::format_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); } } -pucch_res_s::format_c_& pucch_res_s::format_c_::operator=(const pucch_res_s::format_c_& other) +event_trigger_cfg_s::event_id_c_& +event_trigger_cfg_s::event_id_c_::operator=(const event_trigger_cfg_s::event_id_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::format0: - c.set(other.c.get()); + case types::event_a1: + c.set(other.c.get()); break; - case types::format1: - c.set(other.c.get()); + case types::event_a2: + c.set(other.c.get()); break; - case types::format2: - c.set(other.c.get()); + case types::event_a3: + c.set(other.c.get()); break; - case types::format3: - c.set(other.c.get()); + case types::event_a4: + c.set(other.c.get()); break; - case types::format4: - c.set(other.c.get()); + case types::event_a5: + c.set(other.c.get()); + break; + case types::event_a6: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pucch_res_s::format_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); } return *this; } -void pucch_res_s::format_c_::to_json(json_writer& j) const +void event_trigger_cfg_s::event_id_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::format0: - j.write_fieldname("format0"); - c.get().to_json(j); + case types::event_a1: + j.write_fieldname("eventA1"); + j.start_obj(); + j.write_fieldname("a1-Threshold"); + c.get().a1_thres.to_json(j); + j.write_bool("reportOnLeave", c.get().report_on_leave); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.end_obj(); break; - case types::format1: - j.write_fieldname("format1"); - c.get().to_json(j); + case types::event_a2: + j.write_fieldname("eventA2"); + j.start_obj(); + j.write_fieldname("a2-Threshold"); + c.get().a2_thres.to_json(j); + j.write_bool("reportOnLeave", c.get().report_on_leave); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.end_obj(); break; - case types::format2: - j.write_fieldname("format2"); - c.get().to_json(j); + case types::event_a3: + j.write_fieldname("eventA3"); + j.start_obj(); + j.write_fieldname("a3-Offset"); + c.get().a3_offset.to_json(j); + j.write_bool("reportOnLeave", c.get().report_on_leave); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.write_bool("useWhiteCellList", c.get().use_white_cell_list); + j.end_obj(); break; - case types::format3: - j.write_fieldname("format3"); - c.get().to_json(j); + case types::event_a4: + j.write_fieldname("eventA4"); + j.start_obj(); + j.write_fieldname("a4-Threshold"); + c.get().a4_thres.to_json(j); + j.write_bool("reportOnLeave", c.get().report_on_leave); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.write_bool("useWhiteCellList", c.get().use_white_cell_list); + j.end_obj(); break; - case types::format4: - j.write_fieldname("format4"); - c.get().to_json(j); + case types::event_a5: + j.write_fieldname("eventA5"); + j.start_obj(); + j.write_fieldname("a5-Threshold1"); + c.get().a5_thres1.to_json(j); + j.write_fieldname("a5-Threshold2"); + c.get().a5_thres2.to_json(j); + j.write_bool("reportOnLeave", c.get().report_on_leave); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.write_bool("useWhiteCellList", c.get().use_white_cell_list); + j.end_obj(); + break; + case types::event_a6: + j.write_fieldname("eventA6"); + j.start_obj(); + j.write_fieldname("a6-Offset"); + c.get().a6_offset.to_json(j); + j.write_bool("reportOnLeave", c.get().report_on_leave); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.write_bool("useWhiteCellList", c.get().use_white_cell_list); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "pucch_res_s::format_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); } j.end_obj(); } -SRSASN_CODE pucch_res_s::format_c_::pack(bit_ref& bref) const +SRSASN_CODE event_trigger_cfg_s::event_id_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::format0: - HANDLE_CODE(c.get().pack(bref)); + case types::event_a1: + HANDLE_CODE(c.get().a1_thres.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.pack(bref)); break; - case types::format1: - HANDLE_CODE(c.get().pack(bref)); + case types::event_a2: + HANDLE_CODE(c.get().a2_thres.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.pack(bref)); break; - case types::format2: - HANDLE_CODE(c.get().pack(bref)); + case types::event_a3: + HANDLE_CODE(c.get().a3_offset.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.pack(bref)); + HANDLE_CODE(bref.pack(c.get().use_white_cell_list, 1)); break; - case types::format3: - HANDLE_CODE(c.get().pack(bref)); + case types::event_a4: + HANDLE_CODE(c.get().a4_thres.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.pack(bref)); + HANDLE_CODE(bref.pack(c.get().use_white_cell_list, 1)); break; - case types::format4: - HANDLE_CODE(c.get().pack(bref)); + case types::event_a5: + HANDLE_CODE(c.get().a5_thres1.pack(bref)); + HANDLE_CODE(c.get().a5_thres2.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.pack(bref)); + HANDLE_CODE(bref.pack(c.get().use_white_cell_list, 1)); + break; + case types::event_a6: + HANDLE_CODE(c.get().a6_offset.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.pack(bref)); + HANDLE_CODE(bref.pack(c.get().use_white_cell_list, 1)); break; default: - log_invalid_choice_id(type_, "pucch_res_s::format_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_res_s::format_c_::unpack(cbit_ref& bref) +SRSASN_CODE event_trigger_cfg_s::event_id_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::format0: - HANDLE_CODE(c.get().unpack(bref)); + case types::event_a1: + HANDLE_CODE(c.get().a1_thres.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); break; - case types::format1: - HANDLE_CODE(c.get().unpack(bref)); + case types::event_a2: + HANDLE_CODE(c.get().a2_thres.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); break; - case types::format2: - HANDLE_CODE(c.get().unpack(bref)); + case types::event_a3: + HANDLE_CODE(c.get().a3_offset.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().use_white_cell_list, 1)); break; - case types::format3: - HANDLE_CODE(c.get().unpack(bref)); + case types::event_a4: + HANDLE_CODE(c.get().a4_thres.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().use_white_cell_list, 1)); break; - case types::format4: - HANDLE_CODE(c.get().unpack(bref)); + case types::event_a5: + HANDLE_CODE(c.get().a5_thres1.unpack(bref)); + HANDLE_CODE(c.get().a5_thres2.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().use_white_cell_list, 1)); + break; + case types::event_a6: + HANDLE_CODE(c.get().a6_offset.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().use_white_cell_list, 1)); break; default: - log_invalid_choice_id(type_, "pucch_res_s::format_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string pucch_res_s::format_c_::types_opts::to_string() const +std::string event_trigger_cfg_s::event_id_c_::types_opts::to_string() const { - static const char* options[] = {"format0", "format1", "format2", "format3", "format4"}; - return convert_enum_idx(options, 5, value, "pucch_res_s::format_c_::types"); + 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 pucch_res_s::format_c_::types_opts::to_number() const +uint8_t event_trigger_cfg_s::event_id_c_::types_opts::to_number() const { - static const uint8_t options[] = {0, 1, 2, 3, 4}; - return map_enum_number(options, 5, value, "pucch_res_s::format_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"); } -// PUCCH-ResourceSet ::= SEQUENCE -SRSASN_CODE pucch_res_set_s::pack(bit_ref& bref) const +std::string event_trigger_cfg_s::report_amount_opts::to_string() const +{ + 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 { - HANDLE_CODE(bref.pack(max_payload_minus1_present, 1)); + 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_"); +} - HANDLE_CODE(pack_integer(bref, pucch_res_set_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pack_dyn_seq_of(bref, res_list, 1, 32, integer_packer(0, 127))); - if (max_payload_minus1_present) { - HANDLE_CODE(pack_integer(bref, max_payload_minus1, (uint16_t)4u, (uint16_t)256u)); - } +// EventTriggerConfigInterRAT ::= SEQUENCE +SRSASN_CODE event_trigger_cfg_inter_rat_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(event_id.pack(bref)); + HANDLE_CODE(rs_type.pack(bref)); + HANDLE_CODE(report_interv.pack(bref)); + HANDLE_CODE(report_amount.pack(bref)); + HANDLE_CODE(report_quant.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_report_cells, (uint8_t)1u, (uint8_t)8u)); return SRSASN_SUCCESS; } -SRSASN_CODE pucch_res_set_s::unpack(cbit_ref& bref) +SRSASN_CODE event_trigger_cfg_inter_rat_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(max_payload_minus1_present, 1)); - - HANDLE_CODE(unpack_integer(pucch_res_set_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(unpack_dyn_seq_of(res_list, bref, 1, 32, integer_packer(0, 127))); - if (max_payload_minus1_present) { - HANDLE_CODE(unpack_integer(max_payload_minus1, bref, (uint16_t)4u, (uint16_t)256u)); - } + bref.unpack(ext, 1); + HANDLE_CODE(event_id.unpack(bref)); + HANDLE_CODE(rs_type.unpack(bref)); + HANDLE_CODE(report_interv.unpack(bref)); + HANDLE_CODE(report_amount.unpack(bref)); + HANDLE_CODE(report_quant.unpack(bref)); + HANDLE_CODE(unpack_integer(max_report_cells, bref, (uint8_t)1u, (uint8_t)8u)); return SRSASN_SUCCESS; } -void pucch_res_set_s::to_json(json_writer& j) const +void event_trigger_cfg_inter_rat_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("pucch-ResourceSetId", pucch_res_set_id); - j.start_array("resourceList"); - for (const auto& e1 : res_list) { - j.write_int(e1); - } - j.end_array(); - if (max_payload_minus1_present) { - j.write_int("maxPayloadMinus1", max_payload_minus1); - } + j.write_fieldname("eventId"); + event_id.to_json(j); + j.write_str("rsType", rs_type.to_string()); + j.write_str("reportInterval", report_interv.to_string()); + j.write_str("reportAmount", report_amount.to_string()); + j.write_fieldname("reportQuantity"); + report_quant.to_json(j); + j.write_int("maxReportCells", max_report_cells); j.end_obj(); } -// PUCCH-SpatialRelationInfo ::= SEQUENCE -SRSASN_CODE pucch_spatial_relation_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(serving_cell_id_present, 1)); - - HANDLE_CODE(pack_integer(bref, pucch_spatial_relation_info_id, (uint8_t)1u, (uint8_t)8u)); - if (serving_cell_id_present) { - HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(ref_sig.pack(bref)); - HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pack_integer(bref, p0_pucch_id, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(closed_loop_idx.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_spatial_relation_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(serving_cell_id_present, 1)); - - HANDLE_CODE(unpack_integer(pucch_spatial_relation_info_id, bref, (uint8_t)1u, (uint8_t)8u)); - if (serving_cell_id_present) { - HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(ref_sig.unpack(bref)); - HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(unpack_integer(p0_pucch_id, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(closed_loop_idx.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pucch_spatial_relation_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pucch-SpatialRelationInfoId", pucch_spatial_relation_info_id); - if (serving_cell_id_present) { - j.write_int("servingCellId", serving_cell_id); - } - j.write_fieldname("referenceSignal"); - ref_sig.to_json(j); - j.write_int("pucch-PathlossReferenceRS-Id", pucch_pathloss_ref_rs_id); - j.write_int("p0-PUCCH-Id", p0_pucch_id); - j.write_str("closedLoopIndex", closed_loop_idx.to_string()); - j.end_obj(); -} - -void pucch_spatial_relation_info_s::ref_sig_c_::destroy_() +void event_trigger_cfg_inter_rat_s::event_id_c_::destroy_() { switch (type_) { - case types::srs: - c.destroy(); + case types::event_b1: + c.destroy(); + break; + case types::event_b2: + c.destroy(); break; default: break; } } -void pucch_spatial_relation_info_s::ref_sig_c_::set(types::options e) +void event_trigger_cfg_inter_rat_s::event_id_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ssb_idx: - break; - case types::csi_rs_idx: + case types::event_b1: + c.init(); break; - case types::srs: - c.init(); + case types::event_b2: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); } } -pucch_spatial_relation_info_s::ref_sig_c_::ref_sig_c_(const pucch_spatial_relation_info_s::ref_sig_c_& other) +event_trigger_cfg_inter_rat_s::event_id_c_::event_id_c_(const event_trigger_cfg_inter_rat_s::event_id_c_& other) { type_ = other.type(); switch (type_) { - case types::ssb_idx: - c.init(other.c.get()); - break; - case types::csi_rs_idx: - c.init(other.c.get()); + case types::event_b1: + c.init(other.c.get()); break; - case types::srs: - c.init(other.c.get()); + case types::event_b2: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); } } -pucch_spatial_relation_info_s::ref_sig_c_& pucch_spatial_relation_info_s::ref_sig_c_:: - operator=(const pucch_spatial_relation_info_s::ref_sig_c_& other) +event_trigger_cfg_inter_rat_s::event_id_c_& +event_trigger_cfg_inter_rat_s::event_id_c_::operator=(const event_trigger_cfg_inter_rat_s::event_id_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb_idx: - c.set(other.c.get()); - break; - case types::csi_rs_idx: - c.set(other.c.get()); + case types::event_b1: + c.set(other.c.get()); break; - case types::srs: - c.set(other.c.get()); + case types::event_b2: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); } return *this; } -void pucch_spatial_relation_info_s::ref_sig_c_::to_json(json_writer& j) const +void event_trigger_cfg_inter_rat_s::event_id_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb_idx: - j.write_int("ssb-Index", c.get()); - break; - case types::csi_rs_idx: - j.write_int("csi-RS-Index", c.get()); + case types::event_b1: + j.write_fieldname("eventB1"); + j.start_obj(); + j.write_fieldname("b1-ThresholdEUTRA"); + c.get().b1_thres_eutra.to_json(j); + j.write_bool("reportOnLeave", c.get().report_on_leave); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.end_obj(); break; - case types::srs: - j.write_fieldname("srs"); + case types::event_b2: + j.write_fieldname("eventB2"); j.start_obj(); - j.write_int("resource", c.get().res); - j.write_int("uplinkBWP", c.get().ul_bwp); + j.write_fieldname("b2-Threshold1"); + c.get().b2_thres1.to_json(j); + j.write_fieldname("b2-Threshold2EUTRA"); + c.get().b2_thres2_eutra.to_json(j); + j.write_bool("reportOnLeave", c.get().report_on_leave); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); j.end_obj(); break; default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); } j.end_obj(); } -SRSASN_CODE pucch_spatial_relation_info_s::ref_sig_c_::pack(bit_ref& bref) const +SRSASN_CODE event_trigger_cfg_inter_rat_s::event_id_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + case types::event_b1: + bref.pack(c.get().ext, 1); + HANDLE_CODE(c.get().b1_thres_eutra.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.pack(bref)); break; - case types::srs: - HANDLE_CODE(pack_integer(bref, c.get().res, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, c.get().ul_bwp, (uint8_t)0u, (uint8_t)4u)); + case types::event_b2: + bref.pack(c.get().ext, 1); + HANDLE_CODE(c.get().b2_thres1.pack(bref)); + HANDLE_CODE(c.get().b2_thres2_eutra.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.pack(bref)); break; default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_spatial_relation_info_s::ref_sig_c_::unpack(cbit_ref& bref) +SRSASN_CODE event_trigger_cfg_inter_rat_s::event_id_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + case types::event_b1: + bref.unpack(c.get().ext, 1); + HANDLE_CODE(c.get().b1_thres_eutra.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); break; - case types::srs: - HANDLE_CODE(unpack_integer(c.get().res, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(c.get().ul_bwp, bref, (uint8_t)0u, (uint8_t)4u)); + case types::event_b2: + bref.unpack(c.get().ext, 1); + HANDLE_CODE(c.get().b2_thres1.unpack(bref)); + HANDLE_CODE(c.get().b2_thres2_eutra.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); break; default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string pucch_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const +std::string event_trigger_cfg_inter_rat_s::event_id_c_::types_opts::to_string() const { - 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"); + 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 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 pucch_spatial_relation_info_s::closed_loop_idx_opts::to_string() const +std::string event_trigger_cfg_inter_rat_s::report_amount_opts::to_string() const { - static const char* options[] = {"i0", "i1"}; - return convert_enum_idx(options, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); + 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_"); } -uint8_t pucch_spatial_relation_info_s::closed_loop_idx_opts::to_number() const +int8_t event_trigger_cfg_inter_rat_s::report_amount_opts::to_number() const { - static const uint8_t options[] = {0, 1}; - return map_enum_number(options, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_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_"); } -// PUSCH-PowerControl ::= SEQUENCE -SRSASN_CODE pusch_pwr_ctrl_s::pack(bit_ref& bref) const +// FilterConfig ::= SEQUENCE +SRSASN_CODE filt_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(tpc_accumulation_present, 1)); - HANDLE_CODE(bref.pack(msg3_alpha_present, 1)); - HANDLE_CODE(bref.pack(p0_nominal_without_grant_present, 1)); - HANDLE_CODE(bref.pack(p0_alpha_sets_present, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(two_pusch_pc_adjustment_states_present, 1)); - HANDLE_CODE(bref.pack(delta_mcs_present, 1)); - HANDLE_CODE(bref.pack(sri_pusch_map_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(sri_pusch_map_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(filt_coef_rsrp_present, 1)); + HANDLE_CODE(bref.pack(filt_coef_rsrq_present, 1)); + HANDLE_CODE(bref.pack(filt_coef_rs_sinr_present, 1)); - if (msg3_alpha_present) { - HANDLE_CODE(msg3_alpha.pack(bref)); - } - if (p0_nominal_without_grant_present) { - HANDLE_CODE(pack_integer(bref, p0_nominal_without_grant, (int16_t)-202, (int16_t)24)); - } - if (p0_alpha_sets_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, p0_alpha_sets, 1, 30)); - } - if (pathloss_ref_rs_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rs_to_add_mod_list, 1, 4)); - } - if (pathloss_ref_rs_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rs_to_release_list, 1, 4, integer_packer(0, 3))); + if (filt_coef_rsrp_present) { + HANDLE_CODE(filt_coef_rsrp.pack(bref)); } - if (sri_pusch_map_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sri_pusch_map_to_add_mod_list, 1, 16)); + if (filt_coef_rsrq_present) { + HANDLE_CODE(filt_coef_rsrq.pack(bref)); } - if (sri_pusch_map_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sri_pusch_map_to_release_list, 1, 16, integer_packer(0, 15))); + if (filt_coef_rs_sinr_present) { + HANDLE_CODE(filt_coef_rs_sinr.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE pusch_pwr_ctrl_s::unpack(cbit_ref& bref) +SRSASN_CODE filt_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(tpc_accumulation_present, 1)); - HANDLE_CODE(bref.unpack(msg3_alpha_present, 1)); - HANDLE_CODE(bref.unpack(p0_nominal_without_grant_present, 1)); - HANDLE_CODE(bref.unpack(p0_alpha_sets_present, 1)); - HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(two_pusch_pc_adjustment_states_present, 1)); - HANDLE_CODE(bref.unpack(delta_mcs_present, 1)); - HANDLE_CODE(bref.unpack(sri_pusch_map_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(sri_pusch_map_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(filt_coef_rsrp_present, 1)); + HANDLE_CODE(bref.unpack(filt_coef_rsrq_present, 1)); + HANDLE_CODE(bref.unpack(filt_coef_rs_sinr_present, 1)); - if (msg3_alpha_present) { - HANDLE_CODE(msg3_alpha.unpack(bref)); - } - if (p0_nominal_without_grant_present) { - HANDLE_CODE(unpack_integer(p0_nominal_without_grant, bref, (int16_t)-202, (int16_t)24)); - } - if (p0_alpha_sets_present) { - HANDLE_CODE(unpack_dyn_seq_of(p0_alpha_sets, bref, 1, 30)); - } - if (pathloss_ref_rs_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rs_to_add_mod_list, bref, 1, 4)); - } - if (pathloss_ref_rs_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rs_to_release_list, bref, 1, 4, integer_packer(0, 3))); + if (filt_coef_rsrp_present) { + HANDLE_CODE(filt_coef_rsrp.unpack(bref)); } - if (sri_pusch_map_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(sri_pusch_map_to_add_mod_list, bref, 1, 16)); + if (filt_coef_rsrq_present) { + HANDLE_CODE(filt_coef_rsrq.unpack(bref)); } - if (sri_pusch_map_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(sri_pusch_map_to_release_list, bref, 1, 16, integer_packer(0, 15))); + if (filt_coef_rs_sinr_present) { + HANDLE_CODE(filt_coef_rs_sinr.unpack(bref)); } return SRSASN_SUCCESS; } -void pusch_pwr_ctrl_s::to_json(json_writer& j) const +void filt_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (tpc_accumulation_present) { - j.write_str("tpc-Accumulation", "disabled"); - } - if (msg3_alpha_present) { - j.write_str("msg3-Alpha", msg3_alpha.to_string()); - } - if (p0_nominal_without_grant_present) { - j.write_int("p0-NominalWithoutGrant", p0_nominal_without_grant); - } - if (p0_alpha_sets_present) { - j.start_array("p0-AlphaSets"); - 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 (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 (const auto& e1 : pathloss_ref_rs_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (two_pusch_pc_adjustment_states_present) { - j.write_str("twoPUSCH-PC-AdjustmentStates", "twoStates"); - } - if (delta_mcs_present) { - j.write_str("deltaMCS", "enabled"); + if (filt_coef_rsrp_present) { + j.write_str("filterCoefficientRSRP", filt_coef_rsrp.to_string()); } - if (sri_pusch_map_to_add_mod_list_present) { - j.start_array("sri-PUSCH-MappingToAddModList"); - for (const auto& e1 : sri_pusch_map_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); + if (filt_coef_rsrq_present) { + j.write_str("filterCoefficientRSRQ", filt_coef_rsrq.to_string()); } - if (sri_pusch_map_to_release_list_present) { - j.start_array("sri-PUSCH-MappingToReleaseList"); - for (const auto& e1 : sri_pusch_map_to_release_list) { - j.write_int(e1); - } - j.end_array(); + if (filt_coef_rs_sinr_present) { + j.write_str("filterCoefficientRS-SINR", filt_coef_rs_sinr.to_string()); } j.end_obj(); } -// QCL-Info ::= SEQUENCE -SRSASN_CODE qcl_info_s::pack(bit_ref& bref) const +// PCI-RangeElement ::= SEQUENCE +SRSASN_CODE pci_range_elem_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pci_range_idx, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pci_range.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pci_range_elem_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pci_range_idx, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pci_range.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pci_range_elem_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pci-RangeIndex", pci_range_idx); + j.write_fieldname("pci-Range"); + pci_range.to_json(j); + j.end_obj(); +} + +// PeriodicalReportConfig ::= SEQUENCE +SRSASN_CODE periodical_report_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cell_present, 1)); - HANDLE_CODE(bref.pack(bwp_id_present, 1)); + HANDLE_CODE(bref.pack(report_quant_rs_idxes_present, 1)); + HANDLE_CODE(bref.pack(max_nrof_rs_idxes_to_report_present, 1)); - if (cell_present) { - HANDLE_CODE(pack_integer(bref, cell, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(rs_type.pack(bref)); + HANDLE_CODE(report_interv.pack(bref)); + HANDLE_CODE(report_amount.pack(bref)); + HANDLE_CODE(report_quant_cell.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_report_cells, (uint8_t)1u, (uint8_t)8u)); + if (report_quant_rs_idxes_present) { + HANDLE_CODE(report_quant_rs_idxes.pack(bref)); } - if (bwp_id_present) { - HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); + if (max_nrof_rs_idxes_to_report_present) { + HANDLE_CODE(pack_integer(bref, max_nrof_rs_idxes_to_report, (uint8_t)1u, (uint8_t)32u)); } - HANDLE_CODE(ref_sig.pack(bref)); - HANDLE_CODE(qcl_type.pack(bref)); + HANDLE_CODE(bref.pack(include_beam_meass, 1)); + HANDLE_CODE(bref.pack(use_white_cell_list, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE qcl_info_s::unpack(cbit_ref& bref) +SRSASN_CODE periodical_report_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cell_present, 1)); - HANDLE_CODE(bref.unpack(bwp_id_present, 1)); + HANDLE_CODE(bref.unpack(report_quant_rs_idxes_present, 1)); + HANDLE_CODE(bref.unpack(max_nrof_rs_idxes_to_report_present, 1)); - if (cell_present) { - HANDLE_CODE(unpack_integer(cell, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(rs_type.unpack(bref)); + HANDLE_CODE(report_interv.unpack(bref)); + HANDLE_CODE(report_amount.unpack(bref)); + HANDLE_CODE(report_quant_cell.unpack(bref)); + HANDLE_CODE(unpack_integer(max_report_cells, bref, (uint8_t)1u, (uint8_t)8u)); + if (report_quant_rs_idxes_present) { + HANDLE_CODE(report_quant_rs_idxes.unpack(bref)); } - if (bwp_id_present) { - HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); + if (max_nrof_rs_idxes_to_report_present) { + HANDLE_CODE(unpack_integer(max_nrof_rs_idxes_to_report, bref, (uint8_t)1u, (uint8_t)32u)); } - HANDLE_CODE(ref_sig.unpack(bref)); - HANDLE_CODE(qcl_type.unpack(bref)); + HANDLE_CODE(bref.unpack(include_beam_meass, 1)); + HANDLE_CODE(bref.unpack(use_white_cell_list, 1)); return SRSASN_SUCCESS; } -void qcl_info_s::to_json(json_writer& j) const +void periodical_report_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (cell_present) { - j.write_int("cell", cell); + j.write_str("rsType", rs_type.to_string()); + j.write_str("reportInterval", report_interv.to_string()); + j.write_str("reportAmount", report_amount.to_string()); + j.write_fieldname("reportQuantityCell"); + report_quant_cell.to_json(j); + j.write_int("maxReportCells", max_report_cells); + if (report_quant_rs_idxes_present) { + j.write_fieldname("reportQuantityRS-Indexes"); + report_quant_rs_idxes.to_json(j); } - if (bwp_id_present) { - j.write_int("bwp-Id", bwp_id); + if (max_nrof_rs_idxes_to_report_present) { + j.write_int("maxNrofRS-IndexesToReport", max_nrof_rs_idxes_to_report); } - j.write_fieldname("referenceSignal"); - ref_sig.to_json(j); - j.write_str("qcl-Type", qcl_type.to_string()); + j.write_bool("includeBeamMeasurements", include_beam_meass); + j.write_bool("useWhiteCellList", use_white_cell_list); j.end_obj(); } -void qcl_info_s::ref_sig_c_::destroy_() {} -void qcl_info_s::ref_sig_c_::set(types::options e) +std::string periodical_report_cfg_s::report_amount_opts::to_string() const { - destroy_(); - type_ = e; + 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_"); } -qcl_info_s::ref_sig_c_::ref_sig_c_(const qcl_info_s::ref_sig_c_& other) +int8_t periodical_report_cfg_s::report_amount_opts::to_number() const { - type_ = other.type(); - switch (type_) { - case types::csi_rs: - c.init(other.c.get()); - break; - case types::ssb: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); - } + 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_"); } -qcl_info_s::ref_sig_c_& qcl_info_s::ref_sig_c_::operator=(const qcl_info_s::ref_sig_c_& other) + +// PeriodicalReportConfigInterRAT ::= SEQUENCE +SRSASN_CODE periodical_report_cfg_inter_rat_s::pack(bit_ref& bref) const { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::csi_rs: - c.set(other.c.get()); - break; - case types::ssb: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); - } + bref.pack(ext, 1); + HANDLE_CODE(report_interv.pack(bref)); + HANDLE_CODE(report_amount.pack(bref)); + HANDLE_CODE(report_quant.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_report_cells, (uint8_t)1u, (uint8_t)8u)); - return *this; + return SRSASN_SUCCESS; } -void qcl_info_s::ref_sig_c_::to_json(json_writer& j) const +SRSASN_CODE periodical_report_cfg_inter_rat_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(report_interv.unpack(bref)); + HANDLE_CODE(report_amount.unpack(bref)); + HANDLE_CODE(report_quant.unpack(bref)); + HANDLE_CODE(unpack_integer(max_report_cells, bref, (uint8_t)1u, (uint8_t)8u)); + + return SRSASN_SUCCESS; +} +void periodical_report_cfg_inter_rat_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::csi_rs: - j.write_int("csi-rs", c.get()); - break; - case types::ssb: - j.write_int("ssb", c.get()); - break; - default: - log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); - } + j.write_str("reportInterval", report_interv.to_string()); + j.write_str("reportAmount", report_amount.to_string()); + j.write_fieldname("reportQuantity"); + report_quant.to_json(j); + j.write_int("maxReportCells", max_report_cells); j.end_obj(); } -SRSASN_CODE qcl_info_s::ref_sig_c_::pack(bit_ref& bref) const + +std::string periodical_report_cfg_inter_rat_s::report_amount_opts::to_string() const { - type_.pack(bref); - switch (type_) { - case types::csi_rs: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); - break; - case types::ssb: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - default: - log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + 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 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 +SRSASN_CODE ran_area_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ran_area_code_list_present, 1)); + + HANDLE_CODE(tac.pack(bref)); + if (ran_area_code_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_code_list, 1, 32, integer_packer(0, 255))); } + return SRSASN_SUCCESS; } -SRSASN_CODE qcl_info_s::ref_sig_c_::unpack(cbit_ref& bref) +SRSASN_CODE ran_area_cfg_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::csi_rs: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); - break; - case types::ssb: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - default: - log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); - return SRSASN_ERROR_DECODE_FAIL; + HANDLE_CODE(bref.unpack(ran_area_code_list_present, 1)); + + HANDLE_CODE(tac.unpack(bref)); + if (ran_area_code_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ran_area_code_list, bref, 1, 32, integer_packer(0, 255))); } + return SRSASN_SUCCESS; } +void ran_area_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("trackingAreaCode", tac.to_string()); + if (ran_area_code_list_present) { + j.start_array("ran-AreaCodeList"); + for (const auto& e1 : ran_area_code_list) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} -std::string qcl_info_s::ref_sig_c_::types_opts::to_string() const +// ReferenceSignalConfig ::= SEQUENCE +SRSASN_CODE ref_sig_cfg_s::pack(bit_ref& bref) const { - static const char* options[] = {"csi-rs", "ssb"}; - return convert_enum_idx(options, 2, value, "qcl_info_s::ref_sig_c_::types"); + HANDLE_CODE(bref.pack(ssb_cfg_mob_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_res_cfg_mob_present, 1)); + + if (ssb_cfg_mob_present) { + HANDLE_CODE(ssb_cfg_mob.pack(bref)); + } + if (csi_rs_res_cfg_mob_present) { + HANDLE_CODE(csi_rs_res_cfg_mob.pack(bref)); + } + + return SRSASN_SUCCESS; } +SRSASN_CODE ref_sig_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ssb_cfg_mob_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_res_cfg_mob_present, 1)); -std::string qcl_info_s::qcl_type_opts::to_string() const + if (ssb_cfg_mob_present) { + HANDLE_CODE(ssb_cfg_mob.unpack(bref)); + } + if (csi_rs_res_cfg_mob_present) { + HANDLE_CODE(csi_rs_res_cfg_mob.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ref_sig_cfg_s::to_json(json_writer& j) const { - static const char* options[] = {"typeA", "typeB", "typeC", "typeD"}; - return convert_enum_idx(options, 4, value, "qcl_info_s::qcl_type_e_"); + j.start_obj(); + if (ssb_cfg_mob_present) { + j.write_fieldname("ssb-ConfigMobility"); + ssb_cfg_mob.to_json(j); + } + if (csi_rs_res_cfg_mob_present) { + j.write_fieldname("csi-rs-ResourceConfigMobility"); + csi_rs_res_cfg_mob.to_json(j); + } + j.end_obj(); } -// RA-Prioritization ::= SEQUENCE -SRSASN_CODE ra_prioritization_s::pack(bit_ref& bref) const +// ReportCGI ::= SEQUENCE +SRSASN_CODE report_cgi_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(scaling_factor_bi_present, 1)); - - HANDLE_CODE(pwr_ramp_step_high_prio.pack(bref)); - if (scaling_factor_bi_present) { - HANDLE_CODE(scaling_factor_bi.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)1007u)); return SRSASN_SUCCESS; } -SRSASN_CODE ra_prioritization_s::unpack(cbit_ref& bref) +SRSASN_CODE report_cgi_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(scaling_factor_bi_present, 1)); - - HANDLE_CODE(pwr_ramp_step_high_prio.unpack(bref)); - if (scaling_factor_bi_present) { - HANDLE_CODE(scaling_factor_bi.unpack(bref)); - } + HANDLE_CODE(unpack_integer(cell_for_which_to_report_cgi, bref, (uint16_t)0u, (uint16_t)1007u)); return SRSASN_SUCCESS; } -void ra_prioritization_s::to_json(json_writer& j) const +void report_cgi_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("powerRampingStepHighPriority", pwr_ramp_step_high_prio.to_string()); - if (scaling_factor_bi_present) { - j.write_str("scalingFactorBI", scaling_factor_bi.to_string()); - } + j.write_int("cellForWhichToReportCGI", cell_for_which_to_report_cgi); j.end_obj(); } -std::string ra_prioritization_s::pwr_ramp_step_high_prio_opts::to_string() const +// ReportCGI-EUTRA ::= SEQUENCE +SRSASN_CODE report_cgi_eutra_s::pack(bit_ref& bref) const { - static const char* options[] = {"dB0", "dB2", "dB4", "dB6"}; - return convert_enum_idx(options, 4, value, "ra_prioritization_s::pwr_ramp_step_high_prio_e_"); + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)503u)); + + return SRSASN_SUCCESS; } -uint8_t ra_prioritization_s::pwr_ramp_step_high_prio_opts::to_number() const +SRSASN_CODE report_cgi_eutra_s::unpack(cbit_ref& bref) { - 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_"); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(cell_for_which_to_report_cgi, bref, (uint16_t)0u, (uint16_t)503u)); + + return SRSASN_SUCCESS; +} +void report_cgi_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellForWhichToReportCGI", cell_for_which_to_report_cgi); + j.end_obj(); } -std::string ra_prioritization_s::scaling_factor_bi_opts::to_string() const +// ReportSFTD-EUTRA ::= SEQUENCE +SRSASN_CODE report_sftd_eutra_s::pack(bit_ref& bref) const { - static const char* options[] = {"zero", "dot25", "dot5", "dot75"}; - return convert_enum_idx(options, 4, value, "ra_prioritization_s::scaling_factor_bi_e_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(report_sftd_meas, 1)); + HANDLE_CODE(bref.pack(report_rsrp, 1)); + + return SRSASN_SUCCESS; } -uint8_t ra_prioritization_s::scaling_factor_bi_opts::to_number() const +SRSASN_CODE report_sftd_eutra_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {0, 25, 5, 75}; - return map_enum_number(options, 4, value, "ra_prioritization_s::scaling_factor_bi_e_"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(report_sftd_meas, 1)); + HANDLE_CODE(bref.unpack(report_rsrp, 1)); + + return SRSASN_SUCCESS; +} +void report_sftd_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("reportSFTD-Meas", report_sftd_meas); + j.write_bool("reportRSRP", report_rsrp); + j.end_obj(); } -// SRS-Resource ::= SEQUENCE -SRSASN_CODE srs_res_s::pack(bit_ref& bref) const +// ReportSFTD-NR ::= SEQUENCE +SRSASN_CODE report_sftd_nr_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ptrs_port_idx_present, 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_present, 1)); + HANDLE_CODE(bref.pack(report_sftd_meas, 1)); + HANDLE_CODE(bref.pack(report_rsrp, 1)); - HANDLE_CODE(pack_integer(bref, srs_res_id, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(nrof_srs_ports.pack(bref)); - if (ptrs_port_idx_present) { - HANDLE_CODE(ptrs_port_idx.pack(bref)); - } - HANDLE_CODE(tx_comb.pack(bref)); - HANDLE_CODE(pack_integer(bref, res_map.start_position, (uint8_t)0u, (uint8_t)5u)); - HANDLE_CODE(res_map.nrof_symbols.pack(bref)); - HANDLE_CODE(res_map.repeat_factor.pack(bref)); - HANDLE_CODE(pack_integer(bref, freq_domain_position, (uint8_t)0u, (uint8_t)67u)); - HANDLE_CODE(pack_integer(bref, freq_domain_shift, (uint16_t)0u, (uint16_t)268u)); - HANDLE_CODE(pack_integer(bref, freq_hop.c_srs, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, freq_hop.b_srs, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pack_integer(bref, freq_hop.b_hop, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(group_or_seq_hop.pack(bref)); - HANDLE_CODE(res_type.pack(bref)); - HANDLE_CODE(pack_integer(bref, seq_id, (uint16_t)0u, (uint16_t)1023u)); - if (spatial_relation_info_present) { - HANDLE_CODE(spatial_relation_info.pack(bref)); - } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= report_sftd_neigh_meas_present; + group_flags[0] |= drx_sftd_neigh_meas_present; + group_flags[0] |= cells_for_which_to_report_sftd.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(bref.pack(report_sftd_neigh_meas_present, 1)); + HANDLE_CODE(bref.pack(drx_sftd_neigh_meas_present, 1)); + HANDLE_CODE(bref.pack(cells_for_which_to_report_sftd.is_present(), 1)); + if (cells_for_which_to_report_sftd.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cells_for_which_to_report_sftd, 1, 3, integer_packer(0, 1007))); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE srs_res_s::unpack(cbit_ref& bref) +SRSASN_CODE report_sftd_nr_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ptrs_port_idx_present, 1)); - HANDLE_CODE(bref.unpack(spatial_relation_info_present, 1)); + HANDLE_CODE(bref.unpack(report_sftd_meas, 1)); + HANDLE_CODE(bref.unpack(report_rsrp, 1)); - HANDLE_CODE(unpack_integer(srs_res_id, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(nrof_srs_ports.unpack(bref)); - if (ptrs_port_idx_present) { - HANDLE_CODE(ptrs_port_idx.unpack(bref)); - } - HANDLE_CODE(tx_comb.unpack(bref)); - HANDLE_CODE(unpack_integer(res_map.start_position, bref, (uint8_t)0u, (uint8_t)5u)); - HANDLE_CODE(res_map.nrof_symbols.unpack(bref)); - HANDLE_CODE(res_map.repeat_factor.unpack(bref)); - HANDLE_CODE(unpack_integer(freq_domain_position, bref, (uint8_t)0u, (uint8_t)67u)); - HANDLE_CODE(unpack_integer(freq_domain_shift, bref, (uint16_t)0u, (uint16_t)268u)); - HANDLE_CODE(unpack_integer(freq_hop.c_srs, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(freq_hop.b_srs, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(unpack_integer(freq_hop.b_hop, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(group_or_seq_hop.unpack(bref)); - HANDLE_CODE(res_type.unpack(bref)); - HANDLE_CODE(unpack_integer(seq_id, bref, (uint16_t)0u, (uint16_t)1023u)); - if (spatial_relation_info_present) { - HANDLE_CODE(spatial_relation_info.unpack(bref)); - } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(bref.unpack(report_sftd_neigh_meas_present, 1)); + HANDLE_CODE(bref.unpack(drx_sftd_neigh_meas_present, 1)); + bool cells_for_which_to_report_sftd_present; + HANDLE_CODE(bref.unpack(cells_for_which_to_report_sftd_present, 1)); + cells_for_which_to_report_sftd.set_present(cells_for_which_to_report_sftd_present); + if (cells_for_which_to_report_sftd.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cells_for_which_to_report_sftd, bref, 1, 3, integer_packer(0, 1007))); + } + } + } return SRSASN_SUCCESS; } -void srs_res_s::to_json(json_writer& j) const +void report_sftd_nr_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("srs-ResourceId", srs_res_id); - j.write_str("nrofSRS-Ports", nrof_srs_ports.to_string()); - if (ptrs_port_idx_present) { - j.write_str("ptrs-PortIndex", ptrs_port_idx.to_string()); + j.write_bool("reportSFTD-Meas", report_sftd_meas); + j.write_bool("reportRSRP", report_rsrp); + if (ext) { + if (report_sftd_neigh_meas_present) { + j.write_str("reportSFTD-NeighMeas", "true"); + } + if (drx_sftd_neigh_meas_present) { + j.write_str("drx-SFTD-NeighMeas", "true"); + } + if (cells_for_which_to_report_sftd.is_present()) { + j.start_array("cellsForWhichToReportSFTD"); + for (const auto& e1 : *cells_for_which_to_report_sftd) { + j.write_int(e1); + } + j.end_array(); + } } - j.write_fieldname("transmissionComb"); - tx_comb.to_json(j); - j.write_fieldname("resourceMapping"); - j.start_obj(); - j.write_int("startPosition", res_map.start_position); - j.write_str("nrofSymbols", res_map.nrof_symbols.to_string()); - j.write_str("repetitionFactor", res_map.repeat_factor.to_string()); j.end_obj(); - j.write_int("freqDomainPosition", freq_domain_position); - j.write_int("freqDomainShift", freq_domain_shift); - j.write_fieldname("freqHopping"); +} + +// SSB-MTC2 ::= SEQUENCE +SRSASN_CODE ssb_mtc2_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pci_list_present, 1)); + + if (pci_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pci_list, 1, 64, integer_packer(0, 1007))); + } + HANDLE_CODE(periodicity.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_mtc2_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pci_list_present, 1)); + + if (pci_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(pci_list, bref, 1, 64, integer_packer(0, 1007))); + } + HANDLE_CODE(periodicity.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ssb_mtc2_s::to_json(json_writer& j) const +{ j.start_obj(); - j.write_int("c-SRS", freq_hop.c_srs); - j.write_int("b-SRS", freq_hop.b_srs); - j.write_int("b-hop", freq_hop.b_hop); - j.end_obj(); - j.write_str("groupOrSequenceHopping", group_or_seq_hop.to_string()); - j.write_fieldname("resourceType"); - res_type.to_json(j); - j.write_int("sequenceId", seq_id); - if (spatial_relation_info_present) { - j.write_fieldname("spatialRelationInfo"); - spatial_relation_info.to_json(j); + if (pci_list_present) { + j.start_array("pci-List"); + for (const auto& e1 : pci_list) { + j.write_int(e1); + } + j.end_array(); } + j.write_str("periodicity", periodicity.to_string()); j.end_obj(); } -std::string srs_res_s::nrof_srs_ports_opts::to_string() const +std::string ssb_mtc2_s::periodicity_opts::to_string() const { - static const char* options[] = {"port1", "ports2", "ports4"}; - return convert_enum_idx(options, 3, value, "srs_res_s::nrof_srs_ports_e_"); + 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 srs_res_s::nrof_srs_ports_opts::to_number() const +uint8_t ssb_mtc2_s::periodicity_opts::to_number() const { - static const uint8_t options[] = {1, 2, 4}; - return map_enum_number(options, 3, value, "srs_res_s::nrof_srs_ports_e_"); + static const uint8_t options[] = {5, 10, 20, 40, 80}; + return map_enum_number(options, 5, value, "ssb_mtc2_s::periodicity_e_"); } -std::string srs_res_s::ptrs_port_idx_opts::to_string() const +// MRDC-SecondaryCellGroupConfig ::= SEQUENCE +SRSASN_CODE mrdc_secondary_cell_group_cfg_s::pack(bit_ref& bref) const { - static const char* options[] = {"n0", "n1"}; - return convert_enum_idx(options, 2, value, "srs_res_s::ptrs_port_idx_e_"); + HANDLE_CODE(bref.pack(mrdc_release_and_add_present, 1)); + + HANDLE_CODE(mrdc_secondary_cell_group.pack(bref)); + + return SRSASN_SUCCESS; } -uint8_t srs_res_s::ptrs_port_idx_opts::to_number() const +SRSASN_CODE mrdc_secondary_cell_group_cfg_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {0, 1}; - return map_enum_number(options, 2, value, "srs_res_s::ptrs_port_idx_e_"); + HANDLE_CODE(bref.unpack(mrdc_release_and_add_present, 1)); + + HANDLE_CODE(mrdc_secondary_cell_group.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mrdc_secondary_cell_group_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mrdc_release_and_add_present) { + j.write_str("mrdc-ReleaseAndAdd", "true"); + } + j.write_fieldname("mrdc-SecondaryCellGroup"); + mrdc_secondary_cell_group.to_json(j); + j.end_obj(); } -void srs_res_s::tx_comb_c_::destroy_() +void mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::destroy_() { switch (type_) { - case types::n2: - c.destroy(); + case types::nr_scg: + c.destroy(); break; - case types::n4: - c.destroy(); + case types::eutra_scg: + c.destroy(); break; default: break; } } -void srs_res_s::tx_comb_c_::set(types::options e) +void mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::n2: - c.init(); + case types::nr_scg: + c.init(); break; - case types::n4: - c.init(); + case types::eutra_scg: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); } } -srs_res_s::tx_comb_c_::tx_comb_c_(const srs_res_s::tx_comb_c_& other) +mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::mrdc_secondary_cell_group_c_( + const mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_& other) { type_ = other.type(); switch (type_) { - case types::n2: - c.init(other.c.get()); + case types::nr_scg: + c.init(other.c.get()); break; - case types::n4: - c.init(other.c.get()); + case types::eutra_scg: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); } } -srs_res_s::tx_comb_c_& srs_res_s::tx_comb_c_::operator=(const srs_res_s::tx_comb_c_& other) +mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_& +mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::operator=( + const mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::n2: - c.set(other.c.get()); + case types::nr_scg: + c.set(other.c.get()); break; - case types::n4: - c.set(other.c.get()); + case types::eutra_scg: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); } return *this; } -void srs_res_s::tx_comb_c_::to_json(json_writer& j) const +void mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::n2: - j.write_fieldname("n2"); - j.start_obj(); - j.write_int("combOffset-n2", c.get().comb_offset_n2); - j.write_int("cyclicShift-n2", c.get().cyclic_shift_n2); - j.end_obj(); + case types::nr_scg: + j.write_str("nr-SCG", c.get().to_string()); break; - case types::n4: - j.write_fieldname("n4"); - j.start_obj(); - j.write_int("combOffset-n4", c.get().comb_offset_n4); - j.write_int("cyclicShift-n4", c.get().cyclic_shift_n4); - j.end_obj(); + case types::eutra_scg: + j.write_str("eutra-SCG", c.get().to_string()); break; default: - log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); } j.end_obj(); } -SRSASN_CODE srs_res_s::tx_comb_c_::pack(bit_ref& bref) const +SRSASN_CODE mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::n2: - HANDLE_CODE(pack_integer(bref, c.get().comb_offset_n2, (uint8_t)0u, (uint8_t)1u)); - HANDLE_CODE(pack_integer(bref, c.get().cyclic_shift_n2, (uint8_t)0u, (uint8_t)7u)); + case types::nr_scg: + HANDLE_CODE(c.get().pack(bref)); break; - case types::n4: - HANDLE_CODE(pack_integer(bref, c.get().comb_offset_n4, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pack_integer(bref, c.get().cyclic_shift_n4, (uint8_t)0u, (uint8_t)11u)); + case types::eutra_scg: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE srs_res_s::tx_comb_c_::unpack(cbit_ref& bref) +SRSASN_CODE mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::n2: - HANDLE_CODE(unpack_integer(c.get().comb_offset_n2, bref, (uint8_t)0u, (uint8_t)1u)); - HANDLE_CODE(unpack_integer(c.get().cyclic_shift_n2, bref, (uint8_t)0u, (uint8_t)7u)); + case types::nr_scg: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::n4: - HANDLE_CODE(unpack_integer(c.get().comb_offset_n4, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(unpack_integer(c.get().cyclic_shift_n4, bref, (uint8_t)0u, (uint8_t)11u)); + case types::eutra_scg: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string srs_res_s::tx_comb_c_::types_opts::to_string() const -{ - 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 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 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 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 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 +std::string mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::types_opts::to_string() const { - static const uint8_t options[] = {1, 2, 4}; - return map_enum_number(options, 3, value, "srs_res_s::res_map_s_::repeat_factor_e_"); + static const char* options[] = {"nr-SCG", "eutra-SCG"}; + return convert_enum_idx(options, 2, value, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::types"); } -std::string srs_res_s::group_or_seq_hop_opts::to_string() const +// MeasObjectEUTRA ::= SEQUENCE +SRSASN_CODE meas_obj_eutra_s::pack(bit_ref& bref) const { - static const char* options[] = {"neither", "groupHopping", "sequenceHopping"}; - return convert_enum_idx(options, 3, value, "srs_res_s::group_or_seq_hop_e_"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cells_to_rem_list_eutran_present, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list_eutran_present, 1)); + HANDLE_CODE(bref.pack(black_cells_to_rem_list_eutran_present, 1)); + HANDLE_CODE(bref.pack(black_cells_to_add_mod_list_eutran_present, 1)); + HANDLE_CODE(bref.pack(eutra_q_offset_range_present, 1)); -void srs_res_s::res_type_c_::destroy_() -{ - switch (type_) { - case types::aperiodic: - c.destroy(); - break; - case types::semi_persistent: - c.destroy(); - break; - case types::periodic: - c.destroy(); - break; - default: - break; + HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(allowed_meas_bw.pack(bref)); + if (cells_to_rem_list_eutran_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list_eutran, 1, 32, integer_packer(1, 32))); } -} -void srs_res_s::res_type_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::aperiodic: - c.init(); - break; - case types::semi_persistent: - c.init(); - break; - case types::periodic: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); + if (cells_to_add_mod_list_eutran_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list_eutran, 1, 32)); } -} -srs_res_s::res_type_c_::res_type_c_(const srs_res_s::res_type_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::aperiodic: - c.init(other.c.get()); - break; - case types::semi_persistent: - c.init(other.c.get()); - break; - case types::periodic: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); + if (black_cells_to_rem_list_eutran_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_rem_list_eutran, 1, 32, integer_packer(1, 32))); } -} -srs_res_s::res_type_c_& srs_res_s::res_type_c_::operator=(const srs_res_s::res_type_c_& other) -{ - if (this == &other) { - return *this; + if (black_cells_to_add_mod_list_eutran_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_add_mod_list_eutran, 1, 32)); } - set(other.type()); - switch (type_) { - case types::aperiodic: - c.set(other.c.get()); - break; - case types::semi_persistent: - c.set(other.c.get()); - break; - case types::periodic: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); + HANDLE_CODE(bref.pack(eutra_presence_ant_port1, 1)); + if (eutra_q_offset_range_present) { + HANDLE_CODE(eutra_q_offset_range.pack(bref)); } + HANDLE_CODE(bref.pack(wideband_rsrq_meas, 1)); - return *this; + return SRSASN_SUCCESS; } -void srs_res_s::res_type_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::aperiodic: - j.write_fieldname("aperiodic"); - j.start_obj(); - j.end_obj(); - break; - case types::semi_persistent: - j.write_fieldname("semi-persistent"); - j.start_obj(); - j.write_fieldname("periodicityAndOffset-sp"); - c.get().periodicity_and_offset_sp.to_json(j); - j.end_obj(); - break; - case types::periodic: - j.write_fieldname("periodic"); - j.start_obj(); - j.write_fieldname("periodicityAndOffset-p"); - c.get().periodicity_and_offset_p.to_json(j); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE srs_res_s::res_type_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::aperiodic: - bref.pack(c.get().ext, 1); - break; - case types::semi_persistent: - bref.pack(c.get().ext, 1); - HANDLE_CODE(c.get().periodicity_and_offset_sp.pack(bref)); - break; - case types::periodic: - bref.pack(c.get().ext, 1); - HANDLE_CODE(c.get().periodicity_and_offset_p.pack(bref)); - break; - default: - log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE srs_res_s::res_type_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::aperiodic: - bref.unpack(c.get().ext, 1); - break; - case types::semi_persistent: - bref.unpack(c.get().ext, 1); - HANDLE_CODE(c.get().periodicity_and_offset_sp.unpack(bref)); - break; - case types::periodic: - bref.unpack(c.get().ext, 1); - HANDLE_CODE(c.get().periodicity_and_offset_p.unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string srs_res_s::res_type_c_::types_opts::to_string() const -{ - static const char* options[] = {"aperiodic", "semi-persistent", "periodic"}; - return convert_enum_idx(options, 3, value, "srs_res_s::res_type_c_::types"); -} - -// SRS-ResourceSet ::= SEQUENCE -SRSASN_CODE srs_res_set_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(srs_res_id_list_present, 1)); - HANDLE_CODE(bref.pack(alpha_present, 1)); - HANDLE_CODE(bref.pack(p0_present, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_present, 1)); - HANDLE_CODE(bref.pack(srs_pwr_ctrl_adjustment_states_present, 1)); - - HANDLE_CODE(pack_integer(bref, srs_res_set_id, (uint8_t)0u, (uint8_t)15u)); - if (srs_res_id_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_id_list, 1, 16, integer_packer(0, 63))); - } - HANDLE_CODE(res_type.pack(bref)); - HANDLE_CODE(usage.pack(bref)); - if (alpha_present) { - HANDLE_CODE(alpha.pack(bref)); - } - if (p0_present) { - HANDLE_CODE(pack_integer(bref, p0, (int16_t)-202, (int16_t)24)); - } - if (pathloss_ref_rs_present) { - HANDLE_CODE(pathloss_ref_rs.pack(bref)); - } - if (srs_pwr_ctrl_adjustment_states_present) { - HANDLE_CODE(srs_pwr_ctrl_adjustment_states.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE srs_res_set_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_obj_eutra_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(srs_res_id_list_present, 1)); - HANDLE_CODE(bref.unpack(alpha_present, 1)); - HANDLE_CODE(bref.unpack(p0_present, 1)); - HANDLE_CODE(bref.unpack(pathloss_ref_rs_present, 1)); - HANDLE_CODE(bref.unpack(srs_pwr_ctrl_adjustment_states_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_rem_list_eutran_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_add_mod_list_eutran_present, 1)); + HANDLE_CODE(bref.unpack(black_cells_to_rem_list_eutran_present, 1)); + HANDLE_CODE(bref.unpack(black_cells_to_add_mod_list_eutran_present, 1)); + HANDLE_CODE(bref.unpack(eutra_q_offset_range_present, 1)); - HANDLE_CODE(unpack_integer(srs_res_set_id, bref, (uint8_t)0u, (uint8_t)15u)); - if (srs_res_id_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_res_id_list, bref, 1, 16, integer_packer(0, 63))); + HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(allowed_meas_bw.unpack(bref)); + if (cells_to_rem_list_eutran_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list_eutran, bref, 1, 32, integer_packer(1, 32))); } - HANDLE_CODE(res_type.unpack(bref)); - HANDLE_CODE(usage.unpack(bref)); - if (alpha_present) { - HANDLE_CODE(alpha.unpack(bref)); + if (cells_to_add_mod_list_eutran_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_add_mod_list_eutran, bref, 1, 32)); } - if (p0_present) { - HANDLE_CODE(unpack_integer(p0, bref, (int16_t)-202, (int16_t)24)); + if (black_cells_to_rem_list_eutran_present) { + HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_rem_list_eutran, bref, 1, 32, integer_packer(1, 32))); } - if (pathloss_ref_rs_present) { - HANDLE_CODE(pathloss_ref_rs.unpack(bref)); + if (black_cells_to_add_mod_list_eutran_present) { + HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_add_mod_list_eutran, bref, 1, 32)); } - if (srs_pwr_ctrl_adjustment_states_present) { - HANDLE_CODE(srs_pwr_ctrl_adjustment_states.unpack(bref)); + HANDLE_CODE(bref.unpack(eutra_presence_ant_port1, 1)); + if (eutra_q_offset_range_present) { + HANDLE_CODE(eutra_q_offset_range.unpack(bref)); } + HANDLE_CODE(bref.unpack(wideband_rsrq_meas, 1)); return SRSASN_SUCCESS; } -void srs_res_set_s::to_json(json_writer& j) const +void meas_obj_eutra_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("srs-ResourceSetId", srs_res_set_id); - if (srs_res_id_list_present) { - j.start_array("srs-ResourceIdList"); - for (const auto& e1 : srs_res_id_list) { + j.write_int("carrierFreq", carrier_freq); + j.write_str("allowedMeasBandwidth", allowed_meas_bw.to_string()); + if (cells_to_rem_list_eutran_present) { + j.start_array("cellsToRemoveListEUTRAN"); + for (const auto& e1 : cells_to_rem_list_eutran) { j.write_int(e1); } j.end_array(); } - j.write_fieldname("resourceType"); - res_type.to_json(j); - j.write_str("usage", usage.to_string()); - if (alpha_present) { - j.write_str("alpha", alpha.to_string()); + if (cells_to_add_mod_list_eutran_present) { + j.start_array("cellsToAddModListEUTRAN"); + for (const auto& e1 : cells_to_add_mod_list_eutran) { + e1.to_json(j); + } + j.end_array(); } - if (p0_present) { - j.write_int("p0", p0); + if (black_cells_to_rem_list_eutran_present) { + j.start_array("blackCellsToRemoveListEUTRAN"); + for (const auto& e1 : black_cells_to_rem_list_eutran) { + j.write_int(e1); + } + j.end_array(); } - if (pathloss_ref_rs_present) { - j.write_fieldname("pathlossReferenceRS"); - pathloss_ref_rs.to_json(j); + if (black_cells_to_add_mod_list_eutran_present) { + j.start_array("blackCellsToAddModListEUTRAN"); + for (const auto& e1 : black_cells_to_add_mod_list_eutran) { + e1.to_json(j); + } + j.end_array(); } - if (srs_pwr_ctrl_adjustment_states_present) { - j.write_str("srs-PowerControlAdjustmentStates", srs_pwr_ctrl_adjustment_states.to_string()); + j.write_bool("eutra-PresenceAntennaPort1", eutra_presence_ant_port1); + if (eutra_q_offset_range_present) { + j.write_str("eutra-Q-OffsetRange", eutra_q_offset_range.to_string()); } + j.write_bool("widebandRSRQ-Meas", wideband_rsrq_meas); j.end_obj(); } -void srs_res_set_s::res_type_c_::destroy_() +// MeasObjectNR ::= SEQUENCE +SRSASN_CODE meas_obj_nr_s::pack(bit_ref& bref) const { - switch (type_) { - case types::aperiodic: - c.destroy(); - break; - case types::semi_persistent: - c.destroy(); - break; - case types::periodic: - c.destroy(); - break; - default: - break; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ssb_freq_present, 1)); + HANDLE_CODE(bref.pack(ssb_subcarrier_spacing_present, 1)); + HANDLE_CODE(bref.pack(smtc1_present, 1)); + HANDLE_CODE(bref.pack(smtc2_present, 1)); + HANDLE_CODE(bref.pack(ref_freq_csi_rs_present, 1)); + HANDLE_CODE(bref.pack(abs_thresh_ss_blocks_consolidation_present, 1)); + HANDLE_CODE(bref.pack(abs_thresh_csi_rs_consolidation_present, 1)); + HANDLE_CODE(bref.pack(nrof_ss_blocks_to_average_present, 1)); + HANDLE_CODE(bref.pack(nrof_csi_rs_res_to_average_present, 1)); + HANDLE_CODE(bref.pack(cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(black_cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(black_cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(white_cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(white_cells_to_add_mod_list_present, 1)); + + if (ssb_freq_present) { + HANDLE_CODE(pack_integer(bref, ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); } -} -void srs_res_set_s::res_type_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::aperiodic: - c.init(); - break; - case types::semi_persistent: - c.init(); - break; - case types::periodic: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); + if (ssb_subcarrier_spacing_present) { + HANDLE_CODE(ssb_subcarrier_spacing.pack(bref)); } -} -srs_res_set_s::res_type_c_::res_type_c_(const srs_res_set_s::res_type_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::aperiodic: - c.init(other.c.get()); - break; - case types::semi_persistent: - c.init(other.c.get()); - break; - case types::periodic: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); + if (smtc1_present) { + HANDLE_CODE(smtc1.pack(bref)); } -} -srs_res_set_s::res_type_c_& srs_res_set_s::res_type_c_::operator=(const srs_res_set_s::res_type_c_& other) -{ - if (this == &other) { - return *this; + if (smtc2_present) { + HANDLE_CODE(smtc2.pack(bref)); } - set(other.type()); - switch (type_) { - case types::aperiodic: - c.set(other.c.get()); - break; - case types::semi_persistent: - c.set(other.c.get()); - break; - case types::periodic: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); + if (ref_freq_csi_rs_present) { + HANDLE_CODE(pack_integer(bref, ref_freq_csi_rs, (uint32_t)0u, (uint32_t)3279165u)); } - - return *this; -} -void srs_res_set_s::res_type_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::aperiodic: - j.write_fieldname("aperiodic"); - c.get().to_json(j); - break; - case types::semi_persistent: - j.write_fieldname("semi-persistent"); - j.start_obj(); - if (c.get().associated_csi_rs_present) { - j.write_int("associatedCSI-RS", c.get().associated_csi_rs); - } - j.end_obj(); - break; - case types::periodic: - j.write_fieldname("periodic"); - j.start_obj(); - if (c.get().associated_csi_rs_present) { - j.write_int("associatedCSI-RS", c.get().associated_csi_rs); - } - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); + HANDLE_CODE(ref_sig_cfg.pack(bref)); + if (abs_thresh_ss_blocks_consolidation_present) { + HANDLE_CODE(abs_thresh_ss_blocks_consolidation.pack(bref)); } - j.end_obj(); -} -SRSASN_CODE srs_res_set_s::res_type_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::aperiodic: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::semi_persistent: - bref.pack(c.get().ext, 1); - HANDLE_CODE(bref.pack(c.get().associated_csi_rs_present, 1)); - if (c.get().associated_csi_rs_present) { - HANDLE_CODE(pack_integer(bref, c.get().associated_csi_rs, (uint8_t)0u, (uint8_t)191u)); - } - break; - case types::periodic: - bref.pack(c.get().ext, 1); - HANDLE_CODE(bref.pack(c.get().associated_csi_rs_present, 1)); - if (c.get().associated_csi_rs_present) { - HANDLE_CODE(pack_integer(bref, c.get().associated_csi_rs, (uint8_t)0u, (uint8_t)191u)); - } - break; - default: - log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (abs_thresh_csi_rs_consolidation_present) { + HANDLE_CODE(abs_thresh_csi_rs_consolidation.pack(bref)); } - return SRSASN_SUCCESS; -} -SRSASN_CODE srs_res_set_s::res_type_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::aperiodic: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::semi_persistent: - bref.unpack(c.get().ext, 1); - HANDLE_CODE(bref.unpack(c.get().associated_csi_rs_present, 1)); - if (c.get().associated_csi_rs_present) { - HANDLE_CODE(unpack_integer(c.get().associated_csi_rs, bref, (uint8_t)0u, (uint8_t)191u)); - } - break; - case types::periodic: - bref.unpack(c.get().ext, 1); - HANDLE_CODE(bref.unpack(c.get().associated_csi_rs_present, 1)); - if (c.get().associated_csi_rs_present) { - HANDLE_CODE(unpack_integer(c.get().associated_csi_rs, bref, (uint8_t)0u, (uint8_t)191u)); - } - break; - default: - log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); - return SRSASN_ERROR_DECODE_FAIL; + if (nrof_ss_blocks_to_average_present) { + HANDLE_CODE(pack_integer(bref, nrof_ss_blocks_to_average, (uint8_t)2u, (uint8_t)16u)); } - return SRSASN_SUCCESS; -} - -SRSASN_CODE srs_res_set_s::res_type_c_::aperiodic_s_::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(csi_rs_present, 1)); - HANDLE_CODE(bref.pack(slot_offset_present, 1)); - - HANDLE_CODE(pack_integer(bref, aperiodic_srs_res_trigger, (uint8_t)1u, (uint8_t)3u)); - if (csi_rs_present) { - HANDLE_CODE(pack_integer(bref, csi_rs, (uint8_t)0u, (uint8_t)191u)); + if (nrof_csi_rs_res_to_average_present) { + HANDLE_CODE(pack_integer(bref, nrof_csi_rs_res_to_average, (uint8_t)2u, (uint8_t)16u)); } - if (slot_offset_present) { - HANDLE_CODE(pack_integer(bref, slot_offset, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pack_integer(bref, quant_cfg_idx, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(offset_mo.pack(bref)); + if (cells_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list, 1, 32, integer_packer(0, 1007))); + } + if (cells_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list, 1, 32)); + } + if (black_cells_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_rem_list, 1, 8, integer_packer(1, 8))); + } + if (black_cells_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_add_mod_list, 1, 8)); + } + if (white_cells_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, white_cells_to_rem_list, 1, 8, integer_packer(1, 8))); + } + if (white_cells_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, white_cells_to_add_mod_list, 1, 8)); } if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= aperiodic_srs_res_trigger_list_v1530.is_present(); + group_flags[0] |= freq_band_ind_nr_present; + group_flags[0] |= meas_cycle_scell_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(aperiodic_srs_res_trigger_list_v1530.is_present(), 1)); - if (aperiodic_srs_res_trigger_list_v1530.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *aperiodic_srs_res_trigger_list_v1530, 1, 2, integer_packer(1, 3))); + HANDLE_CODE(bref.pack(freq_band_ind_nr_present, 1)); + HANDLE_CODE(bref.pack(meas_cycle_scell_present, 1)); + if (freq_band_ind_nr_present) { + HANDLE_CODE(pack_integer(bref, freq_band_ind_nr, (uint16_t)1u, (uint16_t)1024u)); + } + if (meas_cycle_scell_present) { + HANDLE_CODE(meas_cycle_scell.pack(bref)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE srs_res_set_s::res_type_c_::aperiodic_s_::unpack(cbit_ref& bref) +SRSASN_CODE meas_obj_nr_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(csi_rs_present, 1)); - HANDLE_CODE(bref.unpack(slot_offset_present, 1)); + HANDLE_CODE(bref.unpack(ssb_freq_present, 1)); + HANDLE_CODE(bref.unpack(ssb_subcarrier_spacing_present, 1)); + HANDLE_CODE(bref.unpack(smtc1_present, 1)); + HANDLE_CODE(bref.unpack(smtc2_present, 1)); + HANDLE_CODE(bref.unpack(ref_freq_csi_rs_present, 1)); + HANDLE_CODE(bref.unpack(abs_thresh_ss_blocks_consolidation_present, 1)); + HANDLE_CODE(bref.unpack(abs_thresh_csi_rs_consolidation_present, 1)); + HANDLE_CODE(bref.unpack(nrof_ss_blocks_to_average_present, 1)); + HANDLE_CODE(bref.unpack(nrof_csi_rs_res_to_average_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(black_cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(black_cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(white_cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(white_cells_to_add_mod_list_present, 1)); - HANDLE_CODE(unpack_integer(aperiodic_srs_res_trigger, bref, (uint8_t)1u, (uint8_t)3u)); - if (csi_rs_present) { - HANDLE_CODE(unpack_integer(csi_rs, bref, (uint8_t)0u, (uint8_t)191u)); + if (ssb_freq_present) { + HANDLE_CODE(unpack_integer(ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); } - if (slot_offset_present) { - HANDLE_CODE(unpack_integer(slot_offset, bref, (uint8_t)1u, (uint8_t)32u)); + if (ssb_subcarrier_spacing_present) { + HANDLE_CODE(ssb_subcarrier_spacing.unpack(bref)); + } + if (smtc1_present) { + HANDLE_CODE(smtc1.unpack(bref)); + } + if (smtc2_present) { + HANDLE_CODE(smtc2.unpack(bref)); + } + if (ref_freq_csi_rs_present) { + HANDLE_CODE(unpack_integer(ref_freq_csi_rs, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + HANDLE_CODE(ref_sig_cfg.unpack(bref)); + if (abs_thresh_ss_blocks_consolidation_present) { + HANDLE_CODE(abs_thresh_ss_blocks_consolidation.unpack(bref)); + } + if (abs_thresh_csi_rs_consolidation_present) { + HANDLE_CODE(abs_thresh_csi_rs_consolidation.unpack(bref)); + } + if (nrof_ss_blocks_to_average_present) { + HANDLE_CODE(unpack_integer(nrof_ss_blocks_to_average, bref, (uint8_t)2u, (uint8_t)16u)); + } + if (nrof_csi_rs_res_to_average_present) { + HANDLE_CODE(unpack_integer(nrof_csi_rs_res_to_average, bref, (uint8_t)2u, (uint8_t)16u)); + } + HANDLE_CODE(unpack_integer(quant_cfg_idx, bref, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(offset_mo.unpack(bref)); + if (cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list, bref, 1, 32, integer_packer(0, 1007))); + } + if (cells_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_add_mod_list, bref, 1, 32)); + } + if (black_cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_rem_list, bref, 1, 8, integer_packer(1, 8))); + } + if (black_cells_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_add_mod_list, bref, 1, 8)); + } + if (white_cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(white_cells_to_rem_list, bref, 1, 8, integer_packer(1, 8))); + } + if (white_cells_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(white_cells_to_add_mod_list, bref, 1, 8)); } if (ext) { @@ -12448,9536 +12398,7364 @@ SRSASN_CODE srs_res_set_s::res_type_c_::aperiodic_s_::unpack(cbit_ref& bref) if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - bool aperiodic_srs_res_trigger_list_v1530_present; - HANDLE_CODE(bref.unpack(aperiodic_srs_res_trigger_list_v1530_present, 1)); - aperiodic_srs_res_trigger_list_v1530.set_present(aperiodic_srs_res_trigger_list_v1530_present); - if (aperiodic_srs_res_trigger_list_v1530.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*aperiodic_srs_res_trigger_list_v1530, bref, 1, 2, integer_packer(1, 3))); + HANDLE_CODE(bref.unpack(freq_band_ind_nr_present, 1)); + HANDLE_CODE(bref.unpack(meas_cycle_scell_present, 1)); + if (freq_band_ind_nr_present) { + HANDLE_CODE(unpack_integer(freq_band_ind_nr, bref, (uint16_t)1u, (uint16_t)1024u)); + } + if (meas_cycle_scell_present) { + HANDLE_CODE(meas_cycle_scell.unpack(bref)); } } } return SRSASN_SUCCESS; } -void srs_res_set_s::res_type_c_::aperiodic_s_::to_json(json_writer& j) const +void meas_obj_nr_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("aperiodicSRS-ResourceTrigger", aperiodic_srs_res_trigger); - if (csi_rs_present) { - j.write_int("csi-RS", csi_rs); + if (ssb_freq_present) { + j.write_int("ssbFrequency", ssb_freq); } - if (slot_offset_present) { - j.write_int("slotOffset", slot_offset); + if (ssb_subcarrier_spacing_present) { + j.write_str("ssbSubcarrierSpacing", ssb_subcarrier_spacing.to_string()); } - if (ext) { - if (aperiodic_srs_res_trigger_list_v1530.is_present()) { - j.start_array("aperiodicSRS-ResourceTriggerList-v1530"); - for (const auto& e1 : *aperiodic_srs_res_trigger_list_v1530) { - j.write_int(e1); - } - j.end_array(); - } + if (smtc1_present) { + j.write_fieldname("smtc1"); + smtc1.to_json(j); } - j.end_obj(); -} - -std::string srs_res_set_s::res_type_c_::types_opts::to_string() const -{ - static const char* options[] = {"aperiodic", "semi-persistent", "periodic"}; - return convert_enum_idx(options, 3, value, "srs_res_set_s::res_type_c_::types"); + if (smtc2_present) { + j.write_fieldname("smtc2"); + smtc2.to_json(j); + } + if (ref_freq_csi_rs_present) { + j.write_int("refFreqCSI-RS", ref_freq_csi_rs); + } + j.write_fieldname("referenceSignalConfig"); + ref_sig_cfg.to_json(j); + if (abs_thresh_ss_blocks_consolidation_present) { + j.write_fieldname("absThreshSS-BlocksConsolidation"); + abs_thresh_ss_blocks_consolidation.to_json(j); + } + if (abs_thresh_csi_rs_consolidation_present) { + j.write_fieldname("absThreshCSI-RS-Consolidation"); + abs_thresh_csi_rs_consolidation.to_json(j); + } + if (nrof_ss_blocks_to_average_present) { + j.write_int("nrofSS-BlocksToAverage", nrof_ss_blocks_to_average); + } + if (nrof_csi_rs_res_to_average_present) { + j.write_int("nrofCSI-RS-ResourcesToAverage", nrof_csi_rs_res_to_average); + } + j.write_int("quantityConfigIndex", quant_cfg_idx); + j.write_fieldname("offsetMO"); + offset_mo.to_json(j); + if (cells_to_rem_list_present) { + j.start_array("cellsToRemoveList"); + 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 (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 (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 (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 (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 (const auto& e1 : white_cells_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); + } + if (ext) { + if (freq_band_ind_nr_present) { + j.write_int("freqBandIndicatorNR", freq_band_ind_nr); + } + if (meas_cycle_scell_present) { + j.write_str("measCycleSCell", meas_cycle_scell.to_string()); + } + } + j.end_obj(); } -std::string srs_res_set_s::usage_opts::to_string() const +std::string meas_obj_nr_s::meas_cycle_scell_opts::to_string() const { - static const char* options[] = {"beamManagement", "codebook", "nonCodebook", "antennaSwitching"}; - return convert_enum_idx(options, 4, value, "srs_res_set_s::usage_e_"); + 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_e_"); +} +uint16_t meas_obj_nr_s::meas_cycle_scell_opts::to_number() const +{ + 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_e_"); } -void srs_res_set_s::pathloss_ref_rs_c_::destroy_() {} -void srs_res_set_s::pathloss_ref_rs_c_::set(types::options e) +// OverheatingAssistanceConfig ::= SEQUENCE +SRSASN_CODE overheat_assist_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(overheat_ind_prohibit_timer.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE overheat_assist_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(overheat_ind_prohibit_timer.unpack(bref)); + + return SRSASN_SUCCESS; +} +void overheat_assist_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("overheatingIndicationProhibitTimer", overheat_ind_prohibit_timer.to_string()); + j.end_obj(); +} + +std::string overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_string() const +{ + 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 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 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_"); +} + +// PLMN-RAN-AreaCell ::= SEQUENCE +SRSASN_CODE plmn_ran_area_cell_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(plmn_id_present, 1)); + + if (plmn_id_present) { + HANDLE_CODE(plmn_id.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_cells, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_ran_area_cell_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_present, 1)); + + if (plmn_id_present) { + HANDLE_CODE(plmn_id.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(ran_area_cells, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void plmn_ran_area_cell_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_present) { + j.write_fieldname("plmn-Identity"); + plmn_id.to_json(j); + } + j.start_array("ran-AreaCells"); + for (const auto& e1 : ran_area_cells) { + j.write_str(e1.to_string()); + } + j.end_array(); + j.end_obj(); +} + +// PLMN-RAN-AreaConfig ::= SEQUENCE +SRSASN_CODE plmn_ran_area_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(plmn_id_present, 1)); + + if (plmn_id_present) { + HANDLE_CODE(plmn_id.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, ran_area, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_ran_area_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_present, 1)); + + if (plmn_id_present) { + HANDLE_CODE(plmn_id.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(ran_area, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void plmn_ran_area_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_present) { + j.write_fieldname("plmn-Identity"); + plmn_id.to_json(j); + } + j.start_array("ran-Area"); + for (const auto& e1 : ran_area) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// QuantityConfigRS ::= SEQUENCE +SRSASN_CODE quant_cfg_rs_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(ssb_filt_cfg.pack(bref)); + HANDLE_CODE(csi_rs_filt_cfg.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_rs_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(ssb_filt_cfg.unpack(bref)); + HANDLE_CODE(csi_rs_filt_cfg.unpack(bref)); + + return SRSASN_SUCCESS; +} +void quant_cfg_rs_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ssb-FilterConfig"); + ssb_filt_cfg.to_json(j); + j.write_fieldname("csi-RS-FilterConfig"); + csi_rs_filt_cfg.to_json(j); + j.end_obj(); +} + +// ReportConfigInterRAT ::= SEQUENCE +SRSASN_CODE report_cfg_inter_rat_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(report_type.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_inter_rat_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(report_type.unpack(bref)); + + return SRSASN_SUCCESS; +} +void report_cfg_inter_rat_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("reportType"); + report_type.to_json(j); + j.end_obj(); +} + +void report_cfg_inter_rat_s::report_type_c_::destroy_() +{ + switch (type_) { + case types::periodical: + c.destroy(); + break; + case types::event_triggered: + c.destroy(); + break; + case types::report_cgi: + c.destroy(); + break; + case types::report_sftd: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_inter_rat_s::report_type_c_::set(types::options e) { destroy_(); type_ = e; + switch (type_) { + case types::periodical: + c.init(); + break; + case types::event_triggered: + c.init(); + break; + case types::report_cgi: + c.init(); + break; + case types::report_sftd: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); + } } -srs_res_set_s::pathloss_ref_rs_c_::pathloss_ref_rs_c_(const srs_res_set_s::pathloss_ref_rs_c_& other) +report_cfg_inter_rat_s::report_type_c_::report_type_c_(const report_cfg_inter_rat_s::report_type_c_& other) { type_ = other.type(); switch (type_) { - case types::ssb_idx: - c.init(other.c.get()); + case types::periodical: + c.init(other.c.get()); break; - case types::csi_rs_idx: - c.init(other.c.get()); + case types::event_triggered: + c.init(other.c.get()); + break; + case types::report_cgi: + c.init(other.c.get()); + break; + case types::report_sftd: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); } } -srs_res_set_s::pathloss_ref_rs_c_& srs_res_set_s::pathloss_ref_rs_c_:: - operator=(const srs_res_set_s::pathloss_ref_rs_c_& other) +report_cfg_inter_rat_s::report_type_c_& +report_cfg_inter_rat_s::report_type_c_::operator=(const report_cfg_inter_rat_s::report_type_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb_idx: - c.set(other.c.get()); + case types::periodical: + c.set(other.c.get()); break; - case types::csi_rs_idx: - c.set(other.c.get()); + case types::event_triggered: + c.set(other.c.get()); + break; + case types::report_cgi: + c.set(other.c.get()); + break; + case types::report_sftd: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); } return *this; } -void srs_res_set_s::pathloss_ref_rs_c_::to_json(json_writer& j) const +void report_cfg_inter_rat_s::report_type_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb_idx: - j.write_int("ssb-Index", c.get()); + case types::periodical: + j.write_fieldname("periodical"); + c.get().to_json(j); break; - case types::csi_rs_idx: - j.write_int("csi-RS-Index", c.get()); + case types::event_triggered: + j.write_fieldname("eventTriggered"); + c.get().to_json(j); + break; + case types::report_cgi: + j.write_fieldname("reportCGI"); + c.get().to_json(j); + break; + case types::report_sftd: + j.write_fieldname("reportSFTD"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); } j.end_obj(); } -SRSASN_CODE srs_res_set_s::pathloss_ref_rs_c_::pack(bit_ref& bref) const +SRSASN_CODE report_cfg_inter_rat_s::report_type_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + case types::periodical: + HANDLE_CODE(c.get().pack(bref)); break; - case types::csi_rs_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + case types::event_triggered: + HANDLE_CODE(c.get().pack(bref)); break; + case types::report_cgi: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::report_sftd: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; default: - log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE srs_res_set_s::pathloss_ref_rs_c_::unpack(cbit_ref& bref) +SRSASN_CODE report_cfg_inter_rat_s::report_type_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + case types::periodical: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::csi_rs_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + case types::event_triggered: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::report_cgi: + HANDLE_CODE(c.get().unpack(bref)); break; + case types::report_sftd: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; default: - log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string srs_res_set_s::pathloss_ref_rs_c_::types_opts::to_string() const -{ - 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 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 +std::string report_cfg_inter_rat_s::report_type_c_::types_opts::to_string() const { - static const uint8_t options[] = {2}; - return map_enum_number(options, 1, value, "srs_res_set_s::srs_pwr_ctrl_adjustment_states_e_"); + static const char* options[] = {"periodical", "eventTriggered", "reportCGI", "reportSFTD"}; + return convert_enum_idx(options, 4, value, "report_cfg_inter_rat_s::report_type_c_::types"); } -// SchedulingRequestResourceConfig ::= SEQUENCE -SRSASN_CODE sched_request_res_cfg_s::pack(bit_ref& bref) const +// ReportConfigNR ::= SEQUENCE +SRSASN_CODE report_cfg_nr_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(periodicity_and_offset_present, 1)); - HANDLE_CODE(bref.pack(res_present, 1)); - - HANDLE_CODE(pack_integer(bref, sched_request_res_id, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pack_integer(bref, sched_request_id, (uint8_t)0u, (uint8_t)7u)); - if (periodicity_and_offset_present) { - HANDLE_CODE(periodicity_and_offset.pack(bref)); - } - if (res_present) { - HANDLE_CODE(pack_integer(bref, res, (uint8_t)0u, (uint8_t)127u)); - } + HANDLE_CODE(report_type.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE sched_request_res_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE report_cfg_nr_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(periodicity_and_offset_present, 1)); - HANDLE_CODE(bref.unpack(res_present, 1)); - - HANDLE_CODE(unpack_integer(sched_request_res_id, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(unpack_integer(sched_request_id, bref, (uint8_t)0u, (uint8_t)7u)); - if (periodicity_and_offset_present) { - HANDLE_CODE(periodicity_and_offset.unpack(bref)); - } - if (res_present) { - HANDLE_CODE(unpack_integer(res, bref, (uint8_t)0u, (uint8_t)127u)); - } + HANDLE_CODE(report_type.unpack(bref)); return SRSASN_SUCCESS; } -void sched_request_res_cfg_s::to_json(json_writer& j) const +void report_cfg_nr_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("schedulingRequestResourceId", sched_request_res_id); - j.write_int("schedulingRequestID", sched_request_id); - if (periodicity_and_offset_present) { - j.write_fieldname("periodicityAndOffset"); - periodicity_and_offset.to_json(j); - } - if (res_present) { - j.write_int("resource", res); - } + j.write_fieldname("reportType"); + report_type.to_json(j); j.end_obj(); } -void sched_request_res_cfg_s::periodicity_and_offset_c_::destroy_() {} -void sched_request_res_cfg_s::periodicity_and_offset_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -sched_request_res_cfg_s::periodicity_and_offset_c_::periodicity_and_offset_c_( - const sched_request_res_cfg_s::periodicity_and_offset_c_& other) +void report_cfg_nr_s::report_type_c_::destroy_() { - type_ = other.type(); switch (type_) { - case types::sym2: - break; - case types::sym6or7: + case types::periodical: + c.destroy(); break; - case types::sl1: + case types::event_triggered: + c.destroy(); break; - case types::sl2: - c.init(other.c.get()); + case types::report_cgi: + c.destroy(); break; - case types::sl4: - c.init(other.c.get()); + case types::report_sftd: + c.destroy(); break; - case types::sl5: - c.init(other.c.get()); + default: break; - case types::sl8: - c.init(other.c.get()); + } +} +void report_cfg_nr_s::report_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::periodical: + c.init(); break; - case types::sl10: - c.init(other.c.get()); + case types::event_triggered: + c.init(); break; - case types::sl16: - c.init(other.c.get()); + case types::report_cgi: + c.init(); break; - case types::sl20: - c.init(other.c.get()); + case types::report_sftd: + c.init(); break; - case types::sl40: - c.init(other.c.get()); + case types::nulltype: break; - case types::sl80: - c.init(other.c.get()); + default: + log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); + } +} +report_cfg_nr_s::report_type_c_::report_type_c_(const report_cfg_nr_s::report_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::periodical: + c.init(other.c.get()); break; - case types::sl160: - c.init(other.c.get()); + case types::event_triggered: + c.init(other.c.get()); break; - case types::sl320: - c.init(other.c.get()); + case types::report_cgi: + c.init(other.c.get()); break; - case types::sl640: - c.init(other.c.get()); + case types::report_sftd: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); } } -sched_request_res_cfg_s::periodicity_and_offset_c_& sched_request_res_cfg_s::periodicity_and_offset_c_:: - operator=(const sched_request_res_cfg_s::periodicity_and_offset_c_& other) +report_cfg_nr_s::report_type_c_& +report_cfg_nr_s::report_type_c_::operator=(const report_cfg_nr_s::report_type_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::sym2: + case types::periodical: + c.set(other.c.get()); break; - case types::sym6or7: + case types::event_triggered: + c.set(other.c.get()); break; - case types::sl1: - break; - case types::sl2: - c.set(other.c.get()); - break; - case types::sl4: - c.set(other.c.get()); - break; - case types::sl5: - c.set(other.c.get()); - break; - case types::sl8: - c.set(other.c.get()); - break; - case types::sl10: - c.set(other.c.get()); - break; - case types::sl16: - c.set(other.c.get()); - break; - case types::sl20: - c.set(other.c.get()); - break; - case types::sl40: - c.set(other.c.get()); - break; - case types::sl80: - c.set(other.c.get()); - break; - case types::sl160: - c.set(other.c.get()); - break; - case types::sl320: - c.set(other.c.get()); + case types::report_cgi: + c.set(other.c.get()); break; - case types::sl640: - c.set(other.c.get()); + case types::report_sftd: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); } return *this; } -void sched_request_res_cfg_s::periodicity_and_offset_c_::to_json(json_writer& j) const +void report_cfg_nr_s::report_type_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::sym2: - break; - case types::sym6or7: - break; - case types::sl1: - break; - case types::sl2: - j.write_int("sl2", c.get()); - break; - case types::sl4: - j.write_int("sl4", c.get()); - break; - case types::sl5: - j.write_int("sl5", c.get()); - break; - case types::sl8: - j.write_int("sl8", c.get()); - break; - case types::sl10: - j.write_int("sl10", c.get()); - break; - case types::sl16: - j.write_int("sl16", c.get()); - break; - case types::sl20: - j.write_int("sl20", c.get()); - break; - case types::sl40: - j.write_int("sl40", c.get()); - break; - case types::sl80: - j.write_int("sl80", c.get()); + case types::periodical: + j.write_fieldname("periodical"); + c.get().to_json(j); break; - case types::sl160: - j.write_int("sl160", c.get()); + case types::event_triggered: + j.write_fieldname("eventTriggered"); + c.get().to_json(j); break; - case types::sl320: - j.write_int("sl320", c.get()); + case types::report_cgi: + j.write_fieldname("reportCGI"); + c.get().to_json(j); break; - case types::sl640: - j.write_int("sl640", c.get()); + case types::report_sftd: + j.write_fieldname("reportSFTD"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); } j.end_obj(); } -SRSASN_CODE sched_request_res_cfg_s::periodicity_and_offset_c_::pack(bit_ref& bref) const +SRSASN_CODE report_cfg_nr_s::report_type_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::sym2: - break; - case types::sym6or7: - break; - case types::sl1: - break; - case types::sl2: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)1u)); - break; - case types::sl4: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - case types::sl5: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); - break; - case types::sl8: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); - break; - case types::sl10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::sl16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); - break; - case types::sl20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::sl40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::sl80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::sl160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::sl320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + case types::periodical: + HANDLE_CODE(c.get().pack(bref)); break; - case types::sl640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + case types::event_triggered: + HANDLE_CODE(c.get().pack(bref)); break; + case types::report_cgi: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::report_sftd: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; default: - log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE sched_request_res_cfg_s::periodicity_and_offset_c_::unpack(cbit_ref& bref) +SRSASN_CODE report_cfg_nr_s::report_type_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::sym2: - break; - case types::sym6or7: - break; - case types::sl1: - break; - case types::sl2: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)1u)); - break; - case types::sl4: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - case types::sl5: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); - break; - case types::sl8: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); - break; - case types::sl10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::sl16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::sl20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::sl40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::sl80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::sl160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::sl320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + case types::periodical: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::sl640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + case types::event_triggered: + HANDLE_CODE(c.get().unpack(bref)); break; + case types::report_cgi: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::report_sftd: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; default: - log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string sched_request_res_cfg_s::periodicity_and_offset_c_::types_opts::to_string() const +std::string report_cfg_nr_s::report_type_c_::types_opts::to_string() const { - 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"); + static const char* options[] = {"periodical", "eventTriggered", "reportCGI", "reportSFTD"}; + return convert_enum_idx(options, 4, value, "report_cfg_nr_s::report_type_c_::types"); } -// UCI-OnPUSCH ::= SEQUENCE -SRSASN_CODE uci_on_pusch_s::pack(bit_ref& bref) const +// FreqPriorityEUTRA ::= SEQUENCE +SRSASN_CODE freq_prio_eutra_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(beta_offsets_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_sub_prio_present, 1)); - if (beta_offsets_present) { - HANDLE_CODE(beta_offsets.pack(bref)); + HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(pack_integer(bref, cell_resel_prio, (uint8_t)0u, (uint8_t)7u)); + if (cell_resel_sub_prio_present) { + HANDLE_CODE(cell_resel_sub_prio.pack(bref)); } - HANDLE_CODE(scaling.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE uci_on_pusch_s::unpack(cbit_ref& bref) +SRSASN_CODE freq_prio_eutra_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(beta_offsets_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_sub_prio_present, 1)); - if (beta_offsets_present) { - HANDLE_CODE(beta_offsets.unpack(bref)); + HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(unpack_integer(cell_resel_prio, bref, (uint8_t)0u, (uint8_t)7u)); + if (cell_resel_sub_prio_present) { + HANDLE_CODE(cell_resel_sub_prio.unpack(bref)); } - HANDLE_CODE(scaling.unpack(bref)); return SRSASN_SUCCESS; } -void uci_on_pusch_s::to_json(json_writer& j) const +void freq_prio_eutra_s::to_json(json_writer& j) const { j.start_obj(); - if (beta_offsets_present) { - j.write_fieldname("betaOffsets"); - beta_offsets.to_json(j); + j.write_int("carrierFreq", carrier_freq); + j.write_int("cellReselectionPriority", cell_resel_prio); + if (cell_resel_sub_prio_present) { + j.write_str("cellReselectionSubPriority", cell_resel_sub_prio.to_string()); } - j.write_str("scaling", scaling.to_string()); j.end_obj(); } -void uci_on_pusch_s::beta_offsets_c_::destroy_() +// FreqPriorityNR ::= SEQUENCE +SRSASN_CODE freq_prio_nr_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_resel_sub_prio_present, 1)); + + HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_integer(bref, cell_resel_prio, (uint8_t)0u, (uint8_t)7u)); + if (cell_resel_sub_prio_present) { + HANDLE_CODE(cell_resel_sub_prio.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_nr_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_resel_sub_prio_present, 1)); + + HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_integer(cell_resel_prio, bref, (uint8_t)0u, (uint8_t)7u)); + if (cell_resel_sub_prio_present) { + HANDLE_CODE(cell_resel_sub_prio.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void freq_prio_nr_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + j.write_int("cellReselectionPriority", cell_resel_prio); + if (cell_resel_sub_prio_present) { + j.write_str("cellReselectionSubPriority", cell_resel_sub_prio.to_string()); + } + j.end_obj(); +} + +// GapConfig ::= SEQUENCE +SRSASN_CODE gap_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, gap_offset, (uint8_t)0u, (uint8_t)159u)); + HANDLE_CODE(mgl.pack(bref)); + HANDLE_CODE(mgrp.pack(bref)); + HANDLE_CODE(mgta.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ref_serv_cell_ind_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ref_serv_cell_ind_present, 1)); + if (ref_serv_cell_ind_present) { + HANDLE_CODE(ref_serv_cell_ind.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE gap_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(gap_offset, bref, (uint8_t)0u, (uint8_t)159u)); + HANDLE_CODE(mgl.unpack(bref)); + HANDLE_CODE(mgrp.unpack(bref)); + HANDLE_CODE(mgta.unpack(bref)); + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ref_serv_cell_ind_present, 1)); + if (ref_serv_cell_ind_present) { + HANDLE_CODE(ref_serv_cell_ind.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void gap_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("gapOffset", gap_offset); + j.write_str("mgl", mgl.to_string()); + j.write_str("mgrp", mgrp.to_string()); + j.write_str("mgta", mgta.to_string()); + if (ext) { + if (ref_serv_cell_ind_present) { + j.write_str("refServCellIndicator", ref_serv_cell_ind.to_string()); + } + } + j.end_obj(); +} + +std::string gap_cfg_s::mgl_opts::to_string() const +{ + 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 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 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 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 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 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 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 const char* options[] = {"0", "0.25", "0.5"}; + return convert_enum_idx(options, 3, value, "gap_cfg_s::mgta_e_"); +} + +std::string gap_cfg_s::ref_serv_cell_ind_opts::to_string() const +{ + static const char* options[] = {"pCell", "pSCell", "mcg-FR2"}; + return convert_enum_idx(options, 3, value, "gap_cfg_s::ref_serv_cell_ind_e_"); +} +uint8_t gap_cfg_s::ref_serv_cell_ind_opts::to_number() const +{ + if (value == mcg_fr2) { + return 2; + } + invalid_enum_number(value, "gap_cfg_s::ref_serv_cell_ind_e_"); + return 0; +} + +// MeasGapSharingScheme ::= ENUMERATED +std::string meas_gap_sharing_scheme_opts::to_string() const +{ + 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 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 const char* options[] = {"0.0", "0.1", "1.0", "1.1"}; + return convert_enum_idx(options, 4, value, "meas_gap_sharing_scheme_e"); +} + +// MeasIdToAddMod ::= SEQUENCE +SRSASN_CODE meas_id_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, meas_id, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_integer(bref, meas_obj_id, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_integer(bref, report_cfg_id, (uint8_t)1u, (uint8_t)64u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_id_to_add_mod_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(meas_id, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_integer(meas_obj_id, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_integer(report_cfg_id, bref, (uint8_t)1u, (uint8_t)64u)); + + return SRSASN_SUCCESS; +} +void meas_id_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measId", meas_id); + j.write_int("measObjectId", meas_obj_id); + j.write_int("reportConfigId", report_cfg_id); + j.end_obj(); +} + +// MeasObjectToAddMod ::= SEQUENCE +SRSASN_CODE meas_obj_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, meas_obj_id, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(meas_obj.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_to_add_mod_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(meas_obj_id, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(meas_obj.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_obj_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measObjectId", meas_obj_id); + j.write_fieldname("measObject"); + meas_obj.to_json(j); + j.end_obj(); +} + +void meas_obj_to_add_mod_s::meas_obj_c_::destroy_() { switch (type_) { - case types::dynamic_type: - c.destroy(); + case types::meas_obj_nr: + c.destroy(); break; - case types::semi_static: - c.destroy(); + case types::meas_obj_eutra: + c.destroy(); break; default: break; } } -void uci_on_pusch_s::beta_offsets_c_::set(types::options e) +void meas_obj_to_add_mod_s::meas_obj_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::dynamic_type: - c.init(); + case types::meas_obj_nr: + c.init(); break; - case types::semi_static: - c.init(); + case types::meas_obj_eutra: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); } } -uci_on_pusch_s::beta_offsets_c_::beta_offsets_c_(const uci_on_pusch_s::beta_offsets_c_& other) +meas_obj_to_add_mod_s::meas_obj_c_::meas_obj_c_(const meas_obj_to_add_mod_s::meas_obj_c_& other) { type_ = other.type(); switch (type_) { - case types::dynamic_type: - c.init(other.c.get()); + case types::meas_obj_nr: + c.init(other.c.get()); break; - case types::semi_static: - c.init(other.c.get()); + case types::meas_obj_eutra: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); } } -uci_on_pusch_s::beta_offsets_c_& uci_on_pusch_s::beta_offsets_c_:: - operator=(const uci_on_pusch_s::beta_offsets_c_& other) +meas_obj_to_add_mod_s::meas_obj_c_& +meas_obj_to_add_mod_s::meas_obj_c_::operator=(const meas_obj_to_add_mod_s::meas_obj_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::dynamic_type: - c.set(other.c.get()); + case types::meas_obj_nr: + c.set(other.c.get()); break; - case types::semi_static: - c.set(other.c.get()); + case types::meas_obj_eutra: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); } return *this; } -void uci_on_pusch_s::beta_offsets_c_::to_json(json_writer& j) const +void meas_obj_to_add_mod_s::meas_obj_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::dynamic_type: - j.start_array("dynamic"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::meas_obj_nr: + j.write_fieldname("measObjectNR"); + c.get().to_json(j); break; - case types::semi_static: - j.write_fieldname("semiStatic"); - c.get().to_json(j); + case types::meas_obj_eutra: + j.write_fieldname("measObjectEUTRA"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); } j.end_obj(); } -SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::pack(bit_ref& bref) const +SRSASN_CODE meas_obj_to_add_mod_s::meas_obj_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::dynamic_type: - HANDLE_CODE(pack_fixed_seq_of(bref, &(c.get())[0], c.get().size())); - break; - case types::semi_static: - HANDLE_CODE(c.get().pack(bref)); + case types::meas_obj_nr: + HANDLE_CODE(c.get().pack(bref)); break; + case types::meas_obj_eutra: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::unpack(cbit_ref& bref) +SRSASN_CODE meas_obj_to_add_mod_s::meas_obj_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::dynamic_type: - HANDLE_CODE(unpack_fixed_seq_of(&(c.get())[0], bref, c.get().size())); - break; - case types::semi_static: - HANDLE_CODE(c.get().unpack(bref)); + case types::meas_obj_nr: + HANDLE_CODE(c.get().unpack(bref)); break; + case types::meas_obj_eutra: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string uci_on_pusch_s::beta_offsets_c_::types_opts::to_string() const -{ - 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 +std::string meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_string() const { - static const char* options[] = {"f0p5", "f0p65", "f0p8", "f1"}; - return convert_enum_idx(options, 4, value, "uci_on_pusch_s::scaling_e_"); + static const char* options[] = {"measObjectNR", "measObjectEUTRA"}; + return convert_enum_idx(options, 2, value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); } -// BeamFailureRecoveryConfig ::= SEQUENCE -SRSASN_CODE beam_fail_recovery_cfg_s::pack(bit_ref& bref) const +// OtherConfig-v1540 ::= SEQUENCE +SRSASN_CODE other_cfg_v1540_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(root_seq_idx_bfr_present, 1)); - HANDLE_CODE(bref.pack(rach_cfg_bfr_present, 1)); - HANDLE_CODE(bref.pack(rsrp_thres_ssb_present, 1)); - HANDLE_CODE(bref.pack(candidate_beam_rs_list_present, 1)); - HANDLE_CODE(bref.pack(ssb_per_rach_occasion_present, 1)); - HANDLE_CODE(bref.pack(ra_ssb_occasion_mask_idx_present, 1)); - HANDLE_CODE(bref.pack(recovery_search_space_id_present, 1)); - HANDLE_CODE(bref.pack(ra_prioritization_present, 1)); - HANDLE_CODE(bref.pack(beam_fail_recovery_timer_present, 1)); + HANDLE_CODE(bref.pack(overheat_assist_cfg_present, 1)); - if (root_seq_idx_bfr_present) { - HANDLE_CODE(pack_integer(bref, root_seq_idx_bfr, (uint8_t)0u, (uint8_t)137u)); - } - if (rach_cfg_bfr_present) { - HANDLE_CODE(rach_cfg_bfr.pack(bref)); - } - if (rsrp_thres_ssb_present) { - HANDLE_CODE(pack_integer(bref, rsrp_thres_ssb, (uint8_t)0u, (uint8_t)127u)); - } - if (candidate_beam_rs_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, candidate_beam_rs_list, 1, 16)); - } - if (ssb_per_rach_occasion_present) { - HANDLE_CODE(ssb_per_rach_occasion.pack(bref)); - } - if (ra_ssb_occasion_mask_idx_present) { - HANDLE_CODE(pack_integer(bref, ra_ssb_occasion_mask_idx, (uint8_t)0u, (uint8_t)15u)); - } - if (recovery_search_space_id_present) { - HANDLE_CODE(pack_integer(bref, recovery_search_space_id, (uint8_t)0u, (uint8_t)39u)); - } - if (ra_prioritization_present) { - HANDLE_CODE(ra_prioritization.pack(bref)); - } - if (beam_fail_recovery_timer_present) { - HANDLE_CODE(beam_fail_recovery_timer.pack(bref)); + if (overheat_assist_cfg_present) { + HANDLE_CODE(overheat_assist_cfg.pack(bref)); } - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= msg1_subcarrier_spacing_v1530_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(msg1_subcarrier_spacing_v1530_present, 1)); - if (msg1_subcarrier_spacing_v1530_present) { - HANDLE_CODE(msg1_subcarrier_spacing_v1530.pack(bref)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE beam_fail_recovery_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE other_cfg_v1540_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(root_seq_idx_bfr_present, 1)); - HANDLE_CODE(bref.unpack(rach_cfg_bfr_present, 1)); - HANDLE_CODE(bref.unpack(rsrp_thres_ssb_present, 1)); - HANDLE_CODE(bref.unpack(candidate_beam_rs_list_present, 1)); - HANDLE_CODE(bref.unpack(ssb_per_rach_occasion_present, 1)); - HANDLE_CODE(bref.unpack(ra_ssb_occasion_mask_idx_present, 1)); - HANDLE_CODE(bref.unpack(recovery_search_space_id_present, 1)); - HANDLE_CODE(bref.unpack(ra_prioritization_present, 1)); - HANDLE_CODE(bref.unpack(beam_fail_recovery_timer_present, 1)); + HANDLE_CODE(bref.unpack(overheat_assist_cfg_present, 1)); - if (root_seq_idx_bfr_present) { - HANDLE_CODE(unpack_integer(root_seq_idx_bfr, bref, (uint8_t)0u, (uint8_t)137u)); - } - if (rach_cfg_bfr_present) { - HANDLE_CODE(rach_cfg_bfr.unpack(bref)); - } - if (rsrp_thres_ssb_present) { - HANDLE_CODE(unpack_integer(rsrp_thres_ssb, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (candidate_beam_rs_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(candidate_beam_rs_list, bref, 1, 16)); - } - if (ssb_per_rach_occasion_present) { - HANDLE_CODE(ssb_per_rach_occasion.unpack(bref)); - } - if (ra_ssb_occasion_mask_idx_present) { - HANDLE_CODE(unpack_integer(ra_ssb_occasion_mask_idx, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (recovery_search_space_id_present) { - HANDLE_CODE(unpack_integer(recovery_search_space_id, bref, (uint8_t)0u, (uint8_t)39u)); - } - if (ra_prioritization_present) { - HANDLE_CODE(ra_prioritization.unpack(bref)); - } - if (beam_fail_recovery_timer_present) { - HANDLE_CODE(beam_fail_recovery_timer.unpack(bref)); + if (overheat_assist_cfg_present) { + HANDLE_CODE(overheat_assist_cfg.unpack(bref)); } - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(msg1_subcarrier_spacing_v1530_present, 1)); - if (msg1_subcarrier_spacing_v1530_present) { - HANDLE_CODE(msg1_subcarrier_spacing_v1530.unpack(bref)); - } - } - } return SRSASN_SUCCESS; } -void beam_fail_recovery_cfg_s::to_json(json_writer& j) const +void other_cfg_v1540_s::to_json(json_writer& j) const { j.start_obj(); - if (root_seq_idx_bfr_present) { - j.write_int("rootSequenceIndex-BFR", root_seq_idx_bfr); - } - if (rach_cfg_bfr_present) { - j.write_fieldname("rach-ConfigBFR"); - rach_cfg_bfr.to_json(j); - } - if (rsrp_thres_ssb_present) { - j.write_int("rsrp-ThresholdSSB", rsrp_thres_ssb); - } - if (candidate_beam_rs_list_present) { - j.start_array("candidateBeamRSList"); - for (const auto& e1 : candidate_beam_rs_list) { - e1.to_json(j); - } - j.end_array(); - } - if (ssb_per_rach_occasion_present) { - j.write_str("ssb-perRACH-Occasion", ssb_per_rach_occasion.to_string()); - } - if (ra_ssb_occasion_mask_idx_present) { - j.write_int("ra-ssb-OccasionMaskIndex", ra_ssb_occasion_mask_idx); - } - if (recovery_search_space_id_present) { - j.write_int("recoverySearchSpaceId", recovery_search_space_id); - } - if (ra_prioritization_present) { - j.write_fieldname("ra-Prioritization"); - ra_prioritization.to_json(j); - } - if (beam_fail_recovery_timer_present) { - j.write_str("beamFailureRecoveryTimer", beam_fail_recovery_timer.to_string()); - } - if (ext) { - if (msg1_subcarrier_spacing_v1530_present) { - j.write_str("msg1-SubcarrierSpacing-v1530", msg1_subcarrier_spacing_v1530.to_string()); - } + if (overheat_assist_cfg_present) { + j.write_fieldname("overheatingAssistanceConfig"); + overheat_assist_cfg.to_json(j); } j.end_obj(); } -std::string beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_string() const +// QuantityConfigNR ::= SEQUENCE +SRSASN_CODE quant_cfg_nr_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(bref.pack(quant_cfg_rs_idx_present, 1)); + + HANDLE_CODE(quant_cfg_cell.pack(bref)); + if (quant_cfg_rs_idx_present) { + HANDLE_CODE(quant_cfg_rs_idx.pack(bref)); + } + + return SRSASN_SUCCESS; } -float beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number() const +SRSASN_CODE quant_cfg_nr_s::unpack(cbit_ref& bref) { - 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_"); + HANDLE_CODE(bref.unpack(quant_cfg_rs_idx_present, 1)); + + HANDLE_CODE(quant_cfg_cell.unpack(bref)); + if (quant_cfg_rs_idx_present) { + HANDLE_CODE(quant_cfg_rs_idx.unpack(bref)); + } + + return SRSASN_SUCCESS; } -std::string beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number_string() const +void quant_cfg_nr_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + j.write_fieldname("quantityConfigCell"); + quant_cfg_cell.to_json(j); + if (quant_cfg_rs_idx_present) { + j.write_fieldname("quantityConfigRS-Index"); + quant_cfg_rs_idx.to_json(j); + } + j.end_obj(); } -std::string beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_string() const -{ - 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 +// RAT-Type ::= ENUMERATED +std::string rat_type_opts::to_string() const { - 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_"); + static const char* options[] = {"nr", "eutra-nr", "eutra", "spare1"}; + return convert_enum_idx(options, 4, value, "rat_type_e"); } -// CSI-AssociatedReportConfigInfo ::= SEQUENCE -SRSASN_CODE csi_associated_report_cfg_info_s::pack(bit_ref& bref) const +// RRCReconfiguration-v1560-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_v1560_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(csi_im_res_for_interference_present, 1)); - HANDLE_CODE(bref.pack(nzp_csi_rs_res_for_interference_present, 1)); + HANDLE_CODE(bref.pack(mrdc_secondary_cell_group_cfg_present, 1)); + HANDLE_CODE(bref.pack(radio_bearer_cfg2_present, 1)); + HANDLE_CODE(bref.pack(sk_counter_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(pack_integer(bref, report_cfg_id, (uint8_t)0u, (uint8_t)47u)); - HANDLE_CODE(res_for_ch.pack(bref)); - if (csi_im_res_for_interference_present) { - HANDLE_CODE(pack_integer(bref, csi_im_res_for_interference, (uint8_t)1u, (uint8_t)16u)); + if (mrdc_secondary_cell_group_cfg_present) { + HANDLE_CODE(mrdc_secondary_cell_group_cfg.pack(bref)); } - if (nzp_csi_rs_res_for_interference_present) { - HANDLE_CODE(pack_integer(bref, nzp_csi_rs_res_for_interference, (uint8_t)1u, (uint8_t)16u)); + if (radio_bearer_cfg2_present) { + HANDLE_CODE(radio_bearer_cfg2.pack(bref)); + } + if (sk_counter_present) { + HANDLE_CODE(pack_integer(bref, sk_counter, (uint32_t)0u, (uint32_t)65535u)); } return SRSASN_SUCCESS; } -SRSASN_CODE csi_associated_report_cfg_info_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_recfg_v1560_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(csi_im_res_for_interference_present, 1)); - HANDLE_CODE(bref.unpack(nzp_csi_rs_res_for_interference_present, 1)); + HANDLE_CODE(bref.unpack(mrdc_secondary_cell_group_cfg_present, 1)); + HANDLE_CODE(bref.unpack(radio_bearer_cfg2_present, 1)); + HANDLE_CODE(bref.unpack(sk_counter_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(unpack_integer(report_cfg_id, bref, (uint8_t)0u, (uint8_t)47u)); - HANDLE_CODE(res_for_ch.unpack(bref)); - if (csi_im_res_for_interference_present) { - HANDLE_CODE(unpack_integer(csi_im_res_for_interference, bref, (uint8_t)1u, (uint8_t)16u)); + if (mrdc_secondary_cell_group_cfg_present) { + HANDLE_CODE(mrdc_secondary_cell_group_cfg.unpack(bref)); } - if (nzp_csi_rs_res_for_interference_present) { - HANDLE_CODE(unpack_integer(nzp_csi_rs_res_for_interference, bref, (uint8_t)1u, (uint8_t)16u)); + if (radio_bearer_cfg2_present) { + HANDLE_CODE(radio_bearer_cfg2.unpack(bref)); + } + if (sk_counter_present) { + HANDLE_CODE(unpack_integer(sk_counter, bref, (uint32_t)0u, (uint32_t)65535u)); } return SRSASN_SUCCESS; } -void csi_associated_report_cfg_info_s::to_json(json_writer& j) const +void rrc_recfg_v1560_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("reportConfigId", report_cfg_id); - j.write_fieldname("resourcesForChannel"); - res_for_ch.to_json(j); - if (csi_im_res_for_interference_present) { - j.write_int("csi-IM-ResourcesForInterference", csi_im_res_for_interference); + if (mrdc_secondary_cell_group_cfg_present) { + j.write_fieldname("mrdc-SecondaryCellGroupConfig"); + mrdc_secondary_cell_group_cfg.to_json(j); } - if (nzp_csi_rs_res_for_interference_present) { - j.write_int("nzp-CSI-RS-ResourcesForInterference", nzp_csi_rs_res_for_interference); + if (radio_bearer_cfg2_present) { + j.write_str("radioBearerConfig2", radio_bearer_cfg2.to_string()); + } + if (sk_counter_present) { + j.write_int("sk-Counter", sk_counter); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -void csi_associated_report_cfg_info_s::res_for_ch_c_::destroy_() +// ReportConfigToAddMod ::= SEQUENCE +SRSASN_CODE report_cfg_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, report_cfg_id, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(report_cfg.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_to_add_mod_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(report_cfg_id, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(report_cfg.unpack(bref)); + + return SRSASN_SUCCESS; +} +void report_cfg_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("reportConfigId", report_cfg_id); + j.write_fieldname("reportConfig"); + report_cfg.to_json(j); + j.end_obj(); +} + +void report_cfg_to_add_mod_s::report_cfg_c_::destroy_() { switch (type_) { - case types::nzp_csi_rs: - c.destroy(); + case types::report_cfg_nr: + c.destroy(); + break; + case types::report_cfg_inter_rat: + c.destroy(); break; default: break; } } -void csi_associated_report_cfg_info_s::res_for_ch_c_::set(types::options e) +void report_cfg_to_add_mod_s::report_cfg_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::nzp_csi_rs: - c.init(); + case types::report_cfg_nr: + c.init(); break; - case types::csi_ssb_res_set: + case types::report_cfg_inter_rat: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); } } -csi_associated_report_cfg_info_s::res_for_ch_c_::res_for_ch_c_( - const csi_associated_report_cfg_info_s::res_for_ch_c_& other) +report_cfg_to_add_mod_s::report_cfg_c_::report_cfg_c_(const report_cfg_to_add_mod_s::report_cfg_c_& other) { type_ = other.type(); switch (type_) { - case types::nzp_csi_rs: - c.init(other.c.get()); + case types::report_cfg_nr: + c.init(other.c.get()); break; - case types::csi_ssb_res_set: - c.init(other.c.get()); + case types::report_cfg_inter_rat: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); } } -csi_associated_report_cfg_info_s::res_for_ch_c_& csi_associated_report_cfg_info_s::res_for_ch_c_:: - operator=(const csi_associated_report_cfg_info_s::res_for_ch_c_& other) +report_cfg_to_add_mod_s::report_cfg_c_& +report_cfg_to_add_mod_s::report_cfg_c_::operator=(const report_cfg_to_add_mod_s::report_cfg_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::nzp_csi_rs: - c.set(other.c.get()); + case types::report_cfg_nr: + c.set(other.c.get()); break; - case types::csi_ssb_res_set: - c.set(other.c.get()); + case types::report_cfg_inter_rat: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); } return *this; } -void csi_associated_report_cfg_info_s::res_for_ch_c_::to_json(json_writer& j) const +void report_cfg_to_add_mod_s::report_cfg_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::nzp_csi_rs: - j.write_fieldname("nzp-CSI-RS"); - j.start_obj(); - j.write_int("resourceSet", c.get().res_set); - if (c.get().qcl_info_present) { - j.start_array("qcl-info"); - for (const auto& e1 : c.get().qcl_info) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); + case types::report_cfg_nr: + j.write_fieldname("reportConfigNR"); + c.get().to_json(j); break; - case types::csi_ssb_res_set: - j.write_int("csi-SSB-ResourceSet", c.get()); + case types::report_cfg_inter_rat: + j.write_fieldname("reportConfigInterRAT"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); } j.end_obj(); } -SRSASN_CODE csi_associated_report_cfg_info_s::res_for_ch_c_::pack(bit_ref& bref) const +SRSASN_CODE report_cfg_to_add_mod_s::report_cfg_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::nzp_csi_rs: - HANDLE_CODE(bref.pack(c.get().qcl_info_present, 1)); - HANDLE_CODE(pack_integer(bref, c.get().res_set, (uint8_t)1u, (uint8_t)16u)); - if (c.get().qcl_info_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().qcl_info, 1, 16, integer_packer(0, 127))); - } - break; - case types::csi_ssb_res_set: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)1u)); + case types::report_cfg_nr: + HANDLE_CODE(c.get().pack(bref)); break; + case types::report_cfg_inter_rat: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; default: - log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_associated_report_cfg_info_s::res_for_ch_c_::unpack(cbit_ref& bref) +SRSASN_CODE report_cfg_to_add_mod_s::report_cfg_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::nzp_csi_rs: - HANDLE_CODE(bref.unpack(c.get().qcl_info_present, 1)); - HANDLE_CODE(unpack_integer(c.get().res_set, bref, (uint8_t)1u, (uint8_t)16u)); - if (c.get().qcl_info_present) { - HANDLE_CODE(unpack_dyn_seq_of(c.get().qcl_info, bref, 1, 16, integer_packer(0, 127))); - } - break; - case types::csi_ssb_res_set: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)1u)); + case types::report_cfg_nr: + HANDLE_CODE(c.get().unpack(bref)); break; + case types::report_cfg_inter_rat: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; default: - log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_associated_report_cfg_info_s::res_for_ch_c_::types_opts::to_string() const +std::string report_cfg_to_add_mod_s::report_cfg_c_::types_opts::to_string() const { - 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"); + static const char* options[] = {"reportConfigNR", "reportConfigInterRAT"}; + return convert_enum_idx(options, 2, value, "report_cfg_to_add_mod_s::report_cfg_c_::types"); } -// ConfiguredGrantConfig ::= SEQUENCE -SRSASN_CODE cfgured_grant_cfg_s::pack(bit_ref& bref) const +// CarrierInfoNR ::= SEQUENCE +SRSASN_CODE carrier_info_nr_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_hop_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_transform_precoder_present, 1)); - HANDLE_CODE(bref.pack(uci_on_pusch_present, 1)); - HANDLE_CODE(bref.pack(rbg_size_present, 1)); - HANDLE_CODE(bref.pack(transform_precoder_present, 1)); - HANDLE_CODE(bref.pack(rep_k_rv_present, 1)); - HANDLE_CODE(bref.pack(cfgured_grant_timer_present, 1)); - HANDLE_CODE(bref.pack(rrc_cfgured_ul_grant_present, 1)); + HANDLE_CODE(bref.pack(smtc_present, 1)); - if (freq_hop_present) { - HANDLE_CODE(freq_hop.pack(bref)); - } - HANDLE_CODE(cg_dmrs_cfg.pack(bref)); - if (mcs_table_present) { - HANDLE_CODE(mcs_table.pack(bref)); - } - if (mcs_table_transform_precoder_present) { - HANDLE_CODE(mcs_table_transform_precoder.pack(bref)); - } - if (uci_on_pusch_present) { - HANDLE_CODE(uci_on_pusch.pack(bref)); - } - HANDLE_CODE(res_alloc.pack(bref)); - HANDLE_CODE(pwr_ctrl_loop_to_use.pack(bref)); - HANDLE_CODE(pack_integer(bref, p0_pusch_alpha, (uint8_t)0u, (uint8_t)29u)); - if (transform_precoder_present) { - HANDLE_CODE(transform_precoder.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, nrof_harq_processes, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(rep_k.pack(bref)); - if (rep_k_rv_present) { - HANDLE_CODE(rep_k_rv.pack(bref)); - } - HANDLE_CODE(periodicity.pack(bref)); - if (cfgured_grant_timer_present) { - HANDLE_CODE(pack_integer(bref, cfgured_grant_timer, (uint8_t)1u, (uint8_t)64u)); - } - if (rrc_cfgured_ul_grant_present) { - bref.pack(rrc_cfgured_ul_grant.ext, 1); - HANDLE_CODE(bref.pack(rrc_cfgured_ul_grant.dmrs_seq_initization_present, 1)); - HANDLE_CODE(bref.pack(rrc_cfgured_ul_grant.srs_res_ind_present, 1)); - HANDLE_CODE(bref.pack(rrc_cfgured_ul_grant.freq_hop_offset_present, 1)); - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.time_domain_offset, (uint16_t)0u, (uint16_t)5119u)); - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.time_domain_alloc, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(rrc_cfgured_ul_grant.freq_domain_alloc.pack(bref)); - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.ant_port, (uint8_t)0u, (uint8_t)31u)); - if (rrc_cfgured_ul_grant.dmrs_seq_initization_present) { - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.dmrs_seq_initization, (uint8_t)0u, (uint8_t)1u)); - } - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.precoding_and_nof_layers, (uint8_t)0u, (uint8_t)63u)); - if (rrc_cfgured_ul_grant.srs_res_ind_present) { - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.srs_res_ind, (uint8_t)0u, (uint8_t)15u)); - } - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.mcs_and_tbs, (uint8_t)0u, (uint8_t)31u)); - if (rrc_cfgured_ul_grant.freq_hop_offset_present) { - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.freq_hop_offset, (uint16_t)1u, (uint16_t)274u)); - } - HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.pathloss_ref_idx, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(ssb_subcarrier_spacing.pack(bref)); + if (smtc_present) { + HANDLE_CODE(smtc.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE cfgured_grant_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE carrier_info_nr_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(freq_hop_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_transform_precoder_present, 1)); - HANDLE_CODE(bref.unpack(uci_on_pusch_present, 1)); - HANDLE_CODE(bref.unpack(rbg_size_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoder_present, 1)); - HANDLE_CODE(bref.unpack(rep_k_rv_present, 1)); - HANDLE_CODE(bref.unpack(cfgured_grant_timer_present, 1)); - HANDLE_CODE(bref.unpack(rrc_cfgured_ul_grant_present, 1)); + HANDLE_CODE(bref.unpack(smtc_present, 1)); - if (freq_hop_present) { - HANDLE_CODE(freq_hop.unpack(bref)); - } - HANDLE_CODE(cg_dmrs_cfg.unpack(bref)); - if (mcs_table_present) { - HANDLE_CODE(mcs_table.unpack(bref)); - } - if (mcs_table_transform_precoder_present) { - HANDLE_CODE(mcs_table_transform_precoder.unpack(bref)); - } - if (uci_on_pusch_present) { - HANDLE_CODE(uci_on_pusch.unpack(bref)); - } - HANDLE_CODE(res_alloc.unpack(bref)); - HANDLE_CODE(pwr_ctrl_loop_to_use.unpack(bref)); - HANDLE_CODE(unpack_integer(p0_pusch_alpha, bref, (uint8_t)0u, (uint8_t)29u)); - if (transform_precoder_present) { - HANDLE_CODE(transform_precoder.unpack(bref)); - } - HANDLE_CODE(unpack_integer(nrof_harq_processes, bref, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(rep_k.unpack(bref)); - if (rep_k_rv_present) { - HANDLE_CODE(rep_k_rv.unpack(bref)); - } - HANDLE_CODE(periodicity.unpack(bref)); - if (cfgured_grant_timer_present) { - HANDLE_CODE(unpack_integer(cfgured_grant_timer, bref, (uint8_t)1u, (uint8_t)64u)); - } - if (rrc_cfgured_ul_grant_present) { - bref.unpack(rrc_cfgured_ul_grant.ext, 1); - HANDLE_CODE(bref.unpack(rrc_cfgured_ul_grant.dmrs_seq_initization_present, 1)); - HANDLE_CODE(bref.unpack(rrc_cfgured_ul_grant.srs_res_ind_present, 1)); - HANDLE_CODE(bref.unpack(rrc_cfgured_ul_grant.freq_hop_offset_present, 1)); - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.time_domain_offset, bref, (uint16_t)0u, (uint16_t)5119u)); - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.time_domain_alloc, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(rrc_cfgured_ul_grant.freq_domain_alloc.unpack(bref)); - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.ant_port, bref, (uint8_t)0u, (uint8_t)31u)); - if (rrc_cfgured_ul_grant.dmrs_seq_initization_present) { - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.dmrs_seq_initization, bref, (uint8_t)0u, (uint8_t)1u)); - } - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.precoding_and_nof_layers, bref, (uint8_t)0u, (uint8_t)63u)); - if (rrc_cfgured_ul_grant.srs_res_ind_present) { - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.srs_res_ind, bref, (uint8_t)0u, (uint8_t)15u)); - } - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.mcs_and_tbs, bref, (uint8_t)0u, (uint8_t)31u)); - if (rrc_cfgured_ul_grant.freq_hop_offset_present) { - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.freq_hop_offset, bref, (uint16_t)1u, (uint16_t)274u)); - } - HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.pathloss_ref_idx, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(ssb_subcarrier_spacing.unpack(bref)); + if (smtc_present) { + HANDLE_CODE(smtc.unpack(bref)); } return SRSASN_SUCCESS; } -void cfgured_grant_cfg_s::to_json(json_writer& j) const +void carrier_info_nr_s::to_json(json_writer& j) const { j.start_obj(); - if (freq_hop_present) { - j.write_str("frequencyHopping", freq_hop.to_string()); - } - j.write_fieldname("cg-DMRS-Configuration"); - cg_dmrs_cfg.to_json(j); - if (mcs_table_present) { - j.write_str("mcs-Table", mcs_table.to_string()); - } - if (mcs_table_transform_precoder_present) { - j.write_str("mcs-TableTransformPrecoder", mcs_table_transform_precoder.to_string()); - } - if (uci_on_pusch_present) { - j.write_fieldname("uci-OnPUSCH"); - uci_on_pusch.to_json(j); - } - j.write_str("resourceAllocation", res_alloc.to_string()); - if (rbg_size_present) { - j.write_str("rbg-Size", "config2"); - } - j.write_str("powerControlLoopToUse", pwr_ctrl_loop_to_use.to_string()); - j.write_int("p0-PUSCH-Alpha", p0_pusch_alpha); - if (transform_precoder_present) { - j.write_str("transformPrecoder", transform_precoder.to_string()); - } - j.write_int("nrofHARQ-Processes", nrof_harq_processes); - j.write_str("repK", rep_k.to_string()); - if (rep_k_rv_present) { - j.write_str("repK-RV", rep_k_rv.to_string()); - } - j.write_str("periodicity", periodicity.to_string()); - if (cfgured_grant_timer_present) { - j.write_int("configuredGrantTimer", cfgured_grant_timer); - } - if (rrc_cfgured_ul_grant_present) { - j.write_fieldname("rrc-ConfiguredUplinkGrant"); - j.start_obj(); - j.write_int("timeDomainOffset", rrc_cfgured_ul_grant.time_domain_offset); - j.write_int("timeDomainAllocation", rrc_cfgured_ul_grant.time_domain_alloc); - j.write_str("frequencyDomainAllocation", rrc_cfgured_ul_grant.freq_domain_alloc.to_string()); - j.write_int("antennaPort", rrc_cfgured_ul_grant.ant_port); - if (rrc_cfgured_ul_grant.dmrs_seq_initization_present) { - j.write_int("dmrs-SeqInitialization", rrc_cfgured_ul_grant.dmrs_seq_initization); - } - j.write_int("precodingAndNumberOfLayers", rrc_cfgured_ul_grant.precoding_and_nof_layers); - if (rrc_cfgured_ul_grant.srs_res_ind_present) { - j.write_int("srs-ResourceIndicator", rrc_cfgured_ul_grant.srs_res_ind); - } - j.write_int("mcsAndTBS", rrc_cfgured_ul_grant.mcs_and_tbs); - if (rrc_cfgured_ul_grant.freq_hop_offset_present) { - j.write_int("frequencyHoppingOffset", rrc_cfgured_ul_grant.freq_hop_offset); - } - j.write_int("pathlossReferenceIndex", rrc_cfgured_ul_grant.pathloss_ref_idx); - j.end_obj(); + j.write_int("carrierFreq", carrier_freq); + j.write_str("ssbSubcarrierSpacing", ssb_subcarrier_spacing.to_string()); + if (smtc_present) { + j.write_fieldname("smtc"); + smtc.to_json(j); } j.end_obj(); } -std::string cfgured_grant_cfg_s::freq_hop_opts::to_string() const -{ - 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 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 +// DRB-CountMSB-Info ::= SEQUENCE +SRSASN_CODE drb_count_msb_info_s::pack(bit_ref& bref) const { - static const uint16_t options[] = {256, 64}; - return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::mcs_table_e_"); -} + HANDLE_CODE(pack_integer(bref, drb_id, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pack_integer(bref, count_msb_ul, (uint32_t)0u, (uint32_t)33554431u)); + HANDLE_CODE(pack_integer(bref, count_msb_dl, (uint32_t)0u, (uint32_t)33554431u)); -std::string cfgured_grant_cfg_s::mcs_table_transform_precoder_opts::to_string() const -{ - static const char* options[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::mcs_table_transform_precoder_e_"); + return SRSASN_SUCCESS; } -uint16_t cfgured_grant_cfg_s::mcs_table_transform_precoder_opts::to_number() const +SRSASN_CODE drb_count_msb_info_s::unpack(cbit_ref& bref) { - static const uint16_t options[] = {256, 64}; - return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::mcs_table_transform_precoder_e_"); -} + HANDLE_CODE(unpack_integer(drb_id, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(unpack_integer(count_msb_ul, bref, (uint32_t)0u, (uint32_t)33554431u)); + HANDLE_CODE(unpack_integer(count_msb_dl, bref, (uint32_t)0u, (uint32_t)33554431u)); -std::string cfgured_grant_cfg_s::res_alloc_opts::to_string() const -{ - static const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; - return convert_enum_idx(options, 3, value, "cfgured_grant_cfg_s::res_alloc_e_"); + return SRSASN_SUCCESS; } -uint8_t cfgured_grant_cfg_s::res_alloc_opts::to_number() const +void drb_count_msb_info_s::to_json(json_writer& j) const { - static const uint8_t options[] = {0, 1}; - return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::res_alloc_e_"); + j.start_obj(); + j.write_int("drb-Identity", drb_id); + j.write_int("countMSB-Uplink", count_msb_ul); + j.write_int("countMSB-Downlink", count_msb_dl); + j.end_obj(); } -std::string cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_string() const -{ - 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 +// MasterKeyUpdate ::= SEQUENCE +SRSASN_CODE master_key_upd_s::pack(bit_ref& bref) const { - static const uint8_t options[] = {0, 1}; - return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(nas_container_present, 1)); -std::string cfgured_grant_cfg_s::transform_precoder_opts::to_string() const -{ - static const char* options[] = {"enabled", "disabled"}; - return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::transform_precoder_e_"); -} + HANDLE_CODE(bref.pack(key_set_change_ind, 1)); + HANDLE_CODE(pack_integer(bref, next_hop_chaining_count, (uint8_t)0u, (uint8_t)7u)); + if (nas_container_present) { + HANDLE_CODE(nas_container.pack(bref)); + } -std::string cfgured_grant_cfg_s::rep_k_opts::to_string() const -{ - static const char* options[] = {"n1", "n2", "n4", "n8"}; - return convert_enum_idx(options, 4, value, "cfgured_grant_cfg_s::rep_k_e_"); + return SRSASN_SUCCESS; } -uint8_t cfgured_grant_cfg_s::rep_k_opts::to_number() const +SRSASN_CODE master_key_upd_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {1, 2, 4, 8}; - return map_enum_number(options, 4, value, "cfgured_grant_cfg_s::rep_k_e_"); -} + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(nas_container_present, 1)); -std::string cfgured_grant_cfg_s::rep_k_rv_opts::to_string() const -{ - 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 const uint8_t options[] = {1, 2, 3}; - return map_enum_number(options, 3, value, "cfgured_grant_cfg_s::rep_k_rv_e_"); -} + HANDLE_CODE(bref.unpack(key_set_change_ind, 1)); + HANDLE_CODE(unpack_integer(next_hop_chaining_count, bref, (uint8_t)0u, (uint8_t)7u)); + if (nas_container_present) { + HANDLE_CODE(nas_container.unpack(bref)); + } -std::string cfgured_grant_cfg_s::periodicity_opts::to_string() const + return SRSASN_SUCCESS; +} +void master_key_upd_s::to_json(json_writer& j) const { - 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", - "sym6", "sym1x12", "sym2x12", "sym4x12", "sym5x12", "sym8x12", "sym10x12", "sym16x12", - "sym20x12", "sym32x12", "sym40x12", "sym64x12", "sym80x12", "sym128x12", "sym160x12", "sym256x12", - "sym320x12", "sym512x12", "sym640x12", "sym1280x12", "sym2560x12"}; - return convert_enum_idx(options, 45, value, "cfgured_grant_cfg_s::periodicity_e_"); + j.start_obj(); + j.write_bool("keySetChangeIndicator", key_set_change_ind); + j.write_int("nextHopChainingCount", next_hop_chaining_count); + if (nas_container_present) { + j.write_str("nas-Container", nas_container.to_string()); + } + j.end_obj(); } -// DMRS-DownlinkConfig ::= SEQUENCE -SRSASN_CODE dmrs_dl_cfg_s::pack(bit_ref& bref) const +// MeasGapConfig ::= SEQUENCE +SRSASN_CODE meas_gap_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(dmrs_type_present, 1)); - HANDLE_CODE(bref.pack(dmrs_add_position_present, 1)); - HANDLE_CODE(bref.pack(max_len_present, 1)); - HANDLE_CODE(bref.pack(scrambling_id0_present, 1)); - HANDLE_CODE(bref.pack(scrambling_id1_present, 1)); - HANDLE_CODE(bref.pack(phase_tracking_rs_present, 1)); + HANDLE_CODE(bref.pack(gap_fr2_present, 1)); - if (dmrs_add_position_present) { - HANDLE_CODE(dmrs_add_position.pack(bref)); - } - if (scrambling_id0_present) { - HANDLE_CODE(pack_integer(bref, scrambling_id0, (uint32_t)0u, (uint32_t)65535u)); - } - if (scrambling_id1_present) { - HANDLE_CODE(pack_integer(bref, scrambling_id1, (uint32_t)0u, (uint32_t)65535u)); - } - if (phase_tracking_rs_present) { - HANDLE_CODE(phase_tracking_rs.pack(bref)); + if (gap_fr2_present) { + HANDLE_CODE(gap_fr2.pack(bref)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= gap_fr1.is_present(); + group_flags[0] |= gap_ue.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(gap_fr1.is_present(), 1)); + HANDLE_CODE(bref.pack(gap_ue.is_present(), 1)); + if (gap_fr1.is_present()) { + HANDLE_CODE(gap_fr1->pack(bref)); + } + if (gap_ue.is_present()) { + HANDLE_CODE(gap_ue->pack(bref)); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE dmrs_dl_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_gap_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(dmrs_type_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_add_position_present, 1)); - HANDLE_CODE(bref.unpack(max_len_present, 1)); - HANDLE_CODE(bref.unpack(scrambling_id0_present, 1)); - HANDLE_CODE(bref.unpack(scrambling_id1_present, 1)); - HANDLE_CODE(bref.unpack(phase_tracking_rs_present, 1)); + HANDLE_CODE(bref.unpack(gap_fr2_present, 1)); - if (dmrs_add_position_present) { - HANDLE_CODE(dmrs_add_position.unpack(bref)); - } - if (scrambling_id0_present) { - HANDLE_CODE(unpack_integer(scrambling_id0, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (scrambling_id1_present) { - HANDLE_CODE(unpack_integer(scrambling_id1, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (phase_tracking_rs_present) { - HANDLE_CODE(phase_tracking_rs.unpack(bref)); + if (gap_fr2_present) { + HANDLE_CODE(gap_fr2.unpack(bref)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool gap_fr1_present; + HANDLE_CODE(bref.unpack(gap_fr1_present, 1)); + gap_fr1.set_present(gap_fr1_present); + bool gap_ue_present; + HANDLE_CODE(bref.unpack(gap_ue_present, 1)); + gap_ue.set_present(gap_ue_present); + if (gap_fr1.is_present()) { + HANDLE_CODE(gap_fr1->unpack(bref)); + } + if (gap_ue.is_present()) { + HANDLE_CODE(gap_ue->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } -void dmrs_dl_cfg_s::to_json(json_writer& j) const +void meas_gap_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (dmrs_type_present) { - j.write_str("dmrs-Type", "type2"); - } - if (dmrs_add_position_present) { - j.write_str("dmrs-AdditionalPosition", dmrs_add_position.to_string()); - } - if (max_len_present) { - j.write_str("maxLength", "len2"); - } - if (scrambling_id0_present) { - j.write_int("scramblingID0", scrambling_id0); - } - if (scrambling_id1_present) { - j.write_int("scramblingID1", scrambling_id1); + if (gap_fr2_present) { + j.write_fieldname("gapFR2"); + gap_fr2.to_json(j); } - if (phase_tracking_rs_present) { - j.write_fieldname("phaseTrackingRS"); - phase_tracking_rs.to_json(j); + if (ext) { + if (gap_fr1.is_present()) { + j.write_fieldname("gapFR1"); + gap_fr1->to_json(j); + } + if (gap_ue.is_present()) { + j.write_fieldname("gapUE"); + gap_ue->to_json(j); + } } j.end_obj(); } -std::string dmrs_dl_cfg_s::dmrs_add_position_opts::to_string() const -{ - 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 const uint8_t options[] = {0, 1, 3}; - return map_enum_number(options, 3, value, "dmrs_dl_cfg_s::dmrs_add_position_e_"); -} - -// DownlinkPreemption ::= SEQUENCE -SRSASN_CODE dl_preemption_s::pack(bit_ref& bref) const +// MeasGapSharingConfig ::= SEQUENCE +SRSASN_CODE meas_gap_sharing_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, int_rnti, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(time_freq_set.pack(bref)); - HANDLE_CODE(pack_integer(bref, dci_payload_size, (uint8_t)0u, (uint8_t)126u)); - HANDLE_CODE(pack_dyn_seq_of(bref, int_cfg_per_serving_cell, 1, 32)); + HANDLE_CODE(bref.pack(gap_sharing_fr2_present, 1)); + + if (gap_sharing_fr2_present) { + HANDLE_CODE(gap_sharing_fr2.pack(bref)); + } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= gap_sharing_fr1.is_present(); + group_flags[0] |= gap_sharing_ue.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(gap_sharing_fr1.is_present(), 1)); + HANDLE_CODE(bref.pack(gap_sharing_ue.is_present(), 1)); + if (gap_sharing_fr1.is_present()) { + HANDLE_CODE(gap_sharing_fr1->pack(bref)); + } + if (gap_sharing_ue.is_present()) { + HANDLE_CODE(gap_sharing_ue->pack(bref)); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE dl_preemption_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_gap_sharing_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(int_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(time_freq_set.unpack(bref)); - HANDLE_CODE(unpack_integer(dci_payload_size, bref, (uint8_t)0u, (uint8_t)126u)); - HANDLE_CODE(unpack_dyn_seq_of(int_cfg_per_serving_cell, bref, 1, 32)); + HANDLE_CODE(bref.unpack(gap_sharing_fr2_present, 1)); + + if (gap_sharing_fr2_present) { + HANDLE_CODE(gap_sharing_fr2.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + bool gap_sharing_fr1_present; + HANDLE_CODE(bref.unpack(gap_sharing_fr1_present, 1)); + gap_sharing_fr1.set_present(gap_sharing_fr1_present); + bool gap_sharing_ue_present; + HANDLE_CODE(bref.unpack(gap_sharing_ue_present, 1)); + gap_sharing_ue.set_present(gap_sharing_ue_present); + if (gap_sharing_fr1.is_present()) { + HANDLE_CODE(gap_sharing_fr1->unpack(bref)); + } + if (gap_sharing_ue.is_present()) { + HANDLE_CODE(gap_sharing_ue->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } -void dl_preemption_s::to_json(json_writer& j) const +void meas_gap_sharing_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("int-RNTI", int_rnti); - j.write_str("timeFrequencySet", time_freq_set.to_string()); - j.write_int("dci-PayloadSize", dci_payload_size); - j.start_array("int-ConfigurationPerServingCell"); - for (const auto& e1 : int_cfg_per_serving_cell) { - e1.to_json(j); + if (gap_sharing_fr2_present) { + j.write_fieldname("gapSharingFR2"); + gap_sharing_fr2.to_json(j); + } + if (ext) { + if (gap_sharing_fr1.is_present()) { + j.write_fieldname("gapSharingFR1"); + gap_sharing_fr1->to_json(j); + } + if (gap_sharing_ue.is_present()) { + j.write_fieldname("gapSharingUE"); + gap_sharing_ue->to_json(j); + } } - j.end_array(); j.end_obj(); } -std::string dl_preemption_s::time_freq_set_opts::to_string() const -{ - 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 const uint8_t options[] = {0, 1}; - return map_enum_number(options, 2, value, "dl_preemption_s::time_freq_set_e_"); -} - -// EUTRA-MBSFN-SubframeConfig ::= SEQUENCE -SRSASN_CODE eutra_mbsfn_sf_cfg_s::pack(bit_ref& bref) const +// OtherConfig ::= SEQUENCE +SRSASN_CODE other_cfg_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sf_alloc2_present, 1)); + HANDLE_CODE(bref.pack(delay_budget_report_cfg_present, 1)); - HANDLE_CODE(radioframe_alloc_period.pack(bref)); - HANDLE_CODE(pack_integer(bref, radioframe_alloc_offset, (uint8_t)0u, (uint8_t)7u)); - HANDLE_CODE(sf_alloc1.pack(bref)); - if (sf_alloc2_present) { - HANDLE_CODE(sf_alloc2.pack(bref)); + if (delay_budget_report_cfg_present) { + HANDLE_CODE(delay_budget_report_cfg.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE eutra_mbsfn_sf_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE other_cfg_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sf_alloc2_present, 1)); + HANDLE_CODE(bref.unpack(delay_budget_report_cfg_present, 1)); - HANDLE_CODE(radioframe_alloc_period.unpack(bref)); - HANDLE_CODE(unpack_integer(radioframe_alloc_offset, bref, (uint8_t)0u, (uint8_t)7u)); - HANDLE_CODE(sf_alloc1.unpack(bref)); - if (sf_alloc2_present) { - HANDLE_CODE(sf_alloc2.unpack(bref)); + if (delay_budget_report_cfg_present) { + HANDLE_CODE(delay_budget_report_cfg.unpack(bref)); } return SRSASN_SUCCESS; } -void eutra_mbsfn_sf_cfg_s::to_json(json_writer& j) const +void other_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("radioframeAllocationPeriod", radioframe_alloc_period.to_string()); - j.write_int("radioframeAllocationOffset", radioframe_alloc_offset); - j.write_fieldname("subframeAllocation1"); - sf_alloc1.to_json(j); - if (sf_alloc2_present) { - j.write_fieldname("subframeAllocation2"); - sf_alloc2.to_json(j); + if (delay_budget_report_cfg_present) { + j.write_fieldname("delayBudgetReportingConfig"); + delay_budget_report_cfg.to_json(j); } j.end_obj(); } -std::string eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_string() const -{ - 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 +void other_cfg_s::delay_budget_report_cfg_c_::set(types::options 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_"); + type_ = e; } - -void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::destroy_() +void other_cfg_s::delay_budget_report_cfg_c_::to_json(json_writer& j) const { + j.start_obj(); switch (type_) { - case types::one_frame: - c.destroy >(); + case types::release: break; - case types::four_frames: - c.destroy >(); + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_str("delayBudgetReportingProhibitTimer", c.delay_budget_report_prohibit_timer.to_string()); + j.end_obj(); break; default: - break; + log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); } + j.end_obj(); } -void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::set(types::options e) +SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::pack(bit_ref& bref) const { - destroy_(); - type_ = e; + type_.pack(bref); switch (type_) { - case types::one_frame: - c.init >(); - break; - case types::four_frames: - c.init >(); + case types::release: break; - case types::nulltype: + case types::setup: + HANDLE_CODE(c.delay_budget_report_prohibit_timer.pack(bref)); break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); + log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } + return SRSASN_SUCCESS; } -eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::sf_alloc1_c_(const eutra_mbsfn_sf_cfg_s::sf_alloc1_c_& other) +SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::unpack(cbit_ref& bref) { - type_ = other.type(); + types e; + e.unpack(bref); + set(e); switch (type_) { - case types::one_frame: - c.init(other.c.get >()); - break; - case types::four_frames: - c.init(other.c.get >()); + case types::release: break; - case types::nulltype: + case types::setup: + HANDLE_CODE(c.delay_budget_report_prohibit_timer.unpack(bref)); break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); + log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); + return SRSASN_ERROR_DECODE_FAIL; } + return SRSASN_SUCCESS; } -eutra_mbsfn_sf_cfg_s::sf_alloc1_c_& eutra_mbsfn_sf_cfg_s::sf_alloc1_c_:: - operator=(const eutra_mbsfn_sf_cfg_s::sf_alloc1_c_& other) + +std::string +other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_string() const { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::one_frame: - c.set(other.c.get >()); - break; - case types::four_frames: - c.set(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); - } + 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 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 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_"); +} - return *this; +std::string other_cfg_s::delay_budget_report_cfg_c_::types_opts::to_string() const +{ + static const char* options[] = {"release", "setup"}; + return convert_enum_idx(options, 2, value, "other_cfg_s::delay_budget_report_cfg_c_::types"); } -void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::to_json(json_writer& j) const + +// PeriodicRNAU-TimerValue ::= ENUMERATED +std::string periodic_rnau_timer_value_opts::to_string() const { - j.start_obj(); - switch (type_) { - case types::one_frame: - j.write_str("oneFrame", c.get >().to_string()); - break; - case types::four_frames: - j.write_str("fourFrames", c.get >().to_string()); - break; - default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); - } - j.end_obj(); + static const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min360", "min720"}; + return convert_enum_idx(options, 8, value, "periodic_rnau_timer_value_e"); } -SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::pack(bit_ref& bref) const +uint16_t periodic_rnau_timer_value_opts::to_number() const { - type_.pack(bref); - switch (type_) { - case types::one_frame: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::four_frames: - HANDLE_CODE(c.get >().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + 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"); } -SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::unpack(cbit_ref& bref) + +// QuantityConfig ::= SEQUENCE +SRSASN_CODE quant_cfg_s::pack(bit_ref& bref) const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::one_frame: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::four_frames: - HANDLE_CODE(c.get >().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); - return SRSASN_ERROR_DECODE_FAIL; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(quant_cfg_nr_list_present, 1)); + + if (quant_cfg_nr_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, quant_cfg_nr_list, 1, 2)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= quant_cfg_eutra.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(quant_cfg_eutra.is_present(), 1)); + if (quant_cfg_eutra.is_present()) { + HANDLE_CODE(quant_cfg_eutra->pack(bref)); + } + } } return SRSASN_SUCCESS; } - -std::string eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_string() const +SRSASN_CODE quant_cfg_s::unpack(cbit_ref& bref) { - static const char* options[] = {"oneFrame", "fourFrames"}; - return convert_enum_idx(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(quant_cfg_nr_list_present, 1)); + + if (quant_cfg_nr_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(quant_cfg_nr_list, bref, 1, 2)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool quant_cfg_eutra_present; + HANDLE_CODE(bref.unpack(quant_cfg_eutra_present, 1)); + quant_cfg_eutra.set_present(quant_cfg_eutra_present); + if (quant_cfg_eutra.is_present()) { + HANDLE_CODE(quant_cfg_eutra->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; } -uint8_t eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_number() const +void quant_cfg_s::to_json(json_writer& j) const { - static const uint8_t options[] = {1, 4}; - return map_enum_number(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); + j.start_obj(); + if (quant_cfg_nr_list_present) { + j.start_array("quantityConfigNR-List"); + for (const auto& e1 : quant_cfg_nr_list) { + e1.to_json(j); + } + j.end_array(); + } + if (ext) { + if (quant_cfg_eutra.is_present()) { + j.write_fieldname("quantityConfigEUTRA"); + quant_cfg_eutra->to_json(j); + } + } + j.end_obj(); } -void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::destroy_() +// RAN-NotificationAreaInfo ::= CHOICE +void ran_notif_area_info_c::destroy_() { switch (type_) { - case types::one_frame: - c.destroy >(); + case types::cell_list: + c.destroy(); break; - case types::four_frames: - c.destroy >(); + case types::ran_area_cfg_list: + c.destroy(); break; default: break; } } -void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::set(types::options e) +void ran_notif_area_info_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::one_frame: - c.init >(); + case types::cell_list: + c.init(); break; - case types::four_frames: - c.init >(); + case types::ran_area_cfg_list: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); + log_invalid_choice_id(type_, "ran_notif_area_info_c"); } } -eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::sf_alloc2_c_(const eutra_mbsfn_sf_cfg_s::sf_alloc2_c_& other) +ran_notif_area_info_c::ran_notif_area_info_c(const ran_notif_area_info_c& other) { type_ = other.type(); switch (type_) { - case types::one_frame: - c.init(other.c.get >()); + case types::cell_list: + c.init(other.c.get()); break; - case types::four_frames: - c.init(other.c.get >()); + case types::ran_area_cfg_list: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); + log_invalid_choice_id(type_, "ran_notif_area_info_c"); } } -eutra_mbsfn_sf_cfg_s::sf_alloc2_c_& eutra_mbsfn_sf_cfg_s::sf_alloc2_c_:: - operator=(const eutra_mbsfn_sf_cfg_s::sf_alloc2_c_& other) +ran_notif_area_info_c& ran_notif_area_info_c::operator=(const ran_notif_area_info_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::one_frame: - c.set(other.c.get >()); + case types::cell_list: + c.set(other.c.get()); break; - case types::four_frames: - c.set(other.c.get >()); + case types::ran_area_cfg_list: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); + log_invalid_choice_id(type_, "ran_notif_area_info_c"); } return *this; } -void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::to_json(json_writer& j) const +void ran_notif_area_info_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::one_frame: - j.write_str("oneFrame", c.get >().to_string()); + case types::cell_list: + j.start_array("cellList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); break; - case types::four_frames: - j.write_str("fourFrames", c.get >().to_string()); + case types::ran_area_cfg_list: + j.start_array("ran-AreaConfigList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); + log_invalid_choice_id(type_, "ran_notif_area_info_c"); } j.end_obj(); } -SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::pack(bit_ref& bref) const +SRSASN_CODE ran_notif_area_info_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::one_frame: - HANDLE_CODE(c.get >().pack(bref)); + case types::cell_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); break; - case types::four_frames: - HANDLE_CODE(c.get >().pack(bref)); + case types::ran_area_cfg_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); + log_invalid_choice_id(type_, "ran_notif_area_info_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::unpack(cbit_ref& bref) +SRSASN_CODE ran_notif_area_info_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::one_frame: - HANDLE_CODE(c.get >().unpack(bref)); + case types::cell_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); break; - case types::four_frames: - HANDLE_CODE(c.get >().unpack(bref)); + case types::ran_area_cfg_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); + log_invalid_choice_id(type_, "ran_notif_area_info_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types_opts::to_string() const -{ - 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 +std::string ran_notif_area_info_c::types_opts::to_string() const { - static const uint8_t options[] = {1, 4}; - return map_enum_number(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types"); + static const char* options[] = {"cellList", "ran-AreaConfigList"}; + return convert_enum_idx(options, 2, value, "ran_notif_area_info_c::types"); } -// PUCCH-Config ::= SEQUENCE -SRSASN_CODE pucch_cfg_s::pack(bit_ref& bref) const +// RRCReconfiguration-v1540-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_v1540_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(res_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(format1_present, 1)); - HANDLE_CODE(bref.pack(format2_present, 1)); - HANDLE_CODE(bref.pack(format3_present, 1)); - HANDLE_CODE(bref.pack(format4_present, 1)); - HANDLE_CODE(bref.pack(sched_request_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(sched_request_res_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(multi_csi_pucch_res_list_present, 1)); - HANDLE_CODE(bref.pack(dl_data_to_ul_ack_present, 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(pucch_pwr_ctrl_present, 1)); + HANDLE_CODE(bref.pack(other_cfg_v1540_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (res_set_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_set_to_add_mod_list, 1, 4)); - } - if (res_set_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_set_to_release_list, 1, 4, integer_packer(0, 3))); - } - if (res_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_to_add_mod_list, 1, 128)); - } - if (res_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_to_release_list, 1, 128, integer_packer(0, 127))); - } - if (format1_present) { - HANDLE_CODE(format1.pack(bref)); + if (other_cfg_v1540_present) { + HANDLE_CODE(other_cfg_v1540.pack(bref)); } - if (format2_present) { - HANDLE_CODE(format2.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } - if (format3_present) { - HANDLE_CODE(format3.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_v1540_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(other_cfg_v1540_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (other_cfg_v1540_present) { + HANDLE_CODE(other_cfg_v1540.unpack(bref)); } - if (format4_present) { - HANDLE_CODE(format4.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } - if (sched_request_res_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_res_to_add_mod_list, 1, 8)); + + return SRSASN_SUCCESS; +} +void rrc_recfg_v1540_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (other_cfg_v1540_present) { + j.write_fieldname("otherConfig-v1540"); + other_cfg_v1540.to_json(j); } - if (sched_request_res_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_res_to_release_list, 1, 8, integer_packer(1, 8))); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } - if (multi_csi_pucch_res_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, multi_csi_pucch_res_list, 1, 2, integer_packer(0, 127))); + j.end_obj(); +} + +// RedirectedCarrierInfo-EUTRA ::= SEQUENCE +SRSASN_CODE redirected_carrier_info_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cn_type_present, 1)); + + HANDLE_CODE(pack_integer(bref, eutra_freq, (uint32_t)0u, (uint32_t)262143u)); + if (cn_type_present) { + HANDLE_CODE(cn_type.pack(bref)); } - if (dl_data_to_ul_ack_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, dl_data_to_ul_ack, 1, 8, integer_packer(0, 15))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE redirected_carrier_info_eutra_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cn_type_present, 1)); + + HANDLE_CODE(unpack_integer(eutra_freq, bref, (uint32_t)0u, (uint32_t)262143u)); + if (cn_type_present) { + HANDLE_CODE(cn_type.unpack(bref)); } - if (spatial_relation_info_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, spatial_relation_info_to_add_mod_list, 1, 8)); + + return SRSASN_SUCCESS; +} +void redirected_carrier_info_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("eutraFrequency", eutra_freq); + if (cn_type_present) { + j.write_str("cnType", cn_type.to_string()); } - if (spatial_relation_info_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, spatial_relation_info_to_release_list, 1, 8, integer_packer(1, 8))); + j.end_obj(); +} + +std::string redirected_carrier_info_eutra_s::cn_type_opts::to_string() const +{ + 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 +{ + if (value == five_gc) { + return 5; } - if (pucch_pwr_ctrl_present) { - HANDLE_CODE(pucch_pwr_ctrl.pack(bref)); + invalid_enum_number(value, "redirected_carrier_info_eutra_s::cn_type_e_"); + return 0; +} + +// UE-CapabilityRAT-Request ::= SEQUENCE +SRSASN_CODE ue_cap_rat_request_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cap_request_filt_present, 1)); + + HANDLE_CODE(rat_type.pack(bref)); + if (cap_request_filt_present) { + HANDLE_CODE(cap_request_filt.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE pucch_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_rat_request_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(res_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(format1_present, 1)); - HANDLE_CODE(bref.unpack(format2_present, 1)); - HANDLE_CODE(bref.unpack(format3_present, 1)); - HANDLE_CODE(bref.unpack(format4_present, 1)); - HANDLE_CODE(bref.unpack(sched_request_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(sched_request_res_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(multi_csi_pucch_res_list_present, 1)); - HANDLE_CODE(bref.unpack(dl_data_to_ul_ack_present, 1)); - HANDLE_CODE(bref.unpack(spatial_relation_info_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(spatial_relation_info_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(pucch_pwr_ctrl_present, 1)); + HANDLE_CODE(bref.unpack(cap_request_filt_present, 1)); - if (res_set_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(res_set_to_add_mod_list, bref, 1, 4)); - } - if (res_set_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(res_set_to_release_list, bref, 1, 4, integer_packer(0, 3))); - } - if (res_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(res_to_add_mod_list, bref, 1, 128)); + HANDLE_CODE(rat_type.unpack(bref)); + if (cap_request_filt_present) { + HANDLE_CODE(cap_request_filt.unpack(bref)); } - if (res_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(res_to_release_list, bref, 1, 128, integer_packer(0, 127))); + + return SRSASN_SUCCESS; +} +void ue_cap_rat_request_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("rat-Type", rat_type.to_string()); + if (cap_request_filt_present) { + j.write_str("capabilityRequestFilter", cap_request_filt.to_string()); } - if (format1_present) { - HANDLE_CODE(format1.unpack(bref)); + j.end_obj(); +} + +// CellReselectionPriorities ::= SEQUENCE +SRSASN_CODE cell_resel_priorities_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(freq_prio_list_eutra_present, 1)); + HANDLE_CODE(bref.pack(freq_prio_list_nr_present, 1)); + HANDLE_CODE(bref.pack(t320_present, 1)); + + if (freq_prio_list_eutra_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_eutra, 1, 8)); } - if (format2_present) { - HANDLE_CODE(format2.unpack(bref)); + if (freq_prio_list_nr_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_nr, 1, 8)); } - if (format3_present) { - HANDLE_CODE(format3.unpack(bref)); + if (t320_present) { + HANDLE_CODE(t320.pack(bref)); } - if (format4_present) { - HANDLE_CODE(format4.unpack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_resel_priorities_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(freq_prio_list_eutra_present, 1)); + HANDLE_CODE(bref.unpack(freq_prio_list_nr_present, 1)); + HANDLE_CODE(bref.unpack(t320_present, 1)); + + if (freq_prio_list_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_eutra, bref, 1, 8)); } - if (sched_request_res_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(sched_request_res_to_add_mod_list, bref, 1, 8)); + if (freq_prio_list_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_nr, bref, 1, 8)); } - if (sched_request_res_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(sched_request_res_to_release_list, bref, 1, 8, integer_packer(1, 8))); - } - if (multi_csi_pucch_res_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(multi_csi_pucch_res_list, bref, 1, 2, integer_packer(0, 127))); - } - if (dl_data_to_ul_ack_present) { - HANDLE_CODE(unpack_dyn_seq_of(dl_data_to_ul_ack, bref, 1, 8, integer_packer(0, 15))); - } - if (spatial_relation_info_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(spatial_relation_info_to_add_mod_list, bref, 1, 8)); - } - if (spatial_relation_info_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(spatial_relation_info_to_release_list, bref, 1, 8, integer_packer(1, 8))); - } - if (pucch_pwr_ctrl_present) { - HANDLE_CODE(pucch_pwr_ctrl.unpack(bref)); + if (t320_present) { + HANDLE_CODE(t320.unpack(bref)); } return SRSASN_SUCCESS; } -void pucch_cfg_s::to_json(json_writer& j) const +void cell_resel_priorities_s::to_json(json_writer& j) const { j.start_obj(); - if (res_set_to_add_mod_list_present) { - j.start_array("resourceSetToAddModList"); - 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 (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 (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 (const auto& e1 : res_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (format1_present) { - j.write_fieldname("format1"); - format1.to_json(j); - } - if (format2_present) { - j.write_fieldname("format2"); - format2.to_json(j); - } - if (format3_present) { - j.write_fieldname("format3"); - format3.to_json(j); - } - if (format4_present) { - j.write_fieldname("format4"); - format4.to_json(j); - } - if (sched_request_res_to_add_mod_list_present) { - j.start_array("schedulingRequestResourceToAddModList"); - for (const auto& e1 : sched_request_res_to_add_mod_list) { + if (freq_prio_list_eutra_present) { + j.start_array("freqPriorityListEUTRA"); + for (const auto& e1 : freq_prio_list_eutra) { e1.to_json(j); } j.end_array(); } - if (sched_request_res_to_release_list_present) { - j.start_array("schedulingRequestResourceToReleaseList"); - 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 (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 (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 (const auto& e1 : spatial_relation_info_to_add_mod_list) { + if (freq_prio_list_nr_present) { + j.start_array("freqPriorityListNR"); + for (const auto& e1 : freq_prio_list_nr) { e1.to_json(j); } j.end_array(); } - if (spatial_relation_info_to_release_list_present) { - j.start_array("spatialRelationInfoToReleaseList"); - for (const auto& e1 : spatial_relation_info_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (pucch_pwr_ctrl_present) { - j.write_fieldname("pucch-PowerControl"); - pucch_pwr_ctrl.to_json(j); + if (t320_present) { + j.write_str("t320", t320.to_string()); } j.end_obj(); } -// PUCCH-TPC-CommandConfig ::= SEQUENCE -SRSASN_CODE pucch_tpc_cmd_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(tpc_idx_pcell_present, 1)); - HANDLE_CODE(bref.pack(tpc_idx_pucch_scell_present, 1)); - - if (tpc_idx_pcell_present) { - HANDLE_CODE(pack_integer(bref, tpc_idx_pcell, (uint8_t)1u, (uint8_t)15u)); - } - if (tpc_idx_pucch_scell_present) { - HANDLE_CODE(pack_integer(bref, tpc_idx_pucch_scell, (uint8_t)1u, (uint8_t)15u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_tpc_cmd_cfg_s::unpack(cbit_ref& bref) +std::string cell_resel_priorities_s::t320_opts::to_string() const { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(tpc_idx_pcell_present, 1)); - HANDLE_CODE(bref.unpack(tpc_idx_pucch_scell_present, 1)); - - if (tpc_idx_pcell_present) { - HANDLE_CODE(unpack_integer(tpc_idx_pcell, bref, (uint8_t)1u, (uint8_t)15u)); - } - if (tpc_idx_pucch_scell_present) { - HANDLE_CODE(unpack_integer(tpc_idx_pucch_scell, bref, (uint8_t)1u, (uint8_t)15u)); - } - - return SRSASN_SUCCESS; + 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_"); } -void pucch_tpc_cmd_cfg_s::to_json(json_writer& j) const +uint8_t cell_resel_priorities_s::t320_opts::to_number() const { - j.start_obj(); - if (tpc_idx_pcell_present) { - j.write_int("tpc-IndexPCell", tpc_idx_pcell); - } - if (tpc_idx_pucch_scell_present) { - j.write_int("tpc-IndexPUCCH-SCell", tpc_idx_pucch_scell); - } - j.end_obj(); + 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_"); } -// PUSCH-Config ::= SEQUENCE -SRSASN_CODE pusch_cfg_s::pack(bit_ref& bref) const +// MeasConfig ::= SEQUENCE +SRSASN_CODE meas_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(data_scrambling_id_pusch_present, 1)); - HANDLE_CODE(bref.pack(tx_cfg_present, 1)); - HANDLE_CODE(bref.pack(dmrs_ul_for_pusch_map_type_a_present, 1)); - HANDLE_CODE(bref.pack(dmrs_ul_for_pusch_map_type_b_present, 1)); - HANDLE_CODE(bref.pack(pusch_pwr_ctrl_present, 1)); - HANDLE_CODE(bref.pack(freq_hop_present, 1)); - HANDLE_CODE(bref.pack(freq_hop_offset_lists_present, 1)); - HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list_present, 1)); - HANDLE_CODE(bref.pack(pusch_aggregation_factor_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_transform_precoder_present, 1)); - HANDLE_CODE(bref.pack(transform_precoder_present, 1)); - HANDLE_CODE(bref.pack(codebook_subset_present, 1)); - HANDLE_CODE(bref.pack(max_rank_present, 1)); - HANDLE_CODE(bref.pack(rbg_size_present, 1)); - HANDLE_CODE(bref.pack(uci_on_pusch_present, 1)); - HANDLE_CODE(bref.pack(tp_pi2_bpsk_present, 1)); + HANDLE_CODE(bref.pack(meas_obj_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(report_cfg_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(report_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(s_measure_cfg_present, 1)); + HANDLE_CODE(bref.pack(quant_cfg_present, 1)); + HANDLE_CODE(bref.pack(meas_gap_cfg_present, 1)); + HANDLE_CODE(bref.pack(meas_gap_sharing_cfg_present, 1)); - if (data_scrambling_id_pusch_present) { - HANDLE_CODE(pack_integer(bref, data_scrambling_id_pusch, (uint16_t)0u, (uint16_t)1023u)); - } - if (tx_cfg_present) { - HANDLE_CODE(tx_cfg.pack(bref)); - } - if (dmrs_ul_for_pusch_map_type_a_present) { - HANDLE_CODE(dmrs_ul_for_pusch_map_type_a.pack(bref)); - } - if (dmrs_ul_for_pusch_map_type_b_present) { - HANDLE_CODE(dmrs_ul_for_pusch_map_type_b.pack(bref)); - } - if (pusch_pwr_ctrl_present) { - HANDLE_CODE(pusch_pwr_ctrl.pack(bref)); - } - if (freq_hop_present) { - HANDLE_CODE(freq_hop.pack(bref)); + if (meas_obj_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_rem_list, 1, 64, integer_packer(1, 64))); } - if (freq_hop_offset_lists_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_hop_offset_lists, 1, 4, integer_packer(1, 274))); + if (meas_obj_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_add_mod_list, 1, 64)); } - HANDLE_CODE(res_alloc.pack(bref)); - if (pusch_time_domain_alloc_list_present) { - HANDLE_CODE(pusch_time_domain_alloc_list.pack(bref)); + if (report_cfg_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_to_rem_list, 1, 64, integer_packer(1, 64))); } - if (pusch_aggregation_factor_present) { - HANDLE_CODE(pusch_aggregation_factor.pack(bref)); + if (report_cfg_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_to_add_mod_list, 1, 64)); } - if (mcs_table_present) { - HANDLE_CODE(mcs_table.pack(bref)); + if (meas_id_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_to_rem_list, 1, 64, integer_packer(1, 64))); } - if (mcs_table_transform_precoder_present) { - HANDLE_CODE(mcs_table_transform_precoder.pack(bref)); + if (meas_id_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_to_add_mod_list, 1, 64)); } - if (transform_precoder_present) { - HANDLE_CODE(transform_precoder.pack(bref)); + if (s_measure_cfg_present) { + HANDLE_CODE(s_measure_cfg.pack(bref)); } - if (codebook_subset_present) { - HANDLE_CODE(codebook_subset.pack(bref)); + if (quant_cfg_present) { + HANDLE_CODE(quant_cfg.pack(bref)); } - if (max_rank_present) { - HANDLE_CODE(pack_integer(bref, max_rank, (uint8_t)1u, (uint8_t)4u)); + if (meas_gap_cfg_present) { + HANDLE_CODE(meas_gap_cfg.pack(bref)); } - if (uci_on_pusch_present) { - HANDLE_CODE(uci_on_pusch.pack(bref)); + if (meas_gap_sharing_cfg_present) { + HANDLE_CODE(meas_gap_sharing_cfg.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE pusch_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(data_scrambling_id_pusch_present, 1)); - HANDLE_CODE(bref.unpack(tx_cfg_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_ul_for_pusch_map_type_a_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_ul_for_pusch_map_type_b_present, 1)); - HANDLE_CODE(bref.unpack(pusch_pwr_ctrl_present, 1)); - HANDLE_CODE(bref.unpack(freq_hop_present, 1)); - HANDLE_CODE(bref.unpack(freq_hop_offset_lists_present, 1)); - HANDLE_CODE(bref.unpack(pusch_time_domain_alloc_list_present, 1)); - HANDLE_CODE(bref.unpack(pusch_aggregation_factor_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_transform_precoder_present, 1)); - HANDLE_CODE(bref.unpack(transform_precoder_present, 1)); - HANDLE_CODE(bref.unpack(codebook_subset_present, 1)); - HANDLE_CODE(bref.unpack(max_rank_present, 1)); - HANDLE_CODE(bref.unpack(rbg_size_present, 1)); - HANDLE_CODE(bref.unpack(uci_on_pusch_present, 1)); - HANDLE_CODE(bref.unpack(tp_pi2_bpsk_present, 1)); + HANDLE_CODE(bref.unpack(meas_obj_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_obj_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(report_cfg_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(report_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(s_measure_cfg_present, 1)); + HANDLE_CODE(bref.unpack(quant_cfg_present, 1)); + HANDLE_CODE(bref.unpack(meas_gap_cfg_present, 1)); + HANDLE_CODE(bref.unpack(meas_gap_sharing_cfg_present, 1)); - if (data_scrambling_id_pusch_present) { - HANDLE_CODE(unpack_integer(data_scrambling_id_pusch, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (tx_cfg_present) { - HANDLE_CODE(tx_cfg.unpack(bref)); - } - if (dmrs_ul_for_pusch_map_type_a_present) { - HANDLE_CODE(dmrs_ul_for_pusch_map_type_a.unpack(bref)); - } - if (dmrs_ul_for_pusch_map_type_b_present) { - HANDLE_CODE(dmrs_ul_for_pusch_map_type_b.unpack(bref)); - } - if (pusch_pwr_ctrl_present) { - HANDLE_CODE(pusch_pwr_ctrl.unpack(bref)); - } - if (freq_hop_present) { - HANDLE_CODE(freq_hop.unpack(bref)); + if (meas_obj_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_obj_to_rem_list, bref, 1, 64, integer_packer(1, 64))); } - if (freq_hop_offset_lists_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_hop_offset_lists, bref, 1, 4, integer_packer(1, 274))); + if (meas_obj_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_obj_to_add_mod_list, bref, 1, 64)); } - HANDLE_CODE(res_alloc.unpack(bref)); - if (pusch_time_domain_alloc_list_present) { - HANDLE_CODE(pusch_time_domain_alloc_list.unpack(bref)); + if (report_cfg_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(report_cfg_to_rem_list, bref, 1, 64, integer_packer(1, 64))); } - if (pusch_aggregation_factor_present) { - HANDLE_CODE(pusch_aggregation_factor.unpack(bref)); + if (report_cfg_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(report_cfg_to_add_mod_list, bref, 1, 64)); } - if (mcs_table_present) { - HANDLE_CODE(mcs_table.unpack(bref)); + if (meas_id_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_id_to_rem_list, bref, 1, 64, integer_packer(1, 64))); } - if (mcs_table_transform_precoder_present) { - HANDLE_CODE(mcs_table_transform_precoder.unpack(bref)); + if (meas_id_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_id_to_add_mod_list, bref, 1, 64)); } - if (transform_precoder_present) { - HANDLE_CODE(transform_precoder.unpack(bref)); + if (s_measure_cfg_present) { + HANDLE_CODE(s_measure_cfg.unpack(bref)); } - if (codebook_subset_present) { - HANDLE_CODE(codebook_subset.unpack(bref)); + if (quant_cfg_present) { + HANDLE_CODE(quant_cfg.unpack(bref)); } - if (max_rank_present) { - HANDLE_CODE(unpack_integer(max_rank, bref, (uint8_t)1u, (uint8_t)4u)); + if (meas_gap_cfg_present) { + HANDLE_CODE(meas_gap_cfg.unpack(bref)); } - if (uci_on_pusch_present) { - HANDLE_CODE(uci_on_pusch.unpack(bref)); + if (meas_gap_sharing_cfg_present) { + HANDLE_CODE(meas_gap_sharing_cfg.unpack(bref)); } return SRSASN_SUCCESS; } -void pusch_cfg_s::to_json(json_writer& j) const +void meas_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (data_scrambling_id_pusch_present) { - j.write_int("dataScramblingIdentityPUSCH", data_scrambling_id_pusch); - } - if (tx_cfg_present) { - j.write_str("txConfig", tx_cfg.to_string()); - } - if (dmrs_ul_for_pusch_map_type_a_present) { - j.write_fieldname("dmrs-UplinkForPUSCH-MappingTypeA"); - dmrs_ul_for_pusch_map_type_a.to_json(j); - } - if (dmrs_ul_for_pusch_map_type_b_present) { - j.write_fieldname("dmrs-UplinkForPUSCH-MappingTypeB"); - dmrs_ul_for_pusch_map_type_b.to_json(j); - } - if (pusch_pwr_ctrl_present) { - j.write_fieldname("pusch-PowerControl"); - pusch_pwr_ctrl.to_json(j); - } - if (freq_hop_present) { - j.write_str("frequencyHopping", freq_hop.to_string()); - } - if (freq_hop_offset_lists_present) { - j.start_array("frequencyHoppingOffsetLists"); - for (const auto& e1 : freq_hop_offset_lists) { + if (meas_obj_to_rem_list_present) { + j.start_array("measObjectToRemoveList"); + for (const auto& e1 : meas_obj_to_rem_list) { j.write_int(e1); } j.end_array(); } - j.write_str("resourceAllocation", res_alloc.to_string()); - if (pusch_time_domain_alloc_list_present) { - j.write_fieldname("pusch-TimeDomainAllocationList"); - pusch_time_domain_alloc_list.to_json(j); - } - if (pusch_aggregation_factor_present) { - j.write_str("pusch-AggregationFactor", pusch_aggregation_factor.to_string()); + if (meas_obj_to_add_mod_list_present) { + j.start_array("measObjectToAddModList"); + for (const auto& e1 : meas_obj_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); } - if (mcs_table_present) { - j.write_str("mcs-Table", mcs_table.to_string()); + if (report_cfg_to_rem_list_present) { + j.start_array("reportConfigToRemoveList"); + for (const auto& e1 : report_cfg_to_rem_list) { + j.write_int(e1); + } + j.end_array(); } - if (mcs_table_transform_precoder_present) { - j.write_str("mcs-TableTransformPrecoder", mcs_table_transform_precoder.to_string()); + if (report_cfg_to_add_mod_list_present) { + j.start_array("reportConfigToAddModList"); + for (const auto& e1 : report_cfg_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); } - if (transform_precoder_present) { - j.write_str("transformPrecoder", transform_precoder.to_string()); + if (meas_id_to_rem_list_present) { + j.start_array("measIdToRemoveList"); + for (const auto& e1 : meas_id_to_rem_list) { + j.write_int(e1); + } + j.end_array(); } - if (codebook_subset_present) { - j.write_str("codebookSubset", codebook_subset.to_string()); + if (meas_id_to_add_mod_list_present) { + j.start_array("measIdToAddModList"); + for (const auto& e1 : meas_id_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); } - if (max_rank_present) { - j.write_int("maxRank", max_rank); + if (s_measure_cfg_present) { + j.write_fieldname("s-MeasureConfig"); + s_measure_cfg.to_json(j); } - if (rbg_size_present) { - j.write_str("rbg-Size", "config2"); + if (quant_cfg_present) { + j.write_fieldname("quantityConfig"); + quant_cfg.to_json(j); } - if (uci_on_pusch_present) { - j.write_fieldname("uci-OnPUSCH"); - uci_on_pusch.to_json(j); + if (meas_gap_cfg_present) { + j.write_fieldname("measGapConfig"); + meas_gap_cfg.to_json(j); } - if (tp_pi2_bpsk_present) { - j.write_str("tp-pi2BPSK", "enabled"); + if (meas_gap_sharing_cfg_present) { + j.write_fieldname("measGapSharingConfig"); + meas_gap_sharing_cfg.to_json(j); } j.end_obj(); } -std::string pusch_cfg_s::tx_cfg_opts::to_string() const -{ - 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 +void meas_cfg_s::s_measure_cfg_c_::destroy_() {} +void meas_cfg_s::s_measure_cfg_c_::set(types::options e) { - static const char* options[] = {"intraSlot", "interSlot"}; - return convert_enum_idx(options, 2, value, "pusch_cfg_s::freq_hop_e_"); + destroy_(); + type_ = e; } - -std::string pusch_cfg_s::res_alloc_opts::to_string() const +meas_cfg_s::s_measure_cfg_c_::s_measure_cfg_c_(const meas_cfg_s::s_measure_cfg_c_& other) { - static const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; - return convert_enum_idx(options, 3, value, "pusch_cfg_s::res_alloc_e_"); + type_ = other.type(); + switch (type_) { + case types::ssb_rsrp: + c.init(other.c.get()); + break; + case types::csi_rsrp: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + } } -uint8_t pusch_cfg_s::res_alloc_opts::to_number() const +meas_cfg_s::s_measure_cfg_c_& meas_cfg_s::s_measure_cfg_c_::operator=(const meas_cfg_s::s_measure_cfg_c_& other) { - static const uint8_t options[] = {0, 1}; - return map_enum_number(options, 2, value, "pusch_cfg_s::res_alloc_e_"); -} + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb_rsrp: + c.set(other.c.get()); + break; + case types::csi_rsrp: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + } -std::string pusch_cfg_s::pusch_aggregation_factor_opts::to_string() const -{ - static const char* options[] = {"n2", "n4", "n8"}; - return convert_enum_idx(options, 3, value, "pusch_cfg_s::pusch_aggregation_factor_e_"); + return *this; } -uint8_t pusch_cfg_s::pusch_aggregation_factor_opts::to_number() const +void meas_cfg_s::s_measure_cfg_c_::to_json(json_writer& j) const { - static const uint8_t options[] = {2, 4, 8}; - return map_enum_number(options, 3, value, "pusch_cfg_s::pusch_aggregation_factor_e_"); + j.start_obj(); + switch (type_) { + case types::ssb_rsrp: + j.write_int("ssb-RSRP", c.get()); + break; + case types::csi_rsrp: + j.write_int("csi-RSRP", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + } + j.end_obj(); } - -std::string pusch_cfg_s::mcs_table_opts::to_string() const +SRSASN_CODE meas_cfg_s::s_measure_cfg_c_::pack(bit_ref& bref) const { - static const char* options[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(options, 2, value, "pusch_cfg_s::mcs_table_e_"); + type_.pack(bref); + switch (type_) { + case types::ssb_rsrp: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::csi_rsrp: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -uint16_t pusch_cfg_s::mcs_table_opts::to_number() const +SRSASN_CODE meas_cfg_s::s_measure_cfg_c_::unpack(cbit_ref& bref) { - 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 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 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 const char* options[] = {"enabled", "disabled"}; - return convert_enum_idx(options, 2, value, "pusch_cfg_s::transform_precoder_e_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb_rsrp: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::csi_rsrp: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -std::string pusch_cfg_s::codebook_subset_opts::to_string() const +std::string meas_cfg_s::s_measure_cfg_c_::types_opts::to_string() const { - static const char* options[] = {"fullyAndPartialAndNonCoherent", "partialAndNonCoherent", "nonCoherent"}; - return convert_enum_idx(options, 3, value, "pusch_cfg_s::codebook_subset_e_"); + static const char* options[] = {"ssb-RSRP", "csi-RSRP"}; + return convert_enum_idx(options, 2, value, "meas_cfg_s::s_measure_cfg_c_::types"); } -// PUSCH-TPC-CommandConfig ::= SEQUENCE -SRSASN_CODE pusch_tpc_cmd_cfg_s::pack(bit_ref& bref) const +// RRCReconfiguration-v1530-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_v1530_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(tpc_idx_present, 1)); - HANDLE_CODE(bref.pack(tpc_idx_sul_present, 1)); - HANDLE_CODE(bref.pack(target_cell_present, 1)); + HANDLE_CODE(bref.pack(master_cell_group_present, 1)); + HANDLE_CODE(bref.pack(full_cfg_present, 1)); + HANDLE_CODE(bref.pack(ded_nas_msg_list_present, 1)); + HANDLE_CODE(bref.pack(master_key_upd_present, 1)); + HANDLE_CODE(bref.pack(ded_sib1_delivery_present, 1)); + HANDLE_CODE(bref.pack(ded_sys_info_delivery_present, 1)); + HANDLE_CODE(bref.pack(other_cfg_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (tpc_idx_present) { - HANDLE_CODE(pack_integer(bref, tpc_idx, (uint8_t)1u, (uint8_t)15u)); + if (master_cell_group_present) { + HANDLE_CODE(master_cell_group.pack(bref)); } - if (tpc_idx_sul_present) { - HANDLE_CODE(pack_integer(bref, tpc_idx_sul, (uint8_t)1u, (uint8_t)15u)); + if (ded_nas_msg_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ded_nas_msg_list, 1, 29)); } - if (target_cell_present) { - HANDLE_CODE(pack_integer(bref, target_cell, (uint8_t)0u, (uint8_t)31u)); + if (master_key_upd_present) { + HANDLE_CODE(master_key_upd.pack(bref)); + } + if (ded_sib1_delivery_present) { + HANDLE_CODE(ded_sib1_delivery.pack(bref)); + } + if (ded_sys_info_delivery_present) { + HANDLE_CODE(ded_sys_info_delivery.pack(bref)); + } + if (other_cfg_present) { + HANDLE_CODE(other_cfg.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE pusch_tpc_cmd_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_recfg_v1530_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(tpc_idx_present, 1)); - HANDLE_CODE(bref.unpack(tpc_idx_sul_present, 1)); - HANDLE_CODE(bref.unpack(target_cell_present, 1)); + HANDLE_CODE(bref.unpack(master_cell_group_present, 1)); + HANDLE_CODE(bref.unpack(full_cfg_present, 1)); + HANDLE_CODE(bref.unpack(ded_nas_msg_list_present, 1)); + HANDLE_CODE(bref.unpack(master_key_upd_present, 1)); + HANDLE_CODE(bref.unpack(ded_sib1_delivery_present, 1)); + HANDLE_CODE(bref.unpack(ded_sys_info_delivery_present, 1)); + HANDLE_CODE(bref.unpack(other_cfg_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (tpc_idx_present) { - HANDLE_CODE(unpack_integer(tpc_idx, bref, (uint8_t)1u, (uint8_t)15u)); + if (master_cell_group_present) { + HANDLE_CODE(master_cell_group.unpack(bref)); } - if (tpc_idx_sul_present) { - HANDLE_CODE(unpack_integer(tpc_idx_sul, bref, (uint8_t)1u, (uint8_t)15u)); + if (ded_nas_msg_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ded_nas_msg_list, bref, 1, 29)); } - if (target_cell_present) { - HANDLE_CODE(unpack_integer(target_cell, bref, (uint8_t)0u, (uint8_t)31u)); + if (master_key_upd_present) { + HANDLE_CODE(master_key_upd.unpack(bref)); + } + if (ded_sib1_delivery_present) { + HANDLE_CODE(ded_sib1_delivery.unpack(bref)); + } + if (ded_sys_info_delivery_present) { + HANDLE_CODE(ded_sys_info_delivery.unpack(bref)); + } + if (other_cfg_present) { + HANDLE_CODE(other_cfg.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void pusch_tpc_cmd_cfg_s::to_json(json_writer& j) const +void rrc_recfg_v1530_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (tpc_idx_present) { - j.write_int("tpc-Index", tpc_idx); + if (master_cell_group_present) { + j.write_str("masterCellGroup", master_cell_group.to_string()); } - if (tpc_idx_sul_present) { - j.write_int("tpc-IndexSUL", tpc_idx_sul); + if (full_cfg_present) { + j.write_str("fullConfig", "true"); } - if (target_cell_present) { - j.write_int("targetCell", target_cell); + if (ded_nas_msg_list_present) { + j.start_array("dedicatedNAS-MessageList"); + for (const auto& e1 : ded_nas_msg_list) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (master_key_upd_present) { + j.write_fieldname("masterKeyUpdate"); + master_key_upd.to_json(j); + } + if (ded_sib1_delivery_present) { + j.write_str("dedicatedSIB1-Delivery", ded_sib1_delivery.to_string()); + } + if (ded_sys_info_delivery_present) { + j.write_str("dedicatedSystemInformationDelivery", ded_sys_info_delivery.to_string()); + } + if (other_cfg_present) { + j.write_fieldname("otherConfig"); + other_cfg.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } j.end_obj(); } -// RadioLinkMonitoringRS ::= SEQUENCE -SRSASN_CODE radio_link_monitoring_rs_s::pack(bit_ref& bref) const +// RRCRelease-v1540-IEs ::= SEQUENCE +SRSASN_CODE rrc_release_v1540_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, radio_link_monitoring_rs_id, (uint8_t)0u, (uint8_t)9u)); - HANDLE_CODE(purpose.pack(bref)); - HANDLE_CODE(detection_res.pack(bref)); + HANDLE_CODE(bref.pack(wait_time_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE radio_link_monitoring_rs_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(radio_link_monitoring_rs_id, bref, (uint8_t)0u, (uint8_t)9u)); - HANDLE_CODE(purpose.unpack(bref)); - HANDLE_CODE(detection_res.unpack(bref)); + if (wait_time_present) { + HANDLE_CODE(pack_integer(bref, wait_time, (uint8_t)1u, (uint8_t)16u)); + } return SRSASN_SUCCESS; } -void radio_link_monitoring_rs_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("radioLinkMonitoringRS-Id", radio_link_monitoring_rs_id); - j.write_str("purpose", purpose.to_string()); - j.write_fieldname("detectionResource"); - detection_res.to_json(j); - j.end_obj(); -} - -std::string radio_link_monitoring_rs_s::purpose_opts::to_string() const +SRSASN_CODE rrc_release_v1540_ies_s::unpack(cbit_ref& bref) { - static const char* options[] = {"beamFailure", "rlf", "both"}; - return convert_enum_idx(options, 3, value, "radio_link_monitoring_rs_s::purpose_e_"); -} + HANDLE_CODE(bref.unpack(wait_time_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); -void radio_link_monitoring_rs_s::detection_res_c_::destroy_() {} -void radio_link_monitoring_rs_s::detection_res_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -radio_link_monitoring_rs_s::detection_res_c_::detection_res_c_( - const radio_link_monitoring_rs_s::detection_res_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ssb_idx: - c.init(other.c.get()); - break; - case types::csi_rs_idx: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); - } -} -radio_link_monitoring_rs_s::detection_res_c_& radio_link_monitoring_rs_s::detection_res_c_:: - operator=(const radio_link_monitoring_rs_s::detection_res_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ssb_idx: - c.set(other.c.get()); - break; - case types::csi_rs_idx: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); + if (wait_time_present) { + HANDLE_CODE(unpack_integer(wait_time, bref, (uint8_t)1u, (uint8_t)16u)); } - return *this; + return SRSASN_SUCCESS; } -void radio_link_monitoring_rs_s::detection_res_c_::to_json(json_writer& j) const +void rrc_release_v1540_ies_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::ssb_idx: - j.write_int("ssb-Index", c.get()); - break; - case types::csi_rs_idx: - j.write_int("csi-RS-Index", c.get()); - break; - default: - log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); - } - j.end_obj(); -} -SRSASN_CODE radio_link_monitoring_rs_s::detection_res_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ssb_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); - break; - default: - log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (wait_time_present) { + j.write_int("waitTime", wait_time); } - return SRSASN_SUCCESS; -} -SRSASN_CODE radio_link_monitoring_rs_s::detection_res_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ssb_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); - break; - default: - log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); - return SRSASN_ERROR_DECODE_FAIL; + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } - return SRSASN_SUCCESS; -} - -std::string radio_link_monitoring_rs_s::detection_res_c_::types_opts::to_string() const -{ - 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"); + j.end_obj(); } -// RateMatchPattern ::= SEQUENCE -SRSASN_CODE rate_match_pattern_s::pack(bit_ref& bref) const +// RRCResume-v1560-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_v1560_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(subcarrier_spacing_present, 1)); + HANDLE_CODE(bref.pack(radio_bearer_cfg2_present, 1)); + HANDLE_CODE(bref.pack(sk_counter_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(pack_integer(bref, rate_match_pattern_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pattern_type.pack(bref)); - if (subcarrier_spacing_present) { - HANDLE_CODE(subcarrier_spacing.pack(bref)); + if (radio_bearer_cfg2_present) { + HANDLE_CODE(radio_bearer_cfg2.pack(bref)); + } + if (sk_counter_present) { + HANDLE_CODE(pack_integer(bref, sk_counter, (uint32_t)0u, (uint32_t)65535u)); } - HANDLE_CODE(dummy.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE rate_match_pattern_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_resume_v1560_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(subcarrier_spacing_present, 1)); + HANDLE_CODE(bref.unpack(radio_bearer_cfg2_present, 1)); + HANDLE_CODE(bref.unpack(sk_counter_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(unpack_integer(rate_match_pattern_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pattern_type.unpack(bref)); - if (subcarrier_spacing_present) { - HANDLE_CODE(subcarrier_spacing.unpack(bref)); + if (radio_bearer_cfg2_present) { + HANDLE_CODE(radio_bearer_cfg2.unpack(bref)); + } + if (sk_counter_present) { + HANDLE_CODE(unpack_integer(sk_counter, bref, (uint32_t)0u, (uint32_t)65535u)); } - HANDLE_CODE(dummy.unpack(bref)); return SRSASN_SUCCESS; } -void rate_match_pattern_s::to_json(json_writer& j) const +void rrc_resume_v1560_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rateMatchPatternId", rate_match_pattern_id); - j.write_fieldname("patternType"); - pattern_type.to_json(j); - if (subcarrier_spacing_present) { - j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); + if (radio_bearer_cfg2_present) { + j.write_str("radioBearerConfig2", radio_bearer_cfg2.to_string()); + } + if (sk_counter_present) { + j.write_int("sk-Counter", sk_counter); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } - j.write_str("dummy", dummy.to_string()); j.end_obj(); } -void rate_match_pattern_s::pattern_type_c_::destroy_() +// RedirectedCarrierInfo ::= CHOICE +void redirected_carrier_info_c::destroy_() { switch (type_) { - case types::bitmaps: - c.destroy(); + case types::nr: + c.destroy(); + break; + case types::eutra: + c.destroy(); break; default: break; } } -void rate_match_pattern_s::pattern_type_c_::set(types::options e) +void redirected_carrier_info_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::bitmaps: - c.init(); + case types::nr: + c.init(); break; - case types::ctrl_res_set: + case types::eutra: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + log_invalid_choice_id(type_, "redirected_carrier_info_c"); } } -rate_match_pattern_s::pattern_type_c_::pattern_type_c_(const rate_match_pattern_s::pattern_type_c_& other) +redirected_carrier_info_c::redirected_carrier_info_c(const redirected_carrier_info_c& other) { type_ = other.type(); switch (type_) { - case types::bitmaps: - c.init(other.c.get()); + case types::nr: + c.init(other.c.get()); break; - case types::ctrl_res_set: - c.init(other.c.get()); + case types::eutra: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + log_invalid_choice_id(type_, "redirected_carrier_info_c"); } } -rate_match_pattern_s::pattern_type_c_& rate_match_pattern_s::pattern_type_c_:: - operator=(const rate_match_pattern_s::pattern_type_c_& other) +redirected_carrier_info_c& redirected_carrier_info_c::operator=(const redirected_carrier_info_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::bitmaps: - c.set(other.c.get()); + case types::nr: + c.set(other.c.get()); break; - case types::ctrl_res_set: - c.set(other.c.get()); + case types::eutra: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + log_invalid_choice_id(type_, "redirected_carrier_info_c"); } return *this; } -void rate_match_pattern_s::pattern_type_c_::to_json(json_writer& j) const +void redirected_carrier_info_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::bitmaps: - j.write_fieldname("bitmaps"); - j.start_obj(); - j.write_str("resourceBlocks", c.get().res_blocks.to_string()); - j.write_fieldname("symbolsInResourceBlock"); - c.get().symbols_in_res_block.to_json(j); - if (c.get().periodicity_and_pattern_present) { - j.write_fieldname("periodicityAndPattern"); - c.get().periodicity_and_pattern.to_json(j); - } - j.end_obj(); + case types::nr: + j.write_fieldname("nr"); + c.get().to_json(j); break; - case types::ctrl_res_set: - j.write_int("controlResourceSet", c.get()); + case types::eutra: + j.write_fieldname("eutra"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + log_invalid_choice_id(type_, "redirected_carrier_info_c"); } j.end_obj(); } -SRSASN_CODE rate_match_pattern_s::pattern_type_c_::pack(bit_ref& bref) const +SRSASN_CODE redirected_carrier_info_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::bitmaps: - bref.pack(c.get().ext, 1); - HANDLE_CODE(bref.pack(c.get().periodicity_and_pattern_present, 1)); - HANDLE_CODE(c.get().res_blocks.pack(bref)); - HANDLE_CODE(c.get().symbols_in_res_block.pack(bref)); - if (c.get().periodicity_and_pattern_present) { - HANDLE_CODE(c.get().periodicity_and_pattern.pack(bref)); - } + case types::nr: + HANDLE_CODE(c.get().pack(bref)); break; - case types::ctrl_res_set: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)11u)); + case types::eutra: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + log_invalid_choice_id(type_, "redirected_carrier_info_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rate_match_pattern_s::pattern_type_c_::unpack(cbit_ref& bref) +SRSASN_CODE redirected_carrier_info_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::bitmaps: - bref.unpack(c.get().ext, 1); - HANDLE_CODE(bref.unpack(c.get().periodicity_and_pattern_present, 1)); - HANDLE_CODE(c.get().res_blocks.unpack(bref)); - HANDLE_CODE(c.get().symbols_in_res_block.unpack(bref)); - if (c.get().periodicity_and_pattern_present) { - HANDLE_CODE(c.get().periodicity_and_pattern.unpack(bref)); - } + case types::nr: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::ctrl_res_set: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)11u)); + case types::eutra: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + log_invalid_choice_id(type_, "redirected_carrier_info_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::destroy_() -{ - switch (type_) { - case types::one_slot: - c.destroy >(); - break; - case types::two_slots: - c.destroy >(); - break; - default: - break; - } -} -void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::set(types::options e) +std::string redirected_carrier_info_c::types_opts::to_string() const { - destroy_(); - type_ = e; - switch (type_) { - case types::one_slot: - c.init >(); - break; - case types::two_slots: - c.init >(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); - } + static const char* options[] = {"nr", "eutra"}; + return convert_enum_idx(options, 2, value, "redirected_carrier_info_c::types"); } -rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::symbols_in_res_block_c_( - const rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_& other) + +// SecurityConfigSMC ::= SEQUENCE +SRSASN_CODE security_cfg_smc_s::pack(bit_ref& bref) const { - type_ = other.type(); - switch (type_) { - case types::one_slot: - c.init(other.c.get >()); - break; - case types::two_slots: - c.init(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); - } + bref.pack(ext, 1); + HANDLE_CODE(security_algorithm_cfg.pack(bref)); + + return SRSASN_SUCCESS; } -rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_& -rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_:: -operator=(const rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_& other) +SRSASN_CODE security_cfg_smc_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::one_slot: - c.set(other.c.get >()); - break; - case types::two_slots: - c.set(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); - } + bref.unpack(ext, 1); + HANDLE_CODE(security_algorithm_cfg.unpack(bref)); - return *this; + return SRSASN_SUCCESS; } -void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::to_json(json_writer& j) const +void security_cfg_smc_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::one_slot: - j.write_str("oneSlot", c.get >().to_string()); - break; - case types::two_slots: - j.write_str("twoSlots", c.get >().to_string()); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); - } + j.write_fieldname("securityAlgorithmConfig"); + security_algorithm_cfg.to_json(j); j.end_obj(); } -SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::one_slot: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::two_slots: - HANDLE_CODE(c.get >().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::one_slot: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::two_slots: - HANDLE_CODE(c.get >().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -std::string rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types_opts::to_string() const -{ - 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 +// SuspendConfig ::= SEQUENCE +SRSASN_CODE suspend_cfg_s::pack(bit_ref& bref) const { - 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"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ran_notif_area_info_present, 1)); + HANDLE_CODE(bref.pack(t380_present, 1)); -void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::destroy_() -{ - switch (type_) { - case types::n2: - c.destroy >(); - break; - case types::n4: - c.destroy >(); - break; - case types::n5: - c.destroy >(); - break; - case types::n8: - c.destroy >(); - break; - case types::n10: - c.destroy >(); - break; - case types::n20: - c.destroy >(); - break; - case types::n40: - c.destroy >(); - break; - default: - break; - } -} -void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::n2: - c.init >(); - break; - case types::n4: - c.init >(); - break; - case types::n5: - c.init >(); - break; - case types::n8: - c.init >(); - break; - case types::n10: - c.init >(); - break; - case types::n20: - c.init >(); - break; - case types::n40: - c.init >(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); + HANDLE_CODE(full_i_rnti.pack(bref)); + HANDLE_CODE(short_i_rnti.pack(bref)); + HANDLE_CODE(ran_paging_cycle.pack(bref)); + if (ran_notif_area_info_present) { + HANDLE_CODE(ran_notif_area_info.pack(bref)); } -} -rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::periodicity_and_pattern_c_( - const rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::n2: - c.init(other.c.get >()); - break; - case types::n4: - c.init(other.c.get >()); - break; - case types::n5: - c.init(other.c.get >()); - break; - case types::n8: - c.init(other.c.get >()); - break; - case types::n10: - c.init(other.c.get >()); - break; - case types::n20: - c.init(other.c.get >()); - break; - case types::n40: - c.init(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); + if (t380_present) { + HANDLE_CODE(t380.pack(bref)); } + HANDLE_CODE(pack_integer(bref, next_hop_chaining_count, (uint8_t)0u, (uint8_t)7u)); + + return SRSASN_SUCCESS; } -rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_& -rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_:: -operator=(const rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_& other) +SRSASN_CODE suspend_cfg_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ran_notif_area_info_present, 1)); + HANDLE_CODE(bref.unpack(t380_present, 1)); + + HANDLE_CODE(full_i_rnti.unpack(bref)); + HANDLE_CODE(short_i_rnti.unpack(bref)); + HANDLE_CODE(ran_paging_cycle.unpack(bref)); + if (ran_notif_area_info_present) { + HANDLE_CODE(ran_notif_area_info.unpack(bref)); } - set(other.type()); - switch (type_) { - case types::n2: - c.set(other.c.get >()); - break; - case types::n4: - c.set(other.c.get >()); - break; - case types::n5: - c.set(other.c.get >()); - break; - case types::n8: - c.set(other.c.get >()); - break; - case types::n10: - c.set(other.c.get >()); - break; - case types::n20: - c.set(other.c.get >()); - break; - case types::n40: - c.set(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); + if (t380_present) { + HANDLE_CODE(t380.unpack(bref)); } + HANDLE_CODE(unpack_integer(next_hop_chaining_count, bref, (uint8_t)0u, (uint8_t)7u)); - return *this; + return SRSASN_SUCCESS; } -void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::to_json(json_writer& j) const +void suspend_cfg_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::n2: - j.write_str("n2", c.get >().to_string()); - break; - case types::n4: - j.write_str("n4", c.get >().to_string()); - break; - case types::n5: - j.write_str("n5", c.get >().to_string()); - break; - case types::n8: - j.write_str("n8", c.get >().to_string()); - break; - case types::n10: - j.write_str("n10", c.get >().to_string()); - break; - case types::n20: - j.write_str("n20", c.get >().to_string()); - break; - case types::n40: - j.write_str("n40", c.get >().to_string()); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); + j.write_str("fullI-RNTI", full_i_rnti.to_string()); + j.write_str("shortI-RNTI", short_i_rnti.to_string()); + j.write_str("ran-PagingCycle", ran_paging_cycle.to_string()); + if (ran_notif_area_info_present) { + j.write_fieldname("ran-NotificationAreaInfo"); + ran_notif_area_info.to_json(j); + } + if (t380_present) { + j.write_str("t380", t380.to_string()); } + j.write_int("nextHopChainingCount", next_hop_chaining_count); j.end_obj(); } -SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::pack(bit_ref& bref) const + +// CounterCheck-IEs ::= SEQUENCE +SRSASN_CODE counter_check_ies_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::n2: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::n4: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::n5: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::n8: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::n10: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::n20: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::n40: - HANDLE_CODE(c.get >().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, drb_count_msb_info_list, 1, 29)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } + return SRSASN_SUCCESS; } -SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::unpack(cbit_ref& bref) +SRSASN_CODE counter_check_ies_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::n2: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::n4: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::n5: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::n8: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::n10: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::n20: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::n40: - HANDLE_CODE(c.get >().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); - return SRSASN_ERROR_DECODE_FAIL; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(drb_count_msb_info_list, bref, 1, 29)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - return SRSASN_SUCCESS; -} -std::string rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types_opts::to_string() const -{ - 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 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"); + return SRSASN_SUCCESS; } - -std::string rate_match_pattern_s::pattern_type_c_::types_opts::to_string() const +void counter_check_ies_s::to_json(json_writer& j) const { - static const char* options[] = {"bitmaps", "controlResourceSet"}; - return convert_enum_idx(options, 2, value, "rate_match_pattern_s::pattern_type_c_::types"); + j.start_obj(); + j.start_array("drb-CountMSB-InfoList"); + for (const auto& e1 : drb_count_msb_info_list) { + e1.to_json(j); + } + j.end_array(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); } -std::string rate_match_pattern_s::dummy_opts::to_string() const +// DLInformationTransfer-IEs ::= SEQUENCE +SRSASN_CODE dl_info_transfer_ies_s::pack(bit_ref& bref) const { - static const char* options[] = {"dynamic", "semiStatic"}; - return convert_enum_idx(options, 2, value, "rate_match_pattern_s::dummy_e_"); -} + HANDLE_CODE(bref.pack(ded_nas_msg_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); -void rate_match_pattern_group_item_c_::destroy_() {} -void rate_match_pattern_group_item_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -rate_match_pattern_group_item_c_::rate_match_pattern_group_item_c_(const rate_match_pattern_group_item_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_level: - c.init(other.c.get()); - break; - case types::bwp_level: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); + if (ded_nas_msg_present) { + HANDLE_CODE(ded_nas_msg.pack(bref)); } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; } -rate_match_pattern_group_item_c_& rate_match_pattern_group_item_c_:: - operator=(const rate_match_pattern_group_item_c_& other) +SRSASN_CODE dl_info_transfer_ies_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ded_nas_msg_present) { + HANDLE_CODE(ded_nas_msg.unpack(bref)); } - set(other.type()); - switch (type_) { - case types::cell_level: - c.set(other.c.get()); - break; - case types::bwp_level: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - return *this; + return SRSASN_SUCCESS; } -void rate_match_pattern_group_item_c_::to_json(json_writer& j) const +void dl_info_transfer_ies_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::cell_level: - j.write_int("cellLevel", c.get()); - break; - case types::bwp_level: - j.write_int("bwpLevel", c.get()); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); + if (ded_nas_msg_present) { + j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); } - j.end_obj(); -} -SRSASN_CODE rate_match_pattern_group_item_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_level: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - case types::bwp_level: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - return SRSASN_SUCCESS; -} -SRSASN_CODE rate_match_pattern_group_item_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_level: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - case types::bwp_level: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); - return SRSASN_ERROR_DECODE_FAIL; + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } - return SRSASN_SUCCESS; -} - -std::string rate_match_pattern_group_item_c_::types_opts::to_string() const -{ - static const char* options[] = {"cellLevel", "bwpLevel"}; - return convert_enum_idx(options, 2, value, "rate_match_pattern_group_item_c_::types"); + j.end_obj(); } -// SRS-CC-SetIndex ::= SEQUENCE -SRSASN_CODE srs_cc_set_idx_s::pack(bit_ref& bref) const +// MobilityFromNRCommand-IEs ::= SEQUENCE +SRSASN_CODE mob_from_nr_cmd_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(cc_set_idx_present, 1)); - HANDLE_CODE(bref.pack(cc_idx_in_one_cc_set_present, 1)); + HANDLE_CODE(bref.pack(nas_security_param_from_nr_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (cc_set_idx_present) { - HANDLE_CODE(pack_integer(bref, cc_set_idx, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(target_rat_type.pack(bref)); + HANDLE_CODE(target_rat_msg_container.pack(bref)); + if (nas_security_param_from_nr_present) { + HANDLE_CODE(nas_security_param_from_nr.pack(bref)); } - if (cc_idx_in_one_cc_set_present) { - HANDLE_CODE(pack_integer(bref, cc_idx_in_one_cc_set, (uint8_t)0u, (uint8_t)7u)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE srs_cc_set_idx_s::unpack(cbit_ref& bref) +SRSASN_CODE mob_from_nr_cmd_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(cc_set_idx_present, 1)); - HANDLE_CODE(bref.unpack(cc_idx_in_one_cc_set_present, 1)); + HANDLE_CODE(bref.unpack(nas_security_param_from_nr_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (cc_set_idx_present) { - HANDLE_CODE(unpack_integer(cc_set_idx, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(target_rat_type.unpack(bref)); + HANDLE_CODE(target_rat_msg_container.unpack(bref)); + if (nas_security_param_from_nr_present) { + HANDLE_CODE(nas_security_param_from_nr.unpack(bref)); } - if (cc_idx_in_one_cc_set_present) { - HANDLE_CODE(unpack_integer(cc_idx_in_one_cc_set, bref, (uint8_t)0u, (uint8_t)7u)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void srs_cc_set_idx_s::to_json(json_writer& j) const +void mob_from_nr_cmd_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (cc_set_idx_present) { - j.write_int("cc-SetIndex", cc_set_idx); + j.write_str("targetRAT-Type", target_rat_type.to_string()); + j.write_str("targetRAT-MessageContainer", target_rat_msg_container.to_string()); + if (nas_security_param_from_nr_present) { + j.write_str("nas-SecurityParamFromNR", nas_security_param_from_nr.to_string()); } - if (cc_idx_in_one_cc_set_present) { - j.write_int("cc-IndexInOneCC-Set", cc_idx_in_one_cc_set); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - j.end_obj(); -} - -// SRS-Config ::= SEQUENCE -SRSASN_CODE srs_cfg_s::pack(bit_ref& bref) const + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +std::string mob_from_nr_cmd_ies_s::target_rat_type_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(srs_res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(srs_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(srs_res_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(srs_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(tpc_accumulation_present, 1)); + 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_"); +} - if (srs_res_set_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_set_to_release_list, 1, 16, integer_packer(0, 15))); +// RRCReconfiguration-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(radio_bearer_cfg_present, 1)); + HANDLE_CODE(bref.pack(secondary_cell_group_present, 1)); + HANDLE_CODE(bref.pack(meas_cfg_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (radio_bearer_cfg_present) { + HANDLE_CODE(radio_bearer_cfg.pack(bref)); } - if (srs_res_set_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_set_to_add_mod_list, 1, 16)); + if (secondary_cell_group_present) { + HANDLE_CODE(secondary_cell_group.pack(bref)); } - if (srs_res_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_to_release_list, 1, 64, integer_packer(0, 63))); + if (meas_cfg_present) { + HANDLE_CODE(meas_cfg.pack(bref)); } - if (srs_res_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_to_add_mod_list, 1, 64)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE srs_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_recfg_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(srs_res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(srs_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(srs_res_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(srs_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(tpc_accumulation_present, 1)); + HANDLE_CODE(bref.unpack(radio_bearer_cfg_present, 1)); + HANDLE_CODE(bref.unpack(secondary_cell_group_present, 1)); + HANDLE_CODE(bref.unpack(meas_cfg_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (srs_res_set_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_res_set_to_release_list, bref, 1, 16, integer_packer(0, 15))); + if (radio_bearer_cfg_present) { + HANDLE_CODE(radio_bearer_cfg.unpack(bref)); } - if (srs_res_set_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_res_set_to_add_mod_list, bref, 1, 16)); + if (secondary_cell_group_present) { + HANDLE_CODE(secondary_cell_group.unpack(bref)); } - if (srs_res_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_res_to_release_list, bref, 1, 64, integer_packer(0, 63))); + if (meas_cfg_present) { + HANDLE_CODE(meas_cfg.unpack(bref)); } - if (srs_res_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_res_to_add_mod_list, bref, 1, 64)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void srs_cfg_s::to_json(json_writer& j) const +void rrc_recfg_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (srs_res_set_to_release_list_present) { - j.start_array("srs-ResourceSetToReleaseList"); - for (const auto& e1 : srs_res_set_to_release_list) { - j.write_int(e1); - } - j.end_array(); + if (radio_bearer_cfg_present) { + j.write_fieldname("radioBearerConfig"); + radio_bearer_cfg.to_json(j); } - if (srs_res_set_to_add_mod_list_present) { - j.start_array("srs-ResourceSetToAddModList"); - for (const auto& e1 : srs_res_set_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); + if (secondary_cell_group_present) { + j.write_str("secondaryCellGroup", secondary_cell_group.to_string()); } - if (srs_res_to_release_list_present) { - j.start_array("srs-ResourceToReleaseList"); - for (const auto& e1 : srs_res_to_release_list) { - j.write_int(e1); - } - j.end_array(); + if (meas_cfg_present) { + j.write_fieldname("measConfig"); + meas_cfg.to_json(j); } - if (srs_res_to_add_mod_list_present) { - j.start_array("srs-ResourceToAddModList"); - for (const auto& e1 : srs_res_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (tpc_accumulation_present) { - j.write_str("tpc-Accumulation", "disabled"); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } j.end_obj(); } -// SRS-TPC-CommandConfig ::= SEQUENCE -SRSASN_CODE srs_tpc_cmd_cfg_s::pack(bit_ref& bref) const +// RRCReestablishment-IEs ::= SEQUENCE +SRSASN_CODE rrc_reest_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(start_bit_of_format2_minus3_present, 1)); - HANDLE_CODE(bref.pack(field_type_format2_minus3_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (start_bit_of_format2_minus3_present) { - HANDLE_CODE(pack_integer(bref, start_bit_of_format2_minus3, (uint8_t)1u, (uint8_t)31u)); - } - if (field_type_format2_minus3_present) { - HANDLE_CODE(pack_integer(bref, field_type_format2_minus3, (uint8_t)0u, (uint8_t)1u)); + HANDLE_CODE(pack_integer(bref, next_hop_chaining_count, (uint8_t)0u, (uint8_t)7u)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= start_bit_of_format2_minus3_sul_v1530_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(start_bit_of_format2_minus3_sul_v1530_present, 1)); - if (start_bit_of_format2_minus3_sul_v1530_present) { - HANDLE_CODE(pack_integer(bref, start_bit_of_format2_minus3_sul_v1530, (uint8_t)1u, (uint8_t)31u)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE srs_tpc_cmd_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_reest_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(start_bit_of_format2_minus3_present, 1)); - HANDLE_CODE(bref.unpack(field_type_format2_minus3_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (start_bit_of_format2_minus3_present) { - HANDLE_CODE(unpack_integer(start_bit_of_format2_minus3, bref, (uint8_t)1u, (uint8_t)31u)); - } - if (field_type_format2_minus3_present) { - HANDLE_CODE(unpack_integer(field_type_format2_minus3, bref, (uint8_t)0u, (uint8_t)1u)); + HANDLE_CODE(unpack_integer(next_hop_chaining_count, bref, (uint8_t)0u, (uint8_t)7u)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(start_bit_of_format2_minus3_sul_v1530_present, 1)); - if (start_bit_of_format2_minus3_sul_v1530_present) { - HANDLE_CODE(unpack_integer(start_bit_of_format2_minus3_sul_v1530, bref, (uint8_t)1u, (uint8_t)31u)); - } - } - } return SRSASN_SUCCESS; } -void srs_tpc_cmd_cfg_s::to_json(json_writer& j) const +void rrc_reest_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (start_bit_of_format2_minus3_present) { - j.write_int("startingBitOfFormat2-3", start_bit_of_format2_minus3); - } - if (field_type_format2_minus3_present) { - j.write_int("fieldTypeFormat2-3", field_type_format2_minus3); + j.write_int("nextHopChainingCount", next_hop_chaining_count); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (ext) { - if (start_bit_of_format2_minus3_sul_v1530_present) { - j.write_int("startingBitOfFormat2-3SUL-v1530", start_bit_of_format2_minus3_sul_v1530); - } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -// SlotFormatCombination ::= SEQUENCE -SRSASN_CODE slot_format_combination_s::pack(bit_ref& bref) const +// RRCRelease-IEs ::= SEQUENCE +SRSASN_CODE rrc_release_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, slot_format_combination_id, (uint16_t)0u, (uint16_t)511u)); - HANDLE_CODE(pack_dyn_seq_of(bref, slot_formats, 1, 256, integer_packer(0, 255))); + HANDLE_CODE(bref.pack(redirected_carrier_info_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_priorities_present, 1)); + HANDLE_CODE(bref.pack(suspend_cfg_present, 1)); + HANDLE_CODE(bref.pack(depriorit_req_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (redirected_carrier_info_present) { + HANDLE_CODE(redirected_carrier_info.pack(bref)); + } + if (cell_resel_priorities_present) { + HANDLE_CODE(cell_resel_priorities.pack(bref)); + } + if (suspend_cfg_present) { + HANDLE_CODE(suspend_cfg.pack(bref)); + } + if (depriorit_req_present) { + HANDLE_CODE(depriorit_req.depriorit_type.pack(bref)); + HANDLE_CODE(depriorit_req.depriorit_timer.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE slot_format_combination_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_release_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(slot_format_combination_id, bref, (uint16_t)0u, (uint16_t)511u)); - HANDLE_CODE(unpack_dyn_seq_of(slot_formats, bref, 1, 256, integer_packer(0, 255))); + HANDLE_CODE(bref.unpack(redirected_carrier_info_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_priorities_present, 1)); + HANDLE_CODE(bref.unpack(suspend_cfg_present, 1)); + HANDLE_CODE(bref.unpack(depriorit_req_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (redirected_carrier_info_present) { + HANDLE_CODE(redirected_carrier_info.unpack(bref)); + } + if (cell_resel_priorities_present) { + HANDLE_CODE(cell_resel_priorities.unpack(bref)); + } + if (suspend_cfg_present) { + HANDLE_CODE(suspend_cfg.unpack(bref)); + } + if (depriorit_req_present) { + HANDLE_CODE(depriorit_req.depriorit_type.unpack(bref)); + HANDLE_CODE(depriorit_req.depriorit_timer.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } -void slot_format_combination_s::to_json(json_writer& j) const +void rrc_release_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("slotFormatCombinationId", slot_format_combination_id); - j.start_array("slotFormats"); - for (const auto& e1 : slot_formats) { - j.write_int(e1); + if (redirected_carrier_info_present) { + j.write_fieldname("redirectedCarrierInfo"); + redirected_carrier_info.to_json(j); + } + if (cell_resel_priorities_present) { + j.write_fieldname("cellReselectionPriorities"); + cell_resel_priorities.to_json(j); + } + if (suspend_cfg_present) { + j.write_fieldname("suspendConfig"); + suspend_cfg.to_json(j); + } + if (depriorit_req_present) { + j.write_fieldname("deprioritisationReq"); + j.start_obj(); + j.write_str("deprioritisationType", depriorit_req.depriorit_type.to_string()); + j.write_str("deprioritisationTimer", depriorit_req.depriorit_timer.to_string()); + j.end_obj(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } - j.end_array(); j.end_obj(); } -// TCI-State ::= SEQUENCE -SRSASN_CODE tci_state_s::pack(bit_ref& bref) const +std::string rrc_release_ies_s::depriorit_req_s_::depriorit_type_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(qcl_type2_present, 1)); + static const char* options[] = {"frequency", "nr"}; + return convert_enum_idx(options, 2, value, "rrc_release_ies_s::depriorit_req_s_::depriorit_type_e_"); +} - HANDLE_CODE(pack_integer(bref, tci_state_id, (uint8_t)0u, (uint8_t)127u)); - HANDLE_CODE(qcl_type1.pack(bref)); - if (qcl_type2_present) { - HANDLE_CODE(qcl_type2.pack(bref)); +std::string rrc_release_ies_s::depriorit_req_s_::depriorit_timer_opts::to_string() const +{ + 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 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 +SRSASN_CODE rrc_resume_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(radio_bearer_cfg_present, 1)); + HANDLE_CODE(bref.pack(master_cell_group_present, 1)); + HANDLE_CODE(bref.pack(meas_cfg_present, 1)); + HANDLE_CODE(bref.pack(full_cfg_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (radio_bearer_cfg_present) { + HANDLE_CODE(radio_bearer_cfg.pack(bref)); + } + if (master_cell_group_present) { + HANDLE_CODE(master_cell_group.pack(bref)); + } + if (meas_cfg_present) { + HANDLE_CODE(meas_cfg.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE tci_state_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_resume_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(qcl_type2_present, 1)); + HANDLE_CODE(bref.unpack(radio_bearer_cfg_present, 1)); + HANDLE_CODE(bref.unpack(master_cell_group_present, 1)); + HANDLE_CODE(bref.unpack(meas_cfg_present, 1)); + HANDLE_CODE(bref.unpack(full_cfg_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(unpack_integer(tci_state_id, bref, (uint8_t)0u, (uint8_t)127u)); - HANDLE_CODE(qcl_type1.unpack(bref)); - if (qcl_type2_present) { - HANDLE_CODE(qcl_type2.unpack(bref)); + if (radio_bearer_cfg_present) { + HANDLE_CODE(radio_bearer_cfg.unpack(bref)); + } + if (master_cell_group_present) { + HANDLE_CODE(master_cell_group.unpack(bref)); + } + if (meas_cfg_present) { + HANDLE_CODE(meas_cfg.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void tci_state_s::to_json(json_writer& j) const +void rrc_resume_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("tci-StateId", tci_state_id); - j.write_fieldname("qcl-Type1"); - qcl_type1.to_json(j); - if (qcl_type2_present) { - j.write_fieldname("qcl-Type2"); - qcl_type2.to_json(j); + if (radio_bearer_cfg_present) { + j.write_fieldname("radioBearerConfig"); + radio_bearer_cfg.to_json(j); + } + if (master_cell_group_present) { + j.write_str("masterCellGroup", master_cell_group.to_string()); + } + if (meas_cfg_present) { + j.write_fieldname("measConfig"); + meas_cfg.to_json(j); + } + if (full_cfg_present) { + j.write_str("fullConfig", "true"); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } j.end_obj(); } -// ZP-CSI-RS-Resource ::= SEQUENCE -SRSASN_CODE zp_csi_rs_res_s::pack(bit_ref& bref) const +// SecurityModeCommand-IEs ::= SEQUENCE +SRSASN_CODE security_mode_cmd_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(periodicity_and_offset_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(pack_integer(bref, zp_csi_rs_res_id, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(res_map.pack(bref)); - if (periodicity_and_offset_present) { - HANDLE_CODE(periodicity_and_offset.pack(bref)); + HANDLE_CODE(security_cfg_smc.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE zp_csi_rs_res_s::unpack(cbit_ref& bref) +SRSASN_CODE security_mode_cmd_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(periodicity_and_offset_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(unpack_integer(zp_csi_rs_res_id, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(res_map.unpack(bref)); - if (periodicity_and_offset_present) { - HANDLE_CODE(periodicity_and_offset.unpack(bref)); + HANDLE_CODE(security_cfg_smc.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void zp_csi_rs_res_s::to_json(json_writer& j) const +void security_mode_cmd_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("zp-CSI-RS-ResourceId", zp_csi_rs_res_id); - j.write_fieldname("resourceMapping"); - res_map.to_json(j); - if (periodicity_and_offset_present) { - j.write_fieldname("periodicityAndOffset"); - periodicity_and_offset.to_json(j); + j.write_fieldname("securityConfigSMC"); + security_cfg_smc.to_json(j); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -// ZP-CSI-RS-ResourceSet ::= SEQUENCE -SRSASN_CODE zp_csi_rs_res_set_s::pack(bit_ref& bref) const +// UECapabilityEnquiry-IEs ::= SEQUENCE +SRSASN_CODE ue_cap_enquiry_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, zp_csi_rs_res_set_id, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(pack_dyn_seq_of(bref, zp_csi_rs_res_id_list, 1, 16, integer_packer(0, 31))); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(ue_cap_enquiry_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, ue_cap_rat_request_list, 1, 8)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (ue_cap_enquiry_ext_present) { + HANDLE_CODE(ue_cap_enquiry_ext.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE zp_csi_rs_res_set_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_enquiry_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(zp_csi_rs_res_set_id, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(unpack_dyn_seq_of(zp_csi_rs_res_id_list, bref, 1, 16, integer_packer(0, 31))); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(ue_cap_enquiry_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(ue_cap_rat_request_list, bref, 1, 8)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (ue_cap_enquiry_ext_present) { + HANDLE_CODE(ue_cap_enquiry_ext.unpack(bref)); + } return SRSASN_SUCCESS; } -void zp_csi_rs_res_set_s::to_json(json_writer& j) const +void ue_cap_enquiry_ies_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 (const auto& e1 : zp_csi_rs_res_id_list) { - j.write_int(e1); + j.start_array("ue-CapabilityRAT-RequestList"); + for (const auto& e1 : ue_cap_rat_request_list) { + e1.to_json(j); } j.end_array(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (ue_cap_enquiry_ext_present) { + j.write_str("ue-CapabilityEnquiryExt", ue_cap_enquiry_ext.to_string()); + } j.end_obj(); } -// BWP-UplinkDedicated ::= SEQUENCE -SRSASN_CODE bwp_ul_ded_s::pack(bit_ref& bref) const +// CounterCheck ::= SEQUENCE +SRSASN_CODE counter_check_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pucch_cfg_present, 1)); - HANDLE_CODE(bref.pack(pusch_cfg_present, 1)); - HANDLE_CODE(bref.pack(cfgured_grant_cfg_present, 1)); - HANDLE_CODE(bref.pack(srs_cfg_present, 1)); - HANDLE_CODE(bref.pack(beam_fail_recovery_cfg_present, 1)); - - if (pucch_cfg_present) { - HANDLE_CODE(pucch_cfg.pack(bref)); - } - if (pusch_cfg_present) { - HANDLE_CODE(pusch_cfg.pack(bref)); - } - if (cfgured_grant_cfg_present) { - HANDLE_CODE(cfgured_grant_cfg.pack(bref)); - } - if (srs_cfg_present) { - HANDLE_CODE(srs_cfg.pack(bref)); - } - if (beam_fail_recovery_cfg_present) { - HANDLE_CODE(beam_fail_recovery_cfg.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE bwp_ul_ded_s::unpack(cbit_ref& bref) +SRSASN_CODE counter_check_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pucch_cfg_present, 1)); - HANDLE_CODE(bref.unpack(pusch_cfg_present, 1)); - HANDLE_CODE(bref.unpack(cfgured_grant_cfg_present, 1)); - HANDLE_CODE(bref.unpack(srs_cfg_present, 1)); - HANDLE_CODE(bref.unpack(beam_fail_recovery_cfg_present, 1)); - - if (pucch_cfg_present) { - HANDLE_CODE(pucch_cfg.unpack(bref)); - } - if (pusch_cfg_present) { - HANDLE_CODE(pusch_cfg.unpack(bref)); - } - if (cfgured_grant_cfg_present) { - HANDLE_CODE(cfgured_grant_cfg.unpack(bref)); - } - if (srs_cfg_present) { - HANDLE_CODE(srs_cfg.unpack(bref)); - } - if (beam_fail_recovery_cfg_present) { - HANDLE_CODE(beam_fail_recovery_cfg.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void bwp_ul_ded_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pucch_cfg_present) { - j.write_fieldname("pucch-Config"); - pucch_cfg.to_json(j); - } - if (pusch_cfg_present) { - j.write_fieldname("pusch-Config"); - pusch_cfg.to_json(j); - } - if (cfgured_grant_cfg_present) { - j.write_fieldname("configuredGrantConfig"); - cfgured_grant_cfg.to_json(j); - } - if (srs_cfg_present) { - j.write_fieldname("srs-Config"); - srs_cfg.to_json(j); - } - if (beam_fail_recovery_cfg_present) { - j.write_fieldname("beamFailureRecoveryConfig"); - beam_fail_recovery_cfg.to_json(j); - } - j.end_obj(); -} - -// CFRA-CSIRS-Resource ::= SEQUENCE -SRSASN_CODE cfra_csirs_res_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, csi_rs, (uint8_t)0u, (uint8_t)95u)); - HANDLE_CODE(pack_dyn_seq_of(bref, ra_occasion_list, 1, 64, integer_packer(0, 511))); - HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cfra_csirs_res_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(csi_rs, bref, (uint8_t)0u, (uint8_t)95u)); - HANDLE_CODE(unpack_dyn_seq_of(ra_occasion_list, bref, 1, 64, integer_packer(0, 511))); - HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); - - return SRSASN_SUCCESS; -} -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 (const auto& e1 : ra_occasion_list) { - j.write_int(e1); - } - j.end_array(); - j.write_int("ra-PreambleIndex", ra_preamb_idx); - j.end_obj(); -} - -// CFRA-SSB-Resource ::= SEQUENCE -SRSASN_CODE cfra_ssb_res_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, ssb, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cfra_ssb_res_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(ssb, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void cfra_ssb_res_s::to_json(json_writer& j) const +void counter_check_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("ssb", ssb); - j.write_int("ra-PreambleIndex", ra_preamb_idx); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -// CSI-AperiodicTriggerState ::= SEQUENCE -SRSASN_CODE csi_aperiodic_trigger_state_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, associated_report_cfg_info_list, 1, 16)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_aperiodic_trigger_state_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(associated_report_cfg_info_list, bref, 1, 16)); - - return SRSASN_SUCCESS; -} -void csi_aperiodic_trigger_state_s::to_json(json_writer& j) const +void counter_check_s::crit_exts_c_::destroy_() { - j.start_obj(); - j.start_array("associatedReportConfigInfoList"); - for (const auto& e1 : associated_report_cfg_info_list) { - e1.to_json(j); + switch (type_) { + case types::counter_check: + c.destroy(); + break; + default: + break; } - j.end_array(); - j.end_obj(); } - -// CSI-ReportPeriodicityAndOffset ::= CHOICE -void csi_report_periodicity_and_offset_c::destroy_() {} -void csi_report_periodicity_and_offset_c::set(types::options e) +void counter_check_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; -} -csi_report_periodicity_and_offset_c::csi_report_periodicity_and_offset_c( - const csi_report_periodicity_and_offset_c& other) -{ - type_ = other.type(); switch (type_) { - case types::slots4: - c.init(other.c.get()); - break; - case types::slots5: - c.init(other.c.get()); - break; - case types::slots8: - c.init(other.c.get()); - break; - case types::slots10: - c.init(other.c.get()); - break; - case types::slots16: - c.init(other.c.get()); - break; - case types::slots20: - c.init(other.c.get()); + case types::counter_check: + c.init(); break; - case types::slots40: - c.init(other.c.get()); + case types::crit_exts_future: break; - case types::slots80: - c.init(other.c.get()); + case types::nulltype: break; - case types::slots160: - c.init(other.c.get()); + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + } +} +counter_check_s::crit_exts_c_::crit_exts_c_(const counter_check_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::counter_check: + c.init(other.c.get()); break; - case types::slots320: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); } } -csi_report_periodicity_and_offset_c& csi_report_periodicity_and_offset_c:: - operator=(const csi_report_periodicity_and_offset_c& other) +counter_check_s::crit_exts_c_& counter_check_s::crit_exts_c_::operator=(const counter_check_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::slots4: - c.set(other.c.get()); - break; - case types::slots5: - c.set(other.c.get()); - break; - case types::slots8: - c.set(other.c.get()); - break; - case types::slots10: - c.set(other.c.get()); - break; - case types::slots16: - c.set(other.c.get()); - break; - case types::slots20: - c.set(other.c.get()); - break; - case types::slots40: - c.set(other.c.get()); - break; - case types::slots80: - c.set(other.c.get()); - break; - case types::slots160: - c.set(other.c.get()); + case types::counter_check: + c.set(other.c.get()); break; - case types::slots320: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); } return *this; } -void csi_report_periodicity_and_offset_c::to_json(json_writer& j) const +void counter_check_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::slots4: - j.write_int("slots4", c.get()); - break; - case types::slots5: - j.write_int("slots5", c.get()); - break; - case types::slots8: - j.write_int("slots8", c.get()); - break; - case types::slots10: - j.write_int("slots10", c.get()); - break; - case types::slots16: - j.write_int("slots16", c.get()); - break; - case types::slots20: - j.write_int("slots20", c.get()); - break; - case types::slots40: - j.write_int("slots40", c.get()); - break; - case types::slots80: - j.write_int("slots80", c.get()); - break; - case types::slots160: - j.write_int("slots160", c.get()); + case types::counter_check: + j.write_fieldname("counterCheck"); + c.get().to_json(j); break; - case types::slots320: - j.write_int("slots320", c.get()); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE csi_report_periodicity_and_offset_c::pack(bit_ref& bref) const +SRSASN_CODE counter_check_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::slots4: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - case types::slots5: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); - break; - case types::slots8: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); - break; - case types::slots10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::slots16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); - break; - case types::slots20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::slots40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::slots80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::slots160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + case types::counter_check: + HANDLE_CODE(c.get().pack(bref)); break; - case types::slots320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_report_periodicity_and_offset_c::unpack(cbit_ref& bref) +SRSASN_CODE counter_check_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::slots4: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - case types::slots5: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); - break; - case types::slots8: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); - break; - case types::slots10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::slots16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::slots20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::slots40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::slots80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::slots160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + case types::counter_check: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::slots320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_report_periodicity_and_offset_c::types_opts::to_string() const -{ - 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 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 -SRSASN_CODE csi_semi_persistent_on_pusch_trigger_state_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, associated_report_cfg_info, (uint8_t)0u, (uint8_t)47u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_semi_persistent_on_pusch_trigger_state_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(associated_report_cfg_info, bref, (uint8_t)0u, (uint8_t)47u)); - - return SRSASN_SUCCESS; -} -void csi_semi_persistent_on_pusch_trigger_state_s::to_json(json_writer& j) const +std::string counter_check_s::crit_exts_c_::types_opts::to_string() const { - j.start_obj(); - j.write_int("associatedReportConfigInfo", associated_report_cfg_info); - j.end_obj(); + static const char* options[] = {"counterCheck", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "counter_check_s::crit_exts_c_::types"); } -// CodebookConfig ::= SEQUENCE -SRSASN_CODE codebook_cfg_s::pack(bit_ref& bref) const +// DLInformationTransfer ::= SEQUENCE +SRSASN_CODE dl_info_transfer_s::pack(bit_ref& bref) const { - HANDLE_CODE(codebook_type.pack(bref)); + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE codebook_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE dl_info_transfer_s::unpack(cbit_ref& bref) { - HANDLE_CODE(codebook_type.unpack(bref)); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void codebook_cfg_s::to_json(json_writer& j) const +void dl_info_transfer_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("codebookType"); - codebook_type.to_json(j); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -void codebook_cfg_s::codebook_type_c_::destroy_() +void dl_info_transfer_s::crit_exts_c_::destroy_() { switch (type_) { - case types::type1: - c.destroy(); - break; - case types::type2: - c.destroy(); + case types::dl_info_transfer: + c.destroy(); break; default: break; } } -void codebook_cfg_s::codebook_type_c_::set(types::options e) +void dl_info_transfer_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::type1: - c.init(); + case types::dl_info_transfer: + c.init(); break; - case types::type2: - c.init(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::codebook_type_c_(const codebook_cfg_s::codebook_type_c_& other) +dl_info_transfer_s::crit_exts_c_::crit_exts_c_(const dl_info_transfer_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::type1: - c.init(other.c.get()); + case types::dl_info_transfer: + c.init(other.c.get()); break; - case types::type2: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_& codebook_cfg_s::codebook_type_c_:: - operator=(const codebook_cfg_s::codebook_type_c_& other) +dl_info_transfer_s::crit_exts_c_& +dl_info_transfer_s::crit_exts_c_::operator=(const dl_info_transfer_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::type1: - c.set(other.c.get()); + case types::dl_info_transfer: + c.set(other.c.get()); break; - case types::type2: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); } return *this; } -void codebook_cfg_s::codebook_type_c_::to_json(json_writer& j) const +void dl_info_transfer_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::type1: - j.write_fieldname("type1"); - j.start_obj(); - j.write_fieldname("subType"); - c.get().sub_type.to_json(j); - j.write_int("codebookMode", c.get().codebook_mode); - j.end_obj(); + case types::dl_info_transfer: + j.write_fieldname("dlInformationTransfer"); + c.get().to_json(j); break; - case types::type2: - j.write_fieldname("type2"); - j.start_obj(); - j.write_fieldname("subType"); - c.get().sub_type.to_json(j); - j.write_str("phaseAlphabetSize", c.get().phase_alphabet_size.to_string()); - j.write_bool("subbandAmplitude", c.get().subband_amplitude); - j.write_str("numberOfBeams", c.get().nof_beams.to_string()); - j.end_obj(); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE codebook_cfg_s::codebook_type_c_::pack(bit_ref& bref) const +SRSASN_CODE dl_info_transfer_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::type1: - HANDLE_CODE(c.get().sub_type.pack(bref)); - HANDLE_CODE(pack_integer(bref, c.get().codebook_mode, (uint8_t)1u, (uint8_t)2u)); + case types::dl_info_transfer: + HANDLE_CODE(c.get().pack(bref)); break; - case types::type2: - HANDLE_CODE(c.get().sub_type.pack(bref)); - HANDLE_CODE(c.get().phase_alphabet_size.pack(bref)); - HANDLE_CODE(bref.pack(c.get().subband_amplitude, 1)); - HANDLE_CODE(c.get().nof_beams.pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE codebook_cfg_s::codebook_type_c_::unpack(cbit_ref& bref) +SRSASN_CODE dl_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::type1: - HANDLE_CODE(c.get().sub_type.unpack(bref)); - HANDLE_CODE(unpack_integer(c.get().codebook_mode, bref, (uint8_t)1u, (uint8_t)2u)); + case types::dl_info_transfer: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::type2: - HANDLE_CODE(c.get().sub_type.unpack(bref)); - HANDLE_CODE(c.get().phase_alphabet_size.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().subband_amplitude, 1)); - HANDLE_CODE(c.get().nof_beams.unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::destroy_() +std::string dl_info_transfer_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* options[] = {"dlInformationTransfer", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "dl_info_transfer_s::crit_exts_c_::types"); +} + +// MobilityFromNRCommand ::= SEQUENCE +SRSASN_CODE mob_from_nr_cmd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_nr_cmd_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mob_from_nr_cmd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void mob_from_nr_cmd_s::crit_exts_c_::destroy_() { switch (type_) { - case types::type_i_single_panel: - c.destroy(); - break; - case types::type_i_multi_panel: - c.destroy(); + case types::mob_from_nr_cmd: + c.destroy(); break; default: break; } } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::set(types::options e) +void mob_from_nr_cmd_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::type_i_single_panel: - c.init(); + case types::mob_from_nr_cmd: + c.init(); break; - case types::type_i_multi_panel: - c.init(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::sub_type_c_( - const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_& other) +mob_from_nr_cmd_s::crit_exts_c_::crit_exts_c_(const mob_from_nr_cmd_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::type_i_single_panel: - c.init(other.c.get()); + case types::mob_from_nr_cmd: + c.init(other.c.get()); break; - case types::type_i_multi_panel: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_& codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_:: - operator=(const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_& other) +mob_from_nr_cmd_s::crit_exts_c_& +mob_from_nr_cmd_s::crit_exts_c_::operator=(const mob_from_nr_cmd_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::type_i_single_panel: - c.set(other.c.get()); + case types::mob_from_nr_cmd: + c.set(other.c.get()); break; - case types::type_i_multi_panel: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); } return *this; } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::to_json(json_writer& j) const +void mob_from_nr_cmd_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::type_i_single_panel: - j.write_fieldname("typeI-SinglePanel"); - j.start_obj(); - j.write_fieldname("nrOfAntennaPorts"); - c.get().nr_of_ant_ports.to_json(j); - j.write_str("typeI-SinglePanel-ri-Restriction", - c.get().type_i_single_panel_ri_restrict.to_string()); - j.end_obj(); + case types::mob_from_nr_cmd: + j.write_fieldname("mobilityFromNRCommand"); + c.get().to_json(j); break; - case types::type_i_multi_panel: - j.write_fieldname("typeI-MultiPanel"); - j.start_obj(); - j.write_fieldname("ng-n1-n2"); - c.get().ng_n1_n2.to_json(j); - j.write_str("ri-Restriction", c.get().ri_restrict.to_string()); - j.end_obj(); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::pack(bit_ref& bref) const +SRSASN_CODE mob_from_nr_cmd_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::type_i_single_panel: - HANDLE_CODE(c.get().nr_of_ant_ports.pack(bref)); - HANDLE_CODE(c.get().type_i_single_panel_ri_restrict.pack(bref)); + case types::mob_from_nr_cmd: + HANDLE_CODE(c.get().pack(bref)); break; - case types::type_i_multi_panel: - HANDLE_CODE(c.get().ng_n1_n2.pack(bref)); - HANDLE_CODE(c.get().ri_restrict.pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::unpack(cbit_ref& bref) +SRSASN_CODE mob_from_nr_cmd_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::type_i_single_panel: - HANDLE_CODE(c.get().nr_of_ant_ports.unpack(bref)); - HANDLE_CODE(c.get().type_i_single_panel_ri_restrict.unpack(bref)); + case types::mob_from_nr_cmd: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::type_i_multi_panel: - HANDLE_CODE(c.get().ng_n1_n2.unpack(bref)); - HANDLE_CODE(c.get().ri_restrict.unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::destroy_() +std::string mob_from_nr_cmd_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* options[] = {"mobilityFromNRCommand", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "mob_from_nr_cmd_s::crit_exts_c_::types"); +} + +// RRCReconfiguration ::= SEQUENCE +SRSASN_CODE rrc_recfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_recfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void rrc_recfg_s::crit_exts_c_::destroy_() { switch (type_) { - case types::two: - c.destroy(); - break; - case types::more_than_two: - c.destroy(); + case types::rrc_recfg: + c.destroy(); break; default: break; } } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::set( - types::options e) +void rrc_recfg_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::two: - c.init(); + case types::rrc_recfg: + c.init(); break; - case types::more_than_two: - c.init(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::nr_of_ant_ports_c_( - const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_& other) +rrc_recfg_s::crit_exts_c_::crit_exts_c_(const rrc_recfg_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::two: - c.init(other.c.get()); + case types::rrc_recfg: + c.init(other.c.get()); break; - case types::more_than_two: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_& -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::operator=( - const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_& other) +rrc_recfg_s::crit_exts_c_& rrc_recfg_s::crit_exts_c_::operator=(const rrc_recfg_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::two: - c.set(other.c.get()); + case types::rrc_recfg: + c.set(other.c.get()); break; - case types::more_than_two: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); } return *this; } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::to_json( - json_writer& j) const +void rrc_recfg_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::two: - j.write_fieldname("two"); - j.start_obj(); - j.write_str("twoTX-CodebookSubsetRestriction", c.get().two_tx_codebook_subset_restrict.to_string()); - j.end_obj(); + case types::rrc_recfg: + j.write_fieldname("rrcReconfiguration"); + c.get().to_json(j); break; - case types::more_than_two: - j.write_fieldname("moreThanTwo"); - j.start_obj(); - j.write_fieldname("n1-n2"); - c.get().n1_n2.to_json(j); - if (c.get().type_i_single_panel_codebook_subset_restrict_i2_present) { - j.write_str("typeI-SinglePanel-codebookSubsetRestriction-i2", - c.get().type_i_single_panel_codebook_subset_restrict_i2.to_string()); - } - j.end_obj(); + case types::crit_exts_future: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::pack( - bit_ref& bref) const +SRSASN_CODE rrc_recfg_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::two: - HANDLE_CODE(c.get().two_tx_codebook_subset_restrict.pack(bref)); + case types::rrc_recfg: + HANDLE_CODE(c.get().pack(bref)); break; - case types::more_than_two: - HANDLE_CODE(bref.pack(c.get().type_i_single_panel_codebook_subset_restrict_i2_present, 1)); - HANDLE_CODE(c.get().n1_n2.pack(bref)); - if (c.get().type_i_single_panel_codebook_subset_restrict_i2_present) { - HANDLE_CODE(c.get().type_i_single_panel_codebook_subset_restrict_i2.pack(bref)); - } + case types::crit_exts_future: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::unpack( - cbit_ref& bref) +SRSASN_CODE rrc_recfg_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::two: - HANDLE_CODE(c.get().two_tx_codebook_subset_restrict.unpack(bref)); + case types::rrc_recfg: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::more_than_two: - HANDLE_CODE(bref.unpack(c.get().type_i_single_panel_codebook_subset_restrict_i2_present, 1)); - HANDLE_CODE(c.get().n1_n2.unpack(bref)); - if (c.get().type_i_single_panel_codebook_subset_restrict_i2_present) { - HANDLE_CODE(c.get().type_i_single_panel_codebook_subset_restrict_i2.unpack(bref)); - } + case types::crit_exts_future: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void 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_::destroy_() +std::string rrc_recfg_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* options[] = {"rrcReconfiguration", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_recfg_s::crit_exts_c_::types"); +} + +// RRCReestablishment ::= SEQUENCE +SRSASN_CODE rrc_reest_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_reest_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_reest_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void rrc_reest_s::crit_exts_c_::destroy_() { switch (type_) { - case types::two_one_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::two_two_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::four_one_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::three_two_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::six_one_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::four_two_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::eight_one_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::four_three_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::six_two_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::twelve_one_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::four_four_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::eight_two_type_i_single_panel_restrict: - c.destroy >(); - break; - case types::sixteen_one_type_i_single_panel_restrict: - c.destroy >(); + case types::rrc_reest: + c.destroy(); break; default: break; } } -void 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_::set(types::options e) +void rrc_reest_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::two_one_type_i_single_panel_restrict: - c.init >(); - break; - case types::two_two_type_i_single_panel_restrict: - c.init >(); - break; - case types::four_one_type_i_single_panel_restrict: - c.init >(); - break; - case types::three_two_type_i_single_panel_restrict: - c.init >(); - break; - case types::six_one_type_i_single_panel_restrict: - c.init >(); - break; - case types::four_two_type_i_single_panel_restrict: - c.init >(); - break; - case types::eight_one_type_i_single_panel_restrict: - c.init >(); - break; - case types::four_three_type_i_single_panel_restrict: - c.init >(); - break; - case types::six_two_type_i_single_panel_restrict: - c.init >(); - break; - case types::twelve_one_type_i_single_panel_restrict: - c.init >(); - break; - case types::four_four_type_i_single_panel_restrict: - c.init >(); - break; - case types::eight_two_type_i_single_panel_restrict: - c.init >(); + case types::rrc_reest: + c.init(); break; - case types::sixteen_one_type_i_single_panel_restrict: - c.init >(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, - "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_"); + log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); } } -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_::n1_n2_c_(const 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_& other) +rrc_reest_s::crit_exts_c_::crit_exts_c_(const rrc_reest_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::two_one_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::two_two_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::four_one_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::three_two_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::six_one_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::four_two_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::eight_one_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::four_three_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::six_two_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::twelve_one_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::four_four_type_i_single_panel_restrict: - c.init(other.c.get >()); - break; - case types::eight_two_type_i_single_panel_restrict: - c.init(other.c.get >()); + case types::rrc_reest: + c.init(other.c.get()); break; - case types::sixteen_one_type_i_single_panel_restrict: - c.init(other.c.get >()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, - "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_"); + log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); } } -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_& - 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_:: - operator=(const 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_& other) +rrc_reest_s::crit_exts_c_& rrc_reest_s::crit_exts_c_::operator=(const rrc_reest_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::two_one_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::two_two_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::four_one_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::three_two_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::six_one_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::four_two_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::eight_one_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::four_three_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::six_two_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::twelve_one_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::four_four_type_i_single_panel_restrict: - c.set(other.c.get >()); - break; - case types::eight_two_type_i_single_panel_restrict: - c.set(other.c.get >()); + case types::rrc_reest: + c.set(other.c.get()); break; - case types::sixteen_one_type_i_single_panel_restrict: - c.set(other.c.get >()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, - "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_"); + log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); } return *this; } -void 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_::to_json(json_writer& j) const +void rrc_reest_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::two_one_type_i_single_panel_restrict: - j.write_str("two-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::two_two_type_i_single_panel_restrict: - j.write_str("two-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::four_one_type_i_single_panel_restrict: - j.write_str("four-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::three_two_type_i_single_panel_restrict: - j.write_str("three-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::six_one_type_i_single_panel_restrict: - j.write_str("six-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::four_two_type_i_single_panel_restrict: - j.write_str("four-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::eight_one_type_i_single_panel_restrict: - j.write_str("eight-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::four_three_type_i_single_panel_restrict: - j.write_str("four-three-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::six_two_type_i_single_panel_restrict: - j.write_str("six-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::twelve_one_type_i_single_panel_restrict: - j.write_str("twelve-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::four_four_type_i_single_panel_restrict: - j.write_str("four-four-TypeI-SinglePanel-Restriction", c.get >().to_string()); - break; - case types::eight_two_type_i_single_panel_restrict: - j.write_str("eight-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); + case types::rrc_reest: + j.write_fieldname("rrcReestablishment"); + c.get().to_json(j); break; - case types::sixteen_one_type_i_single_panel_restrict: - j.write_str("sixteen-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, - "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_"); + log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE 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_::pack(bit_ref& bref) const +SRSASN_CODE rrc_reest_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::two_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::two_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::four_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::three_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::six_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); + case types::rrc_reest: + HANDLE_CODE(c.get().pack(bref)); break; - case types::four_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); + case types::crit_exts_future: break; - case types::eight_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); + default: + log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_reest_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_reest: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::four_three_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::six_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::twelve_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::four_four_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::eight_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::sixteen_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - default: - log_invalid_choice_id(type_, - "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_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE 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_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::two_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::two_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::four_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::three_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::six_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::four_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::eight_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::four_three_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::six_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::twelve_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::four_four_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::eight_two_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::sixteen_one_type_i_single_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, - "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_"); + log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -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 +std::string rrc_reest_s::crit_exts_c_::types_opts::to_string() const { - 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, - "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"); + static const char* options[] = {"rrcReestablishment", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_reest_s::crit_exts_c_::types"); } -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 +// RRCRelease ::= SEQUENCE +SRSASN_CODE rrc_release_s::pack(bit_ref& bref) const { - static const char* options[] = {"two", "moreThanTwo"}; - return convert_enum_idx( - options, - 2, - value, - "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::types"); + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; } -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 +SRSASN_CODE rrc_release_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {2}; - return map_enum_number( - options, - 1, - value, - "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::types"); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_release_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::destroy_() +void rrc_release_s::crit_exts_c_::destroy_() { switch (type_) { - case types::two_two_one_type_i_multi_panel_restrict: - c.destroy >(); - break; - case types::two_four_one_type_i_multi_panel_restrict: - c.destroy >(); - break; - case types::four_two_one_type_i_multi_panel_restrict: - c.destroy >(); - break; - case types::two_two_two_type_i_multi_panel_restrict: - c.destroy >(); - break; - case types::two_eight_one_type_i_multi_panel_restrict: - c.destroy >(); - break; - case types::four_four_one_type_i_multi_panel_restrict: - c.destroy >(); - break; - case types::two_four_two_type_i_multi_panel_restrict: - c.destroy >(); - break; - case types::four_two_two_type_i_multi_panel_restrict: - c.destroy >(); + case types::rrc_release: + c.destroy(); break; default: break; } } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::set(types::options e) +void rrc_release_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::two_two_one_type_i_multi_panel_restrict: - c.init >(); - break; - case types::two_four_one_type_i_multi_panel_restrict: - c.init >(); - break; - case types::four_two_one_type_i_multi_panel_restrict: - c.init >(); - break; - case types::two_two_two_type_i_multi_panel_restrict: - c.init >(); - break; - case types::two_eight_one_type_i_multi_panel_restrict: - c.init >(); - break; - case types::four_four_one_type_i_multi_panel_restrict: - c.init >(); - break; - case types::two_four_two_type_i_multi_panel_restrict: - c.init >(); + case types::rrc_release: + c.init(); break; - case types::four_two_two_type_i_multi_panel_restrict: - c.init >(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::ng_n1_n2_c_( - const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_& other) +rrc_release_s::crit_exts_c_::crit_exts_c_(const rrc_release_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::two_two_one_type_i_multi_panel_restrict: - c.init(other.c.get >()); - break; - case types::two_four_one_type_i_multi_panel_restrict: - c.init(other.c.get >()); - break; - case types::four_two_one_type_i_multi_panel_restrict: - c.init(other.c.get >()); - break; - case types::two_two_two_type_i_multi_panel_restrict: - c.init(other.c.get >()); - break; - case types::two_eight_one_type_i_multi_panel_restrict: - c.init(other.c.get >()); - break; - case types::four_four_one_type_i_multi_panel_restrict: - c.init(other.c.get >()); - break; - case types::two_four_two_type_i_multi_panel_restrict: - c.init(other.c.get >()); + case types::rrc_release: + c.init(other.c.get()); break; - case types::four_two_two_type_i_multi_panel_restrict: - c.init(other.c.get >()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_& -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_:: -operator=(const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_& other) +rrc_release_s::crit_exts_c_& rrc_release_s::crit_exts_c_::operator=(const rrc_release_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::two_two_one_type_i_multi_panel_restrict: - c.set(other.c.get >()); - break; - case types::two_four_one_type_i_multi_panel_restrict: - c.set(other.c.get >()); - break; - case types::four_two_one_type_i_multi_panel_restrict: - c.set(other.c.get >()); - break; - case types::two_two_two_type_i_multi_panel_restrict: - c.set(other.c.get >()); - break; - case types::two_eight_one_type_i_multi_panel_restrict: - c.set(other.c.get >()); - break; - case types::four_four_one_type_i_multi_panel_restrict: - c.set(other.c.get >()); - break; - case types::two_four_two_type_i_multi_panel_restrict: - c.set(other.c.get >()); + case types::rrc_release: + c.set(other.c.get()); break; - case types::four_two_two_type_i_multi_panel_restrict: - c.set(other.c.get >()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); } return *this; } -void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::to_json( - json_writer& j) const +void rrc_release_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::two_two_one_type_i_multi_panel_restrict: - j.write_str("two-two-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); - break; - case types::two_four_one_type_i_multi_panel_restrict: - j.write_str("two-four-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); - break; - case types::four_two_one_type_i_multi_panel_restrict: - j.write_str("four-two-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); - break; - case types::two_two_two_type_i_multi_panel_restrict: - j.write_str("two-two-two-TypeI-MultiPanel-Restriction", c.get >().to_string()); - break; - case types::two_eight_one_type_i_multi_panel_restrict: - j.write_str("two-eight-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); - break; - case types::four_four_one_type_i_multi_panel_restrict: - j.write_str("four-four-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); - break; - case types::two_four_two_type_i_multi_panel_restrict: - j.write_str("two-four-two-TypeI-MultiPanel-Restriction", c.get >().to_string()); + case types::rrc_release: + j.write_fieldname("rrcRelease"); + c.get().to_json(j); break; - case types::four_two_two_type_i_multi_panel_restrict: - j.write_str("four-two-two-TypeI-MultiPanel-Restriction", c.get >().to_string()); + case types::crit_exts_future: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::pack(bit_ref& bref) const +SRSASN_CODE rrc_release_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::two_two_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::two_four_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::four_two_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::two_two_two_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::two_eight_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::four_four_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::two_four_two_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); + case types::rrc_release: + HANDLE_CODE(c.get().pack(bref)); break; - case types::four_two_two_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE -codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::unpack(cbit_ref& bref) +SRSASN_CODE rrc_release_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::two_two_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::two_four_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::four_two_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::two_two_two_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::two_eight_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::four_four_one_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::two_four_two_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); + case types::rrc_release: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::four_two_two_type_i_multi_panel_restrict: - HANDLE_CODE(c.get >().unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id( - type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -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 +std::string rrc_release_s::crit_exts_c_::types_opts::to_string() const { - 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, - value, - "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::types"); + static const char* options[] = {"rrcRelease", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_release_s::crit_exts_c_::types"); } -std::string codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::types_opts::to_string() const +// RRCResume ::= SEQUENCE +SRSASN_CODE rrc_resume_s::pack(bit_ref& bref) const { - 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"); + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; } +SRSASN_CODE rrc_resume_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); -void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::destroy_() + return SRSASN_SUCCESS; +} +void rrc_resume_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void rrc_resume_s::crit_exts_c_::destroy_() { switch (type_) { - case types::type_ii: - c.destroy(); - break; - case types::type_ii_port_sel: - c.destroy(); + case types::rrc_resume: + c.destroy(); break; default: break; } } -void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::set(types::options e) +void rrc_resume_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::type_ii: - c.init(); + case types::rrc_resume: + c.init(); break; - case types::type_ii_port_sel: - c.init(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::sub_type_c_( - const codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_& other) +rrc_resume_s::crit_exts_c_::crit_exts_c_(const rrc_resume_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::type_ii: - c.init(other.c.get()); + case types::rrc_resume: + c.init(other.c.get()); break; - case types::type_ii_port_sel: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_& codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_:: - operator=(const codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_& other) +rrc_resume_s::crit_exts_c_& rrc_resume_s::crit_exts_c_::operator=(const rrc_resume_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::type_ii: - c.set(other.c.get()); + case types::rrc_resume: + c.set(other.c.get()); break; - case types::type_ii_port_sel: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); } return *this; } -void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::to_json(json_writer& j) const +void rrc_resume_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::type_ii: - j.write_fieldname("typeII"); - j.start_obj(); - j.write_fieldname("n1-n2-codebookSubsetRestriction"); - c.get().n1_n2_codebook_subset_restrict.to_json(j); - j.write_str("typeII-RI-Restriction", c.get().type_ii_ri_restrict.to_string()); - j.end_obj(); + case types::rrc_resume: + j.write_fieldname("rrcResume"); + c.get().to_json(j); break; - case types::type_ii_port_sel: - j.write_fieldname("typeII-PortSelection"); - j.start_obj(); - if (c.get().port_sel_sampling_size_present) { - j.write_str("portSelectionSamplingSize", c.get().port_sel_sampling_size.to_string()); - } - j.write_str("typeII-PortSelectionRI-Restriction", - c.get().type_ii_port_sel_ri_restrict.to_string()); - j.end_obj(); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::pack(bit_ref& bref) const +SRSASN_CODE rrc_resume_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::type_ii: - HANDLE_CODE(c.get().n1_n2_codebook_subset_restrict.pack(bref)); - HANDLE_CODE(c.get().type_ii_ri_restrict.pack(bref)); + case types::rrc_resume: + HANDLE_CODE(c.get().pack(bref)); break; - case types::type_ii_port_sel: - HANDLE_CODE(bref.pack(c.get().port_sel_sampling_size_present, 1)); - if (c.get().port_sel_sampling_size_present) { - HANDLE_CODE(c.get().port_sel_sampling_size.pack(bref)); - } - HANDLE_CODE(c.get().type_ii_port_sel_ri_restrict.pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::unpack(cbit_ref& bref) +SRSASN_CODE rrc_resume_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::type_ii: - HANDLE_CODE(c.get().n1_n2_codebook_subset_restrict.unpack(bref)); - HANDLE_CODE(c.get().type_ii_ri_restrict.unpack(bref)); + case types::rrc_resume: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::type_ii_port_sel: - HANDLE_CODE(bref.unpack(c.get().port_sel_sampling_size_present, 1)); - if (c.get().port_sel_sampling_size_present) { - HANDLE_CODE(c.get().port_sel_sampling_size.unpack(bref)); - } - HANDLE_CODE(c.get().type_ii_port_sel_ri_restrict.unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::destroy_() +std::string rrc_resume_s::crit_exts_c_::types_opts::to_string() const { - switch (type_) { - case types::two_one: - c.destroy >(); - break; - case types::two_two: - c.destroy >(); - break; - case types::four_one: - c.destroy >(); - break; - case types::three_two: - c.destroy >(); - break; - case types::six_one: - c.destroy >(); - break; - case types::four_two: - c.destroy >(); - break; - case types::eight_one: - c.destroy >(); - break; - case types::four_three: - c.destroy >(); - break; - case types::six_two: - c.destroy >(); - break; - case types::twelve_one: - c.destroy >(); - break; - case types::four_four: - c.destroy >(); - break; - case types::eight_two: - c.destroy >(); - break; - case types::sixteen_one: - c.destroy >(); + static const char* options[] = {"rrcResume", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_resume_s::crit_exts_c_::types"); +} + +// SecurityModeCommand ::= SEQUENCE +SRSASN_CODE security_mode_cmd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_cmd_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void security_mode_cmd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void security_mode_cmd_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::security_mode_cmd: + c.destroy(); break; default: break; } } -void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::set( - types::options e) +void security_mode_cmd_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::two_one: - c.init >(); - break; - case types::two_two: - c.init >(); - break; - case types::four_one: - c.init >(); - break; - case types::three_two: - c.init >(); - break; - case types::six_one: - c.init >(); - break; - case types::four_two: - c.init >(); + case types::security_mode_cmd: + c.init(); break; - case types::eight_one: - c.init >(); + case types::crit_exts_future: break; - case types::four_three: - c.init >(); + case types::nulltype: break; - case types::six_two: - c.init >(); + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + } +} +security_mode_cmd_s::crit_exts_c_::crit_exts_c_(const security_mode_cmd_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::security_mode_cmd: + c.init(other.c.get()); break; - case types::twelve_one: - c.init >(); + case types::crit_exts_future: break; - case types::four_four: - c.init >(); + case types::nulltype: break; - case types::eight_two: - c.init >(); + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + } +} +security_mode_cmd_s::crit_exts_c_& +security_mode_cmd_s::crit_exts_c_::operator=(const security_mode_cmd_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::security_mode_cmd: + c.set(other.c.get()); break; - case types::sixteen_one: - c.init >(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); } + + return *this; } -codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_:: - n1_n2_codebook_subset_restrict_c_( - const codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_& - other) +void security_mode_cmd_s::crit_exts_c_::to_json(json_writer& j) const { - type_ = other.type(); + j.start_obj(); switch (type_) { - case types::two_one: - c.init(other.c.get >()); + case types::security_mode_cmd: + j.write_fieldname("securityModeCommand"); + c.get().to_json(j); break; - case types::two_two: - c.init(other.c.get >()); + case types::crit_exts_future: break; - case types::four_one: - c.init(other.c.get >()); + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE security_mode_cmd_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::security_mode_cmd: + HANDLE_CODE(c.get().pack(bref)); break; - case types::three_two: - c.init(other.c.get >()); + case types::crit_exts_future: break; - case types::six_one: - c.init(other.c.get >()); + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_cmd_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::security_mode_cmd: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::four_two: - c.init(other.c.get >()); + case types::crit_exts_future: break; - case types::eight_one: - c.init(other.c.get >()); + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string security_mode_cmd_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* options[] = {"securityModeCommand", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "security_mode_cmd_s::crit_exts_c_::types"); +} + +// UECapabilityEnquiry ::= SEQUENCE +SRSASN_CODE ue_cap_enquiry_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ue_cap_enquiry_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::ue_cap_enquiry: + c.destroy(); break; - case types::four_three: - c.init(other.c.get >()); + default: break; - case types::six_two: - c.init(other.c.get >()); + } +} +void ue_cap_enquiry_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ue_cap_enquiry: + c.init(); break; - case types::twelve_one: - c.init(other.c.get >()); + case types::crit_exts_future: break; - case types::four_four: - c.init(other.c.get >()); + case types::nulltype: break; - case types::eight_two: - c.init(other.c.get >()); + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + } +} +ue_cap_enquiry_s::crit_exts_c_::crit_exts_c_(const ue_cap_enquiry_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ue_cap_enquiry: + c.init(other.c.get()); break; - case types::sixteen_one: - c.init(other.c.get >()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); } } -codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_& -codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::operator=( - const codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_& other) +ue_cap_enquiry_s::crit_exts_c_& ue_cap_enquiry_s::crit_exts_c_::operator=(const ue_cap_enquiry_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::two_one: - c.set(other.c.get >()); - break; - case types::two_two: - c.set(other.c.get >()); - break; - case types::four_one: - c.set(other.c.get >()); - break; - case types::three_two: - c.set(other.c.get >()); - break; - case types::six_one: - c.set(other.c.get >()); - break; - case types::four_two: - c.set(other.c.get >()); - break; - case types::eight_one: - c.set(other.c.get >()); - break; - case types::four_three: - c.set(other.c.get >()); - break; - case types::six_two: - c.set(other.c.get >()); - break; - case types::twelve_one: - c.set(other.c.get >()); - break; - case types::four_four: - c.set(other.c.get >()); - break; - case types::eight_two: - c.set(other.c.get >()); + case types::ue_cap_enquiry: + c.set(other.c.get()); break; - case types::sixteen_one: - c.set(other.c.get >()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id( - type_, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); } return *this; } -void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::to_json( - json_writer& j) const +void ue_cap_enquiry_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::two_one: - j.write_str("two-one", c.get >().to_string()); - break; - case types::two_two: - j.write_str("two-two", c.get >().to_string()); - break; - case types::four_one: - j.write_str("four-one", c.get >().to_string()); + case types::ue_cap_enquiry: + j.write_fieldname("ueCapabilityEnquiry"); + c.get().to_json(j); break; - case types::three_two: - j.write_str("three-two", c.get >().to_string()); + case types::crit_exts_future: break; - case types::six_one: - j.write_str("six-one", c.get >().to_string()); + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_cap_enquiry_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ue_cap_enquiry: + HANDLE_CODE(c.get().pack(bref)); break; - case types::four_two: - j.write_str("four-two", c.get >().to_string()); + case types::crit_exts_future: break; - case types::eight_one: - j.write_str("eight-one", c.get >().to_string()); + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ue_cap_enquiry: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::four_three: - j.write_str("four-three", c.get >().to_string()); + case types::crit_exts_future: break; - case types::six_two: - j.write_str("six-two", c.get >().to_string()); + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string ue_cap_enquiry_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* options[] = {"ueCapabilityEnquiry", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "ue_cap_enquiry_s::crit_exts_c_::types"); +} + +// DL-DCCH-MessageType ::= CHOICE +void dl_dcch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); break; - case types::twelve_one: - j.write_str("twelve-one", c.get >().to_string()); + default: break; - case types::four_four: - j.write_str("four-four", c.get >().to_string()); + } +} +void dl_dcch_msg_type_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); break; - case types::eight_two: - j.write_str("eight-two", c.get >().to_string()); + case types::msg_class_ext: break; - case types::sixteen_one: - j.write_str("sixteen-one", c.get >().to_string()); + case types::nulltype: break; default: - log_invalid_choice_id( - type_, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); } - j.end_obj(); } -SRSASN_CODE -codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::pack( - bit_ref& bref) const +dl_dcch_msg_type_c::dl_dcch_msg_type_c(const dl_dcch_msg_type_c& other) { - type_.pack(bref); + type_ = other.type(); switch (type_) { - case types::two_one: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::two_two: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::four_one: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::three_two: - HANDLE_CODE(c.get >().pack(bref)); + case types::c1: + c.init(other.c.get()); break; - case types::six_one: - HANDLE_CODE(c.get >().pack(bref)); + case types::msg_class_ext: break; - case types::four_two: - HANDLE_CODE(c.get >().pack(bref)); + case types::nulltype: break; - case types::eight_one: - HANDLE_CODE(c.get >().pack(bref)); + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + } +} +dl_dcch_msg_type_c& dl_dcch_msg_type_c::operator=(const dl_dcch_msg_type_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); break; - case types::four_three: - HANDLE_CODE(c.get >().pack(bref)); + case types::msg_class_ext: break; - case types::six_two: - HANDLE_CODE(c.get >().pack(bref)); + case types::nulltype: break; - case types::twelve_one: - HANDLE_CODE(c.get >().pack(bref)); + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + } + + return *this; +} +void dl_dcch_msg_type_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.get().to_json(j); break; - case types::four_four: - HANDLE_CODE(c.get >().pack(bref)); + case types::msg_class_ext: break; - case types::eight_two: - HANDLE_CODE(c.get >().pack(bref)); + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE dl_dcch_msg_type_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); break; - case types::sixteen_one: - HANDLE_CODE(c.get >().pack(bref)); + case types::msg_class_ext: break; default: - log_invalid_choice_id( - type_, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE -codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::unpack( - cbit_ref& bref) +SRSASN_CODE dl_dcch_msg_type_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::two_one: - HANDLE_CODE(c.get >().unpack(bref)); + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::two_two: - HANDLE_CODE(c.get >().unpack(bref)); + case types::msg_class_ext: break; - case types::four_one: - HANDLE_CODE(c.get >().unpack(bref)); + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void dl_dcch_msg_type_c::c1_c_::destroy_() +{ + switch (type_) { + case types::rrc_recfg: + c.destroy(); break; - case types::three_two: - HANDLE_CODE(c.get >().unpack(bref)); + case types::rrc_resume: + c.destroy(); break; - case types::six_one: - HANDLE_CODE(c.get >().unpack(bref)); + case types::rrc_release: + c.destroy(); break; - case types::four_two: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::eight_one: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::four_three: - HANDLE_CODE(c.get >().unpack(bref)); + case types::rrc_reest: + c.destroy(); break; - case types::six_two: - HANDLE_CODE(c.get >().unpack(bref)); + case types::security_mode_cmd: + c.destroy(); break; - case types::twelve_one: - HANDLE_CODE(c.get >().unpack(bref)); + case types::dl_info_transfer: + c.destroy(); break; - case types::four_four: - HANDLE_CODE(c.get >().unpack(bref)); + case types::ue_cap_enquiry: + c.destroy(); break; - case types::eight_two: - HANDLE_CODE(c.get >().unpack(bref)); + case types::counter_check: + c.destroy(); break; - case types::sixteen_one: - HANDLE_CODE(c.get >().unpack(bref)); + case types::mob_from_nr_cmd: + c.destroy(); break; default: - log_invalid_choice_id( - type_, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); - return SRSASN_ERROR_DECODE_FAIL; + break; } - return SRSASN_SUCCESS; } - -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 +void dl_dcch_msg_type_c::c1_c_::set(types::options e) { - 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, - value, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::types"); + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_recfg: + c.init(); + break; + case types::rrc_resume: + c.init(); + break; + case types::rrc_release: + c.init(); + break; + case types::rrc_reest: + c.init(); + break; + case types::security_mode_cmd: + c.init(); + break; + case types::dl_info_transfer: + c.init(); + break; + case types::ue_cap_enquiry: + c.init(); + break; + case types::counter_check: + c.init(); + break; + case types::mob_from_nr_cmd: + c.init(); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + } } - -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 +dl_dcch_msg_type_c::c1_c_::c1_c_(const dl_dcch_msg_type_c::c1_c_& other) { - static const char* options[] = {"n1", "n2", "n3", "n4"}; - return convert_enum_idx( - options, - 4, - value, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::port_sel_sampling_size_e_"); + type_ = other.type(); + switch (type_) { + case types::rrc_recfg: + c.init(other.c.get()); + break; + case types::rrc_resume: + c.init(other.c.get()); + break; + case types::rrc_release: + c.init(other.c.get()); + break; + case types::rrc_reest: + c.init(other.c.get()); + break; + case types::security_mode_cmd: + c.init(other.c.get()); + break; + case types::dl_info_transfer: + c.init(other.c.get()); + break; + case types::ue_cap_enquiry: + c.init(other.c.get()); + break; + case types::counter_check: + c.init(other.c.get()); + break; + case types::mob_from_nr_cmd: + c.init(other.c.get()); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + } } -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 +dl_dcch_msg_type_c::c1_c_& dl_dcch_msg_type_c::c1_c_::operator=(const dl_dcch_msg_type_c::c1_c_& other) { - static const uint8_t options[] = {1, 2, 3, 4}; - return map_enum_number( - options, - 4, - value, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::port_sel_sampling_size_e_"); -} + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_recfg: + c.set(other.c.get()); + break; + case types::rrc_resume: + c.set(other.c.get()); + break; + case types::rrc_release: + c.set(other.c.get()); + break; + case types::rrc_reest: + c.set(other.c.get()); + break; + case types::security_mode_cmd: + c.set(other.c.get()); + break; + case types::dl_info_transfer: + c.set(other.c.get()); + break; + case types::ue_cap_enquiry: + c.set(other.c.get()); + break; + case types::counter_check: + c.set(other.c.get()); + break; + case types::mob_from_nr_cmd: + c.set(other.c.get()); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + } -std::string codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::types_opts::to_string() const -{ - 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"); + return *this; } - -std::string codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_opts::to_string() const +void dl_dcch_msg_type_c::c1_c_::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + switch (type_) { + case types::rrc_recfg: + j.write_fieldname("rrcReconfiguration"); + c.get().to_json(j); + break; + case types::rrc_resume: + j.write_fieldname("rrcResume"); + c.get().to_json(j); + break; + case types::rrc_release: + j.write_fieldname("rrcRelease"); + c.get().to_json(j); + break; + case types::rrc_reest: + j.write_fieldname("rrcReestablishment"); + c.get().to_json(j); + break; + case types::security_mode_cmd: + j.write_fieldname("securityModeCommand"); + c.get().to_json(j); + break; + case types::dl_info_transfer: + j.write_fieldname("dlInformationTransfer"); + c.get().to_json(j); + break; + case types::ue_cap_enquiry: + j.write_fieldname("ueCapabilityEnquiry"); + c.get().to_json(j); + break; + case types::counter_check: + j.write_fieldname("counterCheck"); + c.get().to_json(j); + break; + case types::mob_from_nr_cmd: + j.write_fieldname("mobilityFromNRCommand"); + c.get().to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + } + j.end_obj(); } -uint8_t codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_opts::to_number() const +SRSASN_CODE dl_dcch_msg_type_c::c1_c_::pack(bit_ref& bref) const { - 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_"); + type_.pack(bref); + switch (type_) { + case types::rrc_recfg: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_resume: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_release: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_reest: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::security_mode_cmd: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_info_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_cap_enquiry: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::counter_check: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::mob_from_nr_cmd: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } - -std::string codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_opts::to_string() const +SRSASN_CODE dl_dcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) { - 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_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_recfg: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_resume: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_release: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_reest: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::security_mode_cmd: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_info_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_cap_enquiry: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::counter_check: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::mob_from_nr_cmd: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -uint8_t codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_opts::to_number() const + +std::string dl_dcch_msg_type_c::c1_c_::types_opts::to_string() const { - 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_"); + 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 codebook_cfg_s::codebook_type_c_::types_opts::to_string() const +std::string dl_dcch_msg_type_c::types_opts::to_string() const { - static const char* options[] = {"type1", "type2"}; - return convert_enum_idx(options, 2, value, "codebook_cfg_s::codebook_type_c_::types"); + static const char* options[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(options, 2, value, "dl_dcch_msg_type_c::types"); } -uint8_t codebook_cfg_s::codebook_type_c_::types_opts::to_number() const +uint8_t dl_dcch_msg_type_c::types_opts::to_number() const { - static const uint8_t options[] = {1, 2}; - return map_enum_number(options, 2, value, "codebook_cfg_s::codebook_type_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "dl_dcch_msg_type_c::types"); } -// FrequencyInfoDL ::= SEQUENCE -SRSASN_CODE freq_info_dl_s::pack(bit_ref& bref) const +// DL-DCCH-Message ::= SEQUENCE +SRSASN_CODE dl_dcch_msg_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(absolute_freq_ssb_present, 1)); + HANDLE_CODE(msg.pack(bref)); - if (absolute_freq_ssb_present) { - HANDLE_CODE(pack_integer(bref, absolute_freq_ssb, (uint32_t)0u, (uint32_t)3279165u)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8, integer_packer(1, 1024))); - HANDLE_CODE(pack_integer(bref, absolute_freq_point_a, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_dyn_seq_of(bref, scs_specific_carrier_list, 1, 5)); + bref.align_bytes_zero(); return SRSASN_SUCCESS; } -SRSASN_CODE freq_info_dl_s::unpack(cbit_ref& bref) +SRSASN_CODE dl_dcch_msg_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(absolute_freq_ssb_present, 1)); + HANDLE_CODE(msg.unpack(bref)); - if (absolute_freq_ssb_present) { - HANDLE_CODE(unpack_integer(absolute_freq_ssb, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8, integer_packer(1, 1024))); - HANDLE_CODE(unpack_integer(absolute_freq_point_a, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_dyn_seq_of(scs_specific_carrier_list, bref, 1, 5)); + bref.align_bytes(); return SRSASN_SUCCESS; } -void freq_info_dl_s::to_json(json_writer& j) const +void dl_dcch_msg_s::to_json(json_writer& j) const { + j.start_array(); j.start_obj(); - if (absolute_freq_ssb_present) { - j.write_int("absoluteFrequencySSB", absolute_freq_ssb); - } - j.start_array("frequencyBandList"); - 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 (const auto& e1 : scs_specific_carrier_list) { - e1.to_json(j); - } - j.end_array(); + j.start_obj("DL-DCCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); j.end_obj(); + j.end_obj(); + j.end_array(); } -// FrequencyInfoUL ::= SEQUENCE -SRSASN_CODE freq_info_ul_s::pack(bit_ref& bref) const +// PagingUE-Identity ::= CHOICE +void paging_ue_id_c::destroy_() { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_band_list_present, 1)); - HANDLE_CODE(bref.pack(absolute_freq_point_a_present, 1)); - HANDLE_CODE(bref.pack(add_spec_emission_present, 1)); - HANDLE_CODE(bref.pack(p_max_present, 1)); - HANDLE_CODE(bref.pack(freq_shift7p5khz_present, 1)); - - if (freq_band_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8, integer_packer(1, 1024))); - } - if (absolute_freq_point_a_present) { - HANDLE_CODE(pack_integer(bref, absolute_freq_point_a, (uint32_t)0u, (uint32_t)3279165u)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, scs_specific_carrier_list, 1, 5)); - if (add_spec_emission_present) { - HANDLE_CODE(pack_integer(bref, add_spec_emission, (uint8_t)0u, (uint8_t)7u)); + switch (type_) { + case types::ng_minus5_g_s_tmsi: + c.destroy >(); + break; + case types::full_i_rnti: + c.destroy >(); + break; + default: + break; } - if (p_max_present) { - HANDLE_CODE(pack_integer(bref, p_max, (int8_t)-30, (int8_t)33)); - } - - return SRSASN_SUCCESS; } -SRSASN_CODE freq_info_ul_s::unpack(cbit_ref& bref) +void paging_ue_id_c::set(types::options e) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); - HANDLE_CODE(bref.unpack(absolute_freq_point_a_present, 1)); - HANDLE_CODE(bref.unpack(add_spec_emission_present, 1)); - HANDLE_CODE(bref.unpack(p_max_present, 1)); - HANDLE_CODE(bref.unpack(freq_shift7p5khz_present, 1)); - - if (freq_band_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8, integer_packer(1, 1024))); + destroy_(); + type_ = e; + switch (type_) { + case types::ng_minus5_g_s_tmsi: + c.init >(); + break; + case types::full_i_rnti: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "paging_ue_id_c"); } - if (absolute_freq_point_a_present) { - HANDLE_CODE(unpack_integer(absolute_freq_point_a, bref, (uint32_t)0u, (uint32_t)3279165u)); +} +paging_ue_id_c::paging_ue_id_c(const paging_ue_id_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::ng_minus5_g_s_tmsi: + c.init(other.c.get >()); + break; + case types::full_i_rnti: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "paging_ue_id_c"); } - HANDLE_CODE(unpack_dyn_seq_of(scs_specific_carrier_list, bref, 1, 5)); - if (add_spec_emission_present) { - HANDLE_CODE(unpack_integer(add_spec_emission, bref, (uint8_t)0u, (uint8_t)7u)); +} +paging_ue_id_c& paging_ue_id_c::operator=(const paging_ue_id_c& other) +{ + if (this == &other) { + return *this; } - if (p_max_present) { - HANDLE_CODE(unpack_integer(p_max, bref, (int8_t)-30, (int8_t)33)); + set(other.type()); + switch (type_) { + case types::ng_minus5_g_s_tmsi: + c.set(other.c.get >()); + break; + case types::full_i_rnti: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "paging_ue_id_c"); } - return SRSASN_SUCCESS; + return *this; } -void freq_info_ul_s::to_json(json_writer& j) const +void paging_ue_id_c::to_json(json_writer& j) const { j.start_obj(); - if (freq_band_list_present) { - j.start_array("frequencyBandList"); - for (const auto& e1 : freq_band_list) { - j.write_int(e1); - } - j.end_array(); - } - if (absolute_freq_point_a_present) { - j.write_int("absoluteFrequencyPointA", absolute_freq_point_a); - } - j.start_array("scs-SpecificCarrierList"); - for (const auto& e1 : scs_specific_carrier_list) { - e1.to_json(j); - } - j.end_array(); - if (add_spec_emission_present) { - j.write_int("additionalSpectrumEmission", add_spec_emission); + switch (type_) { + case types::ng_minus5_g_s_tmsi: + j.write_str("ng-5G-S-TMSI", c.get >().to_string()); + break; + case types::full_i_rnti: + j.write_str("fullI-RNTI", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "paging_ue_id_c"); } - if (p_max_present) { - j.write_int("p-Max", p_max); + j.end_obj(); +} +SRSASN_CODE paging_ue_id_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ng_minus5_g_s_tmsi: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::full_i_rnti: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "paging_ue_id_c"); + return SRSASN_ERROR_ENCODE_FAIL; } - if (freq_shift7p5khz_present) { - j.write_str("frequencyShift7p5khz", "true"); + return SRSASN_SUCCESS; +} +SRSASN_CODE paging_ue_id_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ng_minus5_g_s_tmsi: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::full_i_rnti: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "paging_ue_id_c"); + return SRSASN_ERROR_DECODE_FAIL; } - j.end_obj(); + return SRSASN_SUCCESS; } -// PDCCH-Config ::= SEQUENCE -SRSASN_CODE pdcch_cfg_s::pack(bit_ref& bref) const +std::string paging_ue_id_c::types_opts::to_string() const +{ + 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 const int8_t options[] = {-5}; + return map_enum_number(options, 1, value, "paging_ue_id_c::types"); +} + +// PagingRecord ::= SEQUENCE +SRSASN_CODE paging_record_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ctrl_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(ctrl_res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(search_spaces_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(search_spaces_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(dl_preemption_present, 1)); - HANDLE_CODE(bref.pack(tpc_pusch_present, 1)); - HANDLE_CODE(bref.pack(tpc_pucch_present, 1)); - HANDLE_CODE(bref.pack(tpc_srs_present, 1)); + HANDLE_CODE(bref.pack(access_type_present, 1)); - if (ctrl_res_set_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ctrl_res_set_to_add_mod_list, 1, 3)); - } - if (ctrl_res_set_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ctrl_res_set_to_release_list, 1, 3, integer_packer(0, 11))); - } - if (search_spaces_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, search_spaces_to_add_mod_list, 1, 10)); - } - if (search_spaces_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, search_spaces_to_release_list, 1, 10, integer_packer(0, 39))); - } - if (dl_preemption_present) { - HANDLE_CODE(dl_preemption.pack(bref)); - } - if (tpc_pusch_present) { - HANDLE_CODE(tpc_pusch.pack(bref)); - } - if (tpc_pucch_present) { - HANDLE_CODE(tpc_pucch.pack(bref)); - } - if (tpc_srs_present) { - HANDLE_CODE(tpc_srs.pack(bref)); - } + HANDLE_CODE(ue_id.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE pdcch_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE paging_record_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ctrl_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(ctrl_res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(search_spaces_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(search_spaces_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(dl_preemption_present, 1)); - HANDLE_CODE(bref.unpack(tpc_pusch_present, 1)); - HANDLE_CODE(bref.unpack(tpc_pucch_present, 1)); - HANDLE_CODE(bref.unpack(tpc_srs_present, 1)); + HANDLE_CODE(bref.unpack(access_type_present, 1)); - if (ctrl_res_set_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ctrl_res_set_to_add_mod_list, bref, 1, 3)); - } - if (ctrl_res_set_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ctrl_res_set_to_release_list, bref, 1, 3, integer_packer(0, 11))); - } - if (search_spaces_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(search_spaces_to_add_mod_list, bref, 1, 10)); - } - if (search_spaces_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(search_spaces_to_release_list, bref, 1, 10, integer_packer(0, 39))); - } - if (dl_preemption_present) { - HANDLE_CODE(dl_preemption.unpack(bref)); - } - if (tpc_pusch_present) { - HANDLE_CODE(tpc_pusch.unpack(bref)); - } - if (tpc_pucch_present) { - HANDLE_CODE(tpc_pucch.unpack(bref)); - } - if (tpc_srs_present) { - HANDLE_CODE(tpc_srs.unpack(bref)); - } + HANDLE_CODE(ue_id.unpack(bref)); return SRSASN_SUCCESS; } -void pdcch_cfg_s::to_json(json_writer& j) const +void paging_record_s::to_json(json_writer& j) const { j.start_obj(); - if (ctrl_res_set_to_add_mod_list_present) { - j.start_array("controlResourceSetToAddModList"); - 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 (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 (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 (const auto& e1 : search_spaces_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (dl_preemption_present) { - j.write_fieldname("downlinkPreemption"); - dl_preemption.to_json(j); - } - if (tpc_pusch_present) { - j.write_fieldname("tpc-PUSCH"); - tpc_pusch.to_json(j); - } - if (tpc_pucch_present) { - j.write_fieldname("tpc-PUCCH"); - tpc_pucch.to_json(j); - } - if (tpc_srs_present) { - j.write_fieldname("tpc-SRS"); - tpc_srs.to_json(j); + j.write_fieldname("ue-Identity"); + ue_id.to_json(j); + if (access_type_present) { + j.write_str("accessType", "non3GPP"); } j.end_obj(); } -// PDSCH-Config ::= SEQUENCE -SRSASN_CODE pdsch_cfg_s::pack(bit_ref& bref) const +// Paging ::= SEQUENCE +SRSASN_CODE paging_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(data_scrambling_id_pdsch_present, 1)); - HANDLE_CODE(bref.pack(dmrs_dl_for_pdsch_map_type_a_present, 1)); - HANDLE_CODE(bref.pack(dmrs_dl_for_pdsch_map_type_b_present, 1)); - HANDLE_CODE(bref.pack(tci_states_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(tci_states_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(vrb_to_prb_interleaver_present, 1)); - HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_present, 1)); - HANDLE_CODE(bref.pack(pdsch_aggregation_factor_present, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_group1_present, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_group2_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_present, 1)); - HANDLE_CODE(bref.pack(max_nrof_code_words_sched_by_dci_present, 1)); - HANDLE_CODE(bref.pack(zp_csi_rs_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(zp_csi_rs_res_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(sp_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(sp_zp_csi_rs_res_sets_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(p_zp_csi_rs_res_set_present, 1)); + HANDLE_CODE(bref.pack(paging_record_list_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (data_scrambling_id_pdsch_present) { - HANDLE_CODE(pack_integer(bref, data_scrambling_id_pdsch, (uint16_t)0u, (uint16_t)1023u)); - } - if (dmrs_dl_for_pdsch_map_type_a_present) { - HANDLE_CODE(dmrs_dl_for_pdsch_map_type_a.pack(bref)); - } - if (dmrs_dl_for_pdsch_map_type_b_present) { - HANDLE_CODE(dmrs_dl_for_pdsch_map_type_b.pack(bref)); - } - if (tci_states_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_to_add_mod_list, 1, 128)); - } - if (tci_states_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_to_release_list, 1, 128, integer_packer(0, 127))); - } - if (vrb_to_prb_interleaver_present) { - HANDLE_CODE(vrb_to_prb_interleaver.pack(bref)); - } - HANDLE_CODE(res_alloc.pack(bref)); - if (pdsch_time_domain_alloc_list_present) { - HANDLE_CODE(pdsch_time_domain_alloc_list.pack(bref)); - } - if (pdsch_aggregation_factor_present) { - HANDLE_CODE(pdsch_aggregation_factor.pack(bref)); - } - if (rate_match_pattern_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_add_mod_list, 1, 4)); - } - if (rate_match_pattern_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_release_list, 1, 4, integer_packer(0, 3))); - } - if (rate_match_pattern_group1_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_group1, 1, 8)); - } - if (rate_match_pattern_group2_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_group2, 1, 8)); - } - HANDLE_CODE(rbg_size.pack(bref)); - if (mcs_table_present) { - HANDLE_CODE(mcs_table.pack(bref)); - } - if (max_nrof_code_words_sched_by_dci_present) { - HANDLE_CODE(max_nrof_code_words_sched_by_dci.pack(bref)); - } - HANDLE_CODE(prb_bundling_type.pack(bref)); - if (zp_csi_rs_res_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, zp_csi_rs_res_to_add_mod_list, 1, 32)); - } - if (zp_csi_rs_res_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, zp_csi_rs_res_to_release_list, 1, 32, integer_packer(0, 31))); - } - if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, aperiodic_zp_csi_rs_res_sets_to_add_mod_list, 1, 16)); - } - if (aperiodic_zp_csi_rs_res_sets_to_release_list_present) { - HANDLE_CODE( - pack_dyn_seq_of(bref, aperiodic_zp_csi_rs_res_sets_to_release_list, 1, 16, integer_packer(0, 15))); - } - if (sp_zp_csi_rs_res_sets_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sp_zp_csi_rs_res_sets_to_add_mod_list, 1, 16)); - } - if (sp_zp_csi_rs_res_sets_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sp_zp_csi_rs_res_sets_to_release_list, 1, 16, integer_packer(0, 15))); + if (paging_record_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, paging_record_list, 1, 32)); } - if (p_zp_csi_rs_res_set_present) { - HANDLE_CODE(p_zp_csi_rs_res_set.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE pdsch_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE paging_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(data_scrambling_id_pdsch_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_dl_for_pdsch_map_type_a_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_dl_for_pdsch_map_type_b_present, 1)); - HANDLE_CODE(bref.unpack(tci_states_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(tci_states_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(vrb_to_prb_interleaver_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_time_domain_alloc_list_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_aggregation_factor_present, 1)); - HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(rate_match_pattern_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(rate_match_pattern_group1_present, 1)); - HANDLE_CODE(bref.unpack(rate_match_pattern_group2_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_present, 1)); - HANDLE_CODE(bref.unpack(max_nrof_code_words_sched_by_dci_present, 1)); - HANDLE_CODE(bref.unpack(zp_csi_rs_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(zp_csi_rs_res_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(aperiodic_zp_csi_rs_res_sets_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(sp_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(sp_zp_csi_rs_res_sets_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(p_zp_csi_rs_res_set_present, 1)); + HANDLE_CODE(bref.unpack(paging_record_list_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (data_scrambling_id_pdsch_present) { - HANDLE_CODE(unpack_integer(data_scrambling_id_pdsch, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (dmrs_dl_for_pdsch_map_type_a_present) { - HANDLE_CODE(dmrs_dl_for_pdsch_map_type_a.unpack(bref)); - } - if (dmrs_dl_for_pdsch_map_type_b_present) { - HANDLE_CODE(dmrs_dl_for_pdsch_map_type_b.unpack(bref)); - } - if (tci_states_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(tci_states_to_add_mod_list, bref, 1, 128)); - } - if (tci_states_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(tci_states_to_release_list, bref, 1, 128, integer_packer(0, 127))); - } - if (vrb_to_prb_interleaver_present) { - HANDLE_CODE(vrb_to_prb_interleaver.unpack(bref)); - } - HANDLE_CODE(res_alloc.unpack(bref)); - if (pdsch_time_domain_alloc_list_present) { - HANDLE_CODE(pdsch_time_domain_alloc_list.unpack(bref)); - } - if (pdsch_aggregation_factor_present) { - HANDLE_CODE(pdsch_aggregation_factor.unpack(bref)); - } - if (rate_match_pattern_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_add_mod_list, bref, 1, 4)); - } - if (rate_match_pattern_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_release_list, bref, 1, 4, integer_packer(0, 3))); - } - if (rate_match_pattern_group1_present) { - HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_group1, bref, 1, 8)); - } - if (rate_match_pattern_group2_present) { - HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_group2, bref, 1, 8)); - } - HANDLE_CODE(rbg_size.unpack(bref)); - if (mcs_table_present) { - HANDLE_CODE(mcs_table.unpack(bref)); - } - if (max_nrof_code_words_sched_by_dci_present) { - HANDLE_CODE(max_nrof_code_words_sched_by_dci.unpack(bref)); - } - HANDLE_CODE(prb_bundling_type.unpack(bref)); - if (zp_csi_rs_res_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(zp_csi_rs_res_to_add_mod_list, bref, 1, 32)); - } - if (zp_csi_rs_res_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(zp_csi_rs_res_to_release_list, bref, 1, 32, integer_packer(0, 31))); - } - if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(aperiodic_zp_csi_rs_res_sets_to_add_mod_list, bref, 1, 16)); - } - if (aperiodic_zp_csi_rs_res_sets_to_release_list_present) { - HANDLE_CODE( - unpack_dyn_seq_of(aperiodic_zp_csi_rs_res_sets_to_release_list, bref, 1, 16, integer_packer(0, 15))); - } - if (sp_zp_csi_rs_res_sets_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(sp_zp_csi_rs_res_sets_to_add_mod_list, bref, 1, 16)); - } - if (sp_zp_csi_rs_res_sets_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(sp_zp_csi_rs_res_sets_to_release_list, bref, 1, 16, integer_packer(0, 15))); + if (paging_record_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(paging_record_list, bref, 1, 32)); } - if (p_zp_csi_rs_res_set_present) { - HANDLE_CODE(p_zp_csi_rs_res_set.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void pdsch_cfg_s::to_json(json_writer& j) const +void paging_s::to_json(json_writer& j) const { j.start_obj(); - if (data_scrambling_id_pdsch_present) { - j.write_int("dataScramblingIdentityPDSCH", data_scrambling_id_pdsch); - } - if (dmrs_dl_for_pdsch_map_type_a_present) { - j.write_fieldname("dmrs-DownlinkForPDSCH-MappingTypeA"); - dmrs_dl_for_pdsch_map_type_a.to_json(j); - } - if (dmrs_dl_for_pdsch_map_type_b_present) { - j.write_fieldname("dmrs-DownlinkForPDSCH-MappingTypeB"); - dmrs_dl_for_pdsch_map_type_b.to_json(j); - } - if (tci_states_to_add_mod_list_present) { - j.start_array("tci-StatesToAddModList"); - for (const auto& e1 : tci_states_to_add_mod_list) { + if (paging_record_list_present) { + j.start_array("pagingRecordList"); + for (const auto& e1 : paging_record_list) { e1.to_json(j); } j.end_array(); } - if (tci_states_to_release_list_present) { - j.start_array("tci-StatesToReleaseList"); - for (const auto& e1 : tci_states_to_release_list) { - j.write_int(e1); - } - j.end_array(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (vrb_to_prb_interleaver_present) { - j.write_str("vrb-ToPRB-Interleaver", vrb_to_prb_interleaver.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } - j.write_str("resourceAllocation", res_alloc.to_string()); - if (pdsch_time_domain_alloc_list_present) { - j.write_fieldname("pdsch-TimeDomainAllocationList"); - pdsch_time_domain_alloc_list.to_json(j); - } - if (pdsch_aggregation_factor_present) { - j.write_str("pdsch-AggregationFactor", pdsch_aggregation_factor.to_string()); - } - if (rate_match_pattern_to_add_mod_list_present) { - j.start_array("rateMatchPatternToAddModList"); - 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 (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 (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 (const auto& e1 : rate_match_pattern_group2) { - e1.to_json(j); - } - j.end_array(); - } - j.write_str("rbg-Size", rbg_size.to_string()); - if (mcs_table_present) { - j.write_str("mcs-Table", mcs_table.to_string()); - } - if (max_nrof_code_words_sched_by_dci_present) { - j.write_str("maxNrofCodeWordsScheduledByDCI", max_nrof_code_words_sched_by_dci.to_string()); - } - j.write_fieldname("prb-BundlingType"); - prb_bundling_type.to_json(j); - if (zp_csi_rs_res_to_add_mod_list_present) { - j.start_array("zp-CSI-RS-ResourceToAddModList"); - 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 (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 (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 (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 (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 (const auto& e1 : sp_zp_csi_rs_res_sets_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (p_zp_csi_rs_res_set_present) { - j.write_fieldname("p-ZP-CSI-RS-ResourceSet"); - p_zp_csi_rs_res_set.to_json(j); - } - j.end_obj(); -} - -std::string pdsch_cfg_s::vrb_to_prb_interleaver_opts::to_string() const -{ - 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 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 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 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 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 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 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 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 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 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 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 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_() -{ - switch (type_) { - case types::static_bundling: - c.destroy(); - break; - case types::dynamic_bundling: - c.destroy(); - break; - default: - break; + j.end_obj(); +} + +// PCCH-MessageType ::= CHOICE +void pcch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; } } -void pdsch_cfg_s::prb_bundling_type_c_::set(types::options e) +void pcch_msg_type_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::static_bundling: - c.init(); + case types::c1: + c.init(); break; - case types::dynamic_bundling: - c.init(); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + log_invalid_choice_id(type_, "pcch_msg_type_c"); } } -pdsch_cfg_s::prb_bundling_type_c_::prb_bundling_type_c_(const pdsch_cfg_s::prb_bundling_type_c_& other) +pcch_msg_type_c::pcch_msg_type_c(const pcch_msg_type_c& other) { type_ = other.type(); switch (type_) { - case types::static_bundling: - c.init(other.c.get()); + case types::c1: + c.init(other.c.get()); break; - case types::dynamic_bundling: - c.init(other.c.get()); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + log_invalid_choice_id(type_, "pcch_msg_type_c"); } } -pdsch_cfg_s::prb_bundling_type_c_& pdsch_cfg_s::prb_bundling_type_c_:: - operator=(const pdsch_cfg_s::prb_bundling_type_c_& other) +pcch_msg_type_c& pcch_msg_type_c::operator=(const pcch_msg_type_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::static_bundling: - c.set(other.c.get()); + case types::c1: + c.set(other.c.get()); break; - case types::dynamic_bundling: - c.set(other.c.get()); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + log_invalid_choice_id(type_, "pcch_msg_type_c"); } return *this; } -void pdsch_cfg_s::prb_bundling_type_c_::to_json(json_writer& j) const +void pcch_msg_type_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::static_bundling: - j.write_fieldname("staticBundling"); - j.start_obj(); - if (c.get().bundle_size_present) { - j.write_str("bundleSize", c.get().bundle_size.to_string()); - } - j.end_obj(); + case types::c1: + j.write_fieldname("c1"); + c.get().to_json(j); break; - case types::dynamic_bundling: - j.write_fieldname("dynamicBundling"); - j.start_obj(); - if (c.get().bundle_size_set1_present) { - j.write_str("bundleSizeSet1", c.get().bundle_size_set1.to_string()); - } - if (c.get().bundle_size_set2_present) { - j.write_str("bundleSizeSet2", c.get().bundle_size_set2.to_string()); - } - j.end_obj(); + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + log_invalid_choice_id(type_, "pcch_msg_type_c"); } j.end_obj(); } -SRSASN_CODE pdsch_cfg_s::prb_bundling_type_c_::pack(bit_ref& bref) const +SRSASN_CODE pcch_msg_type_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::static_bundling: - HANDLE_CODE(bref.pack(c.get().bundle_size_present, 1)); - if (c.get().bundle_size_present) { - HANDLE_CODE(c.get().bundle_size.pack(bref)); - } + case types::c1: + HANDLE_CODE(c.get().pack(bref)); break; - case types::dynamic_bundling: - HANDLE_CODE(bref.pack(c.get().bundle_size_set1_present, 1)); - HANDLE_CODE(bref.pack(c.get().bundle_size_set2_present, 1)); - if (c.get().bundle_size_set1_present) { - HANDLE_CODE(c.get().bundle_size_set1.pack(bref)); - } - if (c.get().bundle_size_set2_present) { - HANDLE_CODE(c.get().bundle_size_set2.pack(bref)); - } + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + log_invalid_choice_id(type_, "pcch_msg_type_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE pdsch_cfg_s::prb_bundling_type_c_::unpack(cbit_ref& bref) +SRSASN_CODE pcch_msg_type_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::static_bundling: - HANDLE_CODE(bref.unpack(c.get().bundle_size_present, 1)); - if (c.get().bundle_size_present) { - HANDLE_CODE(c.get().bundle_size.unpack(bref)); - } + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::dynamic_bundling: - HANDLE_CODE(bref.unpack(c.get().bundle_size_set1_present, 1)); - HANDLE_CODE(bref.unpack(c.get().bundle_size_set2_present, 1)); - if (c.get().bundle_size_set1_present) { - HANDLE_CODE(c.get().bundle_size_set1.unpack(bref)); - } - if (c.get().bundle_size_set2_present) { - HANDLE_CODE(c.get().bundle_size_set2.unpack(bref)); - } + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + log_invalid_choice_id(type_, "pcch_msg_type_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_string() const -{ - 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 +void pcch_msg_type_c::c1_c_::set(types::options 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_"); + type_ = e; } - -std::string pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set1_opts::to_string() const +void pcch_msg_type_c::c1_c_::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + switch (type_) { + case types::paging: + j.write_fieldname("paging"); + c.to_json(j); + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c::c1_c_"); + } + j.end_obj(); } - -std::string pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set2_opts::to_string() const +SRSASN_CODE pcch_msg_type_c::c1_c_::pack(bit_ref& bref) const { - 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_"); + type_.pack(bref); + switch (type_) { + case types::paging: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -uint8_t pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set2_opts::to_number() const +SRSASN_CODE pcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) { - 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_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::paging: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -std::string pdsch_cfg_s::prb_bundling_type_c_::types_opts::to_string() const +std::string pcch_msg_type_c::c1_c_::types_opts::to_string() const { - static const char* options[] = {"staticBundling", "dynamicBundling"}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::types"); + static const char* options[] = {"paging", "spare1"}; + return convert_enum_idx(options, 2, value, "pcch_msg_type_c::c1_c_::types"); } -// PUCCH-CSI-Resource ::= SEQUENCE -SRSASN_CODE pucch_csi_res_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, ul_bw_part_id, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, pucch_res, (uint8_t)0u, (uint8_t)127u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_csi_res_s::unpack(cbit_ref& bref) +std::string pcch_msg_type_c::types_opts::to_string() const { - HANDLE_CODE(unpack_integer(ul_bw_part_id, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(pucch_res, bref, (uint8_t)0u, (uint8_t)127u)); - - return SRSASN_SUCCESS; + static const char* options[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(options, 2, value, "pcch_msg_type_c::types"); } -void pucch_csi_res_s::to_json(json_writer& j) const +uint8_t pcch_msg_type_c::types_opts::to_number() const { - j.start_obj(); - j.write_int("uplinkBandwidthPartId", ul_bw_part_id); - j.write_int("pucch-Resource", pucch_res); - j.end_obj(); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "pcch_msg_type_c::types"); } -// PUSCH-CodeBlockGroupTransmission ::= SEQUENCE -SRSASN_CODE pusch_code_block_group_tx_s::pack(bit_ref& bref) const +// PCCH-Message ::= SEQUENCE +SRSASN_CODE pcch_msg_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(max_code_block_groups_per_transport_block.pack(bref)); + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); return SRSASN_SUCCESS; } -SRSASN_CODE pusch_code_block_group_tx_s::unpack(cbit_ref& bref) +SRSASN_CODE pcch_msg_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(max_code_block_groups_per_transport_block.unpack(bref)); + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); return SRSASN_SUCCESS; } -void pusch_code_block_group_tx_s::to_json(json_writer& j) const +void pcch_msg_s::to_json(json_writer& j) const { + j.start_array(); j.start_obj(); - j.write_str("maxCodeBlockGroupsPerTransportBlock", max_code_block_groups_per_transport_block.to_string()); + j.start_obj("PCCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); j.end_obj(); + j.end_obj(); + j.end_array(); } -std::string pusch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_string() const -{ - 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 +// EstablishmentCause ::= ENUMERATED +std::string establishment_cause_opts::to_string() const { - 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_"); + 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"); } -// PortIndexFor8Ranks ::= CHOICE -void port_idx_for8_ranks_c::destroy_() +// InitialUE-Identity ::= CHOICE +void init_ue_id_c::destroy_() { switch (type_) { - case types::port_idx8: - c.destroy(); - break; - case types::port_idx4: - c.destroy(); + case types::ng_minus5_g_s_tmsi_part1: + c.destroy >(); break; - case types::port_idx2: - c.destroy(); + case types::random_value: + c.destroy >(); break; default: break; } } -void port_idx_for8_ranks_c::set(types::options e) +void init_ue_id_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::port_idx8: - c.init(); - break; - case types::port_idx4: - c.init(); - break; - case types::port_idx2: - c.init(); + case types::ng_minus5_g_s_tmsi_part1: + c.init >(); break; - case types::port_idx1: + case types::random_value: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); + log_invalid_choice_id(type_, "init_ue_id_c"); } } -port_idx_for8_ranks_c::port_idx_for8_ranks_c(const port_idx_for8_ranks_c& other) +init_ue_id_c::init_ue_id_c(const init_ue_id_c& other) { type_ = other.type(); switch (type_) { - case types::port_idx8: - c.init(other.c.get()); - break; - case types::port_idx4: - c.init(other.c.get()); - break; - case types::port_idx2: - c.init(other.c.get()); + case types::ng_minus5_g_s_tmsi_part1: + c.init(other.c.get >()); break; - case types::port_idx1: + case types::random_value: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); + log_invalid_choice_id(type_, "init_ue_id_c"); } } -port_idx_for8_ranks_c& port_idx_for8_ranks_c::operator=(const port_idx_for8_ranks_c& other) +init_ue_id_c& init_ue_id_c::operator=(const init_ue_id_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::port_idx8: - c.set(other.c.get()); - break; - case types::port_idx4: - c.set(other.c.get()); - break; - case types::port_idx2: - c.set(other.c.get()); + case types::ng_minus5_g_s_tmsi_part1: + c.set(other.c.get >()); break; - case types::port_idx1: + case types::random_value: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); + log_invalid_choice_id(type_, "init_ue_id_c"); } return *this; } -void port_idx_for8_ranks_c::to_json(json_writer& j) const +void init_ue_id_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::port_idx8: - j.write_fieldname("portIndex8"); - j.start_obj(); - if (c.get().rank1_minus8_present) { - j.write_int("rank1-8", c.get().rank1_minus8); - } - if (c.get().rank2_minus8_present) { - j.start_array("rank2-8"); - 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 (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 (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 (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 (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 (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 (const auto& e1 : c.get().rank8_minus8) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); - break; - case types::port_idx4: - j.write_fieldname("portIndex4"); - j.start_obj(); - if (c.get().rank1_minus4_present) { - j.write_int("rank1-4", c.get().rank1_minus4); - } - if (c.get().rank2_minus4_present) { - j.start_array("rank2-4"); - 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 (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 (const auto& e1 : c.get().rank4_minus4) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); - break; - case types::port_idx2: - j.write_fieldname("portIndex2"); - j.start_obj(); - if (c.get().rank1_minus2_present) { - j.write_int("rank1-2", c.get().rank1_minus2); - } - if (c.get().rank2_minus2_present) { - j.start_array("rank2-2"); - for (const auto& e1 : c.get().rank2_minus2) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); + case types::ng_minus5_g_s_tmsi_part1: + j.write_str("ng-5G-S-TMSI-Part1", c.get >().to_string()); break; - case types::port_idx1: + case types::random_value: + j.write_str("randomValue", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); + log_invalid_choice_id(type_, "init_ue_id_c"); } j.end_obj(); } -SRSASN_CODE port_idx_for8_ranks_c::pack(bit_ref& bref) const +SRSASN_CODE init_ue_id_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::port_idx8: - HANDLE_CODE(bref.pack(c.get().rank1_minus8_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank2_minus8_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank3_minus8_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank4_minus8_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank5_minus8_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank6_minus8_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank7_minus8_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank8_minus8_present, 1)); - if (c.get().rank1_minus8_present) { - HANDLE_CODE(pack_integer(bref, c.get().rank1_minus8, (uint8_t)0u, (uint8_t)7u)); - } - if (c.get().rank2_minus8_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank2_minus8)[0], - c.get().rank2_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank3_minus8_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank3_minus8)[0], - c.get().rank3_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank4_minus8_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank4_minus8)[0], - c.get().rank4_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank5_minus8_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank5_minus8)[0], - c.get().rank5_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank6_minus8_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank6_minus8)[0], - c.get().rank6_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank7_minus8_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank7_minus8)[0], - c.get().rank7_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank8_minus8_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank8_minus8)[0], - c.get().rank8_minus8.size(), - integer_packer(0, 7))); - } - break; - case types::port_idx4: - HANDLE_CODE(bref.pack(c.get().rank1_minus4_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank2_minus4_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank3_minus4_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank4_minus4_present, 1)); - if (c.get().rank1_minus4_present) { - HANDLE_CODE(pack_integer(bref, c.get().rank1_minus4, (uint8_t)0u, (uint8_t)3u)); - } - if (c.get().rank2_minus4_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank2_minus4)[0], - c.get().rank2_minus4.size(), - integer_packer(0, 3))); - } - if (c.get().rank3_minus4_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank3_minus4)[0], - c.get().rank3_minus4.size(), - integer_packer(0, 3))); - } - if (c.get().rank4_minus4_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank4_minus4)[0], - c.get().rank4_minus4.size(), - integer_packer(0, 3))); - } - break; - case types::port_idx2: - HANDLE_CODE(bref.pack(c.get().rank1_minus2_present, 1)); - HANDLE_CODE(bref.pack(c.get().rank2_minus2_present, 1)); - if (c.get().rank1_minus2_present) { - HANDLE_CODE(pack_integer(bref, c.get().rank1_minus2, (uint8_t)0u, (uint8_t)1u)); - } - if (c.get().rank2_minus2_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().rank2_minus2)[0], - c.get().rank2_minus2.size(), - integer_packer(0, 1))); - } + case types::ng_minus5_g_s_tmsi_part1: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::port_idx1: + case types::random_value: + HANDLE_CODE(c.get >().pack(bref)); break; default: - log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); + log_invalid_choice_id(type_, "init_ue_id_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE port_idx_for8_ranks_c::unpack(cbit_ref& bref) +SRSASN_CODE init_ue_id_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::port_idx8: - HANDLE_CODE(bref.unpack(c.get().rank1_minus8_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank2_minus8_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank3_minus8_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank4_minus8_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank5_minus8_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank6_minus8_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank7_minus8_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank8_minus8_present, 1)); - if (c.get().rank1_minus8_present) { - HANDLE_CODE(unpack_integer(c.get().rank1_minus8, bref, (uint8_t)0u, (uint8_t)7u)); - } - if (c.get().rank2_minus8_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank2_minus8)[0], - bref, - c.get().rank2_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank3_minus8_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank3_minus8)[0], - bref, - c.get().rank3_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank4_minus8_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank4_minus8)[0], - bref, - c.get().rank4_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank5_minus8_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank5_minus8)[0], - bref, - c.get().rank5_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank6_minus8_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank6_minus8)[0], - bref, - c.get().rank6_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank7_minus8_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank7_minus8)[0], - bref, - c.get().rank7_minus8.size(), - integer_packer(0, 7))); - } - if (c.get().rank8_minus8_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank8_minus8)[0], - bref, - c.get().rank8_minus8.size(), - integer_packer(0, 7))); - } - break; - case types::port_idx4: - HANDLE_CODE(bref.unpack(c.get().rank1_minus4_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank2_minus4_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank3_minus4_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank4_minus4_present, 1)); - if (c.get().rank1_minus4_present) { - HANDLE_CODE(unpack_integer(c.get().rank1_minus4, bref, (uint8_t)0u, (uint8_t)3u)); - } - if (c.get().rank2_minus4_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank2_minus4)[0], - bref, - c.get().rank2_minus4.size(), - integer_packer(0, 3))); - } - if (c.get().rank3_minus4_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank3_minus4)[0], - bref, - c.get().rank3_minus4.size(), - integer_packer(0, 3))); - } - if (c.get().rank4_minus4_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank4_minus4)[0], - bref, - c.get().rank4_minus4.size(), - integer_packer(0, 3))); - } - break; - case types::port_idx2: - HANDLE_CODE(bref.unpack(c.get().rank1_minus2_present, 1)); - HANDLE_CODE(bref.unpack(c.get().rank2_minus2_present, 1)); - if (c.get().rank1_minus2_present) { - HANDLE_CODE(unpack_integer(c.get().rank1_minus2, bref, (uint8_t)0u, (uint8_t)1u)); - } - if (c.get().rank2_minus2_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank2_minus2)[0], - bref, - c.get().rank2_minus2.size(), - integer_packer(0, 1))); - } + case types::ng_minus5_g_s_tmsi_part1: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::port_idx1: + case types::random_value: + HANDLE_CODE(c.get >().unpack(bref)); break; default: - log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); + log_invalid_choice_id(type_, "init_ue_id_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string port_idx_for8_ranks_c::types_opts::to_string() const +std::string init_ue_id_c::types_opts::to_string() const { - static const char* options[] = {"portIndex8", "portIndex4", "portIndex2", "portIndex1"}; - return convert_enum_idx(options, 4, value, "port_idx_for8_ranks_c::types"); + static const char* options[] = {"ng-5G-S-TMSI-Part1", "randomValue"}; + return convert_enum_idx(options, 2, value, "init_ue_id_c::types"); } -uint8_t port_idx_for8_ranks_c::types_opts::to_number() const +int8_t init_ue_id_c::types_opts::to_number() const { - static const uint8_t options[] = {8, 4, 2, 1}; - return map_enum_number(options, 4, value, "port_idx_for8_ranks_c::types"); + static const int8_t options[] = {-5}; + return map_enum_number(options, 1, value, "init_ue_id_c::types"); } -// RadioLinkMonitoringConfig ::= SEQUENCE -SRSASN_CODE radio_link_monitoring_cfg_s::pack(bit_ref& bref) const +// ReestabUE-Identity ::= SEQUENCE +SRSASN_CODE reestab_ue_id_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(fail_detection_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(fail_detection_res_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(beam_fail_instance_max_count_present, 1)); - HANDLE_CODE(bref.pack(beam_fail_detection_timer_present, 1)); - - if (fail_detection_res_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, fail_detection_res_to_add_mod_list, 1, 10)); - } - if (fail_detection_res_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, fail_detection_res_to_release_list, 1, 10, integer_packer(0, 9))); - } - if (beam_fail_instance_max_count_present) { - HANDLE_CODE(beam_fail_instance_max_count.pack(bref)); - } - if (beam_fail_detection_timer_present) { - HANDLE_CODE(beam_fail_detection_timer.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, c_rnti, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(short_mac_i.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE radio_link_monitoring_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE reestab_ue_id_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(fail_detection_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(fail_detection_res_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(beam_fail_instance_max_count_present, 1)); - HANDLE_CODE(bref.unpack(beam_fail_detection_timer_present, 1)); - - if (fail_detection_res_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(fail_detection_res_to_add_mod_list, bref, 1, 10)); - } - if (fail_detection_res_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(fail_detection_res_to_release_list, bref, 1, 10, integer_packer(0, 9))); - } - if (beam_fail_instance_max_count_present) { - HANDLE_CODE(beam_fail_instance_max_count.unpack(bref)); - } - if (beam_fail_detection_timer_present) { - HANDLE_CODE(beam_fail_detection_timer.unpack(bref)); - } + HANDLE_CODE(unpack_integer(c_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(short_mac_i.unpack(bref)); return SRSASN_SUCCESS; } -void radio_link_monitoring_cfg_s::to_json(json_writer& j) const +void reestab_ue_id_s::to_json(json_writer& j) const { j.start_obj(); - if (fail_detection_res_to_add_mod_list_present) { - j.start_array("failureDetectionResourcesToAddModList"); - 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 (const auto& e1 : fail_detection_res_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (beam_fail_instance_max_count_present) { - j.write_str("beamFailureInstanceMaxCount", beam_fail_instance_max_count.to_string()); - } - if (beam_fail_detection_timer_present) { - j.write_str("beamFailureDetectionTimer", beam_fail_detection_timer.to_string()); - } + j.write_int("c-RNTI", c_rnti); + j.write_int("physCellId", pci); + j.write_str("shortMAC-I", short_mac_i.to_string()); j.end_obj(); } -std::string radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_string() const -{ - 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 +// ReestablishmentCause ::= ENUMERATED +std::string reest_cause_opts::to_string() const { - 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_"); + static const char* options[] = {"reconfigurationFailure", "handoverFailure", "otherFailure", "spare1"}; + return convert_enum_idx(options, 4, value, "reest_cause_e"); } -std::string radio_link_monitoring_cfg_s::beam_fail_detection_timer_opts::to_string() const -{ - 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 +// ResumeCause ::= ENUMERATED +std::string resume_cause_opts::to_string() const { - 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_"); + 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"); } -// SPS-Config ::= SEQUENCE -SRSASN_CODE sps_cfg_s::pack(bit_ref& bref) const +// RRCReestablishmentRequest-IEs ::= SEQUENCE +SRSASN_CODE rrc_reest_request_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(n1_pucch_an_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_present, 1)); - - HANDLE_CODE(periodicity.pack(bref)); - HANDLE_CODE(pack_integer(bref, nrof_harq_processes, (uint8_t)1u, (uint8_t)8u)); - if (n1_pucch_an_present) { - HANDLE_CODE(pack_integer(bref, n1_pucch_an, (uint8_t)0u, (uint8_t)127u)); - } + HANDLE_CODE(ue_id.pack(bref)); + HANDLE_CODE(reest_cause.pack(bref)); + HANDLE_CODE(spare.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE sps_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_reest_request_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(n1_pucch_an_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_present, 1)); - - HANDLE_CODE(periodicity.unpack(bref)); - HANDLE_CODE(unpack_integer(nrof_harq_processes, bref, (uint8_t)1u, (uint8_t)8u)); - if (n1_pucch_an_present) { - HANDLE_CODE(unpack_integer(n1_pucch_an, bref, (uint8_t)0u, (uint8_t)127u)); - } + HANDLE_CODE(ue_id.unpack(bref)); + HANDLE_CODE(reest_cause.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); return SRSASN_SUCCESS; } -void sps_cfg_s::to_json(json_writer& j) const +void rrc_reest_request_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("periodicity", periodicity.to_string()); - j.write_int("nrofHARQ-Processes", nrof_harq_processes); - if (n1_pucch_an_present) { - j.write_int("n1PUCCH-AN", n1_pucch_an); - } - if (mcs_table_present) { - j.write_str("mcs-Table", "qam64LowSE"); - } + j.write_fieldname("ue-Identity"); + ue_id.to_json(j); + j.write_str("reestablishmentCause", reest_cause.to_string()); + j.write_str("spare", spare.to_string()); j.end_obj(); } -std::string sps_cfg_s::periodicity_opts::to_string() const -{ - 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 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 -SRSASN_CODE srs_tpc_pdcch_cfg_s::pack(bit_ref& bref) const +// RRCResumeRequest-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_request_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(srs_cc_set_idxlist_present, 1)); - - if (srs_cc_set_idxlist_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_cc_set_idxlist, 1, 4)); - } + HANDLE_CODE(resume_id.pack(bref)); + HANDLE_CODE(resume_mac_i.pack(bref)); + HANDLE_CODE(resume_cause.pack(bref)); + HANDLE_CODE(spare.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE srs_tpc_pdcch_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_resume_request_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(srs_cc_set_idxlist_present, 1)); - - if (srs_cc_set_idxlist_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_cc_set_idxlist, bref, 1, 4)); - } + HANDLE_CODE(resume_id.unpack(bref)); + HANDLE_CODE(resume_mac_i.unpack(bref)); + HANDLE_CODE(resume_cause.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); return SRSASN_SUCCESS; } -void srs_tpc_pdcch_cfg_s::to_json(json_writer& j) const +void rrc_resume_request_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (srs_cc_set_idxlist_present) { - j.start_array("srs-CC-SetIndexlist"); - for (const auto& e1 : srs_cc_set_idxlist) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); + j.write_str("resumeIdentity", resume_id.to_string()); + j.write_str("resumeMAC-I", resume_mac_i.to_string()); + j.write_str("resumeCause", resume_cause.to_string()); + j.write_str("spare", spare.to_string()); + j.end_obj(); } -// SlotFormatCombinationsPerCell ::= SEQUENCE -SRSASN_CODE slot_format_combinations_per_cell_s::pack(bit_ref& bref) const +// RRCSetupRequest-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_request_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(subcarrier_spacing2_present, 1)); - HANDLE_CODE(bref.pack(slot_format_combinations_present, 1)); - HANDLE_CODE(bref.pack(position_in_dci_present, 1)); - - HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(subcarrier_spacing.pack(bref)); - if (subcarrier_spacing2_present) { - HANDLE_CODE(subcarrier_spacing2.pack(bref)); - } - if (slot_format_combinations_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, slot_format_combinations, 1, 512)); - } - if (position_in_dci_present) { - HANDLE_CODE(pack_integer(bref, position_in_dci, (uint8_t)0u, (uint8_t)127u)); - } + HANDLE_CODE(ue_id.pack(bref)); + HANDLE_CODE(establishment_cause.pack(bref)); + HANDLE_CODE(spare.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE slot_format_combinations_per_cell_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_setup_request_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(subcarrier_spacing2_present, 1)); - HANDLE_CODE(bref.unpack(slot_format_combinations_present, 1)); - HANDLE_CODE(bref.unpack(position_in_dci_present, 1)); - - HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(subcarrier_spacing.unpack(bref)); - if (subcarrier_spacing2_present) { - HANDLE_CODE(subcarrier_spacing2.unpack(bref)); - } - if (slot_format_combinations_present) { - HANDLE_CODE(unpack_dyn_seq_of(slot_format_combinations, bref, 1, 512)); - } - if (position_in_dci_present) { - HANDLE_CODE(unpack_integer(position_in_dci, bref, (uint8_t)0u, (uint8_t)127u)); - } + HANDLE_CODE(ue_id.unpack(bref)); + HANDLE_CODE(establishment_cause.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); return SRSASN_SUCCESS; } -void slot_format_combinations_per_cell_s::to_json(json_writer& j) const +void rrc_setup_request_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("servingCellId", serving_cell_id); - j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); - if (subcarrier_spacing2_present) { - j.write_str("subcarrierSpacing2", subcarrier_spacing2.to_string()); - } - if (slot_format_combinations_present) { - j.start_array("slotFormatCombinations"); - for (const auto& e1 : slot_format_combinations) { - e1.to_json(j); - } - j.end_array(); - } - if (position_in_dci_present) { - j.write_int("positionInDCI", position_in_dci); - } + j.write_fieldname("ue-Identity"); + ue_id.to_json(j); + j.write_str("establishmentCause", establishment_cause.to_string()); + j.write_str("spare", spare.to_string()); j.end_obj(); } -// BWP-DownlinkDedicated ::= SEQUENCE -SRSASN_CODE bwp_dl_ded_s::pack(bit_ref& bref) const +// RRCSystemInfoRequest-IEs ::= SEQUENCE +SRSASN_CODE rrc_sys_info_request_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pdcch_cfg_present, 1)); - HANDLE_CODE(bref.pack(pdsch_cfg_present, 1)); - HANDLE_CODE(bref.pack(sps_cfg_present, 1)); - HANDLE_CODE(bref.pack(radio_link_monitoring_cfg_present, 1)); - - if (pdcch_cfg_present) { - HANDLE_CODE(pdcch_cfg.pack(bref)); - } - if (pdsch_cfg_present) { - HANDLE_CODE(pdsch_cfg.pack(bref)); - } - if (sps_cfg_present) { - HANDLE_CODE(sps_cfg.pack(bref)); - } - if (radio_link_monitoring_cfg_present) { - HANDLE_CODE(radio_link_monitoring_cfg.pack(bref)); - } + HANDLE_CODE(requested_si_list.pack(bref)); + HANDLE_CODE(spare.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE bwp_dl_ded_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_sys_info_request_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pdcch_cfg_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_cfg_present, 1)); - HANDLE_CODE(bref.unpack(sps_cfg_present, 1)); - HANDLE_CODE(bref.unpack(radio_link_monitoring_cfg_present, 1)); - - if (pdcch_cfg_present) { - HANDLE_CODE(pdcch_cfg.unpack(bref)); - } - if (pdsch_cfg_present) { - HANDLE_CODE(pdsch_cfg.unpack(bref)); - } - if (sps_cfg_present) { - HANDLE_CODE(sps_cfg.unpack(bref)); - } - if (radio_link_monitoring_cfg_present) { - HANDLE_CODE(radio_link_monitoring_cfg.unpack(bref)); - } + HANDLE_CODE(requested_si_list.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); return SRSASN_SUCCESS; } -void bwp_dl_ded_s::to_json(json_writer& j) const +void rrc_sys_info_request_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (pdcch_cfg_present) { - j.write_fieldname("pdcch-Config"); - pdcch_cfg.to_json(j); - } - if (pdsch_cfg_present) { - j.write_fieldname("pdsch-Config"); - pdsch_cfg.to_json(j); - } - if (sps_cfg_present) { - j.write_fieldname("sps-Config"); - sps_cfg.to_json(j); - } - if (radio_link_monitoring_cfg_present) { - j.write_fieldname("radioLinkMonitoringConfig"); - radio_link_monitoring_cfg.to_json(j); - } + j.write_str("requested-SI-List", requested_si_list.to_string()); + j.write_str("spare", spare.to_string()); j.end_obj(); } -// BWP-Uplink ::= SEQUENCE -SRSASN_CODE bwp_ul_s::pack(bit_ref& bref) const +// RRCReestablishmentRequest ::= SEQUENCE +SRSASN_CODE rrc_reest_request_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(bwp_common_present, 1)); - HANDLE_CODE(bref.pack(bwp_ded_present, 1)); - - HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); - if (bwp_common_present) { - HANDLE_CODE(bwp_common.pack(bref)); - } - if (bwp_ded_present) { - HANDLE_CODE(bwp_ded.pack(bref)); - } + HANDLE_CODE(rrc_reest_request.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE bwp_ul_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_reest_request_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(bwp_common_present, 1)); - HANDLE_CODE(bref.unpack(bwp_ded_present, 1)); - - HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); - if (bwp_common_present) { - HANDLE_CODE(bwp_common.unpack(bref)); - } - if (bwp_ded_present) { - HANDLE_CODE(bwp_ded.unpack(bref)); - } + HANDLE_CODE(rrc_reest_request.unpack(bref)); return SRSASN_SUCCESS; } -void bwp_ul_s::to_json(json_writer& j) const +void rrc_reest_request_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("bwp-Id", bwp_id); - if (bwp_common_present) { - j.write_fieldname("bwp-Common"); - bwp_common.to_json(j); - } - if (bwp_ded_present) { - j.write_fieldname("bwp-Dedicated"); - bwp_ded.to_json(j); - } + j.write_fieldname("rrcReestablishmentRequest"); + rrc_reest_request.to_json(j); j.end_obj(); } -// CFRA ::= SEQUENCE -SRSASN_CODE cfra_s::pack(bit_ref& bref) const +// RRCResumeRequest ::= SEQUENCE +SRSASN_CODE rrc_resume_request_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(occasions_present, 1)); - - if (occasions_present) { - HANDLE_CODE(bref.pack(occasions.ssb_per_rach_occasion_present, 1)); - HANDLE_CODE(occasions.rach_cfg_generic.pack(bref)); - if (occasions.ssb_per_rach_occasion_present) { - HANDLE_CODE(occasions.ssb_per_rach_occasion.pack(bref)); - } - } - HANDLE_CODE(res.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= total_nof_ra_preambs_v1530_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(rrc_resume_request.pack(bref)); - HANDLE_CODE(bref.pack(total_nof_ra_preambs_v1530_present, 1)); - if (total_nof_ra_preambs_v1530_present) { - HANDLE_CODE(pack_integer(bref, total_nof_ra_preambs_v1530, (uint8_t)1u, (uint8_t)63u)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE cfra_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_resume_request_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(occasions_present, 1)); + HANDLE_CODE(rrc_resume_request.unpack(bref)); - if (occasions_present) { - HANDLE_CODE(bref.unpack(occasions.ssb_per_rach_occasion_present, 1)); - HANDLE_CODE(occasions.rach_cfg_generic.unpack(bref)); - if (occasions.ssb_per_rach_occasion_present) { - HANDLE_CODE(occasions.ssb_per_rach_occasion.unpack(bref)); - } - } - HANDLE_CODE(res.unpack(bref)); + return SRSASN_SUCCESS; +} +void rrc_resume_request_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rrcResumeRequest"); + rrc_resume_request.to_json(j); + j.end_obj(); +} - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); +// RRCSetupRequest ::= SEQUENCE +SRSASN_CODE rrc_setup_request_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(rrc_setup_request.pack(bref)); - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_setup_request_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(rrc_setup_request.unpack(bref)); - HANDLE_CODE(bref.unpack(total_nof_ra_preambs_v1530_present, 1)); - if (total_nof_ra_preambs_v1530_present) { - HANDLE_CODE(unpack_integer(total_nof_ra_preambs_v1530, bref, (uint8_t)1u, (uint8_t)63u)); - } - } - } return SRSASN_SUCCESS; } -void cfra_s::to_json(json_writer& j) const +void rrc_setup_request_s::to_json(json_writer& j) const { j.start_obj(); - if (occasions_present) { - j.write_fieldname("occasions"); - j.start_obj(); - j.write_fieldname("rach-ConfigGeneric"); - occasions.rach_cfg_generic.to_json(j); - if (occasions.ssb_per_rach_occasion_present) { - j.write_str("ssb-perRACH-Occasion", occasions.ssb_per_rach_occasion.to_string()); - } - j.end_obj(); - } - j.write_fieldname("resources"); - res.to_json(j); - if (ext) { - if (total_nof_ra_preambs_v1530_present) { - j.write_int("totalNumberOfRA-Preambles-v1530", total_nof_ra_preambs_v1530); - } - } + j.write_fieldname("rrcSetupRequest"); + rrc_setup_request.to_json(j); j.end_obj(); } -std::string cfra_s::occasions_s_::ssb_per_rach_occasion_opts::to_string() const +// RRCSystemInfoRequest ::= SEQUENCE +SRSASN_CODE rrc_sys_info_request_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; } -float cfra_s::occasions_s_::ssb_per_rach_occasion_opts::to_number() const +SRSASN_CODE rrc_sys_info_request_s::unpack(cbit_ref& bref) { - 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_"); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; } -std::string cfra_s::occasions_s_::ssb_per_rach_occasion_opts::to_number_string() const +void rrc_sys_info_request_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); } -void cfra_s::res_c_::destroy_() +void rrc_sys_info_request_s::crit_exts_c_::destroy_() { switch (type_) { - case types::ssb: - c.destroy(); - break; - case types::csirs: - c.destroy(); + case types::rrc_sys_info_request: + c.destroy(); break; default: break; } } -void cfra_s::res_c_::set(types::options e) +void rrc_sys_info_request_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ssb: - c.init(); + case types::rrc_sys_info_request: + c.init(); break; - case types::csirs: - c.init(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cfra_s::res_c_"); + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); } } -cfra_s::res_c_::res_c_(const cfra_s::res_c_& other) +rrc_sys_info_request_s::crit_exts_c_::crit_exts_c_(const rrc_sys_info_request_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::ssb: - c.init(other.c.get()); + case types::rrc_sys_info_request: + c.init(other.c.get()); break; - case types::csirs: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cfra_s::res_c_"); + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); } } -cfra_s::res_c_& cfra_s::res_c_::operator=(const cfra_s::res_c_& other) +rrc_sys_info_request_s::crit_exts_c_& +rrc_sys_info_request_s::crit_exts_c_::operator=(const rrc_sys_info_request_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb: - c.set(other.c.get()); + case types::rrc_sys_info_request: + c.set(other.c.get()); break; - case types::csirs: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cfra_s::res_c_"); + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); } return *this; } -void cfra_s::res_c_::to_json(json_writer& j) const +void rrc_sys_info_request_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb: - j.write_fieldname("ssb"); - j.start_obj(); - j.start_array("ssb-ResourceList"); - 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); - j.end_obj(); + case types::rrc_sys_info_request: + j.write_fieldname("rrcSystemInfoRequest"); + c.get().to_json(j); break; - case types::csirs: - j.write_fieldname("csirs"); - j.start_obj(); - j.start_array("csirs-ResourceList"); - 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); - j.end_obj(); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cfra_s::res_c_"); + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE cfra_s::res_c_::pack(bit_ref& bref) const +SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().ssb_res_list, 1, 64)); - HANDLE_CODE(pack_integer(bref, c.get().ra_ssb_occasion_mask_idx, (uint8_t)0u, (uint8_t)15u)); + case types::rrc_sys_info_request: + HANDLE_CODE(c.get().pack(bref)); break; - case types::csirs: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().csirs_res_list, 1, 96)); - HANDLE_CODE(pack_integer(bref, c.get().rsrp_thres_csi_rs, (uint8_t)0u, (uint8_t)127u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cfra_s::res_c_"); + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE cfra_s::res_c_::unpack(cbit_ref& bref) +SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb: - HANDLE_CODE(unpack_dyn_seq_of(c.get().ssb_res_list, bref, 1, 64)); - HANDLE_CODE(unpack_integer(c.get().ra_ssb_occasion_mask_idx, bref, (uint8_t)0u, (uint8_t)15u)); + case types::rrc_sys_info_request: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::csirs: - HANDLE_CODE(unpack_dyn_seq_of(c.get().csirs_res_list, bref, 1, 96)); - HANDLE_CODE(unpack_integer(c.get().rsrp_thres_csi_rs, bref, (uint8_t)0u, (uint8_t)127u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cfra_s::res_c_"); + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string cfra_s::res_c_::types_opts::to_string() const -{ - static const char* options[] = {"ssb", "csirs"}; - return convert_enum_idx(options, 2, value, "cfra_s::res_c_::types"); -} - -// CSI-IM-Resource ::= SEQUENCE -SRSASN_CODE csi_im_res_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(csi_im_res_elem_pattern_present, 1)); - HANDLE_CODE(bref.pack(freq_band_present, 1)); - HANDLE_CODE(bref.pack(periodicity_and_offset_present, 1)); - - HANDLE_CODE(pack_integer(bref, csi_im_res_id, (uint8_t)0u, (uint8_t)31u)); - if (csi_im_res_elem_pattern_present) { - HANDLE_CODE(csi_im_res_elem_pattern.pack(bref)); - } - if (freq_band_present) { - HANDLE_CODE(freq_band.pack(bref)); - } - if (periodicity_and_offset_present) { - HANDLE_CODE(periodicity_and_offset.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_im_res_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(csi_im_res_elem_pattern_present, 1)); - HANDLE_CODE(bref.unpack(freq_band_present, 1)); - HANDLE_CODE(bref.unpack(periodicity_and_offset_present, 1)); - - HANDLE_CODE(unpack_integer(csi_im_res_id, bref, (uint8_t)0u, (uint8_t)31u)); - if (csi_im_res_elem_pattern_present) { - HANDLE_CODE(csi_im_res_elem_pattern.unpack(bref)); - } - if (freq_band_present) { - HANDLE_CODE(freq_band.unpack(bref)); - } - if (periodicity_and_offset_present) { - HANDLE_CODE(periodicity_and_offset.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void csi_im_res_s::to_json(json_writer& j) const +std::string rrc_sys_info_request_s::crit_exts_c_::types_opts::to_string() const { - j.start_obj(); - j.write_int("csi-IM-ResourceId", csi_im_res_id); - if (csi_im_res_elem_pattern_present) { - j.write_fieldname("csi-IM-ResourceElementPattern"); - csi_im_res_elem_pattern.to_json(j); - } - if (freq_band_present) { - j.write_fieldname("freqBand"); - freq_band.to_json(j); - } - if (periodicity_and_offset_present) { - j.write_fieldname("periodicityAndOffset"); - periodicity_and_offset.to_json(j); - } - j.end_obj(); + static const char* options[] = {"rrcSystemInfoRequest", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_sys_info_request_s::crit_exts_c_::types"); } -void csi_im_res_s::csi_im_res_elem_pattern_c_::destroy_() +// UL-CCCH-MessageType ::= CHOICE +void ul_ccch_msg_type_c::destroy_() { switch (type_) { - case types::pattern0: - c.destroy(); - break; - case types::pattern1: - c.destroy(); + case types::c1: + c.destroy(); break; default: break; } } -void csi_im_res_s::csi_im_res_elem_pattern_c_::set(types::options e) +void ul_ccch_msg_type_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::pattern0: - c.init(); + case types::c1: + c.init(); break; - case types::pattern1: - c.init(); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); } } -csi_im_res_s::csi_im_res_elem_pattern_c_::csi_im_res_elem_pattern_c_( - const csi_im_res_s::csi_im_res_elem_pattern_c_& other) +ul_ccch_msg_type_c::ul_ccch_msg_type_c(const ul_ccch_msg_type_c& other) { type_ = other.type(); switch (type_) { - case types::pattern0: - c.init(other.c.get()); + case types::c1: + c.init(other.c.get()); break; - case types::pattern1: - c.init(other.c.get()); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); } } -csi_im_res_s::csi_im_res_elem_pattern_c_& csi_im_res_s::csi_im_res_elem_pattern_c_:: - operator=(const csi_im_res_s::csi_im_res_elem_pattern_c_& other) +ul_ccch_msg_type_c& ul_ccch_msg_type_c::operator=(const ul_ccch_msg_type_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::pattern0: - c.set(other.c.get()); + case types::c1: + c.set(other.c.get()); break; - case types::pattern1: - c.set(other.c.get()); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); } return *this; } -void csi_im_res_s::csi_im_res_elem_pattern_c_::to_json(json_writer& j) const +void ul_ccch_msg_type_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::pattern0: - j.write_fieldname("pattern0"); - j.start_obj(); - j.write_str("subcarrierLocation-p0", c.get().subcarrier_location_p0.to_string()); - j.write_int("symbolLocation-p0", c.get().symbol_location_p0); - j.end_obj(); + case types::c1: + j.write_fieldname("c1"); + c.get().to_json(j); break; - case types::pattern1: - j.write_fieldname("pattern1"); - j.start_obj(); - j.write_str("subcarrierLocation-p1", c.get().subcarrier_location_p1.to_string()); - j.write_int("symbolLocation-p1", c.get().symbol_location_p1); - j.end_obj(); + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); } j.end_obj(); } -SRSASN_CODE csi_im_res_s::csi_im_res_elem_pattern_c_::pack(bit_ref& bref) const +SRSASN_CODE ul_ccch_msg_type_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::pattern0: - HANDLE_CODE(c.get().subcarrier_location_p0.pack(bref)); - HANDLE_CODE(pack_integer(bref, c.get().symbol_location_p0, (uint8_t)0u, (uint8_t)12u)); + case types::c1: + HANDLE_CODE(c.get().pack(bref)); break; - case types::pattern1: - HANDLE_CODE(c.get().subcarrier_location_p1.pack(bref)); - HANDLE_CODE(pack_integer(bref, c.get().symbol_location_p1, (uint8_t)0u, (uint8_t)13u)); + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_im_res_s::csi_im_res_elem_pattern_c_::unpack(cbit_ref& bref) +SRSASN_CODE ul_ccch_msg_type_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::pattern0: - HANDLE_CODE(c.get().subcarrier_location_p0.unpack(bref)); - HANDLE_CODE(unpack_integer(c.get().symbol_location_p0, bref, (uint8_t)0u, (uint8_t)12u)); + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::pattern1: - HANDLE_CODE(c.get().subcarrier_location_p1.unpack(bref)); - HANDLE_CODE(unpack_integer(c.get().symbol_location_p1, bref, (uint8_t)0u, (uint8_t)13u)); + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_im_res_s::csi_im_res_elem_pattern_c_::pattern0_s_::subcarrier_location_p0_opts::to_string() const -{ - 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 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 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 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 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 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 -SRSASN_CODE csi_im_res_set_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, csi_im_res_set_id, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res, 1, 8, integer_packer(0, 31))); - - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_im_res_set_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(csi_im_res_set_id, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_dyn_seq_of(csi_im_res, bref, 1, 8, integer_packer(0, 31))); - - return SRSASN_SUCCESS; -} -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 (const auto& e1 : csi_im_res) { - j.write_int(e1); - } - j.end_array(); - j.end_obj(); -} - -// CSI-ReportConfig ::= SEQUENCE -SRSASN_CODE csi_report_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(carrier_present, 1)); - HANDLE_CODE(bref.pack(csi_im_res_for_interference_present, 1)); - HANDLE_CODE(bref.pack(nzp_csi_rs_res_for_interference_present, 1)); - HANDLE_CODE(bref.pack(report_freq_cfg_present, 1)); - HANDLE_CODE(bref.pack(codebook_cfg_present, 1)); - HANDLE_CODE(bref.pack(dummy_present, 1)); - HANDLE_CODE(bref.pack(cqi_table_present, 1)); - HANDLE_CODE(bref.pack(non_pmi_port_ind_present, 1)); - - HANDLE_CODE(pack_integer(bref, report_cfg_id, (uint8_t)0u, (uint8_t)47u)); - if (carrier_present) { - HANDLE_CODE(pack_integer(bref, carrier, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(pack_integer(bref, res_for_ch_meas, (uint8_t)0u, (uint8_t)111u)); - if (csi_im_res_for_interference_present) { - HANDLE_CODE(pack_integer(bref, csi_im_res_for_interference, (uint8_t)0u, (uint8_t)111u)); - } - if (nzp_csi_rs_res_for_interference_present) { - HANDLE_CODE(pack_integer(bref, nzp_csi_rs_res_for_interference, (uint8_t)0u, (uint8_t)111u)); - } - HANDLE_CODE(report_cfg_type.pack(bref)); - HANDLE_CODE(report_quant.pack(bref)); - if (report_freq_cfg_present) { - HANDLE_CODE(bref.pack(report_freq_cfg.cqi_format_ind_present, 1)); - HANDLE_CODE(bref.pack(report_freq_cfg.pmi_format_ind_present, 1)); - HANDLE_CODE(bref.pack(report_freq_cfg.csi_report_band_present, 1)); - if (report_freq_cfg.cqi_format_ind_present) { - HANDLE_CODE(report_freq_cfg.cqi_format_ind.pack(bref)); - } - if (report_freq_cfg.pmi_format_ind_present) { - HANDLE_CODE(report_freq_cfg.pmi_format_ind.pack(bref)); - } - if (report_freq_cfg.csi_report_band_present) { - HANDLE_CODE(report_freq_cfg.csi_report_band.pack(bref)); - } - } - HANDLE_CODE(time_restrict_for_ch_meass.pack(bref)); - HANDLE_CODE(time_restrict_for_interference_meass.pack(bref)); - if (codebook_cfg_present) { - HANDLE_CODE(codebook_cfg.pack(bref)); - } - if (dummy_present) { - HANDLE_CODE(dummy.pack(bref)); - } - HANDLE_CODE(group_based_beam_report.pack(bref)); - if (cqi_table_present) { - HANDLE_CODE(cqi_table.pack(bref)); - } - HANDLE_CODE(subband_size.pack(bref)); - if (non_pmi_port_ind_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, non_pmi_port_ind, 1, 128)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= semi_persistent_on_pusch_v1530.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(semi_persistent_on_pusch_v1530.is_present(), 1)); - if (semi_persistent_on_pusch_v1530.is_present()) { - HANDLE_CODE(semi_persistent_on_pusch_v1530->report_slot_cfg_v1530.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_report_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(carrier_present, 1)); - HANDLE_CODE(bref.unpack(csi_im_res_for_interference_present, 1)); - HANDLE_CODE(bref.unpack(nzp_csi_rs_res_for_interference_present, 1)); - HANDLE_CODE(bref.unpack(report_freq_cfg_present, 1)); - HANDLE_CODE(bref.unpack(codebook_cfg_present, 1)); - HANDLE_CODE(bref.unpack(dummy_present, 1)); - HANDLE_CODE(bref.unpack(cqi_table_present, 1)); - HANDLE_CODE(bref.unpack(non_pmi_port_ind_present, 1)); - - HANDLE_CODE(unpack_integer(report_cfg_id, bref, (uint8_t)0u, (uint8_t)47u)); - if (carrier_present) { - HANDLE_CODE(unpack_integer(carrier, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(unpack_integer(res_for_ch_meas, bref, (uint8_t)0u, (uint8_t)111u)); - if (csi_im_res_for_interference_present) { - HANDLE_CODE(unpack_integer(csi_im_res_for_interference, bref, (uint8_t)0u, (uint8_t)111u)); - } - if (nzp_csi_rs_res_for_interference_present) { - HANDLE_CODE(unpack_integer(nzp_csi_rs_res_for_interference, bref, (uint8_t)0u, (uint8_t)111u)); - } - HANDLE_CODE(report_cfg_type.unpack(bref)); - HANDLE_CODE(report_quant.unpack(bref)); - if (report_freq_cfg_present) { - HANDLE_CODE(bref.unpack(report_freq_cfg.cqi_format_ind_present, 1)); - HANDLE_CODE(bref.unpack(report_freq_cfg.pmi_format_ind_present, 1)); - HANDLE_CODE(bref.unpack(report_freq_cfg.csi_report_band_present, 1)); - if (report_freq_cfg.cqi_format_ind_present) { - HANDLE_CODE(report_freq_cfg.cqi_format_ind.unpack(bref)); - } - if (report_freq_cfg.pmi_format_ind_present) { - HANDLE_CODE(report_freq_cfg.pmi_format_ind.unpack(bref)); - } - if (report_freq_cfg.csi_report_band_present) { - HANDLE_CODE(report_freq_cfg.csi_report_band.unpack(bref)); - } - } - HANDLE_CODE(time_restrict_for_ch_meass.unpack(bref)); - HANDLE_CODE(time_restrict_for_interference_meass.unpack(bref)); - if (codebook_cfg_present) { - HANDLE_CODE(codebook_cfg.unpack(bref)); - } - if (dummy_present) { - HANDLE_CODE(dummy.unpack(bref)); - } - HANDLE_CODE(group_based_beam_report.unpack(bref)); - if (cqi_table_present) { - HANDLE_CODE(cqi_table.unpack(bref)); - } - HANDLE_CODE(subband_size.unpack(bref)); - if (non_pmi_port_ind_present) { - HANDLE_CODE(unpack_dyn_seq_of(non_pmi_port_ind, bref, 1, 128)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - bool semi_persistent_on_pusch_v1530_present; - HANDLE_CODE(bref.unpack(semi_persistent_on_pusch_v1530_present, 1)); - semi_persistent_on_pusch_v1530.set_present(semi_persistent_on_pusch_v1530_present); - if (semi_persistent_on_pusch_v1530.is_present()) { - HANDLE_CODE(semi_persistent_on_pusch_v1530->report_slot_cfg_v1530.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void csi_report_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("reportConfigId", report_cfg_id); - if (carrier_present) { - j.write_int("carrier", carrier); - } - j.write_int("resourcesForChannelMeasurement", res_for_ch_meas); - if (csi_im_res_for_interference_present) { - j.write_int("csi-IM-ResourcesForInterference", csi_im_res_for_interference); - } - if (nzp_csi_rs_res_for_interference_present) { - j.write_int("nzp-CSI-RS-ResourcesForInterference", nzp_csi_rs_res_for_interference); - } - j.write_fieldname("reportConfigType"); - report_cfg_type.to_json(j); - j.write_fieldname("reportQuantity"); - report_quant.to_json(j); - if (report_freq_cfg_present) { - j.write_fieldname("reportFreqConfiguration"); - j.start_obj(); - if (report_freq_cfg.cqi_format_ind_present) { - j.write_str("cqi-FormatIndicator", report_freq_cfg.cqi_format_ind.to_string()); - } - if (report_freq_cfg.pmi_format_ind_present) { - j.write_str("pmi-FormatIndicator", report_freq_cfg.pmi_format_ind.to_string()); - } - if (report_freq_cfg.csi_report_band_present) { - j.write_fieldname("csi-ReportingBand"); - report_freq_cfg.csi_report_band.to_json(j); - } - j.end_obj(); - } - j.write_str("timeRestrictionForChannelMeasurements", time_restrict_for_ch_meass.to_string()); - j.write_str("timeRestrictionForInterferenceMeasurements", time_restrict_for_interference_meass.to_string()); - if (codebook_cfg_present) { - j.write_fieldname("codebookConfig"); - codebook_cfg.to_json(j); - } - if (dummy_present) { - j.write_str("dummy", dummy.to_string()); - } - j.write_fieldname("groupBasedBeamReporting"); - group_based_beam_report.to_json(j); - if (cqi_table_present) { - j.write_str("cqi-Table", cqi_table.to_string()); - } - j.write_str("subbandSize", subband_size.to_string()); - if (non_pmi_port_ind_present) { - j.start_array("non-PMI-PortIndication"); - for (const auto& e1 : non_pmi_port_ind) { - e1.to_json(j); - } - j.end_array(); - } - if (ext) { - if (semi_persistent_on_pusch_v1530.is_present()) { - j.write_fieldname("semiPersistentOnPUSCH-v1530"); - j.start_obj(); - j.write_str("reportSlotConfig-v1530", semi_persistent_on_pusch_v1530->report_slot_cfg_v1530.to_string()); - j.end_obj(); - } - } - j.end_obj(); -} - -void csi_report_cfg_s::report_cfg_type_c_::destroy_() +void ul_ccch_msg_type_c::c1_c_::destroy_() { switch (type_) { - case types::periodic: - c.destroy(); + case types::rrc_setup_request: + c.destroy(); break; - case types::semi_persistent_on_pucch: - c.destroy(); + case types::rrc_resume_request: + c.destroy(); break; - case types::semi_persistent_on_pusch: - c.destroy(); + case types::rrc_reest_request: + c.destroy(); break; - case types::aperiodic: - c.destroy(); + case types::rrc_sys_info_request: + c.destroy(); break; default: break; } } -void csi_report_cfg_s::report_cfg_type_c_::set(types::options e) +void ul_ccch_msg_type_c::c1_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::periodic: - c.init(); + case types::rrc_setup_request: + c.init(); break; - case types::semi_persistent_on_pucch: - c.init(); + case types::rrc_resume_request: + c.init(); break; - case types::semi_persistent_on_pusch: - c.init(); + case types::rrc_reest_request: + c.init(); break; - case types::aperiodic: - c.init(); + case types::rrc_sys_info_request: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); } } -csi_report_cfg_s::report_cfg_type_c_::report_cfg_type_c_(const csi_report_cfg_s::report_cfg_type_c_& other) +ul_ccch_msg_type_c::c1_c_::c1_c_(const ul_ccch_msg_type_c::c1_c_& other) { type_ = other.type(); switch (type_) { - case types::periodic: - c.init(other.c.get()); + case types::rrc_setup_request: + c.init(other.c.get()); break; - case types::semi_persistent_on_pucch: - c.init(other.c.get()); + case types::rrc_resume_request: + c.init(other.c.get()); break; - case types::semi_persistent_on_pusch: - c.init(other.c.get()); + case types::rrc_reest_request: + c.init(other.c.get()); break; - case types::aperiodic: - c.init(other.c.get()); + case types::rrc_sys_info_request: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); } } -csi_report_cfg_s::report_cfg_type_c_& csi_report_cfg_s::report_cfg_type_c_:: - operator=(const csi_report_cfg_s::report_cfg_type_c_& other) +ul_ccch_msg_type_c::c1_c_& ul_ccch_msg_type_c::c1_c_::operator=(const ul_ccch_msg_type_c::c1_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::periodic: - c.set(other.c.get()); + case types::rrc_setup_request: + c.set(other.c.get()); break; - case types::semi_persistent_on_pucch: - c.set(other.c.get()); + case types::rrc_resume_request: + c.set(other.c.get()); break; - case types::semi_persistent_on_pusch: - c.set(other.c.get()); + case types::rrc_reest_request: + c.set(other.c.get()); break; - case types::aperiodic: - c.set(other.c.get()); + case types::rrc_sys_info_request: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); } return *this; } -void csi_report_cfg_s::report_cfg_type_c_::to_json(json_writer& j) const +void ul_ccch_msg_type_c::c1_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::periodic: - j.write_fieldname("periodic"); - j.start_obj(); - j.write_fieldname("reportSlotConfig"); - c.get().report_slot_cfg.to_json(j); - j.start_array("pucch-CSI-ResourceList"); - for (const auto& e1 : c.get().pucch_csi_res_list) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); + case types::rrc_setup_request: + j.write_fieldname("rrcSetupRequest"); + c.get().to_json(j); break; - case types::semi_persistent_on_pucch: - j.write_fieldname("semiPersistentOnPUCCH"); - j.start_obj(); - j.write_fieldname("reportSlotConfig"); - c.get().report_slot_cfg.to_json(j); - j.start_array("pucch-CSI-ResourceList"); - for (const auto& e1 : c.get().pucch_csi_res_list) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); + case types::rrc_resume_request: + j.write_fieldname("rrcResumeRequest"); + c.get().to_json(j); break; - case types::semi_persistent_on_pusch: - j.write_fieldname("semiPersistentOnPUSCH"); - j.start_obj(); - j.write_str("reportSlotConfig", c.get().report_slot_cfg.to_string()); - j.start_array("reportSlotOffsetList"); - for (const auto& e1 : c.get().report_slot_offset_list) { - j.write_int(e1); - } - j.end_array(); - j.write_int("p0alpha", c.get().p0alpha); - j.end_obj(); + case types::rrc_reest_request: + j.write_fieldname("rrcReestablishmentRequest"); + c.get().to_json(j); break; - case types::aperiodic: - j.write_fieldname("aperiodic"); - j.start_obj(); - j.start_array("reportSlotOffsetList"); - for (const auto& e1 : c.get().report_slot_offset_list) { - j.write_int(e1); - } - j.end_array(); - j.end_obj(); + case types::rrc_sys_info_request: + j.write_fieldname("rrcSystemInfoRequest"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); } j.end_obj(); } -SRSASN_CODE csi_report_cfg_s::report_cfg_type_c_::pack(bit_ref& bref) const +SRSASN_CODE ul_ccch_msg_type_c::c1_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::periodic: - HANDLE_CODE(c.get().report_slot_cfg.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().pucch_csi_res_list, 1, 4)); + case types::rrc_setup_request: + HANDLE_CODE(c.get().pack(bref)); break; - case types::semi_persistent_on_pucch: - HANDLE_CODE(c.get().report_slot_cfg.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().pucch_csi_res_list, 1, 4)); + case types::rrc_resume_request: + HANDLE_CODE(c.get().pack(bref)); break; - case types::semi_persistent_on_pusch: - HANDLE_CODE(c.get().report_slot_cfg.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of( - bref, c.get().report_slot_offset_list, 1, 16, integer_packer(0, 32))); - HANDLE_CODE(pack_integer(bref, c.get().p0alpha, (uint8_t)0u, (uint8_t)29u)); + case types::rrc_reest_request: + HANDLE_CODE(c.get().pack(bref)); break; - case types::aperiodic: - HANDLE_CODE( - pack_dyn_seq_of(bref, c.get().report_slot_offset_list, 1, 16, integer_packer(0, 32))); + case types::rrc_sys_info_request: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_report_cfg_s::report_cfg_type_c_::unpack(cbit_ref& bref) +SRSASN_CODE ul_ccch_msg_type_c::c1_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::periodic: - HANDLE_CODE(c.get().report_slot_cfg.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(c.get().pucch_csi_res_list, bref, 1, 4)); + case types::rrc_setup_request: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::semi_persistent_on_pucch: - HANDLE_CODE(c.get().report_slot_cfg.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(c.get().pucch_csi_res_list, bref, 1, 4)); + case types::rrc_resume_request: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::semi_persistent_on_pusch: - HANDLE_CODE(c.get().report_slot_cfg.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of( - c.get().report_slot_offset_list, bref, 1, 16, integer_packer(0, 32))); - HANDLE_CODE(unpack_integer(c.get().p0alpha, bref, (uint8_t)0u, (uint8_t)29u)); + case types::rrc_reest_request: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::aperiodic: - HANDLE_CODE(unpack_dyn_seq_of( - c.get().report_slot_offset_list, bref, 1, 16, integer_packer(0, 32))); + case types::rrc_sys_info_request: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_opts::to_string() const +std::string ul_ccch_msg_type_c::c1_c_::types_opts::to_string() const { - 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_"); + static const char* options[] = { + "rrcSetupRequest", "rrcResumeRequest", "rrcReestablishmentRequest", "rrcSystemInfoRequest"}; + return convert_enum_idx(options, 4, value, "ul_ccch_msg_type_c::c1_c_::types"); } -uint16_t csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_opts::to_number() const + +std::string ul_ccch_msg_type_c::types_opts::to_string() const { - 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_"); + static const char* options[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(options, 2, value, "ul_ccch_msg_type_c::types"); } - -std::string csi_report_cfg_s::report_cfg_type_c_::types_opts::to_string() const +uint8_t ul_ccch_msg_type_c::types_opts::to_number() const { - static const char* options[] = {"periodic", "semiPersistentOnPUCCH", "semiPersistentOnPUSCH", "aperiodic"}; - return convert_enum_idx(options, 4, value, "csi_report_cfg_s::report_cfg_type_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_ccch_msg_type_c::types"); } -void csi_report_cfg_s::report_quant_c_::set(types::options e) +// UL-CCCH-Message ::= SEQUENCE +SRSASN_CODE ul_ccch_msg_s::pack(bit_ref& bref) const { - type_ = e; + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; } -void csi_report_cfg_s::report_quant_c_::to_json(json_writer& j) const +SRSASN_CODE ul_ccch_msg_s::unpack(cbit_ref& bref) { - j.start_obj(); - switch (type_) { - case types::none: - break; - case types::cri_ri_pmi_cqi: - break; - case types::cri_ri_i1: - break; - case types::cri_ri_i1_cqi: - j.write_fieldname("cri-RI-i1-CQI"); - j.start_obj(); - if (c.pdsch_bundle_size_for_csi_present) { - j.write_str("pdsch-BundleSizeForCSI", c.pdsch_bundle_size_for_csi.to_string()); - } - j.end_obj(); - break; - case types::cri_ri_cqi: - break; - case types::cri_rsrp: - break; - case types::ssb_idx_rsrp: - break; - case types::cri_ri_li_pmi_cqi: - break; - default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_quant_c_"); - } - j.end_obj(); -} -SRSASN_CODE csi_report_cfg_s::report_quant_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::none: - break; - case types::cri_ri_pmi_cqi: - break; - case types::cri_ri_i1: - break; - case types::cri_ri_i1_cqi: - HANDLE_CODE(bref.pack(c.pdsch_bundle_size_for_csi_present, 1)); - if (c.pdsch_bundle_size_for_csi_present) { - HANDLE_CODE(c.pdsch_bundle_size_for_csi.pack(bref)); - } - break; - case types::cri_ri_cqi: - break; - case types::cri_rsrp: - break; - case types::ssb_idx_rsrp: - break; - case types::cri_ri_li_pmi_cqi: - break; - default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_quant_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + return SRSASN_SUCCESS; } -SRSASN_CODE csi_report_cfg_s::report_quant_c_::unpack(cbit_ref& bref) +void ul_ccch_msg_s::to_json(json_writer& j) const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::none: - break; - case types::cri_ri_pmi_cqi: - break; - case types::cri_ri_i1: - break; - case types::cri_ri_i1_cqi: - HANDLE_CODE(bref.unpack(c.pdsch_bundle_size_for_csi_present, 1)); - if (c.pdsch_bundle_size_for_csi_present) { - HANDLE_CODE(c.pdsch_bundle_size_for_csi.unpack(bref)); - } - break; - case types::cri_ri_cqi: - break; - case types::cri_rsrp: - break; - case types::ssb_idx_rsrp: - break; - case types::cri_ri_li_pmi_cqi: - break; - default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_quant_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + j.start_array(); + j.start_obj(); + j.start_obj("UL-CCCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); } -std::string csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_for_csi_opts::to_string() const +// RRCResumeRequest1-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_request1_ies_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(resume_id.pack(bref)); + HANDLE_CODE(resume_mac_i.pack(bref)); + HANDLE_CODE(resume_cause.pack(bref)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; } -uint8_t csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_for_csi_opts::to_number() const +SRSASN_CODE rrc_resume_request1_ies_s::unpack(cbit_ref& bref) { - 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_"); -} + HANDLE_CODE(resume_id.unpack(bref)); + HANDLE_CODE(resume_mac_i.unpack(bref)); + HANDLE_CODE(resume_cause.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); -std::string csi_report_cfg_s::report_quant_c_::types_opts::to_string() const + return SRSASN_SUCCESS; +} +void rrc_resume_request1_ies_s::to_json(json_writer& j) const { - 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"); + j.start_obj(); + j.write_str("resumeIdentity", resume_id.to_string()); + j.write_str("resumeMAC-I", resume_mac_i.to_string()); + j.write_str("resumeCause", resume_cause.to_string()); + j.write_str("spare", spare.to_string()); + j.end_obj(); } -std::string csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::to_string() const +// RRCResumeRequest1 ::= SEQUENCE +SRSASN_CODE rrc_resume_request1_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(rrc_resume_request1.pack(bref)); + + return SRSASN_SUCCESS; } +SRSASN_CODE rrc_resume_request1_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(rrc_resume_request1.unpack(bref)); -std::string csi_report_cfg_s::report_freq_cfg_s_::pmi_format_ind_opts::to_string() const + return SRSASN_SUCCESS; +} +void rrc_resume_request1_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + j.write_fieldname("rrcResumeRequest1"); + rrc_resume_request1.to_json(j); + j.end_obj(); } -void csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::destroy_() +// UL-CCCH1-MessageType ::= CHOICE +void ul_ccch1_msg_type_c::destroy_() { switch (type_) { - case types::subbands3: - c.destroy >(); - break; - case types::subbands4: - c.destroy >(); - break; - case types::subbands5: - c.destroy >(); - break; - case types::subbands6: - c.destroy >(); - break; - case types::subbands7: - c.destroy >(); - break; - case types::subbands8: - c.destroy >(); - break; - case types::subbands9: - c.destroy >(); - break; - case types::subbands10: - c.destroy >(); - break; - case types::subbands11: - c.destroy >(); - break; - case types::subbands12: - c.destroy >(); - break; - case types::subbands13: - c.destroy >(); - break; - case types::subbands14: - c.destroy >(); - break; - case types::subbands15: - c.destroy >(); - break; - case types::subbands16: - c.destroy >(); - break; - case types::subbands17: - c.destroy >(); - break; - case types::subbands18: - c.destroy >(); - break; - case types::subbands19_v1530: - c.destroy >(); + case types::c1: + c.destroy(); break; default: break; } } -void csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::set(types::options e) +void ul_ccch1_msg_type_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::subbands3: - c.init >(); - break; - case types::subbands4: - c.init >(); - break; - case types::subbands5: - c.init >(); - break; - case types::subbands6: - c.init >(); - break; - case types::subbands7: - c.init >(); - break; - case types::subbands8: - c.init >(); - break; - case types::subbands9: - c.init >(); - break; - case types::subbands10: - c.init >(); - break; - case types::subbands11: - c.init >(); - break; - case types::subbands12: - c.init >(); - break; - case types::subbands13: - c.init >(); - break; - case types::subbands14: - c.init >(); - break; - case types::subbands15: - c.init >(); - break; - case types::subbands16: - c.init >(); - break; - case types::subbands17: - c.init >(); - break; - case types::subbands18: - c.init >(); + case types::c1: + c.init(); break; - case types::subbands19_v1530: - c.init >(); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); } } -csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::csi_report_band_c_( - const csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_& other) +ul_ccch1_msg_type_c::ul_ccch1_msg_type_c(const ul_ccch1_msg_type_c& other) { type_ = other.type(); switch (type_) { - case types::subbands3: - c.init(other.c.get >()); - break; - case types::subbands4: - c.init(other.c.get >()); - break; - case types::subbands5: - c.init(other.c.get >()); - break; - case types::subbands6: - c.init(other.c.get >()); - break; - case types::subbands7: - c.init(other.c.get >()); - break; - case types::subbands8: - c.init(other.c.get >()); - break; - case types::subbands9: - c.init(other.c.get >()); - break; - case types::subbands10: - c.init(other.c.get >()); - break; - case types::subbands11: - c.init(other.c.get >()); - break; - case types::subbands12: - c.init(other.c.get >()); - break; - case types::subbands13: - c.init(other.c.get >()); - break; - case types::subbands14: - c.init(other.c.get >()); - break; - case types::subbands15: - c.init(other.c.get >()); - break; - case types::subbands16: - c.init(other.c.get >()); - break; - case types::subbands17: - c.init(other.c.get >()); - break; - case types::subbands18: - c.init(other.c.get >()); + case types::c1: + c.init(other.c.get()); break; - case types::subbands19_v1530: - c.init(other.c.get >()); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); } } -csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_& csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_:: - operator=(const csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_& other) +ul_ccch1_msg_type_c& ul_ccch1_msg_type_c::operator=(const ul_ccch1_msg_type_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::subbands3: - c.set(other.c.get >()); - break; - case types::subbands4: - c.set(other.c.get >()); - break; - case types::subbands5: - c.set(other.c.get >()); - break; - case types::subbands6: - c.set(other.c.get >()); - break; - case types::subbands7: - c.set(other.c.get >()); - break; - case types::subbands8: - c.set(other.c.get >()); - break; - case types::subbands9: - c.set(other.c.get >()); - break; - case types::subbands10: - c.set(other.c.get >()); - break; - case types::subbands11: - c.set(other.c.get >()); - break; - case types::subbands12: - c.set(other.c.get >()); - break; - case types::subbands13: - c.set(other.c.get >()); - break; - case types::subbands14: - c.set(other.c.get >()); - break; - case types::subbands15: - c.set(other.c.get >()); - break; - case types::subbands16: - c.set(other.c.get >()); - break; - case types::subbands17: - c.set(other.c.get >()); - break; - case types::subbands18: - c.set(other.c.get >()); + case types::c1: + c.set(other.c.get()); break; - case types::subbands19_v1530: - c.set(other.c.get >()); + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); } return *this; } -void csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::to_json(json_writer& j) const +void ul_ccch1_msg_type_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::subbands3: - j.write_str("subbands3", c.get >().to_string()); - break; - case types::subbands4: - j.write_str("subbands4", c.get >().to_string()); - break; - case types::subbands5: - j.write_str("subbands5", c.get >().to_string()); - break; - case types::subbands6: - j.write_str("subbands6", c.get >().to_string()); - break; - case types::subbands7: - j.write_str("subbands7", c.get >().to_string()); - break; - case types::subbands8: - j.write_str("subbands8", c.get >().to_string()); - break; - case types::subbands9: - j.write_str("subbands9", c.get >().to_string()); - break; - case types::subbands10: - j.write_str("subbands10", c.get >().to_string()); - break; - case types::subbands11: - j.write_str("subbands11", c.get >().to_string()); - break; - case types::subbands12: - j.write_str("subbands12", c.get >().to_string()); - break; - case types::subbands13: - j.write_str("subbands13", c.get >().to_string()); - break; - case types::subbands14: - j.write_str("subbands14", c.get >().to_string()); - break; - case types::subbands15: - j.write_str("subbands15", c.get >().to_string()); - break; - case types::subbands16: - j.write_str("subbands16", c.get >().to_string()); - break; - case types::subbands17: - j.write_str("subbands17", c.get >().to_string()); - break; - case types::subbands18: - j.write_str("subbands18", c.get >().to_string()); + case types::c1: + j.write_fieldname("c1"); + c.get().to_json(j); break; - case types::subbands19_v1530: - j.write_str("subbands19-v1530", c.get >().to_string()); + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); } j.end_obj(); } -SRSASN_CODE csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::pack(bit_ref& bref) const +SRSASN_CODE ul_ccch1_msg_type_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::subbands3: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands4: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands5: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands6: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands7: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands8: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands9: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands10: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands11: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands12: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands13: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands14: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands15: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands16: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::subbands17: - HANDLE_CODE(c.get >().pack(bref)); + case types::c1: + HANDLE_CODE(c.get().pack(bref)); break; - case types::subbands18: - HANDLE_CODE(c.get >().pack(bref)); + case types::msg_class_ext: break; - case types::subbands19_v1530: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get >().pack(bref)); - } break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::unpack(cbit_ref& bref) +SRSASN_CODE ul_ccch1_msg_type_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::subbands3: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands4: - HANDLE_CODE(c.get >().unpack(bref)); + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::subbands5: - HANDLE_CODE(c.get >().unpack(bref)); + case types::msg_class_ext: break; - case types::subbands6: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands7: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands8: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands9: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands10: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands11: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands12: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands13: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands14: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands15: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands16: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands17: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands18: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::subbands19_v1530: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get >().unpack(bref)); - } break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types_opts::to_string() const -{ - 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 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 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 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 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 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) +void ul_ccch1_msg_type_c::c1_c_::set(types::options e) { type_ = e; } -void csi_report_cfg_s::group_based_beam_report_c_::to_json(json_writer& j) const +void ul_ccch1_msg_type_c::c1_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::enabled: + case types::rrc_resume_request1: + j.write_fieldname("rrcResumeRequest1"); + c.to_json(j); break; - case types::disabled: - j.write_fieldname("disabled"); - j.start_obj(); - if (c.nrof_reported_rs_present) { - j.write_str("nrofReportedRS", c.nrof_reported_rs.to_string()); - } - j.end_obj(); + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::group_based_beam_report_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c::c1_c_"); } j.end_obj(); } -SRSASN_CODE csi_report_cfg_s::group_based_beam_report_c_::pack(bit_ref& bref) const +SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::enabled: + case types::rrc_resume_request1: + HANDLE_CODE(c.pack(bref)); break; - case types::disabled: - HANDLE_CODE(bref.pack(c.nrof_reported_rs_present, 1)); - if (c.nrof_reported_rs_present) { - HANDLE_CODE(c.nrof_reported_rs.pack(bref)); - } + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::group_based_beam_report_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c::c1_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_report_cfg_s::group_based_beam_report_c_::unpack(cbit_ref& bref) +SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::enabled: + case types::rrc_resume_request1: + HANDLE_CODE(c.unpack(bref)); break; - case types::disabled: - HANDLE_CODE(bref.unpack(c.nrof_reported_rs_present, 1)); - if (c.nrof_reported_rs_present) { - HANDLE_CODE(c.nrof_reported_rs.unpack(bref)); - } + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: break; default: - log_invalid_choice_id(type_, "csi_report_cfg_s::group_based_beam_report_c_"); + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c::c1_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported_rs_opts::to_string() const -{ - 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 +std::string ul_ccch1_msg_type_c::c1_c_::types_opts::to_string() const { - 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_"); + static const char* options[] = {"rrcResumeRequest1", "spare3", "spare2", "spare1"}; + return convert_enum_idx(options, 4, value, "ul_ccch1_msg_type_c::c1_c_::types"); } - -std::string csi_report_cfg_s::group_based_beam_report_c_::types_opts::to_string() const +uint8_t ul_ccch1_msg_type_c::c1_c_::types_opts::to_number() const { - static const char* options[] = {"enabled", "disabled"}; - return convert_enum_idx(options, 2, value, "csi_report_cfg_s::group_based_beam_report_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 csi_report_cfg_s::cqi_table_opts::to_string() const +std::string ul_ccch1_msg_type_c::types_opts::to_string() const { - static const char* options[] = {"table1", "table2", "table3", "spare1"}; - return convert_enum_idx(options, 4, value, "csi_report_cfg_s::cqi_table_e_"); + static const char* options[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(options, 2, value, "ul_ccch1_msg_type_c::types"); } -uint8_t csi_report_cfg_s::cqi_table_opts::to_number() const +uint8_t ul_ccch1_msg_type_c::types_opts::to_number() const { - static const uint8_t options[] = {1, 2, 3}; - return map_enum_number(options, 3, value, "csi_report_cfg_s::cqi_table_e_"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_ccch1_msg_type_c::types"); } -std::string csi_report_cfg_s::subband_size_opts::to_string() const +// UL-CCCH1-Message ::= SEQUENCE +SRSASN_CODE ul_ccch1_msg_s::pack(bit_ref& bref) const { - static const char* options[] = {"value1", "value2"}; - return convert_enum_idx(options, 2, value, "csi_report_cfg_s::subband_size_e_"); + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; } -uint8_t csi_report_cfg_s::subband_size_opts::to_number() const +SRSASN_CODE ul_ccch1_msg_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {1, 2}; - return map_enum_number(options, 2, value, "csi_report_cfg_s::subband_size_e_"); -} + HANDLE_CODE(msg.unpack(bref)); -std::string csi_report_cfg_s::semi_persistent_on_pusch_v1530_s_::report_slot_cfg_v1530_opts::to_string() const -{ - 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_"); + bref.align_bytes(); + + return SRSASN_SUCCESS; } -uint8_t csi_report_cfg_s::semi_persistent_on_pusch_v1530_s_::report_slot_cfg_v1530_opts::to_number() const +void ul_ccch1_msg_s::to_json(json_writer& j) const { - 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_"); + j.start_array(); + j.start_obj(); + j.start_obj("UL-CCCH1-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); } -// CSI-ResourceConfig ::= SEQUENCE -SRSASN_CODE csi_res_cfg_s::pack(bit_ref& bref) const +// MeasQuantityResults ::= SEQUENCE +SRSASN_CODE meas_quant_results_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, csi_res_cfg_id, (uint8_t)0u, (uint8_t)111u)); - HANDLE_CODE(csi_rs_res_set_list.pack(bref)); - HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(res_type.pack(bref)); + HANDLE_CODE(bref.pack(rsrp_present, 1)); + HANDLE_CODE(bref.pack(rsrq_present, 1)); + HANDLE_CODE(bref.pack(sinr_present, 1)); + + if (rsrp_present) { + HANDLE_CODE(pack_integer(bref, rsrp, (uint8_t)0u, (uint8_t)127u)); + } + if (rsrq_present) { + HANDLE_CODE(pack_integer(bref, rsrq, (uint8_t)0u, (uint8_t)127u)); + } + if (sinr_present) { + HANDLE_CODE(pack_integer(bref, sinr, (uint8_t)0u, (uint8_t)127u)); + } return SRSASN_SUCCESS; } -SRSASN_CODE csi_res_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_quant_results_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(csi_res_cfg_id, bref, (uint8_t)0u, (uint8_t)111u)); - HANDLE_CODE(csi_rs_res_set_list.unpack(bref)); - HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(res_type.unpack(bref)); + HANDLE_CODE(bref.unpack(rsrp_present, 1)); + HANDLE_CODE(bref.unpack(rsrq_present, 1)); + HANDLE_CODE(bref.unpack(sinr_present, 1)); + + if (rsrp_present) { + HANDLE_CODE(unpack_integer(rsrp, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (rsrq_present) { + HANDLE_CODE(unpack_integer(rsrq, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (sinr_present) { + HANDLE_CODE(unpack_integer(sinr, bref, (uint8_t)0u, (uint8_t)127u)); + } return SRSASN_SUCCESS; } -void csi_res_cfg_s::to_json(json_writer& j) const +void meas_quant_results_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("csi-ResourceConfigId", csi_res_cfg_id); - j.write_fieldname("csi-RS-ResourceSetList"); - csi_rs_res_set_list.to_json(j); - j.write_int("bwp-Id", bwp_id); - j.write_str("resourceType", res_type.to_string()); + if (rsrp_present) { + j.write_int("rsrp", rsrp); + } + if (rsrq_present) { + j.write_int("rsrq", rsrq); + } + if (sinr_present) { + j.write_int("sinr", sinr); + } j.end_obj(); } -void csi_res_cfg_s::csi_rs_res_set_list_c_::destroy_() +// PLMN-Identity-EUTRA-5GC ::= CHOICE +void plmn_id_eutra_minus5_gc_c::destroy_() { switch (type_) { - case types::nzp_csi_rs_ssb: - c.destroy(); - break; - case types::csi_im_res_set_list: - c.destroy(); + case types::plmn_id_eutra_minus5_gc: + c.destroy(); break; default: break; } } -void csi_res_cfg_s::csi_rs_res_set_list_c_::set(types::options e) +void plmn_id_eutra_minus5_gc_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::nzp_csi_rs_ssb: - c.init(); + case types::plmn_id_eutra_minus5_gc: + c.init(); break; - case types::csi_im_res_set_list: - c.init(); + case types::plmn_idx: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); + log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); } } -csi_res_cfg_s::csi_rs_res_set_list_c_::csi_rs_res_set_list_c_(const csi_res_cfg_s::csi_rs_res_set_list_c_& other) +plmn_id_eutra_minus5_gc_c::plmn_id_eutra_minus5_gc_c(const plmn_id_eutra_minus5_gc_c& other) { type_ = other.type(); switch (type_) { - case types::nzp_csi_rs_ssb: - c.init(other.c.get()); + case types::plmn_id_eutra_minus5_gc: + c.init(other.c.get()); break; - case types::csi_im_res_set_list: - c.init(other.c.get()); + case types::plmn_idx: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); + log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); } } -csi_res_cfg_s::csi_rs_res_set_list_c_& csi_res_cfg_s::csi_rs_res_set_list_c_:: - operator=(const csi_res_cfg_s::csi_rs_res_set_list_c_& other) +plmn_id_eutra_minus5_gc_c& plmn_id_eutra_minus5_gc_c::operator=(const plmn_id_eutra_minus5_gc_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::nzp_csi_rs_ssb: - c.set(other.c.get()); + case types::plmn_id_eutra_minus5_gc: + c.set(other.c.get()); break; - case types::csi_im_res_set_list: - c.set(other.c.get()); + case types::plmn_idx: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); + log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); } return *this; } -void csi_res_cfg_s::csi_rs_res_set_list_c_::to_json(json_writer& j) const +void plmn_id_eutra_minus5_gc_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::nzp_csi_rs_ssb: - j.write_fieldname("nzp-CSI-RS-SSB"); - j.start_obj(); - if (c.get().nzp_csi_rs_res_set_list_present) { - j.start_array("nzp-CSI-RS-ResourceSetList"); - 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 (const auto& e1 : c.get().csi_ssb_res_set_list) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); + case types::plmn_id_eutra_minus5_gc: + j.write_fieldname("plmn-Identity-EUTRA-5GC"); + c.get().to_json(j); break; - case types::csi_im_res_set_list: - j.start_array("csi-IM-ResourceSetList"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); + case types::plmn_idx: + j.write_int("plmn-index", c.get()); break; default: - log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); + log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); } j.end_obj(); } -SRSASN_CODE csi_res_cfg_s::csi_rs_res_set_list_c_::pack(bit_ref& bref) const +SRSASN_CODE plmn_id_eutra_minus5_gc_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::nzp_csi_rs_ssb: - HANDLE_CODE(bref.pack(c.get().nzp_csi_rs_res_set_list_present, 1)); - HANDLE_CODE(bref.pack(c.get().csi_ssb_res_set_list_present, 1)); - if (c.get().nzp_csi_rs_res_set_list_present) { - HANDLE_CODE(pack_dyn_seq_of( - bref, c.get().nzp_csi_rs_res_set_list, 1, 16, integer_packer(0, 63))); - } - if (c.get().csi_ssb_res_set_list_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - &(c.get().csi_ssb_res_set_list)[0], - c.get().csi_ssb_res_set_list.size(), - integer_packer(0, 63))); - } + case types::plmn_id_eutra_minus5_gc: + HANDLE_CODE(c.get().pack(bref)); break; - case types::csi_im_res_set_list: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16, integer_packer(0, 63))); + case types::plmn_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)12u)); break; default: - log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); + log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_res_cfg_s::csi_rs_res_set_list_c_::unpack(cbit_ref& bref) +SRSASN_CODE plmn_id_eutra_minus5_gc_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::nzp_csi_rs_ssb: - HANDLE_CODE(bref.unpack(c.get().nzp_csi_rs_res_set_list_present, 1)); - HANDLE_CODE(bref.unpack(c.get().csi_ssb_res_set_list_present, 1)); - if (c.get().nzp_csi_rs_res_set_list_present) { - HANDLE_CODE(unpack_dyn_seq_of( - c.get().nzp_csi_rs_res_set_list, bref, 1, 16, integer_packer(0, 63))); - } - if (c.get().csi_ssb_res_set_list_present) { - HANDLE_CODE(unpack_fixed_seq_of(&(c.get().csi_ssb_res_set_list)[0], - bref, - c.get().csi_ssb_res_set_list.size(), - integer_packer(0, 63))); - } + case types::plmn_id_eutra_minus5_gc: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::csi_im_res_set_list: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16, integer_packer(0, 63))); + case types::plmn_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)12u)); break; default: - log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); + log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_res_cfg_s::csi_rs_res_set_list_c_::types_opts::to_string() const +std::string plmn_id_eutra_minus5_gc_c::types_opts::to_string() const { - 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"); + static const char* options[] = {"plmn-Identity-EUTRA-5GC", "plmn-index"}; + return convert_enum_idx(options, 2, value, "plmn_id_eutra_minus5_gc_c::types"); } - -std::string csi_res_cfg_s::res_type_opts::to_string() const +int8_t plmn_id_eutra_minus5_gc_c::types_opts::to_number() const { - static const char* options[] = {"aperiodic", "semiPersistent", "periodic"}; - return convert_enum_idx(options, 3, value, "csi_res_cfg_s::res_type_e_"); + static const int8_t options[] = {-5}; + return map_enum_number(options, 1, value, "plmn_id_eutra_minus5_gc_c::types"); } -// CSI-SSB-ResourceSet ::= SEQUENCE -SRSASN_CODE csi_ssb_res_set_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, csi_ssb_res_set_id, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_dyn_seq_of(bref, csi_ssb_res_list, 1, 64, integer_packer(0, 63))); - - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_ssb_res_set_s::unpack(cbit_ref& bref) +// CellIdentity-EUTRA-5GC ::= CHOICE +void cell_id_eutra_minus5_gc_c::destroy_() { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(csi_ssb_res_set_id, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_dyn_seq_of(csi_ssb_res_list, bref, 1, 64, integer_packer(0, 63))); - - return SRSASN_SUCCESS; + switch (type_) { + case types::cell_id_eutra: + c.destroy >(); + break; + default: + break; + } } -void csi_ssb_res_set_s::to_json(json_writer& j) const +void cell_id_eutra_minus5_gc_c::set(types::options e) { - j.start_obj(); - j.write_int("csi-SSB-ResourceSetId", csi_ssb_res_set_id); - j.start_array("csi-SSB-ResourceList"); - for (const auto& e1 : csi_ssb_res_list) { - j.write_int(e1); + destroy_(); + type_ = e; + switch (type_) { + case types::cell_id_eutra: + c.init >(); + break; + case types::cell_id_idx: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); } - j.end_array(); - j.end_obj(); } - -// DownlinkConfigCommon ::= SEQUENCE -SRSASN_CODE dl_cfg_common_s::pack(bit_ref& bref) const +cell_id_eutra_minus5_gc_c::cell_id_eutra_minus5_gc_c(const cell_id_eutra_minus5_gc_c& other) { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_info_dl_present, 1)); - HANDLE_CODE(bref.pack(init_dl_bwp_present, 1)); - - if (freq_info_dl_present) { - HANDLE_CODE(freq_info_dl.pack(bref)); - } - if (init_dl_bwp_present) { - HANDLE_CODE(init_dl_bwp.pack(bref)); + type_ = other.type(); + switch (type_) { + case types::cell_id_eutra: + c.init(other.c.get >()); + break; + case types::cell_id_idx: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE dl_cfg_common_s::unpack(cbit_ref& bref) +cell_id_eutra_minus5_gc_c& cell_id_eutra_minus5_gc_c::operator=(const cell_id_eutra_minus5_gc_c& other) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(freq_info_dl_present, 1)); - HANDLE_CODE(bref.unpack(init_dl_bwp_present, 1)); - - if (freq_info_dl_present) { - HANDLE_CODE(freq_info_dl.unpack(bref)); + if (this == &other) { + return *this; } - if (init_dl_bwp_present) { - HANDLE_CODE(init_dl_bwp.unpack(bref)); + set(other.type()); + switch (type_) { + case types::cell_id_eutra: + c.set(other.c.get >()); + break; + case types::cell_id_idx: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); } - return SRSASN_SUCCESS; + return *this; } -void dl_cfg_common_s::to_json(json_writer& j) const +void cell_id_eutra_minus5_gc_c::to_json(json_writer& j) const { j.start_obj(); - if (freq_info_dl_present) { - j.write_fieldname("frequencyInfoDL"); - freq_info_dl.to_json(j); - } - if (init_dl_bwp_present) { - j.write_fieldname("initialDownlinkBWP"); - init_dl_bwp.to_json(j); + switch (type_) { + case types::cell_id_eutra: + j.write_str("cellIdentity-EUTRA", c.get >().to_string()); + break; + case types::cell_id_idx: + j.write_int("cellId-index", c.get()); + break; + default: + log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); } j.end_obj(); } - -// NZP-CSI-RS-Resource ::= SEQUENCE -SRSASN_CODE nzp_csi_rs_res_s::pack(bit_ref& bref) const +SRSASN_CODE cell_id_eutra_minus5_gc_c::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pwr_ctrl_offset_ss_present, 1)); - HANDLE_CODE(bref.pack(periodicity_and_offset_present, 1)); - HANDLE_CODE(bref.pack(qcl_info_periodic_csi_rs_present, 1)); - - HANDLE_CODE(pack_integer(bref, nzp_csi_rs_res_id, (uint8_t)0u, (uint8_t)191u)); - HANDLE_CODE(res_map.pack(bref)); - HANDLE_CODE(pack_integer(bref, pwr_ctrl_offset, (int8_t)-8, (int8_t)15)); - if (pwr_ctrl_offset_ss_present) { - HANDLE_CODE(pwr_ctrl_offset_ss.pack(bref)); + type_.pack(bref); + switch (type_) { + case types::cell_id_eutra: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::cell_id_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)12u)); + break; + default: + log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); + return SRSASN_ERROR_ENCODE_FAIL; } - HANDLE_CODE(pack_integer(bref, scrambling_id, (uint16_t)0u, (uint16_t)1023u)); - if (periodicity_and_offset_present) { - HANDLE_CODE(periodicity_and_offset.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_id_eutra_minus5_gc_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_id_eutra: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::cell_id_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)12u)); + break; + default: + log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); + return SRSASN_ERROR_DECODE_FAIL; } - if (qcl_info_periodic_csi_rs_present) { - HANDLE_CODE(pack_integer(bref, qcl_info_periodic_csi_rs, (uint8_t)0u, (uint8_t)127u)); + return SRSASN_SUCCESS; +} + +std::string cell_id_eutra_minus5_gc_c::types_opts::to_string() const +{ + static const char* options[] = {"cellIdentity-EUTRA", "cellId-index"}; + return convert_enum_idx(options, 2, value, "cell_id_eutra_minus5_gc_c::types"); +} + +// ResultsPerCSI-RS-Index ::= SEQUENCE +SRSASN_CODE results_per_csi_rs_idx_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_rs_results_present, 1)); + + HANDLE_CODE(pack_integer(bref, csi_rs_idx, (uint8_t)0u, (uint8_t)95u)); + if (csi_rs_results_present) { + HANDLE_CODE(csi_rs_results.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE nzp_csi_rs_res_s::unpack(cbit_ref& bref) +SRSASN_CODE results_per_csi_rs_idx_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pwr_ctrl_offset_ss_present, 1)); - HANDLE_CODE(bref.unpack(periodicity_and_offset_present, 1)); - HANDLE_CODE(bref.unpack(qcl_info_periodic_csi_rs_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_results_present, 1)); - HANDLE_CODE(unpack_integer(nzp_csi_rs_res_id, bref, (uint8_t)0u, (uint8_t)191u)); - HANDLE_CODE(res_map.unpack(bref)); - HANDLE_CODE(unpack_integer(pwr_ctrl_offset, bref, (int8_t)-8, (int8_t)15)); - if (pwr_ctrl_offset_ss_present) { - HANDLE_CODE(pwr_ctrl_offset_ss.unpack(bref)); - } - HANDLE_CODE(unpack_integer(scrambling_id, bref, (uint16_t)0u, (uint16_t)1023u)); - if (periodicity_and_offset_present) { - HANDLE_CODE(periodicity_and_offset.unpack(bref)); - } - if (qcl_info_periodic_csi_rs_present) { - HANDLE_CODE(unpack_integer(qcl_info_periodic_csi_rs, bref, (uint8_t)0u, (uint8_t)127u)); + HANDLE_CODE(unpack_integer(csi_rs_idx, bref, (uint8_t)0u, (uint8_t)95u)); + if (csi_rs_results_present) { + HANDLE_CODE(csi_rs_results.unpack(bref)); } return SRSASN_SUCCESS; } -void nzp_csi_rs_res_s::to_json(json_writer& j) const +void results_per_csi_rs_idx_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("nzp-CSI-RS-ResourceId", nzp_csi_rs_res_id); - j.write_fieldname("resourceMapping"); - res_map.to_json(j); - j.write_int("powerControlOffset", pwr_ctrl_offset); - if (pwr_ctrl_offset_ss_present) { - j.write_str("powerControlOffsetSS", pwr_ctrl_offset_ss.to_string()); - } - j.write_int("scramblingID", scrambling_id); - if (periodicity_and_offset_present) { - j.write_fieldname("periodicityAndOffset"); - periodicity_and_offset.to_json(j); - } - if (qcl_info_periodic_csi_rs_present) { - j.write_int("qcl-InfoPeriodicCSI-RS", qcl_info_periodic_csi_rs); + j.write_int("csi-RS-Index", csi_rs_idx); + if (csi_rs_results_present) { + j.write_fieldname("csi-RS-Results"); + csi_rs_results.to_json(j); } j.end_obj(); } -std::string nzp_csi_rs_res_s::pwr_ctrl_offset_ss_opts::to_string() const +// ResultsPerSSB-Index ::= SEQUENCE +SRSASN_CODE results_per_ssb_idx_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(bref.pack(ssb_results_present, 1)); + + HANDLE_CODE(pack_integer(bref, ssb_idx, (uint8_t)0u, (uint8_t)63u)); + if (ssb_results_present) { + HANDLE_CODE(ssb_results.pack(bref)); + } + + return SRSASN_SUCCESS; } -int8_t nzp_csi_rs_res_s::pwr_ctrl_offset_ss_opts::to_number() const +SRSASN_CODE results_per_ssb_idx_s::unpack(cbit_ref& bref) { - 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_"); + HANDLE_CODE(bref.unpack(ssb_results_present, 1)); + + HANDLE_CODE(unpack_integer(ssb_idx, bref, (uint8_t)0u, (uint8_t)63u)); + if (ssb_results_present) { + HANDLE_CODE(ssb_results.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void results_per_ssb_idx_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ssb-Index", ssb_idx); + if (ssb_results_present) { + j.write_fieldname("ssb-Results"); + ssb_results.to_json(j); + } + j.end_obj(); } -// NZP-CSI-RS-ResourceSet ::= SEQUENCE -SRSASN_CODE nzp_csi_rs_res_set_s::pack(bit_ref& bref) const +// CGI-InfoNR ::= SEQUENCE +SRSASN_CODE cgi_info_nr_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(repeat_present, 1)); - HANDLE_CODE(bref.pack(aperiodic_trigger_offset_present, 1)); - HANDLE_CODE(bref.pack(trs_info_present, 1)); + HANDLE_CODE(bref.pack(plmn_id_info_list_present, 1)); + HANDLE_CODE(bref.pack(freq_band_list_present, 1)); + HANDLE_CODE(bref.pack(no_sib1_present, 1)); - HANDLE_CODE(pack_integer(bref, nzp_csi_res_set_id, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res, 1, 64, integer_packer(0, 191))); - if (repeat_present) { - HANDLE_CODE(repeat.pack(bref)); + if (plmn_id_info_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_info_list, 1, 12)); } - if (aperiodic_trigger_offset_present) { - HANDLE_CODE(pack_integer(bref, aperiodic_trigger_offset, (uint8_t)0u, (uint8_t)6u)); + if (freq_band_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8, integer_packer(1, 1024))); + } + if (no_sib1_present) { + HANDLE_CODE(pack_integer(bref, no_sib1.ssb_subcarrier_offset, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(no_sib1.pdcch_cfg_sib1.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE nzp_csi_rs_res_set_s::unpack(cbit_ref& bref) +SRSASN_CODE cgi_info_nr_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(repeat_present, 1)); - HANDLE_CODE(bref.unpack(aperiodic_trigger_offset_present, 1)); - HANDLE_CODE(bref.unpack(trs_info_present, 1)); + HANDLE_CODE(bref.unpack(plmn_id_info_list_present, 1)); + HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); + HANDLE_CODE(bref.unpack(no_sib1_present, 1)); - HANDLE_CODE(unpack_integer(nzp_csi_res_set_id, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res, bref, 1, 64, integer_packer(0, 191))); - if (repeat_present) { - HANDLE_CODE(repeat.unpack(bref)); + if (plmn_id_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_info_list, bref, 1, 12)); } - if (aperiodic_trigger_offset_present) { - HANDLE_CODE(unpack_integer(aperiodic_trigger_offset, bref, (uint8_t)0u, (uint8_t)6u)); + if (freq_band_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8, integer_packer(1, 1024))); + } + if (no_sib1_present) { + HANDLE_CODE(unpack_integer(no_sib1.ssb_subcarrier_offset, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(no_sib1.pdcch_cfg_sib1.unpack(bref)); } return SRSASN_SUCCESS; } -void nzp_csi_rs_res_set_s::to_json(json_writer& j) const +void cgi_info_nr_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 (const auto& e1 : nzp_csi_rs_res) { - j.write_int(e1); + if (plmn_id_info_list_present) { + j.start_array("plmn-IdentityInfoList"); + for (const auto& e1 : plmn_id_info_list) { + e1.to_json(j); + } + j.end_array(); } - j.end_array(); - if (repeat_present) { - j.write_str("repetition", repeat.to_string()); + if (freq_band_list_present) { + j.start_array("frequencyBandList"); + for (const auto& e1 : freq_band_list) { + j.write_int(e1); + } + j.end_array(); } - if (aperiodic_trigger_offset_present) { - j.write_int("aperiodicTriggeringOffset", aperiodic_trigger_offset); + if (no_sib1_present) { + j.write_fieldname("noSIB1"); + j.start_obj(); + j.write_int("ssb-SubcarrierOffset", no_sib1.ssb_subcarrier_offset); + j.write_fieldname("pdcch-ConfigSIB1"); + no_sib1.pdcch_cfg_sib1.to_json(j); + j.end_obj(); } - if (trs_info_present) { - j.write_str("trs-Info", "true"); + j.end_obj(); +} + +// CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE +SRSASN_CODE cell_access_related_info_eutra_minus5_gc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ranac_minus5gc_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_eutra_minus5gc, 1, 12)); + HANDLE_CODE(tac_eutra_minus5gc.pack(bref)); + if (ranac_minus5gc_present) { + HANDLE_CODE(pack_integer(bref, ranac_minus5gc, (uint16_t)0u, (uint16_t)255u)); + } + HANDLE_CODE(cell_id_eutra_minus5gc.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_access_related_info_eutra_minus5_gc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ranac_minus5gc_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_eutra_minus5gc, bref, 1, 12)); + HANDLE_CODE(tac_eutra_minus5gc.unpack(bref)); + if (ranac_minus5gc_present) { + HANDLE_CODE(unpack_integer(ranac_minus5gc, bref, (uint16_t)0u, (uint16_t)255u)); } + HANDLE_CODE(cell_id_eutra_minus5gc.unpack(bref)); + + return SRSASN_SUCCESS; +} +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 (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()); + if (ranac_minus5gc_present) { + j.write_int("ranac-5gc", ranac_minus5gc); + } + j.write_fieldname("cellIdentity-eutra-5gc"); + cell_id_eutra_minus5gc.to_json(j); j.end_obj(); } -std::string nzp_csi_rs_res_set_s::repeat_opts::to_string() const +// CellAccessRelatedInfo-EUTRA-EPC ::= SEQUENCE +SRSASN_CODE cell_access_related_info_eutra_epc_s::pack(bit_ref& bref) const { - static const char* options[] = {"on", "off"}; - return convert_enum_idx(options, 2, value, "nzp_csi_rs_res_set_s::repeat_e_"); + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_eutra_epc, 1, 12)); + HANDLE_CODE(tac_eutra_epc.pack(bref)); + HANDLE_CODE(cell_id_eutra_epc.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_access_related_info_eutra_epc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_eutra_epc, bref, 1, 12)); + HANDLE_CODE(tac_eutra_epc.unpack(bref)); + HANDLE_CODE(cell_id_eutra_epc.unpack(bref)); + + return SRSASN_SUCCESS; +} +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 (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()); + j.write_str("cellIdentity-eutra-epc", cell_id_eutra_epc.to_string()); + j.end_obj(); } -// PDSCH-CodeBlockGroupTransmission ::= SEQUENCE -SRSASN_CODE pdsch_code_block_group_tx_s::pack(bit_ref& bref) const +// CGI-InfoEUTRA ::= SEQUENCE +SRSASN_CODE cgi_info_eutra_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(max_code_block_groups_per_transport_block.pack(bref)); - HANDLE_CODE(bref.pack(code_block_group_flush_ind, 1)); + HANDLE_CODE(bref.pack(cgi_info_epc_present, 1)); + HANDLE_CODE(bref.pack(cgi_info_minus5_gc_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_present, 1)); + HANDLE_CODE(bref.pack(freq_band_ind_prio_present, 1)); + + if (cgi_info_epc_present) { + HANDLE_CODE(bref.pack(cgi_info_epc.cgi_info_epc_list_present, 1)); + HANDLE_CODE(cgi_info_epc.cgi_info_epc_legacy.pack(bref)); + if (cgi_info_epc.cgi_info_epc_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info_epc.cgi_info_epc_list, 1, 12)); + } + } + if (cgi_info_minus5_gc_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info_minus5_gc, 1, 12)); + } + HANDLE_CODE(pack_integer(bref, freq_band_ind, (uint16_t)1u, (uint16_t)256u)); + if (multi_band_info_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list, 1, 8, integer_packer(1, 256))); + } return SRSASN_SUCCESS; } -SRSASN_CODE pdsch_code_block_group_tx_s::unpack(cbit_ref& bref) +SRSASN_CODE cgi_info_eutra_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(max_code_block_groups_per_transport_block.unpack(bref)); - HANDLE_CODE(bref.unpack(code_block_group_flush_ind, 1)); + HANDLE_CODE(bref.unpack(cgi_info_epc_present, 1)); + HANDLE_CODE(bref.unpack(cgi_info_minus5_gc_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_present, 1)); + HANDLE_CODE(bref.unpack(freq_band_ind_prio_present, 1)); + + if (cgi_info_epc_present) { + HANDLE_CODE(bref.unpack(cgi_info_epc.cgi_info_epc_list_present, 1)); + HANDLE_CODE(cgi_info_epc.cgi_info_epc_legacy.unpack(bref)); + if (cgi_info_epc.cgi_info_epc_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cgi_info_epc.cgi_info_epc_list, bref, 1, 12)); + } + } + if (cgi_info_minus5_gc_present) { + HANDLE_CODE(unpack_dyn_seq_of(cgi_info_minus5_gc, bref, 1, 12)); + } + HANDLE_CODE(unpack_integer(freq_band_ind, bref, (uint16_t)1u, (uint16_t)256u)); + if (multi_band_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list, bref, 1, 8, integer_packer(1, 256))); + } return SRSASN_SUCCESS; } -void pdsch_code_block_group_tx_s::to_json(json_writer& j) const +void cgi_info_eutra_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("maxCodeBlockGroupsPerTransportBlock", max_code_block_groups_per_transport_block.to_string()); - j.write_bool("codeBlockGroupFlushIndicator", code_block_group_flush_ind); + if (cgi_info_epc_present) { + j.write_fieldname("cgi-info-EPC"); + j.start_obj(); + j.write_fieldname("cgi-info-EPC-legacy"); + cgi_info_epc.cgi_info_epc_legacy.to_json(j); + if (cgi_info_epc.cgi_info_epc_list_present) { + j.start_array("cgi-info-EPC-list"); + for (const auto& e1 : cgi_info_epc.cgi_info_epc_list) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (cgi_info_minus5_gc_present) { + j.start_array("cgi-info-5GC"); + for (const auto& e1 : cgi_info_minus5_gc) { + e1.to_json(j); + } + j.end_array(); + } + j.write_int("freqBandIndicator", freq_band_ind); + if (multi_band_info_list_present) { + j.start_array("multiBandInfoList"); + for (const auto& e1 : multi_band_info_list) { + j.write_int(e1); + } + j.end_array(); + } + if (freq_band_ind_prio_present) { + j.write_str("freqBandIndicatorPriority", "true"); + } j.end_obj(); } -std::string pdsch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_string() const +// MeasQuantityResultsEUTRA ::= SEQUENCE +SRSASN_CODE meas_quant_results_eutra_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(bref.pack(rsrp_present, 1)); + HANDLE_CODE(bref.pack(rsrq_present, 1)); + HANDLE_CODE(bref.pack(sinr_present, 1)); + + if (rsrp_present) { + HANDLE_CODE(pack_integer(bref, rsrp, (uint8_t)0u, (uint8_t)97u)); + } + if (rsrq_present) { + HANDLE_CODE(pack_integer(bref, rsrq, (uint8_t)0u, (uint8_t)34u)); + } + if (sinr_present) { + HANDLE_CODE(pack_integer(bref, sinr, (uint8_t)0u, (uint8_t)127u)); + } + + return SRSASN_SUCCESS; } -uint8_t pdsch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_number() const +SRSASN_CODE meas_quant_results_eutra_s::unpack(cbit_ref& bref) { - 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_"); + HANDLE_CODE(bref.unpack(rsrp_present, 1)); + HANDLE_CODE(bref.unpack(rsrq_present, 1)); + HANDLE_CODE(bref.unpack(sinr_present, 1)); + + if (rsrp_present) { + HANDLE_CODE(unpack_integer(rsrp, bref, (uint8_t)0u, (uint8_t)97u)); + } + if (rsrq_present) { + HANDLE_CODE(unpack_integer(rsrq, bref, (uint8_t)0u, (uint8_t)34u)); + } + if (sinr_present) { + HANDLE_CODE(unpack_integer(sinr, bref, (uint8_t)0u, (uint8_t)127u)); + } + + return SRSASN_SUCCESS; +} +void meas_quant_results_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rsrp_present) { + j.write_int("rsrp", rsrp); + } + if (rsrq_present) { + j.write_int("rsrq", rsrq); + } + if (sinr_present) { + j.write_int("sinr", sinr); + } + j.end_obj(); } -// PUSCH-ServingCellConfig ::= SEQUENCE -SRSASN_CODE pusch_serving_cell_cfg_s::pack(bit_ref& bref) const +// MeasResultNR ::= SEQUENCE +SRSASN_CODE meas_result_nr_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(code_block_group_tx_present, 1)); - HANDLE_CODE(bref.pack(rate_matching_present, 1)); - HANDLE_CODE(bref.pack(xoverhead_present, 1)); + HANDLE_CODE(bref.pack(pci_present, 1)); - if (code_block_group_tx_present) { - HANDLE_CODE(code_block_group_tx.pack(bref)); + if (pci_present) { + HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); } - if (xoverhead_present) { - HANDLE_CODE(xoverhead.pack(bref)); + HANDLE_CODE(bref.pack(meas_result.rs_idx_results_present, 1)); + HANDLE_CODE(bref.pack(meas_result.cell_results.results_ssb_cell_present, 1)); + HANDLE_CODE(bref.pack(meas_result.cell_results.results_csi_rs_cell_present, 1)); + if (meas_result.cell_results.results_ssb_cell_present) { + HANDLE_CODE(meas_result.cell_results.results_ssb_cell.pack(bref)); + } + if (meas_result.cell_results.results_csi_rs_cell_present) { + HANDLE_CODE(meas_result.cell_results.results_csi_rs_cell.pack(bref)); + } + if (meas_result.rs_idx_results_present) { + HANDLE_CODE(bref.pack(meas_result.rs_idx_results.results_ssb_idxes_present, 1)); + HANDLE_CODE(bref.pack(meas_result.rs_idx_results.results_csi_rs_idxes_present, 1)); + if (meas_result.rs_idx_results.results_ssb_idxes_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result.rs_idx_results.results_ssb_idxes, 1, 64)); + } + if (meas_result.rs_idx_results.results_csi_rs_idxes_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result.rs_idx_results.results_csi_rs_idxes, 1, 64)); + } } if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= max_mimo_layers_present; - group_flags[0] |= processing_type2_enabled_present; + group_flags[0] |= cgi_info.is_present(); group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(max_mimo_layers_present, 1)); - HANDLE_CODE(bref.pack(processing_type2_enabled_present, 1)); - if (max_mimo_layers_present) { - HANDLE_CODE(pack_integer(bref, max_mimo_layers, (uint8_t)1u, (uint8_t)4u)); - } - if (processing_type2_enabled_present) { - HANDLE_CODE(bref.pack(processing_type2_enabled, 1)); + HANDLE_CODE(bref.pack(cgi_info.is_present(), 1)); + if (cgi_info.is_present()) { + HANDLE_CODE(cgi_info->pack(bref)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE pusch_serving_cell_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_result_nr_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(code_block_group_tx_present, 1)); - HANDLE_CODE(bref.unpack(rate_matching_present, 1)); - HANDLE_CODE(bref.unpack(xoverhead_present, 1)); + HANDLE_CODE(bref.unpack(pci_present, 1)); - if (code_block_group_tx_present) { - HANDLE_CODE(code_block_group_tx.unpack(bref)); + if (pci_present) { + HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); } - if (xoverhead_present) { - HANDLE_CODE(xoverhead.unpack(bref)); + HANDLE_CODE(bref.unpack(meas_result.rs_idx_results_present, 1)); + HANDLE_CODE(bref.unpack(meas_result.cell_results.results_ssb_cell_present, 1)); + HANDLE_CODE(bref.unpack(meas_result.cell_results.results_csi_rs_cell_present, 1)); + if (meas_result.cell_results.results_ssb_cell_present) { + HANDLE_CODE(meas_result.cell_results.results_ssb_cell.unpack(bref)); + } + if (meas_result.cell_results.results_csi_rs_cell_present) { + HANDLE_CODE(meas_result.cell_results.results_csi_rs_cell.unpack(bref)); + } + if (meas_result.rs_idx_results_present) { + HANDLE_CODE(bref.unpack(meas_result.rs_idx_results.results_ssb_idxes_present, 1)); + HANDLE_CODE(bref.unpack(meas_result.rs_idx_results.results_csi_rs_idxes_present, 1)); + if (meas_result.rs_idx_results.results_ssb_idxes_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result.rs_idx_results.results_ssb_idxes, bref, 1, 64)); + } + if (meas_result.rs_idx_results.results_csi_rs_idxes_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result.rs_idx_results.results_csi_rs_idxes, bref, 1, 64)); + } } if (ext) { @@ -21987,6229 +19765,4738 @@ SRSASN_CODE pusch_serving_cell_cfg_s::unpack(cbit_ref& bref) if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(max_mimo_layers_present, 1)); - HANDLE_CODE(bref.unpack(processing_type2_enabled_present, 1)); - if (max_mimo_layers_present) { - HANDLE_CODE(unpack_integer(max_mimo_layers, bref, (uint8_t)1u, (uint8_t)4u)); - } - if (processing_type2_enabled_present) { - HANDLE_CODE(bref.unpack(processing_type2_enabled, 1)); + bool cgi_info_present; + HANDLE_CODE(bref.unpack(cgi_info_present, 1)); + cgi_info.set_present(cgi_info_present); + if (cgi_info.is_present()) { + HANDLE_CODE(cgi_info->unpack(bref)); } } } return SRSASN_SUCCESS; } -void pusch_serving_cell_cfg_s::to_json(json_writer& j) const +void meas_result_nr_s::to_json(json_writer& j) const { j.start_obj(); - if (code_block_group_tx_present) { - j.write_fieldname("codeBlockGroupTransmission"); - code_block_group_tx.to_json(j); + if (pci_present) { + j.write_int("physCellId", pci); } - if (rate_matching_present) { - j.write_str("rateMatching", "limitedBufferRM"); + j.write_fieldname("measResult"); + j.start_obj(); + j.write_fieldname("cellResults"); + j.start_obj(); + if (meas_result.cell_results.results_ssb_cell_present) { + j.write_fieldname("resultsSSB-Cell"); + meas_result.cell_results.results_ssb_cell.to_json(j); } - if (xoverhead_present) { - j.write_str("xOverhead", xoverhead.to_string()); + if (meas_result.cell_results.results_csi_rs_cell_present) { + j.write_fieldname("resultsCSI-RS-Cell"); + meas_result.cell_results.results_csi_rs_cell.to_json(j); } - if (ext) { - if (max_mimo_layers_present) { - j.write_int("maxMIMO-Layers", max_mimo_layers); - } - if (processing_type2_enabled_present) { - j.write_bool("processingType2Enabled", processing_type2_enabled); - } + j.end_obj(); + if (meas_result.rs_idx_results_present) { + j.write_fieldname("rsIndexResults"); + j.start_obj(); + if (meas_result.rs_idx_results.results_ssb_idxes_present) { + j.start_array("resultsSSB-Indexes"); + 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 (const auto& e1 : meas_result.rs_idx_results.results_csi_rs_idxes) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + j.end_obj(); + if (ext) { + if (cgi_info.is_present()) { + j.write_fieldname("cgi-Info"); + cgi_info->to_json(j); + } } j.end_obj(); } -std::string pusch_serving_cell_cfg_s::xoverhead_opts::to_string() const -{ - 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 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 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", - "mB10", "mB11", "mB12", "mB13", "mB14", "mB15", "mB16", "mB17", "mB18", "mB20", - "mB25", "mB30", "mB40", "infinity", "spare20", "spare19", "spare18", "spare17", "spare16", "spare15", - "spare14", "spare13", "spare12", "spare11", "spare10", "spare9", "spare8", "spare7", "spare6", "spare5", - "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(options, 64, value, "poll_byte_e"); -} - -// PollPDU ::= ENUMERATED -std::string poll_pdu_opts::to_string() const -{ - 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 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 -SRSASN_CODE rate_match_pattern_lte_crs_s::pack(bit_ref& bref) const +// MeasResultEUTRA ::= SEQUENCE +SRSASN_CODE meas_result_eutra_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cgi_info_present, 1)); - HANDLE_CODE(pack_integer(bref, carrier_freq_dl, (uint16_t)0u, (uint16_t)16383u)); - HANDLE_CODE(carrier_bw_dl.pack(bref)); - if (mbsfn_sf_cfg_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, mbsfn_sf_cfg_list, 1, 8)); + HANDLE_CODE(pack_integer(bref, eutra_pci, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(meas_result.pack(bref)); + if (cgi_info_present) { + HANDLE_CODE(cgi_info.pack(bref)); } - HANDLE_CODE(nrof_crs_ports.pack(bref)); - HANDLE_CODE(v_shift.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE rate_match_pattern_lte_crs_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_result_eutra_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cgi_info_present, 1)); - HANDLE_CODE(unpack_integer(carrier_freq_dl, bref, (uint16_t)0u, (uint16_t)16383u)); - HANDLE_CODE(carrier_bw_dl.unpack(bref)); - if (mbsfn_sf_cfg_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(mbsfn_sf_cfg_list, bref, 1, 8)); + HANDLE_CODE(unpack_integer(eutra_pci, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(meas_result.unpack(bref)); + if (cgi_info_present) { + HANDLE_CODE(cgi_info.unpack(bref)); } - HANDLE_CODE(nrof_crs_ports.unpack(bref)); - HANDLE_CODE(v_shift.unpack(bref)); return SRSASN_SUCCESS; } -void rate_match_pattern_lte_crs_s::to_json(json_writer& j) const +void meas_result_eutra_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("carrierFreqDL", carrier_freq_dl); - j.write_str("carrierBandwidthDL", carrier_bw_dl.to_string()); - if (mbsfn_sf_cfg_list_present) { - j.start_array("mbsfn-SubframeConfigList"); - for (const auto& e1 : mbsfn_sf_cfg_list) { - e1.to_json(j); - } - j.end_array(); + j.write_int("eutra-PhysCellId", eutra_pci); + j.write_fieldname("measResult"); + meas_result.to_json(j); + if (cgi_info_present) { + j.write_fieldname("cgi-Info"); + cgi_info.to_json(j); } - j.write_str("nrofCRS-Ports", nrof_crs_ports.to_string()); - j.write_str("v-Shift", v_shift.to_string()); j.end_obj(); } -std::string rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_string() const +// UplinkTxDirectCurrentBWP ::= SEQUENCE +SRSASN_CODE ul_tx_direct_current_bwp_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(bref.pack(shift7dot5k_hz, 1)); + HANDLE_CODE(pack_integer(bref, tx_direct_current_location, (uint16_t)0u, (uint16_t)3301u)); + + return SRSASN_SUCCESS; } -uint8_t rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_number() const +SRSASN_CODE ul_tx_direct_current_bwp_s::unpack(cbit_ref& bref) { - 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_"); -} + HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(bref.unpack(shift7dot5k_hz, 1)); + HANDLE_CODE(unpack_integer(tx_direct_current_location, bref, (uint16_t)0u, (uint16_t)3301u)); -std::string rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_string() const -{ - static const char* options[] = {"n1", "n2", "n4"}; - return convert_enum_idx(options, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); + return SRSASN_SUCCESS; } -uint8_t rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_number() const +void ul_tx_direct_current_bwp_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + j.write_int("bwp-Id", bwp_id); + j.write_bool("shift7dot5kHz", shift7dot5k_hz); + j.write_int("txDirectCurrentLocation", tx_direct_current_location); + j.end_obj(); } -std::string rate_match_pattern_lte_crs_s::v_shift_opts::to_string() const +// EUTRA-RSTD-Info ::= SEQUENCE +SRSASN_CODE eutra_rstd_info_s::pack(bit_ref& bref) const { - 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_"); + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(pack_integer(bref, meas_prs_offset, (uint8_t)0u, (uint8_t)39u)); + + return SRSASN_SUCCESS; } -uint8_t rate_match_pattern_lte_crs_s::v_shift_opts::to_number() const +SRSASN_CODE eutra_rstd_info_s::unpack(cbit_ref& bref) { - 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_"); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(unpack_integer(meas_prs_offset, bref, (uint8_t)0u, (uint8_t)39u)); + + return SRSASN_SUCCESS; +} +void eutra_rstd_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + j.write_int("measPRS-Offset", meas_prs_offset); + j.end_obj(); } -// SN-FieldLengthAM ::= ENUMERATED -std::string sn_field_len_am_opts::to_string() const +// MIMO-LayersDL ::= ENUMERATED +std::string mimo_layers_dl_opts::to_string() const { - static const char* options[] = {"size12", "size18"}; - return convert_enum_idx(options, 2, value, "sn_field_len_am_e"); + static const char* options[] = {"twoLayers", "fourLayers", "eightLayers"}; + return convert_enum_idx(options, 3, value, "mimo_layers_dl_e"); } -uint8_t sn_field_len_am_opts::to_number() const +uint8_t mimo_layers_dl_opts::to_number() const { - static const uint8_t options[] = {12, 18}; - return map_enum_number(options, 2, value, "sn_field_len_am_e"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "mimo_layers_dl_e"); } -// SN-FieldLengthUM ::= ENUMERATED -std::string sn_field_len_um_opts::to_string() const +// MIMO-LayersUL ::= ENUMERATED +std::string mimo_layers_ul_opts::to_string() const { - static const char* options[] = {"size6", "size12"}; - return convert_enum_idx(options, 2, value, "sn_field_len_um_e"); + static const char* options[] = {"oneLayer", "twoLayers", "fourLayers"}; + return convert_enum_idx(options, 3, value, "mimo_layers_ul_e"); } -uint8_t sn_field_len_um_opts::to_number() const +uint8_t mimo_layers_ul_opts::to_number() const { - static const uint8_t options[] = {6, 12}; - return map_enum_number(options, 2, value, "sn_field_len_um_e"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "mimo_layers_ul_e"); } -// SRS-CarrierSwitching ::= SEQUENCE -SRSASN_CODE srs_carrier_switching_s::pack(bit_ref& bref) const +// MeasResult2EUTRA ::= SEQUENCE +SRSASN_CODE meas_result2_eutra_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(srs_switch_from_serv_cell_idx_present, 1)); - HANDLE_CODE(bref.pack(srs_tpc_pdcch_group_present, 1)); - HANDLE_CODE(bref.pack(monitoring_cells_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serving_cell_present, 1)); + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_present, 1)); - if (srs_switch_from_serv_cell_idx_present) { - HANDLE_CODE(pack_integer(bref, srs_switch_from_serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(srs_switch_from_carrier.pack(bref)); - if (srs_tpc_pdcch_group_present) { - HANDLE_CODE(srs_tpc_pdcch_group.pack(bref)); + HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); + if (meas_result_serving_cell_present) { + HANDLE_CODE(meas_result_serving_cell.pack(bref)); } - if (monitoring_cells_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, monitoring_cells, 1, 32, integer_packer(0, 31))); + if (meas_result_best_neigh_cell_present) { + HANDLE_CODE(meas_result_best_neigh_cell.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE srs_carrier_switching_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_result2_eutra_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(srs_switch_from_serv_cell_idx_present, 1)); - HANDLE_CODE(bref.unpack(srs_tpc_pdcch_group_present, 1)); - HANDLE_CODE(bref.unpack(monitoring_cells_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serving_cell_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_present, 1)); - if (srs_switch_from_serv_cell_idx_present) { - HANDLE_CODE(unpack_integer(srs_switch_from_serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(srs_switch_from_carrier.unpack(bref)); - if (srs_tpc_pdcch_group_present) { - HANDLE_CODE(srs_tpc_pdcch_group.unpack(bref)); + HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); + if (meas_result_serving_cell_present) { + HANDLE_CODE(meas_result_serving_cell.unpack(bref)); } - if (monitoring_cells_present) { - HANDLE_CODE(unpack_dyn_seq_of(monitoring_cells, bref, 1, 32, integer_packer(0, 31))); + if (meas_result_best_neigh_cell_present) { + HANDLE_CODE(meas_result_best_neigh_cell.unpack(bref)); } return SRSASN_SUCCESS; } -void srs_carrier_switching_s::to_json(json_writer& j) const +void meas_result2_eutra_s::to_json(json_writer& j) const { j.start_obj(); - if (srs_switch_from_serv_cell_idx_present) { - j.write_int("srs-SwitchFromServCellIndex", srs_switch_from_serv_cell_idx); - } - j.write_str("srs-SwitchFromCarrier", srs_switch_from_carrier.to_string()); - if (srs_tpc_pdcch_group_present) { - j.write_fieldname("srs-TPC-PDCCH-Group"); - srs_tpc_pdcch_group.to_json(j); + j.write_int("carrierFreq", carrier_freq); + if (meas_result_serving_cell_present) { + j.write_fieldname("measResultServingCell"); + meas_result_serving_cell.to_json(j); } - if (monitoring_cells_present) { - j.start_array("monitoringCells"); - for (const auto& e1 : monitoring_cells) { - j.write_int(e1); - } - j.end_array(); + if (meas_result_best_neigh_cell_present) { + j.write_fieldname("measResultBestNeighCell"); + meas_result_best_neigh_cell.to_json(j); } j.end_obj(); } -std::string srs_carrier_switching_s::srs_switch_from_carrier_opts::to_string() const +// MeasResult2NR ::= SEQUENCE +SRSASN_CODE meas_result2_nr_s::pack(bit_ref& bref) const { - static const char* options[] = {"sUL", "nUL"}; - return convert_enum_idx(options, 2, value, "srs_carrier_switching_s::srs_switch_from_carrier_e_"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ssb_freq_present, 1)); + HANDLE_CODE(bref.pack(ref_freq_csi_rs_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serving_cell_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cell_list_nr_present, 1)); -void srs_carrier_switching_s::srs_tpc_pdcch_group_c_::destroy_() -{ - switch (type_) { - case types::type_a: - c.destroy(); - break; - case types::type_b: - c.destroy(); - break; - default: - break; + if (ssb_freq_present) { + HANDLE_CODE(pack_integer(bref, ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); } -} -void srs_carrier_switching_s::srs_tpc_pdcch_group_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::type_a: - c.init(); - break; - case types::type_b: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); + if (ref_freq_csi_rs_present) { + HANDLE_CODE(pack_integer(bref, ref_freq_csi_rs, (uint32_t)0u, (uint32_t)3279165u)); } -} -srs_carrier_switching_s::srs_tpc_pdcch_group_c_::srs_tpc_pdcch_group_c_( - const srs_carrier_switching_s::srs_tpc_pdcch_group_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::type_a: - c.init(other.c.get()); - break; - case types::type_b: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); + if (meas_result_serving_cell_present) { + HANDLE_CODE(meas_result_serving_cell.pack(bref)); } + if (meas_result_neigh_cell_list_nr_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cell_list_nr, 1, 8)); + } + + return SRSASN_SUCCESS; } -srs_carrier_switching_s::srs_tpc_pdcch_group_c_& srs_carrier_switching_s::srs_tpc_pdcch_group_c_:: - operator=(const srs_carrier_switching_s::srs_tpc_pdcch_group_c_& other) +SRSASN_CODE meas_result2_nr_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ssb_freq_present, 1)); + HANDLE_CODE(bref.unpack(ref_freq_csi_rs_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serving_cell_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_nr_present, 1)); + + if (ssb_freq_present) { + HANDLE_CODE(unpack_integer(ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); } - set(other.type()); - switch (type_) { - case types::type_a: - c.set(other.c.get()); - break; - case types::type_b: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); + if (ref_freq_csi_rs_present) { + HANDLE_CODE(unpack_integer(ref_freq_csi_rs, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + if (meas_result_serving_cell_present) { + HANDLE_CODE(meas_result_serving_cell.unpack(bref)); + } + if (meas_result_neigh_cell_list_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cell_list_nr, bref, 1, 8)); } - return *this; + return SRSASN_SUCCESS; } -void srs_carrier_switching_s::srs_tpc_pdcch_group_c_::to_json(json_writer& j) const +void meas_result2_nr_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::type_a: - j.start_array("typeA"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - case types::type_b: - j.write_fieldname("typeB"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); + if (ssb_freq_present) { + j.write_int("ssbFrequency", ssb_freq); + } + if (ref_freq_csi_rs_present) { + j.write_int("refFreqCSI-RS", ref_freq_csi_rs); + } + if (meas_result_serving_cell_present) { + j.write_fieldname("measResultServingCell"); + meas_result_serving_cell.to_json(j); + } + if (meas_result_neigh_cell_list_nr_present) { + j.start_array("measResultNeighCellListNR"); + for (const auto& e1 : meas_result_neigh_cell_list_nr) { + e1.to_json(j); + } + j.end_array(); } j.end_obj(); } -SRSASN_CODE srs_carrier_switching_s::srs_tpc_pdcch_group_c_::pack(bit_ref& bref) const + +// MeasResultCellSFTD-NR ::= SEQUENCE +SRSASN_CODE meas_result_cell_sftd_nr_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::type_a: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 32)); - break; - case types::type_b: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + HANDLE_CODE(bref.pack(rsrp_result_present, 1)); + + HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(pack_integer(bref, sfn_offset_result, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(pack_integer(bref, frame_boundary_offset_result, (int16_t)-30720, (int16_t)30719)); + if (rsrp_result_present) { + HANDLE_CODE(pack_integer(bref, rsrp_result, (uint8_t)0u, (uint8_t)127u)); } + return SRSASN_SUCCESS; } -SRSASN_CODE srs_carrier_switching_s::srs_tpc_pdcch_group_c_::unpack(cbit_ref& bref) +SRSASN_CODE meas_result_cell_sftd_nr_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::type_a: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 32)); - break; - case types::type_b: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); - return SRSASN_ERROR_DECODE_FAIL; + HANDLE_CODE(bref.unpack(rsrp_result_present, 1)); + + HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(unpack_integer(sfn_offset_result, bref, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(unpack_integer(frame_boundary_offset_result, bref, (int16_t)-30720, (int16_t)30719)); + if (rsrp_result_present) { + HANDLE_CODE(unpack_integer(rsrp_result, bref, (uint8_t)0u, (uint8_t)127u)); } + return SRSASN_SUCCESS; } - -std::string srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types_opts::to_string() const +void meas_result_cell_sftd_nr_s::to_json(json_writer& j) const { - static const char* options[] = {"typeA", "typeB"}; - return convert_enum_idx(options, 2, value, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types"); + j.start_obj(); + j.write_int("physCellId", pci); + j.write_int("sfn-OffsetResult", sfn_offset_result); + j.write_int("frameBoundaryOffsetResult", frame_boundary_offset_result); + if (rsrp_result_present) { + j.write_int("rsrp-Result", rsrp_result); + } + j.end_obj(); } -// SlotFormatIndicator ::= SEQUENCE -SRSASN_CODE slot_format_ind_s::pack(bit_ref& bref) const +// MeasResultServMO ::= SEQUENCE +SRSASN_CODE meas_result_serv_mo_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(slot_format_comb_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(slot_format_comb_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_present, 1)); - HANDLE_CODE(pack_integer(bref, sfi_rnti, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(pack_integer(bref, dci_payload_size, (uint8_t)1u, (uint8_t)128u)); - if (slot_format_comb_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, slot_format_comb_to_add_mod_list, 1, 16)); - } - if (slot_format_comb_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, slot_format_comb_to_release_list, 1, 16, integer_packer(0, 31))); + HANDLE_CODE(pack_integer(bref, serv_cell_id, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(meas_result_serving_cell.pack(bref)); + if (meas_result_best_neigh_cell_present) { + HANDLE_CODE(meas_result_best_neigh_cell.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE slot_format_ind_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_result_serv_mo_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(slot_format_comb_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(slot_format_comb_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_present, 1)); - HANDLE_CODE(unpack_integer(sfi_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(unpack_integer(dci_payload_size, bref, (uint8_t)1u, (uint8_t)128u)); - if (slot_format_comb_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(slot_format_comb_to_add_mod_list, bref, 1, 16)); - } - if (slot_format_comb_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(slot_format_comb_to_release_list, bref, 1, 16, integer_packer(0, 31))); + HANDLE_CODE(unpack_integer(serv_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(meas_result_serving_cell.unpack(bref)); + if (meas_result_best_neigh_cell_present) { + HANDLE_CODE(meas_result_best_neigh_cell.unpack(bref)); } return SRSASN_SUCCESS; } -void slot_format_ind_s::to_json(json_writer& j) const +void meas_result_serv_mo_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("sfi-RNTI", sfi_rnti); - j.write_int("dci-PayloadSize", dci_payload_size); - if (slot_format_comb_to_add_mod_list_present) { - j.start_array("slotFormatCombToAddModList"); - 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 (const auto& e1 : slot_format_comb_to_release_list) { - j.write_int(e1); - } - j.end_array(); + j.write_int("servCellId", serv_cell_id); + j.write_fieldname("measResultServingCell"); + meas_result_serving_cell.to_json(j); + if (meas_result_best_neigh_cell_present) { + j.write_fieldname("measResultBestNeighCell"); + meas_result_best_neigh_cell.to_json(j); } j.end_obj(); } -// T-PollRetransmit ::= ENUMERATED -std::string t_poll_retx_opts::to_string() const +// ReducedAggregatedBandwidth ::= ENUMERATED +std::string reduced_aggregated_bw_opts::to_string() const { 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", - "ms170", "ms175", "ms180", "ms185", "ms190", "ms195", "ms200", "ms205", "ms210", "ms215", "ms220", - "ms225", "ms230", "ms235", "ms240", "ms245", "ms250", "ms300", "ms350", "ms400", "ms450", "ms500", - "ms800", "ms1000", "ms2000", "ms4000", "spare5", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(options, 64, value, "t_poll_retx_e"); + "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 t_poll_retx_opts::to_number() const +uint16_t reduced_aggregated_bw_opts::to_number() const { - 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"); + 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"); } -// T-Reassembly ::= ENUMERATED -std::string t_reassembly_opts::to_string() const +// UplinkTxDirectCurrentCell ::= SEQUENCE +SRSASN_CODE ul_tx_direct_current_cell_s::pack(bit_ref& bref) const { - 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"); + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_dyn_seq_of(bref, ul_direct_current_bwp, 1, 4)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ul_direct_current_bwp_sul.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ul_direct_current_bwp_sul.is_present(), 1)); + if (ul_direct_current_bwp_sul.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ul_direct_current_bwp_sul, 1, 4)); + } + } + } + return SRSASN_SUCCESS; } -uint8_t t_reassembly_opts::to_number() const +SRSASN_CODE ul_tx_direct_current_cell_s::unpack(cbit_ref& bref) { - 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"); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_dyn_seq_of(ul_direct_current_bwp, bref, 1, 4)); + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool ul_direct_current_bwp_sul_present; + HANDLE_CODE(bref.unpack(ul_direct_current_bwp_sul_present, 1)); + ul_direct_current_bwp_sul.set_present(ul_direct_current_bwp_sul_present); + if (ul_direct_current_bwp_sul.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*ul_direct_current_bwp_sul, bref, 1, 4)); + } + } + } + return SRSASN_SUCCESS; +} +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 (const auto& e1 : ul_direct_current_bwp) { + e1.to_json(j); + } + j.end_array(); + if (ext) { + if (ul_direct_current_bwp_sul.is_present()) { + j.start_array("uplinkDirectCurrentBWP-SUL"); + for (const auto& e1 : *ul_direct_current_bwp_sul) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); } -// T-StatusProhibit ::= ENUMERATED -std::string t_status_prohibit_opts::to_string() const +// DRB-CountInfo ::= SEQUENCE +SRSASN_CODE drb_count_info_s::pack(bit_ref& bref) const { - 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", - "ms165", "ms170", "ms175", "ms180", "ms185", "ms190", "ms195", "ms200", "ms205", "ms210", "ms215", - "ms220", "ms225", "ms230", "ms235", "ms240", "ms245", "ms250", "ms300", "ms350", "ms400", "ms450", - "ms500", "ms800", "ms1000", "ms1200", "ms1600", "ms2000", "ms2400", "spare2", "spare1"}; - return convert_enum_idx(options, 64, value, "t_status_prohibit_e"); + HANDLE_CODE(pack_integer(bref, drb_id, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pack_integer(bref, count_ul, (uint64_t)0u, (uint64_t)4294967295u)); + HANDLE_CODE(pack_integer(bref, count_dl, (uint64_t)0u, (uint64_t)4294967295u)); + + return SRSASN_SUCCESS; } -uint16_t t_status_prohibit_opts::to_number() const +SRSASN_CODE drb_count_info_s::unpack(cbit_ref& bref) { - 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"); + HANDLE_CODE(unpack_integer(drb_id, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(unpack_integer(count_ul, bref, (uint64_t)0u, (uint64_t)4294967295u)); + HANDLE_CODE(unpack_integer(count_dl, bref, (uint64_t)0u, (uint64_t)4294967295u)); + + return SRSASN_SUCCESS; +} +void drb_count_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("drb-Identity", drb_id); + j.write_int("count-Uplink", count_ul); + j.write_int("count-Downlink", count_dl); + j.end_obj(); } -// TDD-UL-DL-SlotConfig ::= SEQUENCE -SRSASN_CODE tdd_ul_dl_slot_cfg_s::pack(bit_ref& bref) const +// MeasResultSFTD-EUTRA ::= SEQUENCE +SRSASN_CODE meas_result_sftd_eutra_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, slot_idx, (uint16_t)0u, (uint16_t)319u)); - HANDLE_CODE(symbols.pack(bref)); + HANDLE_CODE(bref.pack(rsrp_result_present, 1)); + + HANDLE_CODE(pack_integer(bref, eutra_pci, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(pack_integer(bref, sfn_offset_result, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(pack_integer(bref, frame_boundary_offset_result, (int16_t)-30720, (int16_t)30719)); + if (rsrp_result_present) { + HANDLE_CODE(pack_integer(bref, rsrp_result, (uint8_t)0u, (uint8_t)127u)); + } return SRSASN_SUCCESS; } -SRSASN_CODE tdd_ul_dl_slot_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_result_sftd_eutra_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(slot_idx, bref, (uint16_t)0u, (uint16_t)319u)); - HANDLE_CODE(symbols.unpack(bref)); + HANDLE_CODE(bref.unpack(rsrp_result_present, 1)); + + HANDLE_CODE(unpack_integer(eutra_pci, bref, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(unpack_integer(sfn_offset_result, bref, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(unpack_integer(frame_boundary_offset_result, bref, (int16_t)-30720, (int16_t)30719)); + if (rsrp_result_present) { + HANDLE_CODE(unpack_integer(rsrp_result, bref, (uint8_t)0u, (uint8_t)127u)); + } return SRSASN_SUCCESS; } -void tdd_ul_dl_slot_cfg_s::to_json(json_writer& j) const +void meas_result_sftd_eutra_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("slotIndex", slot_idx); - j.write_fieldname("symbols"); - symbols.to_json(j); + j.write_int("eutra-PhysCellId", eutra_pci); + j.write_int("sfn-OffsetResult", sfn_offset_result); + j.write_int("frameBoundaryOffsetResult", frame_boundary_offset_result); + if (rsrp_result_present) { + j.write_int("rsrp-Result", rsrp_result); + } j.end_obj(); } -void tdd_ul_dl_slot_cfg_s::symbols_c_::set(types::options e) +// OverheatingAssistance ::= SEQUENCE +SRSASN_CODE overheat_assist_s::pack(bit_ref& bref) const { - type_ = e; + HANDLE_CODE(bref.pack(reduced_max_ccs_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_bw_fr1_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_bw_fr2_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr1_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr2_present, 1)); + + if (reduced_max_ccs_present) { + HANDLE_CODE(pack_integer(bref, reduced_max_ccs.reduced_ccs_dl, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, reduced_max_ccs.reduced_ccs_ul, (uint8_t)0u, (uint8_t)31u)); + } + if (reduced_max_bw_fr1_present) { + HANDLE_CODE(reduced_max_bw_fr1.reduced_bw_fr1_dl.pack(bref)); + HANDLE_CODE(reduced_max_bw_fr1.reduced_bw_fr1_ul.pack(bref)); + } + if (reduced_max_bw_fr2_present) { + HANDLE_CODE(reduced_max_bw_fr2.reduced_bw_fr2_dl.pack(bref)); + HANDLE_CODE(reduced_max_bw_fr2.reduced_bw_fr2_ul.pack(bref)); + } + if (reduced_max_mimo_layers_fr1_present) { + HANDLE_CODE(reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_dl.pack(bref)); + HANDLE_CODE(reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_ul.pack(bref)); + } + if (reduced_max_mimo_layers_fr2_present) { + HANDLE_CODE(reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_dl.pack(bref)); + HANDLE_CODE(reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_ul.pack(bref)); + } + + return SRSASN_SUCCESS; } -void tdd_ul_dl_slot_cfg_s::symbols_c_::to_json(json_writer& j) const +SRSASN_CODE overheat_assist_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_max_ccs_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_bw_fr1_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr1_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr2_present, 1)); + + if (reduced_max_ccs_present) { + HANDLE_CODE(unpack_integer(reduced_max_ccs.reduced_ccs_dl, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(reduced_max_ccs.reduced_ccs_ul, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (reduced_max_bw_fr1_present) { + HANDLE_CODE(reduced_max_bw_fr1.reduced_bw_fr1_dl.unpack(bref)); + HANDLE_CODE(reduced_max_bw_fr1.reduced_bw_fr1_ul.unpack(bref)); + } + if (reduced_max_bw_fr2_present) { + HANDLE_CODE(reduced_max_bw_fr2.reduced_bw_fr2_dl.unpack(bref)); + HANDLE_CODE(reduced_max_bw_fr2.reduced_bw_fr2_ul.unpack(bref)); + } + if (reduced_max_mimo_layers_fr1_present) { + HANDLE_CODE(reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_dl.unpack(bref)); + HANDLE_CODE(reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_ul.unpack(bref)); + } + if (reduced_max_mimo_layers_fr2_present) { + HANDLE_CODE(reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_dl.unpack(bref)); + HANDLE_CODE(reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_ul.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void overheat_assist_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_max_ccs_present) { + j.write_fieldname("reducedMaxCCs"); + j.start_obj(); + j.write_int("reducedCCsDL", reduced_max_ccs.reduced_ccs_dl); + j.write_int("reducedCCsUL", reduced_max_ccs.reduced_ccs_ul); + j.end_obj(); + } + if (reduced_max_bw_fr1_present) { + j.write_fieldname("reducedMaxBW-FR1"); + j.start_obj(); + j.write_str("reducedBW-FR1-DL", reduced_max_bw_fr1.reduced_bw_fr1_dl.to_string()); + j.write_str("reducedBW-FR1-UL", reduced_max_bw_fr1.reduced_bw_fr1_ul.to_string()); + j.end_obj(); + } + if (reduced_max_bw_fr2_present) { + j.write_fieldname("reducedMaxBW-FR2"); + j.start_obj(); + j.write_str("reducedBW-FR2-DL", reduced_max_bw_fr2.reduced_bw_fr2_dl.to_string()); + j.write_str("reducedBW-FR2-UL", reduced_max_bw_fr2.reduced_bw_fr2_ul.to_string()); + j.end_obj(); + } + if (reduced_max_mimo_layers_fr1_present) { + j.write_fieldname("reducedMaxMIMO-LayersFR1"); + j.start_obj(); + j.write_str("reducedMIMO-LayersFR1-DL", reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_dl.to_string()); + j.write_str("reducedMIMO-LayersFR1-UL", reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_ul.to_string()); + j.end_obj(); + } + if (reduced_max_mimo_layers_fr2_present) { + j.write_fieldname("reducedMaxMIMO-LayersFR2"); + j.start_obj(); + j.write_str("reducedMIMO-LayersFR2-DL", reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_dl.to_string()); + j.write_str("reducedMIMO-LayersFR2-UL", reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_ul.to_string()); + j.end_obj(); + } + j.end_obj(); +} + +// RRCReconfigurationComplete-v1560-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_v1560_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scg_resp_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (scg_resp_present) { + HANDLE_CODE(scg_resp.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_complete_v1560_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scg_resp_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (scg_resp_present) { + HANDLE_CODE(scg_resp.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_complete_v1560_ies_s::to_json(json_writer& j) const { j.start_obj(); + if (scg_resp_present) { + j.write_fieldname("scg-Response"); + scg_resp.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +void rrc_recfg_complete_v1560_ies_s::scg_resp_c_::destroy_() +{ switch (type_) { - case types::all_dl: + case types::nr_scg_resp: + c.destroy(); break; - case types::all_ul: + case types::eutra_scg_resp: + c.destroy(); break; - case types::explicit_type: - j.write_fieldname("explicit"); - j.start_obj(); - if (c.nrof_dl_symbols_present) { - j.write_int("nrofDownlinkSymbols", c.nrof_dl_symbols); - } - if (c.nrof_ul_symbols_present) { - j.write_int("nrofUplinkSymbols", c.nrof_ul_symbols); - } - j.end_obj(); + default: + break; + } +} +void rrc_recfg_complete_v1560_ies_s::scg_resp_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_scg_resp: + c.init(); + break; + case types::eutra_scg_resp: + c.init(); + break; + case types::nulltype: break; default: - log_invalid_choice_id(type_, "tdd_ul_dl_slot_cfg_s::symbols_c_"); + log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); + } +} +rrc_recfg_complete_v1560_ies_s::scg_resp_c_::scg_resp_c_(const rrc_recfg_complete_v1560_ies_s::scg_resp_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_scg_resp: + c.init(other.c.get()); + break; + case types::eutra_scg_resp: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); + } +} +rrc_recfg_complete_v1560_ies_s::scg_resp_c_& +rrc_recfg_complete_v1560_ies_s::scg_resp_c_::operator=(const rrc_recfg_complete_v1560_ies_s::scg_resp_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_scg_resp: + c.set(other.c.get()); + break; + case types::eutra_scg_resp: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); + } + + return *this; +} +void rrc_recfg_complete_v1560_ies_s::scg_resp_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_scg_resp: + j.write_str("nr-SCG-Response", c.get().to_string()); + break; + case types::eutra_scg_resp: + j.write_str("eutra-SCG-Response", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); } j.end_obj(); } -SRSASN_CODE tdd_ul_dl_slot_cfg_s::symbols_c_::pack(bit_ref& bref) const +SRSASN_CODE rrc_recfg_complete_v1560_ies_s::scg_resp_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::all_dl: - break; - case types::all_ul: + case types::nr_scg_resp: + HANDLE_CODE(c.get().pack(bref)); break; - case types::explicit_type: - HANDLE_CODE(bref.pack(c.nrof_dl_symbols_present, 1)); - HANDLE_CODE(bref.pack(c.nrof_ul_symbols_present, 1)); - if (c.nrof_dl_symbols_present) { - HANDLE_CODE(pack_integer(bref, c.nrof_dl_symbols, (uint8_t)1u, (uint8_t)13u)); - } - if (c.nrof_ul_symbols_present) { - HANDLE_CODE(pack_integer(bref, c.nrof_ul_symbols, (uint8_t)1u, (uint8_t)13u)); - } + case types::eutra_scg_resp: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "tdd_ul_dl_slot_cfg_s::symbols_c_"); + log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE tdd_ul_dl_slot_cfg_s::symbols_c_::unpack(cbit_ref& bref) +SRSASN_CODE rrc_recfg_complete_v1560_ies_s::scg_resp_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::all_dl: - break; - case types::all_ul: + case types::nr_scg_resp: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::explicit_type: - HANDLE_CODE(bref.unpack(c.nrof_dl_symbols_present, 1)); - HANDLE_CODE(bref.unpack(c.nrof_ul_symbols_present, 1)); - if (c.nrof_dl_symbols_present) { - HANDLE_CODE(unpack_integer(c.nrof_dl_symbols, bref, (uint8_t)1u, (uint8_t)13u)); - } - if (c.nrof_ul_symbols_present) { - HANDLE_CODE(unpack_integer(c.nrof_ul_symbols, bref, (uint8_t)1u, (uint8_t)13u)); - } + case types::eutra_scg_resp: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "tdd_ul_dl_slot_cfg_s::symbols_c_"); + log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string tdd_ul_dl_slot_cfg_s::symbols_c_::types_opts::to_string() const +std::string rrc_recfg_complete_v1560_ies_s::scg_resp_c_::types_opts::to_string() const { - static const char* options[] = {"allDownlink", "allUplink", "explicit"}; - return convert_enum_idx(options, 3, value, "tdd_ul_dl_slot_cfg_s::symbols_c_::types"); + static const char* options[] = {"nr-SCG-Response", "eutra-SCG-Response"}; + return convert_enum_idx(options, 2, value, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_::types"); } -// UL-DataSplitThreshold ::= ENUMERATED -std::string ul_data_split_thres_opts::to_string() const +// UE-CapabilityRAT-Container ::= SEQUENCE +SRSASN_CODE ue_cap_rat_container_s::pack(bit_ref& bref) const { - 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"); + HANDLE_CODE(rat_type.pack(bref)); + HANDLE_CODE(ue_cap_rat_container.pack(bref)); + + return SRSASN_SUCCESS; } -int32_t ul_data_split_thres_opts::to_number() const +SRSASN_CODE ue_cap_rat_container_s::unpack(cbit_ref& bref) { - 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"); -} + HANDLE_CODE(rat_type.unpack(bref)); + HANDLE_CODE(ue_cap_rat_container.unpack(bref)); -// UplinkConfigCommon ::= SEQUENCE -SRSASN_CODE ul_cfg_common_s::pack(bit_ref& bref) const + return SRSASN_SUCCESS; +} +void ue_cap_rat_container_s::to_json(json_writer& j) const { - HANDLE_CODE(bref.pack(freq_info_ul_present, 1)); - HANDLE_CODE(bref.pack(init_ul_bwp_present, 1)); + j.start_obj(); + j.write_str("rat-Type", rat_type.to_string()); + j.write_str("ue-CapabilityRAT-Container", ue_cap_rat_container.to_string()); + j.end_obj(); +} - if (freq_info_ul_present) { - HANDLE_CODE(freq_info_ul.pack(bref)); - } - if (init_ul_bwp_present) { - HANDLE_CODE(init_ul_bwp.pack(bref)); +// DelayBudgetReport ::= CHOICE +void delay_budget_report_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("type1", c.to_string()); + j.end_obj(); +} +SRSASN_CODE delay_budget_report_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type()); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE delay_budget_report_c::unpack(cbit_ref& bref) +{ + types e; + unpack_enum(e, bref); + if (e != type()) { + log_invalid_choice_id(e, "delay_budget_report_c"); + return SRSASN_ERROR_DECODE_FAIL; } - HANDLE_CODE(dummy.pack(bref)); - + HANDLE_CODE(c.unpack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ul_cfg_common_s::unpack(cbit_ref& bref) + +std::string delay_budget_report_c::type1_opts::to_string() const { - HANDLE_CODE(bref.unpack(freq_info_ul_present, 1)); - HANDLE_CODE(bref.unpack(init_ul_bwp_present, 1)); + 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 const int16_t options[] = { + -1280, -640, -320, -160, -80, -60, -40, -20, 0, 20, 40, 60, 80, 160, 320, 640, 1280}; + return map_enum_number(options, 17, value, "delay_budget_report_c::type1_e_"); +} - if (freq_info_ul_present) { - HANDLE_CODE(freq_info_ul.unpack(bref)); - } - if (init_ul_bwp_present) { - HANDLE_CODE(init_ul_bwp.unpack(bref)); - } - HANDLE_CODE(dummy.unpack(bref)); +std::string delay_budget_report_c::types_opts::to_string() const +{ + 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 const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "delay_budget_report_c::types"); +} + +// FailureInfoRLC-Bearer ::= SEQUENCE +SRSASN_CODE fail_info_rlc_bearer_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, cell_group_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pack_integer(bref, lc_ch_id, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(fail_type.pack(bref)); return SRSASN_SUCCESS; } -void ul_cfg_common_s::to_json(json_writer& j) const +SRSASN_CODE fail_info_rlc_bearer_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(cell_group_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(unpack_integer(lc_ch_id, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(fail_type.unpack(bref)); + + return SRSASN_SUCCESS; +} +void fail_info_rlc_bearer_s::to_json(json_writer& j) const { j.start_obj(); - if (freq_info_ul_present) { - j.write_fieldname("frequencyInfoUL"); - freq_info_ul.to_json(j); - } - if (init_ul_bwp_present) { - j.write_fieldname("initialUplinkBWP"); - init_ul_bwp.to_json(j); - } - j.write_str("dummy", dummy.to_string()); + j.write_int("cellGroupId", cell_group_id); + j.write_int("logicalChannelIdentity", lc_ch_id); + j.write_str("failureType", fail_type.to_string()); j.end_obj(); } -// BWP-Downlink ::= SEQUENCE -SRSASN_CODE bwp_dl_s::pack(bit_ref& bref) const +std::string fail_info_rlc_bearer_s::fail_type_opts::to_string() const +{ + static const char* options[] = {"rlc-failure", "spare3", "spare2", "spare1"}; + return convert_enum_idx(options, 4, value, "fail_info_rlc_bearer_s::fail_type_e_"); +} + +// FailureReportSCG ::= SEQUENCE +SRSASN_CODE fail_report_scg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(bwp_common_present, 1)); - HANDLE_CODE(bref.pack(bwp_ded_present, 1)); + HANDLE_CODE(bref.pack(meas_result_freq_list_present, 1)); + HANDLE_CODE(bref.pack(meas_result_scg_fail_present, 1)); - HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); - if (bwp_common_present) { - HANDLE_CODE(bwp_common.pack(bref)); + HANDLE_CODE(fail_type.pack(bref)); + if (meas_result_freq_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list, 1, 8)); } - if (bwp_ded_present) { - HANDLE_CODE(bwp_ded.pack(bref)); + if (meas_result_scg_fail_present) { + HANDLE_CODE(meas_result_scg_fail.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE bwp_dl_s::unpack(cbit_ref& bref) +SRSASN_CODE fail_report_scg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(bwp_common_present, 1)); - HANDLE_CODE(bref.unpack(bwp_ded_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_freq_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_scg_fail_present, 1)); - HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); - if (bwp_common_present) { - HANDLE_CODE(bwp_common.unpack(bref)); + HANDLE_CODE(fail_type.unpack(bref)); + if (meas_result_freq_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list, bref, 1, 8)); } - if (bwp_ded_present) { - HANDLE_CODE(bwp_ded.unpack(bref)); + if (meas_result_scg_fail_present) { + HANDLE_CODE(meas_result_scg_fail.unpack(bref)); } return SRSASN_SUCCESS; } -void bwp_dl_s::to_json(json_writer& j) const +void fail_report_scg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("bwp-Id", bwp_id); - if (bwp_common_present) { - j.write_fieldname("bwp-Common"); - bwp_common.to_json(j); + j.write_str("failureType", fail_type.to_string()); + if (meas_result_freq_list_present) { + j.start_array("measResultFreqList"); + for (const auto& e1 : meas_result_freq_list) { + e1.to_json(j); + } + j.end_array(); } - if (bwp_ded_present) { - j.write_fieldname("bwp-Dedicated"); - bwp_ded.to_json(j); + if (meas_result_scg_fail_present) { + j.write_str("measResultSCG-Failure", meas_result_scg_fail.to_string()); } j.end_obj(); } -// CSI-MeasConfig ::= SEQUENCE -SRSASN_CODE csi_meas_cfg_s::pack(bit_ref& bref) const +std::string fail_report_scg_s::fail_type_opts::to_string() const +{ + static const char* options[] = {"t310-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "synchReconfigFailureSCG", + "scg-ReconfigFailure", + "srb3-IntegrityFailure", + "spare2", + "spare1"}; + return convert_enum_idx(options, 8, value, "fail_report_scg_s::fail_type_e_"); +} +uint16_t fail_report_scg_s::fail_type_opts::to_number() const +{ + switch (value) { + case t310_expiry: + return 310; + case srb3_integrity_fail: + return 3; + default: + invalid_enum_number(value, "fail_report_scg_s::fail_type_e_"); + } + return 0; +} + +// FailureReportSCG-EUTRA ::= SEQUENCE +SRSASN_CODE fail_report_scg_eutra_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(nzp_csi_rs_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(nzp_csi_rs_res_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(nzp_csi_rs_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(nzp_csi_rs_res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(csi_im_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(csi_im_res_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(csi_im_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(csi_im_res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(csi_ssb_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(csi_ssb_res_set_to_add_release_list_present, 1)); - HANDLE_CODE(bref.pack(csi_res_cfg_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(csi_res_cfg_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(csi_report_cfg_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(csi_report_cfg_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(report_trigger_size_present, 1)); - HANDLE_CODE(bref.pack(aperiodic_trigger_state_list_present, 1)); - HANDLE_CODE(bref.pack(semi_persistent_on_pusch_trigger_state_list_present, 1)); + HANDLE_CODE(bref.pack(meas_result_freq_list_mrdc_present, 1)); + HANDLE_CODE(bref.pack(meas_result_scg_fail_mrdc_present, 1)); - if (nzp_csi_rs_res_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res_to_add_mod_list, 1, 192)); - } - if (nzp_csi_rs_res_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res_to_release_list, 1, 192, integer_packer(0, 191))); - } - if (nzp_csi_rs_res_set_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res_set_to_add_mod_list, 1, 64)); - } - if (nzp_csi_rs_res_set_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res_set_to_release_list, 1, 64, integer_packer(0, 63))); - } - if (csi_im_res_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res_to_add_mod_list, 1, 32)); - } - if (csi_im_res_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res_to_release_list, 1, 32, integer_packer(0, 31))); - } - if (csi_im_res_set_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res_set_to_add_mod_list, 1, 64)); - } - if (csi_im_res_set_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res_set_to_release_list, 1, 64, integer_packer(0, 63))); - } - if (csi_ssb_res_set_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_ssb_res_set_to_add_mod_list, 1, 64)); - } - if (csi_ssb_res_set_to_add_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_ssb_res_set_to_add_release_list, 1, 64, integer_packer(0, 63))); - } - if (csi_res_cfg_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_res_cfg_to_add_mod_list, 1, 112)); - } - if (csi_res_cfg_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_res_cfg_to_release_list, 1, 112, integer_packer(0, 111))); - } - if (csi_report_cfg_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_report_cfg_to_add_mod_list, 1, 48)); - } - if (csi_report_cfg_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, csi_report_cfg_to_release_list, 1, 48, integer_packer(0, 47))); - } - if (report_trigger_size_present) { - HANDLE_CODE(pack_integer(bref, report_trigger_size, (uint8_t)0u, (uint8_t)6u)); - } - if (aperiodic_trigger_state_list_present) { - HANDLE_CODE(aperiodic_trigger_state_list.pack(bref)); + HANDLE_CODE(fail_type.pack(bref)); + if (meas_result_freq_list_mrdc_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_mrdc, 1, 8)); } - if (semi_persistent_on_pusch_trigger_state_list_present) { - HANDLE_CODE(semi_persistent_on_pusch_trigger_state_list.pack(bref)); + if (meas_result_scg_fail_mrdc_present) { + HANDLE_CODE(meas_result_scg_fail_mrdc.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE csi_meas_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE fail_report_scg_eutra_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(nzp_csi_rs_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(nzp_csi_rs_res_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(nzp_csi_rs_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(nzp_csi_rs_res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_im_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_im_res_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_im_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_im_res_set_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_ssb_res_set_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_ssb_res_set_to_add_release_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_res_cfg_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_res_cfg_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_report_cfg_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(csi_report_cfg_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(report_trigger_size_present, 1)); - HANDLE_CODE(bref.unpack(aperiodic_trigger_state_list_present, 1)); - HANDLE_CODE(bref.unpack(semi_persistent_on_pusch_trigger_state_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_freq_list_mrdc_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_scg_fail_mrdc_present, 1)); - if (nzp_csi_rs_res_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res_to_add_mod_list, bref, 1, 192)); - } - if (nzp_csi_rs_res_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res_to_release_list, bref, 1, 192, integer_packer(0, 191))); - } - if (nzp_csi_rs_res_set_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res_set_to_add_mod_list, bref, 1, 64)); - } - if (nzp_csi_rs_res_set_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res_set_to_release_list, bref, 1, 64, integer_packer(0, 63))); - } - if (csi_im_res_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_im_res_to_add_mod_list, bref, 1, 32)); - } - if (csi_im_res_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_im_res_to_release_list, bref, 1, 32, integer_packer(0, 31))); - } - if (csi_im_res_set_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_im_res_set_to_add_mod_list, bref, 1, 64)); - } - if (csi_im_res_set_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_im_res_set_to_release_list, bref, 1, 64, integer_packer(0, 63))); - } - if (csi_ssb_res_set_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_ssb_res_set_to_add_mod_list, bref, 1, 64)); - } - if (csi_ssb_res_set_to_add_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_ssb_res_set_to_add_release_list, bref, 1, 64, integer_packer(0, 63))); - } - if (csi_res_cfg_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_res_cfg_to_add_mod_list, bref, 1, 112)); - } - if (csi_res_cfg_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_res_cfg_to_release_list, bref, 1, 112, integer_packer(0, 111))); - } - if (csi_report_cfg_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_report_cfg_to_add_mod_list, bref, 1, 48)); - } - if (csi_report_cfg_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(csi_report_cfg_to_release_list, bref, 1, 48, integer_packer(0, 47))); - } - if (report_trigger_size_present) { - HANDLE_CODE(unpack_integer(report_trigger_size, bref, (uint8_t)0u, (uint8_t)6u)); - } - if (aperiodic_trigger_state_list_present) { - HANDLE_CODE(aperiodic_trigger_state_list.unpack(bref)); + HANDLE_CODE(fail_type.unpack(bref)); + if (meas_result_freq_list_mrdc_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_mrdc, bref, 1, 8)); } - if (semi_persistent_on_pusch_trigger_state_list_present) { - HANDLE_CODE(semi_persistent_on_pusch_trigger_state_list.unpack(bref)); + if (meas_result_scg_fail_mrdc_present) { + HANDLE_CODE(meas_result_scg_fail_mrdc.unpack(bref)); } return SRSASN_SUCCESS; } -void csi_meas_cfg_s::to_json(json_writer& j) const +void fail_report_scg_eutra_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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (const auto& e1 : csi_report_cfg_to_add_mod_list) { + j.write_str("failureType", fail_type.to_string()); + if (meas_result_freq_list_mrdc_present) { + j.start_array("measResultFreqListMRDC"); + for (const auto& e1 : meas_result_freq_list_mrdc) { e1.to_json(j); } j.end_array(); } - if (csi_report_cfg_to_release_list_present) { - j.start_array("csi-ReportConfigToReleaseList"); - for (const auto& e1 : csi_report_cfg_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (report_trigger_size_present) { - j.write_int("reportTriggerSize", report_trigger_size); - } - if (aperiodic_trigger_state_list_present) { - j.write_fieldname("aperiodicTriggerStateList"); - aperiodic_trigger_state_list.to_json(j); - } - if (semi_persistent_on_pusch_trigger_state_list_present) { - j.write_fieldname("semiPersistentOnPUSCH-TriggerStateList"); - semi_persistent_on_pusch_trigger_state_list.to_json(j); + if (meas_result_scg_fail_mrdc_present) { + j.write_str("measResultSCG-FailureMRDC", meas_result_scg_fail_mrdc.to_string()); } j.end_obj(); } -// CipheringAlgorithm ::= ENUMERATED -std::string ciphering_algorithm_opts::to_string() const +std::string fail_report_scg_eutra_s::fail_type_opts::to_string() const { - static const char* options[] = {"nea0", "nea1", "nea2", "nea3", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(options, 8, value, "ciphering_algorithm_e"); + static const char* options[] = {"t313-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "scg-ChangeFailure", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(options, 8, value, "fail_report_scg_eutra_s::fail_type_e_"); } -uint8_t ciphering_algorithm_opts::to_number() const +uint16_t fail_report_scg_eutra_s::fail_type_opts::to_number() const { - static const uint8_t options[] = {0, 1, 2, 3}; - return map_enum_number(options, 4, value, "ciphering_algorithm_e"); + static const uint16_t options[] = {313}; + return map_enum_number(options, 1, value, "fail_report_scg_eutra_s::fail_type_e_"); } -// CrossCarrierSchedulingConfig ::= SEQUENCE -SRSASN_CODE cross_carrier_sched_cfg_s::pack(bit_ref& bref) const +// LocationMeasurementInfo ::= CHOICE +void location_meas_info_c::set(types::options e) +{ + type_ = e; +} +void location_meas_info_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::eutra_rstd: + j.start_array("eutra-RSTD"); + for (const auto& e1 : c) { + e1.to_json(j); + } + j.end_array(); + break; + case types::eutra_fine_timing_detection: + break; + default: + log_invalid_choice_id(type_, "location_meas_info_c"); + } + j.end_obj(); +} +SRSASN_CODE location_meas_info_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::eutra_rstd: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 3)); + break; + case types::eutra_fine_timing_detection: + break; + default: + log_invalid_choice_id(type_, "location_meas_info_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE location_meas_info_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::eutra_rstd: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 3)); + break; + case types::eutra_fine_timing_detection: + break; + default: + log_invalid_choice_id(type_, "location_meas_info_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string location_meas_info_c::types_opts::to_string() const +{ + static const char* options[] = {"eutra-RSTD", "eutra-FineTimingDetection"}; + return convert_enum_idx(options, 2, value, "location_meas_info_c::types"); +} + +// MeasResults ::= SEQUENCE +SRSASN_CODE meas_results_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(sched_cell_info.pack(bref)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_present, 1)); + + HANDLE_CODE(pack_integer(bref, meas_id, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_serving_mo_list, 1, 32)); + if (meas_result_neigh_cells_present) { + HANDLE_CODE(meas_result_neigh_cells.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= meas_result_serv_freq_list_eutra_scg.is_present(); + group_flags[0] |= meas_result_serv_freq_list_nr_scg.is_present(); + group_flags[0] |= meas_result_sftd_eutra.is_present(); + group_flags[0] |= meas_result_sftd_nr.is_present(); + group_flags[1] |= meas_result_cell_list_sftd_nr.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(meas_result_serv_freq_list_eutra_scg.is_present(), 1)); + HANDLE_CODE(bref.pack(meas_result_serv_freq_list_nr_scg.is_present(), 1)); + HANDLE_CODE(bref.pack(meas_result_sftd_eutra.is_present(), 1)); + HANDLE_CODE(bref.pack(meas_result_sftd_nr.is_present(), 1)); + if (meas_result_serv_freq_list_eutra_scg.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_serv_freq_list_eutra_scg, 1, 32)); + } + if (meas_result_serv_freq_list_nr_scg.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_serv_freq_list_nr_scg, 1, 32)); + } + if (meas_result_sftd_eutra.is_present()) { + HANDLE_CODE(meas_result_sftd_eutra->pack(bref)); + } + if (meas_result_sftd_nr.is_present()) { + HANDLE_CODE(meas_result_sftd_nr->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(bref.pack(meas_result_cell_list_sftd_nr.is_present(), 1)); + if (meas_result_cell_list_sftd_nr.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_cell_list_sftd_nr, 1, 3)); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE cross_carrier_sched_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_results_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(sched_cell_info.unpack(bref)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_present, 1)); + + HANDLE_CODE(unpack_integer(meas_id, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_serving_mo_list, bref, 1, 32)); + if (meas_result_neigh_cells_present) { + HANDLE_CODE(meas_result_neigh_cells.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool meas_result_serv_freq_list_eutra_scg_present; + HANDLE_CODE(bref.unpack(meas_result_serv_freq_list_eutra_scg_present, 1)); + meas_result_serv_freq_list_eutra_scg.set_present(meas_result_serv_freq_list_eutra_scg_present); + bool meas_result_serv_freq_list_nr_scg_present; + HANDLE_CODE(bref.unpack(meas_result_serv_freq_list_nr_scg_present, 1)); + meas_result_serv_freq_list_nr_scg.set_present(meas_result_serv_freq_list_nr_scg_present); + bool meas_result_sftd_eutra_present; + HANDLE_CODE(bref.unpack(meas_result_sftd_eutra_present, 1)); + meas_result_sftd_eutra.set_present(meas_result_sftd_eutra_present); + bool meas_result_sftd_nr_present; + HANDLE_CODE(bref.unpack(meas_result_sftd_nr_present, 1)); + meas_result_sftd_nr.set_present(meas_result_sftd_nr_present); + if (meas_result_serv_freq_list_eutra_scg.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_serv_freq_list_eutra_scg, bref, 1, 32)); + } + if (meas_result_serv_freq_list_nr_scg.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_serv_freq_list_nr_scg, bref, 1, 32)); + } + if (meas_result_sftd_eutra.is_present()) { + HANDLE_CODE(meas_result_sftd_eutra->unpack(bref)); + } + if (meas_result_sftd_nr.is_present()) { + HANDLE_CODE(meas_result_sftd_nr->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + bool meas_result_cell_list_sftd_nr_present; + HANDLE_CODE(bref.unpack(meas_result_cell_list_sftd_nr_present, 1)); + meas_result_cell_list_sftd_nr.set_present(meas_result_cell_list_sftd_nr_present); + if (meas_result_cell_list_sftd_nr.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_cell_list_sftd_nr, bref, 1, 3)); + } + } + } return SRSASN_SUCCESS; } -void cross_carrier_sched_cfg_s::to_json(json_writer& j) const +void meas_results_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("schedulingCellInfo"); - sched_cell_info.to_json(j); + j.write_int("measId", meas_id); + j.start_array("measResultServingMOList"); + for (const auto& e1 : meas_result_serving_mo_list) { + e1.to_json(j); + } + j.end_array(); + if (meas_result_neigh_cells_present) { + j.write_fieldname("measResultNeighCells"); + meas_result_neigh_cells.to_json(j); + } + if (ext) { + if (meas_result_serv_freq_list_eutra_scg.is_present()) { + j.start_array("measResultServFreqListEUTRA-SCG"); + for (const auto& e1 : *meas_result_serv_freq_list_eutra_scg) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_serv_freq_list_nr_scg.is_present()) { + j.start_array("measResultServFreqListNR-SCG"); + for (const auto& e1 : *meas_result_serv_freq_list_nr_scg) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_sftd_eutra.is_present()) { + j.write_fieldname("measResultSFTD-EUTRA"); + meas_result_sftd_eutra->to_json(j); + } + if (meas_result_sftd_nr.is_present()) { + j.write_fieldname("measResultSFTD-NR"); + meas_result_sftd_nr->to_json(j); + } + if (meas_result_cell_list_sftd_nr.is_present()) { + j.start_array("measResultCellListSFTD-NR"); + for (const auto& e1 : *meas_result_cell_list_sftd_nr) { + e1.to_json(j); + } + j.end_array(); + } + } j.end_obj(); } -void cross_carrier_sched_cfg_s::sched_cell_info_c_::destroy_() +void meas_results_s::meas_result_neigh_cells_c_::destroy_() { switch (type_) { - case types::own: - c.destroy(); + case types::meas_result_list_nr: + c.destroy(); break; - case types::other: - c.destroy(); + case types::meas_result_list_eutra: + c.destroy(); break; default: break; } } -void cross_carrier_sched_cfg_s::sched_cell_info_c_::set(types::options e) +void meas_results_s::meas_result_neigh_cells_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::own: - c.init(); + case types::meas_result_list_nr: + c.init(); break; - case types::other: - c.init(); + case types::meas_result_list_eutra: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); } } -cross_carrier_sched_cfg_s::sched_cell_info_c_::sched_cell_info_c_( - const cross_carrier_sched_cfg_s::sched_cell_info_c_& other) +meas_results_s::meas_result_neigh_cells_c_::meas_result_neigh_cells_c_( + const meas_results_s::meas_result_neigh_cells_c_& other) { type_ = other.type(); switch (type_) { - case types::own: - c.init(other.c.get()); + case types::meas_result_list_nr: + c.init(other.c.get()); break; - case types::other: - c.init(other.c.get()); + case types::meas_result_list_eutra: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); } } -cross_carrier_sched_cfg_s::sched_cell_info_c_& cross_carrier_sched_cfg_s::sched_cell_info_c_:: - operator=(const cross_carrier_sched_cfg_s::sched_cell_info_c_& other) +meas_results_s::meas_result_neigh_cells_c_& +meas_results_s::meas_result_neigh_cells_c_::operator=(const meas_results_s::meas_result_neigh_cells_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::own: - c.set(other.c.get()); + case types::meas_result_list_nr: + c.set(other.c.get()); break; - case types::other: - c.set(other.c.get()); + case types::meas_result_list_eutra: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); } return *this; } -void cross_carrier_sched_cfg_s::sched_cell_info_c_::to_json(json_writer& j) const +void meas_results_s::meas_result_neigh_cells_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::own: - j.write_fieldname("own"); - j.start_obj(); - j.write_bool("cif-Presence", c.get().cif_presence); - j.end_obj(); + case types::meas_result_list_nr: + j.start_array("measResultListNR"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); break; - case types::other: - j.write_fieldname("other"); - j.start_obj(); - j.write_int("schedulingCellId", c.get().sched_cell_id); - j.write_int("cif-InSchedulingCell", c.get().cif_in_sched_cell); - j.end_obj(); + case types::meas_result_list_eutra: + j.start_array("measResultListEUTRA"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); break; default: - log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); } j.end_obj(); } -SRSASN_CODE cross_carrier_sched_cfg_s::sched_cell_info_c_::pack(bit_ref& bref) const +SRSASN_CODE meas_results_s::meas_result_neigh_cells_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::own: - HANDLE_CODE(bref.pack(c.get().cif_presence, 1)); - break; - case types::other: - HANDLE_CODE(pack_integer(bref, c.get().sched_cell_id, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, c.get().cif_in_sched_cell, (uint8_t)1u, (uint8_t)7u)); + case types::meas_result_list_nr: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); break; + case types::meas_result_list_eutra: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + } break; default: - log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE cross_carrier_sched_cfg_s::sched_cell_info_c_::unpack(cbit_ref& bref) +SRSASN_CODE meas_results_s::meas_result_neigh_cells_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::own: - HANDLE_CODE(bref.unpack(c.get().cif_presence, 1)); - break; - case types::other: - HANDLE_CODE(unpack_integer(c.get().sched_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(c.get().cif_in_sched_cell, bref, (uint8_t)1u, (uint8_t)7u)); + case types::meas_result_list_nr: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); break; + case types::meas_result_list_eutra: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + } break; default: - log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string cross_carrier_sched_cfg_s::sched_cell_info_c_::types_opts::to_string() const +std::string meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const { - static const char* options[] = {"own", "other"}; - return convert_enum_idx(options, 2, value, "cross_carrier_sched_cfg_s::sched_cell_info_c_::types"); + static const char* options[] = {"measResultListNR", "measResultListEUTRA"}; + return convert_enum_idx(options, 2, value, "meas_results_s::meas_result_neigh_cells_c_::types"); } -// DL-AM-RLC ::= SEQUENCE -SRSASN_CODE dl_am_rlc_s::pack(bit_ref& bref) const +// RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_v1530_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(sn_field_len_present, 1)); + HANDLE_CODE(bref.pack(ul_tx_direct_current_list_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (sn_field_len_present) { - HANDLE_CODE(sn_field_len.pack(bref)); + if (ul_tx_direct_current_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_list, 1, 32)); } - HANDLE_CODE(t_reassembly.pack(bref)); - HANDLE_CODE(t_status_prohibit.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_am_rlc_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sn_field_len_present, 1)); - - if (sn_field_len_present) { - HANDLE_CODE(sn_field_len.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } - HANDLE_CODE(t_reassembly.unpack(bref)); - HANDLE_CODE(t_status_prohibit.unpack(bref)); return SRSASN_SUCCESS; } -void dl_am_rlc_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sn_field_len_present) { - j.write_str("sn-FieldLength", sn_field_len.to_string()); - } - j.write_str("t-Reassembly", t_reassembly.to_string()); - j.write_str("t-StatusProhibit", t_status_prohibit.to_string()); - j.end_obj(); -} - -// DL-UM-RLC ::= SEQUENCE -SRSASN_CODE dl_um_rlc_s::pack(bit_ref& bref) const +SRSASN_CODE rrc_recfg_complete_v1530_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.pack(sn_field_len_present, 1)); + HANDLE_CODE(bref.unpack(ul_tx_direct_current_list_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (sn_field_len_present) { - HANDLE_CODE(sn_field_len.pack(bref)); + if (ul_tx_direct_current_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_list, bref, 1, 32)); } - HANDLE_CODE(t_reassembly.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_um_rlc_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sn_field_len_present, 1)); - - if (sn_field_len_present) { - HANDLE_CODE(sn_field_len.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } - HANDLE_CODE(t_reassembly.unpack(bref)); return SRSASN_SUCCESS; } -void dl_um_rlc_s::to_json(json_writer& j) const +void rrc_recfg_complete_v1530_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (sn_field_len_present) { - j.write_str("sn-FieldLength", sn_field_len.to_string()); - } - j.write_str("t-Reassembly", t_reassembly.to_string()); - j.end_obj(); -} - -// IntegrityProtAlgorithm ::= ENUMERATED -std::string integrity_prot_algorithm_opts::to_string() const -{ - 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 const uint8_t options[] = {0, 1, 2, 3}; - return map_enum_number(options, 4, value, "integrity_prot_algorithm_e"); -} - -// PDCCH-ServingCellConfig ::= SEQUENCE -SRSASN_CODE pdcch_serving_cell_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(slot_format_ind_present, 1)); - - if (slot_format_ind_present) { - HANDLE_CODE(slot_format_ind.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_serving_cell_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(slot_format_ind_present, 1)); - - if (slot_format_ind_present) { - HANDLE_CODE(slot_format_ind.unpack(bref)); + if (ul_tx_direct_current_list_present) { + j.start_array("uplinkTxDirectCurrentList"); + for (const auto& e1 : ul_tx_direct_current_list) { + e1.to_json(j); + } + j.end_array(); } - - return SRSASN_SUCCESS; -} -void pdcch_serving_cell_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (slot_format_ind_present) { - j.write_fieldname("slotFormatIndicator"); - slot_format_ind.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } j.end_obj(); } -// PDCP-Config ::= SEQUENCE -SRSASN_CODE pdcp_cfg_s::pack(bit_ref& bref) const +// RegisteredAMF ::= SEQUENCE +SRSASN_CODE registered_amf_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(drb_present, 1)); - HANDLE_CODE(bref.pack(more_than_one_rlc_present, 1)); - HANDLE_CODE(bref.pack(t_reordering_present, 1)); + HANDLE_CODE(bref.pack(plmn_id_present, 1)); - if (drb_present) { - HANDLE_CODE(bref.pack(drb.discard_timer_present, 1)); - HANDLE_CODE(bref.pack(drb.pdcp_sn_size_ul_present, 1)); - HANDLE_CODE(bref.pack(drb.pdcp_sn_size_dl_present, 1)); - HANDLE_CODE(bref.pack(drb.integrity_protection_present, 1)); - HANDLE_CODE(bref.pack(drb.status_report_required_present, 1)); - HANDLE_CODE(bref.pack(drb.out_of_order_delivery_present, 1)); - if (drb.discard_timer_present) { - HANDLE_CODE(drb.discard_timer.pack(bref)); - } - if (drb.pdcp_sn_size_ul_present) { - HANDLE_CODE(drb.pdcp_sn_size_ul.pack(bref)); - } - if (drb.pdcp_sn_size_dl_present) { - HANDLE_CODE(drb.pdcp_sn_size_dl.pack(bref)); - } - HANDLE_CODE(drb.hdr_compress.pack(bref)); - } - if (more_than_one_rlc_present) { - HANDLE_CODE(bref.pack(more_than_one_rlc.ul_data_split_thres_present, 1)); - HANDLE_CODE(bref.pack(more_than_one_rlc.pdcp_dupl_present, 1)); - HANDLE_CODE(bref.pack(more_than_one_rlc.primary_path.cell_group_present, 1)); - HANDLE_CODE(bref.pack(more_than_one_rlc.primary_path.lc_ch_present, 1)); - if (more_than_one_rlc.primary_path.cell_group_present) { - HANDLE_CODE(pack_integer(bref, more_than_one_rlc.primary_path.cell_group, (uint8_t)0u, (uint8_t)3u)); - } - if (more_than_one_rlc.primary_path.lc_ch_present) { - HANDLE_CODE(pack_integer(bref, more_than_one_rlc.primary_path.lc_ch, (uint8_t)1u, (uint8_t)32u)); - } - if (more_than_one_rlc.ul_data_split_thres_present) { - HANDLE_CODE(more_than_one_rlc.ul_data_split_thres.pack(bref)); - } - if (more_than_one_rlc.pdcp_dupl_present) { - HANDLE_CODE(bref.pack(more_than_one_rlc.pdcp_dupl, 1)); - } - } - if (t_reordering_present) { - HANDLE_CODE(t_reordering.pack(bref)); + if (plmn_id_present) { + HANDLE_CODE(plmn_id.pack(bref)); } + HANDLE_CODE(amf_id.pack(bref)); - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ciphering_disabled_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ciphering_disabled_present, 1)); - } - } return SRSASN_SUCCESS; } -SRSASN_CODE pdcp_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE registered_amf_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(drb_present, 1)); - HANDLE_CODE(bref.unpack(more_than_one_rlc_present, 1)); - HANDLE_CODE(bref.unpack(t_reordering_present, 1)); + HANDLE_CODE(bref.unpack(plmn_id_present, 1)); - if (drb_present) { - HANDLE_CODE(bref.unpack(drb.discard_timer_present, 1)); - HANDLE_CODE(bref.unpack(drb.pdcp_sn_size_ul_present, 1)); - HANDLE_CODE(bref.unpack(drb.pdcp_sn_size_dl_present, 1)); - HANDLE_CODE(bref.unpack(drb.integrity_protection_present, 1)); - HANDLE_CODE(bref.unpack(drb.status_report_required_present, 1)); - HANDLE_CODE(bref.unpack(drb.out_of_order_delivery_present, 1)); - if (drb.discard_timer_present) { - HANDLE_CODE(drb.discard_timer.unpack(bref)); - } - if (drb.pdcp_sn_size_ul_present) { - HANDLE_CODE(drb.pdcp_sn_size_ul.unpack(bref)); - } - if (drb.pdcp_sn_size_dl_present) { - HANDLE_CODE(drb.pdcp_sn_size_dl.unpack(bref)); - } - HANDLE_CODE(drb.hdr_compress.unpack(bref)); - } - if (more_than_one_rlc_present) { - HANDLE_CODE(bref.unpack(more_than_one_rlc.ul_data_split_thres_present, 1)); - HANDLE_CODE(bref.unpack(more_than_one_rlc.pdcp_dupl_present, 1)); - HANDLE_CODE(bref.unpack(more_than_one_rlc.primary_path.cell_group_present, 1)); - HANDLE_CODE(bref.unpack(more_than_one_rlc.primary_path.lc_ch_present, 1)); - if (more_than_one_rlc.primary_path.cell_group_present) { - HANDLE_CODE(unpack_integer(more_than_one_rlc.primary_path.cell_group, bref, (uint8_t)0u, (uint8_t)3u)); - } - if (more_than_one_rlc.primary_path.lc_ch_present) { - HANDLE_CODE(unpack_integer(more_than_one_rlc.primary_path.lc_ch, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (more_than_one_rlc.ul_data_split_thres_present) { - HANDLE_CODE(more_than_one_rlc.ul_data_split_thres.unpack(bref)); - } - if (more_than_one_rlc.pdcp_dupl_present) { - HANDLE_CODE(bref.unpack(more_than_one_rlc.pdcp_dupl, 1)); - } - } - if (t_reordering_present) { - HANDLE_CODE(t_reordering.unpack(bref)); + if (plmn_id_present) { + HANDLE_CODE(plmn_id.unpack(bref)); } + HANDLE_CODE(amf_id.unpack(bref)); - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ciphering_disabled_present, 1)); - } - } return SRSASN_SUCCESS; } -void pdcp_cfg_s::to_json(json_writer& j) const +void registered_amf_s::to_json(json_writer& j) const { j.start_obj(); - if (drb_present) { - j.write_fieldname("drb"); - j.start_obj(); - if (drb.discard_timer_present) { - j.write_str("discardTimer", drb.discard_timer.to_string()); - } - if (drb.pdcp_sn_size_ul_present) { - j.write_str("pdcp-SN-SizeUL", drb.pdcp_sn_size_ul.to_string()); - } - if (drb.pdcp_sn_size_dl_present) { - j.write_str("pdcp-SN-SizeDL", drb.pdcp_sn_size_dl.to_string()); - } - j.write_fieldname("headerCompression"); - drb.hdr_compress.to_json(j); - if (drb.integrity_protection_present) { - j.write_str("integrityProtection", "enabled"); - } - if (drb.status_report_required_present) { - j.write_str("statusReportRequired", "true"); - } - if (drb.out_of_order_delivery_present) { - j.write_str("outOfOrderDelivery", "true"); - } - j.end_obj(); - } - if (more_than_one_rlc_present) { - j.write_fieldname("moreThanOneRLC"); - j.start_obj(); - j.write_fieldname("primaryPath"); - j.start_obj(); - if (more_than_one_rlc.primary_path.cell_group_present) { - j.write_int("cellGroup", more_than_one_rlc.primary_path.cell_group); - } - if (more_than_one_rlc.primary_path.lc_ch_present) { - j.write_int("logicalChannel", more_than_one_rlc.primary_path.lc_ch); - } - j.end_obj(); - if (more_than_one_rlc.ul_data_split_thres_present) { - j.write_str("ul-DataSplitThreshold", more_than_one_rlc.ul_data_split_thres.to_string()); - } - if (more_than_one_rlc.pdcp_dupl_present) { - j.write_bool("pdcp-Duplication", more_than_one_rlc.pdcp_dupl); - } - j.end_obj(); - } - if (t_reordering_present) { - j.write_str("t-Reordering", t_reordering.to_string()); - } - if (ext) { - if (ciphering_disabled_present) { - j.write_str("cipheringDisabled", "true"); - } + if (plmn_id_present) { + j.write_fieldname("plmn-Identity"); + plmn_id.to_json(j); } + j.write_str("amf-Identifier", amf_id.to_string()); j.end_obj(); } -std::string pdcp_cfg_s::drb_s_::discard_timer_opts::to_string() const -{ - 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 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 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 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 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 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_() +// S-NSSAI ::= CHOICE +void s_nssai_c::destroy_() { switch (type_) { - case types::rohc: - c.destroy(); + case types::sst: + c.destroy >(); break; - case types::ul_only_rohc: - c.destroy(); + case types::sst_sd: + c.destroy >(); break; default: break; } } -void pdcp_cfg_s::drb_s_::hdr_compress_c_::set(types::options e) +void s_nssai_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::not_used: - break; - case types::rohc: - c.init(); + case types::sst: + c.init >(); break; - case types::ul_only_rohc: - c.init(); + case types::sst_sd: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + log_invalid_choice_id(type_, "s_nssai_c"); } } -pdcp_cfg_s::drb_s_::hdr_compress_c_::hdr_compress_c_(const pdcp_cfg_s::drb_s_::hdr_compress_c_& other) +s_nssai_c::s_nssai_c(const s_nssai_c& other) { type_ = other.type(); switch (type_) { - case types::not_used: - break; - case types::rohc: - c.init(other.c.get()); + case types::sst: + c.init(other.c.get >()); break; - case types::ul_only_rohc: - c.init(other.c.get()); + case types::sst_sd: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + log_invalid_choice_id(type_, "s_nssai_c"); } } -pdcp_cfg_s::drb_s_::hdr_compress_c_& pdcp_cfg_s::drb_s_::hdr_compress_c_:: - operator=(const pdcp_cfg_s::drb_s_::hdr_compress_c_& other) +s_nssai_c& s_nssai_c::operator=(const s_nssai_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::not_used: - break; - case types::rohc: - c.set(other.c.get()); + case types::sst: + c.set(other.c.get >()); break; - case types::ul_only_rohc: - c.set(other.c.get()); + case types::sst_sd: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + log_invalid_choice_id(type_, "s_nssai_c"); } return *this; } -void pdcp_cfg_s::drb_s_::hdr_compress_c_::to_json(json_writer& j) const +void s_nssai_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::not_used: - break; - case types::rohc: - j.write_fieldname("rohc"); - j.start_obj(); - if (c.get().max_cid_present) { - j.write_int("maxCID", c.get().max_cid); - } - j.write_fieldname("profiles"); - j.start_obj(); - j.write_bool("profile0x0001", c.get().profiles.profile0x0001); - j.write_bool("profile0x0002", c.get().profiles.profile0x0002); - j.write_bool("profile0x0003", c.get().profiles.profile0x0003); - j.write_bool("profile0x0004", c.get().profiles.profile0x0004); - j.write_bool("profile0x0006", c.get().profiles.profile0x0006); - j.write_bool("profile0x0101", c.get().profiles.profile0x0101); - j.write_bool("profile0x0102", c.get().profiles.profile0x0102); - j.write_bool("profile0x0103", c.get().profiles.profile0x0103); - j.write_bool("profile0x0104", c.get().profiles.profile0x0104); - j.end_obj(); - if (c.get().drb_continue_rohc_present) { - j.write_str("drb-ContinueROHC", "true"); - } - j.end_obj(); + case types::sst: + j.write_str("sst", c.get >().to_string()); break; - case types::ul_only_rohc: - j.write_fieldname("uplinkOnlyROHC"); - j.start_obj(); - if (c.get().max_cid_present) { - j.write_int("maxCID", c.get().max_cid); - } - j.write_fieldname("profiles"); - j.start_obj(); - j.write_bool("profile0x0006", c.get().profiles.profile0x0006); - j.end_obj(); - if (c.get().drb_continue_rohc_present) { - j.write_str("drb-ContinueROHC", "true"); - } - j.end_obj(); + case types::sst_sd: + j.write_str("sst-SD", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + log_invalid_choice_id(type_, "s_nssai_c"); } j.end_obj(); } -SRSASN_CODE pdcp_cfg_s::drb_s_::hdr_compress_c_::pack(bit_ref& bref) const +SRSASN_CODE s_nssai_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::not_used: - break; - case types::rohc: - HANDLE_CODE(bref.pack(c.get().max_cid_present, 1)); - HANDLE_CODE(bref.pack(c.get().drb_continue_rohc_present, 1)); - if (c.get().max_cid_present) { - HANDLE_CODE(pack_integer(bref, c.get().max_cid, (uint16_t)1u, (uint16_t)16383u)); - } - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0001, 1)); - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0002, 1)); - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0003, 1)); - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0004, 1)); - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0006, 1)); - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0101, 1)); - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0102, 1)); - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0103, 1)); - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0104, 1)); + case types::sst: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::ul_only_rohc: - HANDLE_CODE(bref.pack(c.get().max_cid_present, 1)); - HANDLE_CODE(bref.pack(c.get().drb_continue_rohc_present, 1)); - if (c.get().max_cid_present) { - HANDLE_CODE(pack_integer(bref, c.get().max_cid, (uint16_t)1u, (uint16_t)16383u)); - } - HANDLE_CODE(bref.pack(c.get().profiles.profile0x0006, 1)); + case types::sst_sd: + HANDLE_CODE(c.get >().pack(bref)); break; default: - log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + log_invalid_choice_id(type_, "s_nssai_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE pdcp_cfg_s::drb_s_::hdr_compress_c_::unpack(cbit_ref& bref) +SRSASN_CODE s_nssai_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::not_used: - break; - case types::rohc: - HANDLE_CODE(bref.unpack(c.get().max_cid_present, 1)); - HANDLE_CODE(bref.unpack(c.get().drb_continue_rohc_present, 1)); - if (c.get().max_cid_present) { - HANDLE_CODE(unpack_integer(c.get().max_cid, bref, (uint16_t)1u, (uint16_t)16383u)); - } - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0001, 1)); - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0002, 1)); - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0003, 1)); - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0004, 1)); - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0006, 1)); - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0101, 1)); - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0102, 1)); - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0103, 1)); - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0104, 1)); + case types::sst: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::ul_only_rohc: - HANDLE_CODE(bref.unpack(c.get().max_cid_present, 1)); - HANDLE_CODE(bref.unpack(c.get().drb_continue_rohc_present, 1)); - if (c.get().max_cid_present) { - HANDLE_CODE(unpack_integer(c.get().max_cid, bref, (uint16_t)1u, (uint16_t)16383u)); - } - HANDLE_CODE(bref.unpack(c.get().profiles.profile0x0006, 1)); + case types::sst_sd: + HANDLE_CODE(c.get >().unpack(bref)); break; default: - log_invalid_choice_id(type_, "pdcp_cfg_s::drb_s_::hdr_compress_c_"); + log_invalid_choice_id(type_, "s_nssai_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string pdcp_cfg_s::drb_s_::hdr_compress_c_::types_opts::to_string() const +std::string s_nssai_c::types_opts::to_string() const { - static const char* options[] = {"notUsed", "rohc", "uplinkOnlyROHC"}; - return convert_enum_idx(options, 3, value, "pdcp_cfg_s::drb_s_::hdr_compress_c_::types"); + static const char* options[] = {"sst", "sst-SD"}; + return convert_enum_idx(options, 2, value, "s_nssai_c::types"); } -std::string pdcp_cfg_s::t_reordering_opts::to_string() const -{ - 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", - "ms1750", "ms2000", "ms2250", "ms2500", "ms2750", "ms3000", "spare28", "spare27", "spare26", "spare25", - "spare24", "spare23", "spare22", "spare21", "spare20", "spare19", "spare18", "spare17", "spare16", "spare15", - "spare14", "spare13", "spare12", "spare11", "spare10", "spare09", "spare08", "spare07", "spare06", "spare05", - "spare04", "spare03", "spare02", "spare01"}; - return convert_enum_idx(options, 64, value, "pdcp_cfg_s::t_reordering_e_"); -} -uint16_t pdcp_cfg_s::t_reordering_opts::to_number() const +// SCGFailureInformation-v1590-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_v1590_ies_s::pack(bit_ref& bref) const { - 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_"); -} + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); -// PDSCH-ServingCellConfig ::= SEQUENCE -SRSASN_CODE pdsch_serving_cell_cfg_s::pack(bit_ref& bref) const + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_v1590_ies_s::unpack(cbit_ref& bref) { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(code_block_group_tx_present, 1)); - HANDLE_CODE(bref.pack(xoverhead_present, 1)); - HANDLE_CODE(bref.pack(nrof_harq_processes_for_pdsch_present, 1)); - HANDLE_CODE(bref.pack(pucch_cell_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (code_block_group_tx_present) { - HANDLE_CODE(code_block_group_tx.pack(bref)); - } - if (xoverhead_present) { - HANDLE_CODE(xoverhead.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - if (nrof_harq_processes_for_pdsch_present) { - HANDLE_CODE(nrof_harq_processes_for_pdsch.pack(bref)); + + return SRSASN_SUCCESS; +} +void scg_fail_info_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (pucch_cell_present) { - HANDLE_CODE(pack_integer(bref, pucch_cell, (uint8_t)0u, (uint8_t)31u)); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } + j.end_obj(); +} - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= max_mimo_layers_present; - group_flags[0] |= processing_type2_enabled_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); +// SCGFailureInformationEUTRA-v1590-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_eutra_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(max_mimo_layers_present, 1)); - HANDLE_CODE(bref.pack(processing_type2_enabled_present, 1)); - if (max_mimo_layers_present) { - HANDLE_CODE(pack_integer(bref, max_mimo_layers, (uint8_t)1u, (uint8_t)8u)); - } - if (processing_type2_enabled_present) { - HANDLE_CODE(bref.pack(processing_type2_enabled, 1)); - } - } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } + return SRSASN_SUCCESS; } -SRSASN_CODE pdsch_serving_cell_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE scg_fail_info_eutra_v1590_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(code_block_group_tx_present, 1)); - HANDLE_CODE(bref.unpack(xoverhead_present, 1)); - HANDLE_CODE(bref.unpack(nrof_harq_processes_for_pdsch_present, 1)); - HANDLE_CODE(bref.unpack(pucch_cell_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (code_block_group_tx_present) { - HANDLE_CODE(code_block_group_tx.unpack(bref)); - } - if (xoverhead_present) { - HANDLE_CODE(xoverhead.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - if (nrof_harq_processes_for_pdsch_present) { - HANDLE_CODE(nrof_harq_processes_for_pdsch.unpack(bref)); + + return SRSASN_SUCCESS; +} +void scg_fail_info_eutra_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (pucch_cell_present) { - HANDLE_CODE(unpack_integer(pucch_cell, bref, (uint8_t)0u, (uint8_t)31u)); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } + j.end_obj(); +} - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); +// UEAssistanceInformation-v1540-IEs ::= SEQUENCE +SRSASN_CODE ueassist_info_v1540_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(overheat_assist_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); + if (overheat_assist_present) { + HANDLE_CODE(overheat_assist.pack(bref)); + } - HANDLE_CODE(bref.unpack(max_mimo_layers_present, 1)); - HANDLE_CODE(bref.unpack(processing_type2_enabled_present, 1)); - if (max_mimo_layers_present) { - HANDLE_CODE(unpack_integer(max_mimo_layers, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (processing_type2_enabled_present) { - HANDLE_CODE(bref.unpack(processing_type2_enabled, 1)); - } - } + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_v1540_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(overheat_assist_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (overheat_assist_present) { + HANDLE_CODE(overheat_assist.unpack(bref)); } + return SRSASN_SUCCESS; } -void pdsch_serving_cell_cfg_s::to_json(json_writer& j) const +void ueassist_info_v1540_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (code_block_group_tx_present) { - j.write_fieldname("codeBlockGroupTransmission"); - code_block_group_tx.to_json(j); - } - if (xoverhead_present) { - j.write_str("xOverhead", xoverhead.to_string()); - } - if (nrof_harq_processes_for_pdsch_present) { - j.write_str("nrofHARQ-ProcessesForPDSCH", nrof_harq_processes_for_pdsch.to_string()); - } - if (pucch_cell_present) { - j.write_int("pucch-Cell", pucch_cell); + if (overheat_assist_present) { + j.write_fieldname("overheatingAssistance"); + overheat_assist.to_json(j); } - if (ext) { - if (max_mimo_layers_present) { - j.write_int("maxMIMO-Layers", max_mimo_layers); - } - if (processing_type2_enabled_present) { - j.write_bool("processingType2Enabled", processing_type2_enabled); - } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -std::string pdsch_serving_cell_cfg_s::xoverhead_opts::to_string() const +// CounterCheckResponse-IEs ::= SEQUENCE +SRSASN_CODE counter_check_resp_ies_s::pack(bit_ref& bref) const { - static const char* options[] = {"xOh6", "xOh12", "xOh18"}; - return convert_enum_idx(options, 3, value, "pdsch_serving_cell_cfg_s::xoverhead_e_"); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, drb_count_info_list, 0, 29)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t pdsch_serving_cell_cfg_s::xoverhead_opts::to_number() const +SRSASN_CODE counter_check_resp_ies_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {6, 12, 18}; - return map_enum_number(options, 3, value, "pdsch_serving_cell_cfg_s::xoverhead_e_"); -} + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); -std::string pdsch_serving_cell_cfg_s::nrof_harq_processes_for_pdsch_opts::to_string() const -{ - 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_"); + HANDLE_CODE(unpack_dyn_seq_of(drb_count_info_list, bref, 0, 29)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t pdsch_serving_cell_cfg_s::nrof_harq_processes_for_pdsch_opts::to_number() const +void counter_check_resp_ies_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + j.start_array("drb-CountInfoList"); + for (const auto& e1 : drb_count_info_list) { + e1.to_json(j); + } + j.end_array(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); } -// RACH-ConfigDedicated ::= SEQUENCE -SRSASN_CODE rach_cfg_ded_s::pack(bit_ref& bref) const +// FailureInformation-IEs ::= SEQUENCE +SRSASN_CODE fail_info_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cfra_present, 1)); - HANDLE_CODE(bref.pack(ra_prioritization_present, 1)); + HANDLE_CODE(bref.pack(fail_info_rlc_bearer_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (cfra_present) { - HANDLE_CODE(cfra.pack(bref)); + if (fail_info_rlc_bearer_present) { + HANDLE_CODE(fail_info_rlc_bearer.pack(bref)); } - if (ra_prioritization_present) { - HANDLE_CODE(ra_prioritization.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE rach_cfg_ded_s::unpack(cbit_ref& bref) +SRSASN_CODE fail_info_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cfra_present, 1)); - HANDLE_CODE(bref.unpack(ra_prioritization_present, 1)); + HANDLE_CODE(bref.unpack(fail_info_rlc_bearer_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (cfra_present) { - HANDLE_CODE(cfra.unpack(bref)); + if (fail_info_rlc_bearer_present) { + HANDLE_CODE(fail_info_rlc_bearer.unpack(bref)); } - if (ra_prioritization_present) { - HANDLE_CODE(ra_prioritization.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void rach_cfg_ded_s::to_json(json_writer& j) const +void fail_info_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (cfra_present) { - j.write_fieldname("cfra"); - cfra.to_json(j); + if (fail_info_rlc_bearer_present) { + j.write_fieldname("failureInfoRLC-Bearer"); + fail_info_rlc_bearer.to_json(j); } - if (ra_prioritization_present) { - j.write_fieldname("ra-Prioritization"); - ra_prioritization.to_json(j); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -// SDAP-Config ::= SEQUENCE -SRSASN_CODE sdap_cfg_s::pack(bit_ref& bref) const +// LocationMeasurementIndication-IEs ::= SEQUENCE +SRSASN_CODE location_meas_ind_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(mapped_qos_flows_to_add_present, 1)); - HANDLE_CODE(bref.pack(mapped_qos_flows_to_release_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(pack_integer(bref, pdu_session, (uint16_t)0u, (uint16_t)255u)); - HANDLE_CODE(sdap_hdr_dl.pack(bref)); - HANDLE_CODE(sdap_hdr_ul.pack(bref)); - HANDLE_CODE(bref.pack(default_drb, 1)); - if (mapped_qos_flows_to_add_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, mapped_qos_flows_to_add, 1, 64, integer_packer(0, 63))); - } - if (mapped_qos_flows_to_release_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, mapped_qos_flows_to_release, 1, 64, integer_packer(0, 63))); + HANDLE_CODE(meas_ind.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE sdap_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE location_meas_ind_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(mapped_qos_flows_to_add_present, 1)); - HANDLE_CODE(bref.unpack(mapped_qos_flows_to_release_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(unpack_integer(pdu_session, bref, (uint16_t)0u, (uint16_t)255u)); - HANDLE_CODE(sdap_hdr_dl.unpack(bref)); - HANDLE_CODE(sdap_hdr_ul.unpack(bref)); - HANDLE_CODE(bref.unpack(default_drb, 1)); - if (mapped_qos_flows_to_add_present) { - HANDLE_CODE(unpack_dyn_seq_of(mapped_qos_flows_to_add, bref, 1, 64, integer_packer(0, 63))); - } - if (mapped_qos_flows_to_release_present) { - HANDLE_CODE(unpack_dyn_seq_of(mapped_qos_flows_to_release, bref, 1, 64, integer_packer(0, 63))); + HANDLE_CODE(meas_ind.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void sdap_cfg_s::to_json(json_writer& j) const +void location_meas_ind_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("pdu-Session", pdu_session); - j.write_str("sdap-HeaderDL", sdap_hdr_dl.to_string()); - j.write_str("sdap-HeaderUL", sdap_hdr_ul.to_string()); - j.write_bool("defaultDRB", default_drb); - if (mapped_qos_flows_to_add_present) { - j.start_array("mappedQoS-FlowsToAdd"); - for (const auto& e1 : mapped_qos_flows_to_add) { - j.write_int(e1); - } - j.end_array(); + j.write_fieldname("measurementIndication"); + meas_ind.to_json(j); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (mapped_qos_flows_to_release_present) { - j.start_array("mappedQoS-FlowsToRelease"); - for (const auto& e1 : mapped_qos_flows_to_release) { - j.write_int(e1); - } - j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -std::string sdap_cfg_s::sdap_hdr_dl_opts::to_string() const +// MeasurementReport-IEs ::= SEQUENCE +SRSASN_CODE meas_report_ies_s::pack(bit_ref& bref) const { - static const char* options[] = {"present", "absent"}; - return convert_enum_idx(options, 2, value, "sdap_cfg_s::sdap_hdr_dl_e_"); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_results.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; } +SRSASN_CODE meas_report_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); -std::string sdap_cfg_s::sdap_hdr_ul_opts::to_string() const + HANDLE_CODE(meas_results.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_report_ies_s::to_json(json_writer& j) const { - static const char* options[] = {"present", "absent"}; - return convert_enum_idx(options, 2, value, "sdap_cfg_s::sdap_hdr_ul_e_"); + j.start_obj(); + j.write_fieldname("measResults"); + meas_results.to_json(j); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); } -// SchedulingRequestToAddMod ::= SEQUENCE -SRSASN_CODE sched_request_to_add_mod_s::pack(bit_ref& bref) const +// RRCReconfigurationComplete-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(sr_prohibit_timer_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(pack_integer(bref, sched_request_id, (uint8_t)0u, (uint8_t)7u)); - if (sr_prohibit_timer_present) { - HANDLE_CODE(sr_prohibit_timer.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } - HANDLE_CODE(sr_trans_max.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE sched_request_to_add_mod_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_recfg_complete_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(sr_prohibit_timer_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(unpack_integer(sched_request_id, bref, (uint8_t)0u, (uint8_t)7u)); - if (sr_prohibit_timer_present) { - HANDLE_CODE(sr_prohibit_timer.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } - HANDLE_CODE(sr_trans_max.unpack(bref)); return SRSASN_SUCCESS; } -void sched_request_to_add_mod_s::to_json(json_writer& j) const +void rrc_recfg_complete_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("schedulingRequestId", sched_request_id); - if (sr_prohibit_timer_present) { - j.write_str("sr-ProhibitTimer", sr_prohibit_timer.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } - j.write_str("sr-TransMax", sr_trans_max.to_string()); j.end_obj(); } -std::string sched_request_to_add_mod_s::sr_prohibit_timer_opts::to_string() const +// RRCReestablishmentComplete-IEs ::= SEQUENCE +SRSASN_CODE rrc_reest_complete_ies_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t sched_request_to_add_mod_s::sr_prohibit_timer_opts::to_number() const +SRSASN_CODE rrc_reest_complete_ies_s::unpack(cbit_ref& bref) { - 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_"); -} + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); -std::string sched_request_to_add_mod_s::sr_trans_max_opts::to_string() const -{ - 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_"); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t sched_request_to_add_mod_s::sr_trans_max_opts::to_number() const +void rrc_reest_complete_ies_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); } -// ServingCellConfigCommon ::= SEQUENCE -SRSASN_CODE serving_cell_cfg_common_s::pack(bit_ref& bref) const +// RRCResumeComplete-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_complete_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pci_present, 1)); - HANDLE_CODE(bref.pack(dl_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(ul_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(supplementary_ul_cfg_present, 1)); - HANDLE_CODE(bref.pack(n_timing_advance_offset_present, 1)); - HANDLE_CODE(bref.pack(ssb_positions_in_burst_present, 1)); - HANDLE_CODE(bref.pack(ssb_periodicity_serving_cell_present, 1)); - HANDLE_CODE(bref.pack(lte_crs_to_match_around_present, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(ssb_subcarrier_spacing_present, 1)); - HANDLE_CODE(bref.pack(tdd_ul_dl_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(ded_nas_msg_present, 1)); + HANDLE_CODE(bref.pack(sel_plmn_id_present, 1)); + HANDLE_CODE(bref.pack(ul_tx_direct_current_list_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (pci_present) { - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); - } - if (dl_cfg_common_present) { - HANDLE_CODE(dl_cfg_common.pack(bref)); - } - if (ul_cfg_common_present) { - HANDLE_CODE(ul_cfg_common.pack(bref)); - } - if (supplementary_ul_cfg_present) { - HANDLE_CODE(supplementary_ul_cfg.pack(bref)); - } - if (n_timing_advance_offset_present) { - HANDLE_CODE(n_timing_advance_offset.pack(bref)); + if (ded_nas_msg_present) { + HANDLE_CODE(ded_nas_msg.pack(bref)); } - if (ssb_positions_in_burst_present) { - HANDLE_CODE(ssb_positions_in_burst.pack(bref)); + if (sel_plmn_id_present) { + HANDLE_CODE(pack_integer(bref, sel_plmn_id, (uint8_t)1u, (uint8_t)12u)); } - if (ssb_periodicity_serving_cell_present) { - HANDLE_CODE(ssb_periodicity_serving_cell.pack(bref)); + if (ul_tx_direct_current_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_list, 1, 32)); } - HANDLE_CODE(dmrs_type_a_position.pack(bref)); - if (lte_crs_to_match_around_present) { - HANDLE_CODE(lte_crs_to_match_around.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } - if (rate_match_pattern_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_add_mod_list, 1, 4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_complete_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); + HANDLE_CODE(bref.unpack(sel_plmn_id_present, 1)); + HANDLE_CODE(bref.unpack(ul_tx_direct_current_list_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ded_nas_msg_present) { + HANDLE_CODE(ded_nas_msg.unpack(bref)); } - if (rate_match_pattern_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_release_list, 1, 4, integer_packer(0, 3))); + if (sel_plmn_id_present) { + HANDLE_CODE(unpack_integer(sel_plmn_id, bref, (uint8_t)1u, (uint8_t)12u)); } - if (ssb_subcarrier_spacing_present) { - HANDLE_CODE(ssb_subcarrier_spacing.pack(bref)); + if (ul_tx_direct_current_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_list, bref, 1, 32)); } - if (tdd_ul_dl_cfg_common_present) { - HANDLE_CODE(tdd_ul_dl_cfg_common.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - HANDLE_CODE(pack_integer(bref, ss_pbch_block_pwr, (int8_t)-60, (int8_t)50)); return SRSASN_SUCCESS; } -SRSASN_CODE serving_cell_cfg_common_s::unpack(cbit_ref& bref) +void rrc_resume_complete_ies_s::to_json(json_writer& j) const { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pci_present, 1)); - HANDLE_CODE(bref.unpack(dl_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(ul_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(supplementary_ul_cfg_present, 1)); - HANDLE_CODE(bref.unpack(n_timing_advance_offset_present, 1)); - HANDLE_CODE(bref.unpack(ssb_positions_in_burst_present, 1)); - HANDLE_CODE(bref.unpack(ssb_periodicity_serving_cell_present, 1)); - HANDLE_CODE(bref.unpack(lte_crs_to_match_around_present, 1)); - HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(rate_match_pattern_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(ssb_subcarrier_spacing_present, 1)); - HANDLE_CODE(bref.unpack(tdd_ul_dl_cfg_common_present, 1)); - - if (pci_present) { - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); - } - if (dl_cfg_common_present) { - HANDLE_CODE(dl_cfg_common.unpack(bref)); - } - if (ul_cfg_common_present) { - HANDLE_CODE(ul_cfg_common.unpack(bref)); + j.start_obj(); + if (ded_nas_msg_present) { + j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); } - if (supplementary_ul_cfg_present) { - HANDLE_CODE(supplementary_ul_cfg.unpack(bref)); + if (sel_plmn_id_present) { + j.write_int("selectedPLMN-Identity", sel_plmn_id); } - if (n_timing_advance_offset_present) { - HANDLE_CODE(n_timing_advance_offset.unpack(bref)); + if (ul_tx_direct_current_list_present) { + j.start_array("uplinkTxDirectCurrentList"); + for (const auto& e1 : ul_tx_direct_current_list) { + e1.to_json(j); + } + j.end_array(); } - if (ssb_positions_in_burst_present) { - HANDLE_CODE(ssb_positions_in_burst.unpack(bref)); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (ssb_periodicity_serving_cell_present) { - HANDLE_CODE(ssb_periodicity_serving_cell.unpack(bref)); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } - HANDLE_CODE(dmrs_type_a_position.unpack(bref)); - if (lte_crs_to_match_around_present) { - HANDLE_CODE(lte_crs_to_match_around.unpack(bref)); + j.end_obj(); +} + +// RRCSetupComplete-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_complete_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(registered_amf_present, 1)); + HANDLE_CODE(bref.pack(guami_type_present, 1)); + HANDLE_CODE(bref.pack(s_nssai_list_present, 1)); + HANDLE_CODE(bref.pack(ng_minus5_g_s_tmsi_value_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_integer(bref, sel_plmn_id, (uint8_t)1u, (uint8_t)12u)); + if (registered_amf_present) { + HANDLE_CODE(registered_amf.pack(bref)); } - if (rate_match_pattern_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_add_mod_list, bref, 1, 4)); + if (guami_type_present) { + HANDLE_CODE(guami_type.pack(bref)); } - if (rate_match_pattern_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_release_list, bref, 1, 4, integer_packer(0, 3))); + if (s_nssai_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_nssai_list, 1, 8)); } - if (ssb_subcarrier_spacing_present) { - HANDLE_CODE(ssb_subcarrier_spacing.unpack(bref)); + HANDLE_CODE(ded_nas_msg.pack(bref)); + if (ng_minus5_g_s_tmsi_value_present) { + HANDLE_CODE(ng_minus5_g_s_tmsi_value.pack(bref)); } - if (tdd_ul_dl_cfg_common_present) { - HANDLE_CODE(tdd_ul_dl_cfg_common.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } - HANDLE_CODE(unpack_integer(ss_pbch_block_pwr, bref, (int8_t)-60, (int8_t)50)); return SRSASN_SUCCESS; } -void serving_cell_cfg_common_s::to_json(json_writer& j) const +SRSASN_CODE rrc_setup_complete_ies_s::unpack(cbit_ref& bref) { - j.start_obj(); - if (pci_present) { - j.write_int("physCellId", pci); - } - if (dl_cfg_common_present) { - j.write_fieldname("downlinkConfigCommon"); - dl_cfg_common.to_json(j); + HANDLE_CODE(bref.unpack(registered_amf_present, 1)); + HANDLE_CODE(bref.unpack(guami_type_present, 1)); + HANDLE_CODE(bref.unpack(s_nssai_list_present, 1)); + HANDLE_CODE(bref.unpack(ng_minus5_g_s_tmsi_value_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_integer(sel_plmn_id, bref, (uint8_t)1u, (uint8_t)12u)); + if (registered_amf_present) { + HANDLE_CODE(registered_amf.unpack(bref)); } - if (ul_cfg_common_present) { - j.write_fieldname("uplinkConfigCommon"); - ul_cfg_common.to_json(j); + if (guami_type_present) { + HANDLE_CODE(guami_type.unpack(bref)); } - if (supplementary_ul_cfg_present) { - j.write_fieldname("supplementaryUplinkConfig"); - supplementary_ul_cfg.to_json(j); + if (s_nssai_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_nssai_list, bref, 1, 8)); } - if (n_timing_advance_offset_present) { - j.write_str("n-TimingAdvanceOffset", n_timing_advance_offset.to_string()); + HANDLE_CODE(ded_nas_msg.unpack(bref)); + if (ng_minus5_g_s_tmsi_value_present) { + HANDLE_CODE(ng_minus5_g_s_tmsi_value.unpack(bref)); } - if (ssb_positions_in_burst_present) { - j.write_fieldname("ssb-PositionsInBurst"); - ssb_positions_in_burst.to_json(j); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - if (ssb_periodicity_serving_cell_present) { - j.write_str("ssb-periodicityServingCell", ssb_periodicity_serving_cell.to_string()); + + return SRSASN_SUCCESS; +} +void rrc_setup_complete_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("selectedPLMN-Identity", sel_plmn_id); + if (registered_amf_present) { + j.write_fieldname("registeredAMF"); + registered_amf.to_json(j); } - j.write_str("dmrs-TypeA-Position", dmrs_type_a_position.to_string()); - if (lte_crs_to_match_around_present) { - j.write_fieldname("lte-CRS-ToMatchAround"); - lte_crs_to_match_around.to_json(j); + if (guami_type_present) { + j.write_str("guami-Type", guami_type.to_string()); } - if (rate_match_pattern_to_add_mod_list_present) { - j.start_array("rateMatchPatternToAddModList"); - for (const auto& e1 : rate_match_pattern_to_add_mod_list) { + if (s_nssai_list_present) { + j.start_array("s-NSSAI-List"); + for (const auto& e1 : s_nssai_list) { e1.to_json(j); } j.end_array(); } - if (rate_match_pattern_to_release_list_present) { - j.start_array("rateMatchPatternToReleaseList"); - for (const auto& e1 : rate_match_pattern_to_release_list) { - j.write_int(e1); - } - j.end_array(); + j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); + if (ng_minus5_g_s_tmsi_value_present) { + j.write_fieldname("ng-5G-S-TMSI-Value"); + ng_minus5_g_s_tmsi_value.to_json(j); } - if (ssb_subcarrier_spacing_present) { - j.write_str("ssbSubcarrierSpacing", ssb_subcarrier_spacing.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (tdd_ul_dl_cfg_common_present) { - j.write_fieldname("tdd-UL-DL-ConfigurationCommon"); - tdd_ul_dl_cfg_common.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } - j.write_int("ss-PBCH-BlockPower", ss_pbch_block_pwr); j.end_obj(); } -std::string serving_cell_cfg_common_s::n_timing_advance_offset_opts::to_string() const -{ - 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 +std::string rrc_setup_complete_ies_s::guami_type_opts::to_string() const { - 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_"); + static const char* options[] = {"native", "mapped"}; + return convert_enum_idx(options, 2, value, "rrc_setup_complete_ies_s::guami_type_e_"); } -void serving_cell_cfg_common_s::ssb_positions_in_burst_c_::destroy_() +void rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::destroy_() { switch (type_) { - case types::short_bitmap: - c.destroy >(); - break; - case types::medium_bitmap: - c.destroy >(); + case types::ng_minus5_g_s_tmsi: + c.destroy >(); break; - case types::long_bitmap: - c.destroy >(); + case types::ng_minus5_g_s_tmsi_part2: + c.destroy >(); break; default: break; } } -void serving_cell_cfg_common_s::ssb_positions_in_burst_c_::set(types::options e) +void rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::short_bitmap: - c.init >(); - break; - case types::medium_bitmap: - c.init >(); + case types::ng_minus5_g_s_tmsi: + c.init >(); break; - case types::long_bitmap: - c.init >(); + case types::ng_minus5_g_s_tmsi_part2: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); } } -serving_cell_cfg_common_s::ssb_positions_in_burst_c_::ssb_positions_in_burst_c_( - const serving_cell_cfg_common_s::ssb_positions_in_burst_c_& other) +rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::ng_minus5_g_s_tmsi_value_c_( + const rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_& other) { type_ = other.type(); switch (type_) { - case types::short_bitmap: - c.init(other.c.get >()); - break; - case types::medium_bitmap: - c.init(other.c.get >()); + case types::ng_minus5_g_s_tmsi: + c.init(other.c.get >()); break; - case types::long_bitmap: - c.init(other.c.get >()); + case types::ng_minus5_g_s_tmsi_part2: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); } } -serving_cell_cfg_common_s::ssb_positions_in_burst_c_& serving_cell_cfg_common_s::ssb_positions_in_burst_c_:: - operator=(const serving_cell_cfg_common_s::ssb_positions_in_burst_c_& other) +rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_& rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::operator=( + const rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::short_bitmap: - c.set(other.c.get >()); - break; - case types::medium_bitmap: - c.set(other.c.get >()); + case types::ng_minus5_g_s_tmsi: + c.set(other.c.get >()); break; - case types::long_bitmap: - c.set(other.c.get >()); + case types::ng_minus5_g_s_tmsi_part2: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); } return *this; } -void serving_cell_cfg_common_s::ssb_positions_in_burst_c_::to_json(json_writer& j) const +void rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::short_bitmap: - j.write_str("shortBitmap", c.get >().to_string()); - break; - case types::medium_bitmap: - j.write_str("mediumBitmap", c.get >().to_string()); + case types::ng_minus5_g_s_tmsi: + j.write_str("ng-5G-S-TMSI", c.get >().to_string()); break; - case types::long_bitmap: - j.write_str("longBitmap", c.get >().to_string()); + case types::ng_minus5_g_s_tmsi_part2: + j.write_str("ng-5G-S-TMSI-Part2", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); } j.end_obj(); } -SRSASN_CODE serving_cell_cfg_common_s::ssb_positions_in_burst_c_::pack(bit_ref& bref) const +SRSASN_CODE rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::short_bitmap: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::medium_bitmap: - HANDLE_CODE(c.get >().pack(bref)); + case types::ng_minus5_g_s_tmsi: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::long_bitmap: - HANDLE_CODE(c.get >().pack(bref)); + case types::ng_minus5_g_s_tmsi_part2: + HANDLE_CODE(c.get >().pack(bref)); break; default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE serving_cell_cfg_common_s::ssb_positions_in_burst_c_::unpack(cbit_ref& bref) +SRSASN_CODE rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::short_bitmap: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::medium_bitmap: - HANDLE_CODE(c.get >().unpack(bref)); + case types::ng_minus5_g_s_tmsi: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::long_bitmap: - HANDLE_CODE(c.get >().unpack(bref)); + case types::ng_minus5_g_s_tmsi_part2: + HANDLE_CODE(c.get >().unpack(bref)); break; default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string serving_cell_cfg_common_s::ssb_positions_in_burst_c_::types_opts::to_string() const -{ - 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 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 +std::string rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::types_opts::to_string() const { - 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_"); + 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"); } -std::string serving_cell_cfg_common_s::dmrs_type_a_position_opts::to_string() const -{ - 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 +// SCGFailureInformation-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_ies_s::pack(bit_ref& bref) const { - static const uint8_t options[] = {2, 3}; - return map_enum_number(options, 2, value, "serving_cell_cfg_common_s::dmrs_type_a_position_e_"); -} + HANDLE_CODE(bref.pack(fail_report_scg_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); -// TAG ::= SEQUENCE -SRSASN_CODE tag_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, tag_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(time_align_timer.pack(bref)); + if (fail_report_scg_present) { + HANDLE_CODE(fail_report_scg.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE tag_s::unpack(cbit_ref& bref) +SRSASN_CODE scg_fail_info_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(tag_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(time_align_timer.unpack(bref)); + HANDLE_CODE(bref.unpack(fail_report_scg_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fail_report_scg_present) { + HANDLE_CODE(fail_report_scg.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } -void tag_s::to_json(json_writer& j) const +void scg_fail_info_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("tag-Id", tag_id); - j.write_str("timeAlignmentTimer", time_align_timer.to_string()); + if (fail_report_scg_present) { + j.write_fieldname("failureReportSCG"); + fail_report_scg.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } j.end_obj(); } -// TDD-UL-DL-ConfigDedicated ::= SEQUENCE -SRSASN_CODE tdd_ul_dl_cfg_ded_s::pack(bit_ref& bref) const +// SCGFailureInformationEUTRA-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_eutra_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(slot_specific_cfgs_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(slot_specific_cfgs_torelease_list_present, 1)); + HANDLE_CODE(bref.pack(fail_report_scg_eutra_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (slot_specific_cfgs_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, slot_specific_cfgs_to_add_mod_list, 1, 320)); + if (fail_report_scg_eutra_present) { + HANDLE_CODE(fail_report_scg_eutra.pack(bref)); } - if (slot_specific_cfgs_torelease_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, slot_specific_cfgs_torelease_list, 1, 320, integer_packer(0, 319))); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE tdd_ul_dl_cfg_ded_s::unpack(cbit_ref& bref) +SRSASN_CODE scg_fail_info_eutra_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(slot_specific_cfgs_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(slot_specific_cfgs_torelease_list_present, 1)); + HANDLE_CODE(bref.unpack(fail_report_scg_eutra_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (slot_specific_cfgs_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(slot_specific_cfgs_to_add_mod_list, bref, 1, 320)); + if (fail_report_scg_eutra_present) { + HANDLE_CODE(fail_report_scg_eutra.unpack(bref)); } - if (slot_specific_cfgs_torelease_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(slot_specific_cfgs_torelease_list, bref, 1, 320, integer_packer(0, 319))); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void tdd_ul_dl_cfg_ded_s::to_json(json_writer& j) const +void scg_fail_info_eutra_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (slot_specific_cfgs_to_add_mod_list_present) { - j.start_array("slotSpecificConfigurationsToAddModList"); - for (const auto& e1 : slot_specific_cfgs_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); + if (fail_report_scg_eutra_present) { + j.write_fieldname("failureReportSCG-EUTRA"); + fail_report_scg_eutra.to_json(j); } - if (slot_specific_cfgs_torelease_list_present) { - j.start_array("slotSpecificConfigurationsToreleaseList"); - for (const auto& e1 : slot_specific_cfgs_torelease_list) { - j.write_int(e1); - } - j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } j.end_obj(); } -// UL-AM-RLC ::= SEQUENCE -SRSASN_CODE ul_am_rlc_s::pack(bit_ref& bref) const +// SecurityModeComplete-IEs ::= SEQUENCE +SRSASN_CODE security_mode_complete_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(sn_field_len_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (sn_field_len_present) { - HANDLE_CODE(sn_field_len.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } - HANDLE_CODE(t_poll_retx.pack(bref)); - HANDLE_CODE(poll_pdu.pack(bref)); - HANDLE_CODE(poll_byte.pack(bref)); - HANDLE_CODE(max_retx_thres.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ul_am_rlc_s::unpack(cbit_ref& bref) +SRSASN_CODE security_mode_complete_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(sn_field_len_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (sn_field_len_present) { - HANDLE_CODE(sn_field_len.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - HANDLE_CODE(t_poll_retx.unpack(bref)); - HANDLE_CODE(poll_pdu.unpack(bref)); - HANDLE_CODE(poll_byte.unpack(bref)); - HANDLE_CODE(max_retx_thres.unpack(bref)); return SRSASN_SUCCESS; } -void ul_am_rlc_s::to_json(json_writer& j) const +void security_mode_complete_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (sn_field_len_present) { - j.write_str("sn-FieldLength", sn_field_len.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } - j.write_str("t-PollRetransmit", t_poll_retx.to_string()); - j.write_str("pollPDU", poll_pdu.to_string()); - j.write_str("pollByte", poll_byte.to_string()); - j.write_str("maxRetxThreshold", max_retx_thres.to_string()); j.end_obj(); } -std::string ul_am_rlc_s::max_retx_thres_opts::to_string() const -{ - 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 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 -SRSASN_CODE ul_um_rlc_s::pack(bit_ref& bref) const +// SecurityModeFailure-IEs ::= SEQUENCE +SRSASN_CODE security_mode_fail_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(sn_field_len_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (sn_field_len_present) { - HANDLE_CODE(sn_field_len.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE ul_um_rlc_s::unpack(cbit_ref& bref) +SRSASN_CODE security_mode_fail_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(sn_field_len_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (sn_field_len_present) { - HANDLE_CODE(sn_field_len.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void ul_um_rlc_s::to_json(json_writer& j) const +void security_mode_fail_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (sn_field_len_present) { - j.write_str("sn-FieldLength", sn_field_len.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -// UplinkConfig ::= SEQUENCE -SRSASN_CODE ul_cfg_s::pack(bit_ref& bref) const +// UEAssistanceInformation-IEs ::= SEQUENCE +SRSASN_CODE ueassist_info_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(init_ul_bwp_present, 1)); - HANDLE_CODE(bref.pack(ul_bwp_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(ul_bwp_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(first_active_ul_bwp_id_present, 1)); - HANDLE_CODE(bref.pack(pusch_serving_cell_cfg_present, 1)); - HANDLE_CODE(bref.pack(carrier_switching_present, 1)); + HANDLE_CODE(bref.pack(delay_budget_report_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (init_ul_bwp_present) { - HANDLE_CODE(init_ul_bwp.pack(bref)); - } - if (ul_bwp_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_bwp_to_release_list, 1, 4, integer_packer(0, 4))); - } - if (ul_bwp_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_bwp_to_add_mod_list, 1, 4)); - } - if (first_active_ul_bwp_id_present) { - HANDLE_CODE(pack_integer(bref, first_active_ul_bwp_id, (uint8_t)0u, (uint8_t)4u)); + if (delay_budget_report_present) { + HANDLE_CODE(delay_budget_report.pack(bref)); } - if (pusch_serving_cell_cfg_present) { - HANDLE_CODE(pusch_serving_cell_cfg.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } - if (carrier_switching_present) { - HANDLE_CODE(carrier_switching.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= pwr_boost_pi2_bpsk_present; - group_flags[0] |= ul_ch_bw_per_scs_list.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pwr_boost_pi2_bpsk_present, 1)); - HANDLE_CODE(bref.pack(ul_ch_bw_per_scs_list.is_present(), 1)); - if (pwr_boost_pi2_bpsk_present) { - HANDLE_CODE(bref.pack(pwr_boost_pi2_bpsk, 1)); - } - if (ul_ch_bw_per_scs_list.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *ul_ch_bw_per_scs_list, 1, 5)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE ul_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE ueassist_info_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(init_ul_bwp_present, 1)); - HANDLE_CODE(bref.unpack(ul_bwp_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(ul_bwp_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(first_active_ul_bwp_id_present, 1)); - HANDLE_CODE(bref.unpack(pusch_serving_cell_cfg_present, 1)); - HANDLE_CODE(bref.unpack(carrier_switching_present, 1)); + HANDLE_CODE(bref.unpack(delay_budget_report_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (init_ul_bwp_present) { - HANDLE_CODE(init_ul_bwp.unpack(bref)); - } - if (ul_bwp_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_bwp_to_release_list, bref, 1, 4, integer_packer(0, 4))); - } - if (ul_bwp_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_bwp_to_add_mod_list, bref, 1, 4)); - } - if (first_active_ul_bwp_id_present) { - HANDLE_CODE(unpack_integer(first_active_ul_bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); + if (delay_budget_report_present) { + HANDLE_CODE(delay_budget_report.unpack(bref)); } - if (pusch_serving_cell_cfg_present) { - HANDLE_CODE(pusch_serving_cell_cfg.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } - if (carrier_switching_present) { - HANDLE_CODE(carrier_switching.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(pwr_boost_pi2_bpsk_present, 1)); - bool ul_ch_bw_per_scs_list_present; - HANDLE_CODE(bref.unpack(ul_ch_bw_per_scs_list_present, 1)); - ul_ch_bw_per_scs_list.set_present(ul_ch_bw_per_scs_list_present); - if (pwr_boost_pi2_bpsk_present) { - HANDLE_CODE(bref.unpack(pwr_boost_pi2_bpsk, 1)); - } - if (ul_ch_bw_per_scs_list.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*ul_ch_bw_per_scs_list, bref, 1, 5)); - } - } - } return SRSASN_SUCCESS; } -void ul_cfg_s::to_json(json_writer& j) const +void ueassist_info_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (init_ul_bwp_present) { - j.write_fieldname("initialUplinkBWP"); - init_ul_bwp.to_json(j); - } - if (ul_bwp_to_release_list_present) { - j.start_array("uplinkBWP-ToReleaseList"); - 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 (const auto& e1 : ul_bwp_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } - if (first_active_ul_bwp_id_present) { - j.write_int("firstActiveUplinkBWP-Id", first_active_ul_bwp_id); - } - if (pusch_serving_cell_cfg_present) { - j.write_fieldname("pusch-ServingCellConfig"); - pusch_serving_cell_cfg.to_json(j); + if (delay_budget_report_present) { + j.write_fieldname("delayBudgetReport"); + delay_budget_report.to_json(j); } - if (carrier_switching_present) { - j.write_fieldname("carrierSwitching"); - carrier_switching.to_json(j); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (ext) { - if (pwr_boost_pi2_bpsk_present) { - j.write_bool("powerBoostPi2BPSK", pwr_boost_pi2_bpsk); - } - if (ul_ch_bw_per_scs_list.is_present()) { - j.start_array("uplinkChannelBW-PerSCS-List"); - for (const auto& e1 : *ul_ch_bw_per_scs_list) { - e1.to_json(j); - } - j.end_array(); - } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } j.end_obj(); } -// BSR-Config ::= SEQUENCE -SRSASN_CODE bsr_cfg_s::pack(bit_ref& bref) const +// UECapabilityInformation-IEs ::= SEQUENCE +SRSASN_CODE ue_cap_info_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(lc_ch_sr_delay_timer_present, 1)); + HANDLE_CODE(bref.pack(ue_cap_rat_container_list_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(periodic_bsr_timer.pack(bref)); - HANDLE_CODE(retx_bsr_timer.pack(bref)); - if (lc_ch_sr_delay_timer_present) { - HANDLE_CODE(lc_ch_sr_delay_timer.pack(bref)); + if (ue_cap_rat_container_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ue_cap_rat_container_list, 0, 8)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE bsr_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_info_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(lc_ch_sr_delay_timer_present, 1)); + HANDLE_CODE(bref.unpack(ue_cap_rat_container_list_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(periodic_bsr_timer.unpack(bref)); - HANDLE_CODE(retx_bsr_timer.unpack(bref)); - if (lc_ch_sr_delay_timer_present) { - HANDLE_CODE(lc_ch_sr_delay_timer.unpack(bref)); + if (ue_cap_rat_container_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ue_cap_rat_container_list, bref, 0, 8)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void bsr_cfg_s::to_json(json_writer& j) const +void ue_cap_info_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("periodicBSR-Timer", periodic_bsr_timer.to_string()); - j.write_str("retxBSR-Timer", retx_bsr_timer.to_string()); - if (lc_ch_sr_delay_timer_present) { - j.write_str("logicalChannelSR-DelayTimer", lc_ch_sr_delay_timer.to_string()); + if (ue_cap_rat_container_list_present) { + j.start_array("ue-CapabilityRAT-ContainerList"); + for (const auto& e1 : ue_cap_rat_container_list) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -std::string bsr_cfg_s::periodic_bsr_timer_opts::to_string() const -{ - 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 +// ULInformationTransfer-IEs ::= SEQUENCE +SRSASN_CODE ul_info_transfer_ies_s::pack(bit_ref& bref) const { - 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_"); -} + HANDLE_CODE(bref.pack(ded_nas_msg_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); -std::string bsr_cfg_s::retx_bsr_timer_opts::to_string() const -{ - 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_"); + if (ded_nas_msg_present) { + HANDLE_CODE(ded_nas_msg.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; } -uint16_t bsr_cfg_s::retx_bsr_timer_opts::to_number() const +SRSASN_CODE ul_info_transfer_ies_s::unpack(cbit_ref& bref) { - 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_"); -} + HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); -std::string bsr_cfg_s::lc_ch_sr_delay_timer_opts::to_string() const -{ - 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_"); + if (ded_nas_msg_present) { + HANDLE_CODE(ded_nas_msg.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; } -uint16_t bsr_cfg_s::lc_ch_sr_delay_timer_opts::to_number() const +void ul_info_transfer_ies_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + if (ded_nas_msg_present) { + j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); } -// DRB-ToAddMod ::= SEQUENCE -SRSASN_CODE drb_to_add_mod_s::pack(bit_ref& bref) const +// ULInformationTransferMRDC-IEs ::= SEQUENCE +SRSASN_CODE ul_info_transfer_mrdc_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cn_assoc_present, 1)); - HANDLE_CODE(bref.pack(reestablish_pdcp_present, 1)); - HANDLE_CODE(bref.pack(recover_pdcp_present, 1)); - HANDLE_CODE(bref.pack(pdcp_cfg_present, 1)); + HANDLE_CODE(bref.pack(ul_dcch_msg_nr_present, 1)); + HANDLE_CODE(bref.pack(ul_dcch_msg_eutra_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (cn_assoc_present) { - HANDLE_CODE(cn_assoc.pack(bref)); + if (ul_dcch_msg_nr_present) { + HANDLE_CODE(ul_dcch_msg_nr.pack(bref)); } - HANDLE_CODE(pack_integer(bref, drb_id, (uint8_t)1u, (uint8_t)32u)); - if (pdcp_cfg_present) { - HANDLE_CODE(pdcp_cfg.pack(bref)); + if (ul_dcch_msg_eutra_present) { + HANDLE_CODE(ul_dcch_msg_eutra.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE drb_to_add_mod_s::unpack(cbit_ref& bref) +SRSASN_CODE ul_info_transfer_mrdc_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cn_assoc_present, 1)); - HANDLE_CODE(bref.unpack(reestablish_pdcp_present, 1)); - HANDLE_CODE(bref.unpack(recover_pdcp_present, 1)); - HANDLE_CODE(bref.unpack(pdcp_cfg_present, 1)); + HANDLE_CODE(bref.unpack(ul_dcch_msg_nr_present, 1)); + HANDLE_CODE(bref.unpack(ul_dcch_msg_eutra_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (cn_assoc_present) { - HANDLE_CODE(cn_assoc.unpack(bref)); + if (ul_dcch_msg_nr_present) { + HANDLE_CODE(ul_dcch_msg_nr.unpack(bref)); } - HANDLE_CODE(unpack_integer(drb_id, bref, (uint8_t)1u, (uint8_t)32u)); - if (pdcp_cfg_present) { - HANDLE_CODE(pdcp_cfg.unpack(bref)); + if (ul_dcch_msg_eutra_present) { + HANDLE_CODE(ul_dcch_msg_eutra.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void drb_to_add_mod_s::to_json(json_writer& j) const +void ul_info_transfer_mrdc_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (cn_assoc_present) { - j.write_fieldname("cnAssociation"); - cn_assoc.to_json(j); + if (ul_dcch_msg_nr_present) { + j.write_str("ul-DCCH-MessageNR", ul_dcch_msg_nr.to_string()); } - j.write_int("drb-Identity", drb_id); - if (reestablish_pdcp_present) { - j.write_str("reestablishPDCP", "true"); + if (ul_dcch_msg_eutra_present) { + j.write_str("ul-DCCH-MessageEUTRA", ul_dcch_msg_eutra.to_string()); } - if (recover_pdcp_present) { - j.write_str("recoverPDCP", "true"); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (pdcp_cfg_present) { - j.write_fieldname("pdcp-Config"); - pdcp_cfg.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -void drb_to_add_mod_s::cn_assoc_c_::destroy_() +// CounterCheckResponse ::= SEQUENCE +SRSASN_CODE counter_check_resp_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_resp_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void counter_check_resp_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void counter_check_resp_s::crit_exts_c_::destroy_() { switch (type_) { - case types::sdap_cfg: - c.destroy(); + case types::counter_check_resp: + c.destroy(); break; default: break; } } -void drb_to_add_mod_s::cn_assoc_c_::set(types::options e) +void counter_check_resp_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::eps_bearer_id: + case types::counter_check_resp: + c.init(); break; - case types::sdap_cfg: - c.init(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); } } -drb_to_add_mod_s::cn_assoc_c_::cn_assoc_c_(const drb_to_add_mod_s::cn_assoc_c_& other) +counter_check_resp_s::crit_exts_c_::crit_exts_c_(const counter_check_resp_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::eps_bearer_id: - c.init(other.c.get()); + case types::counter_check_resp: + c.init(other.c.get()); break; - case types::sdap_cfg: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); } } -drb_to_add_mod_s::cn_assoc_c_& drb_to_add_mod_s::cn_assoc_c_::operator=(const drb_to_add_mod_s::cn_assoc_c_& other) +counter_check_resp_s::crit_exts_c_& +counter_check_resp_s::crit_exts_c_::operator=(const counter_check_resp_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::eps_bearer_id: - c.set(other.c.get()); + case types::counter_check_resp: + c.set(other.c.get()); break; - case types::sdap_cfg: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); } return *this; } -void drb_to_add_mod_s::cn_assoc_c_::to_json(json_writer& j) const +void counter_check_resp_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::eps_bearer_id: - j.write_int("eps-BearerIdentity", c.get()); + case types::counter_check_resp: + j.write_fieldname("counterCheckResponse"); + c.get().to_json(j); break; - case types::sdap_cfg: - j.write_fieldname("sdap-Config"); - c.get().to_json(j); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE drb_to_add_mod_s::cn_assoc_c_::pack(bit_ref& bref) const +SRSASN_CODE counter_check_resp_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::eps_bearer_id: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + case types::counter_check_resp: + HANDLE_CODE(c.get().pack(bref)); break; - case types::sdap_cfg: - HANDLE_CODE(c.get().pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE drb_to_add_mod_s::cn_assoc_c_::unpack(cbit_ref& bref) +SRSASN_CODE counter_check_resp_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::eps_bearer_id: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + case types::counter_check_resp: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::sdap_cfg: - HANDLE_CODE(c.get().unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string drb_to_add_mod_s::cn_assoc_c_::types_opts::to_string() const +std::string counter_check_resp_s::crit_exts_c_::types_opts::to_string() const { - static const char* options[] = {"eps-BearerIdentity", "sdap-Config"}; - return convert_enum_idx(options, 2, value, "drb_to_add_mod_s::cn_assoc_c_::types"); + static const char* options[] = {"counterCheckResponse", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "counter_check_resp_s::crit_exts_c_::types"); } -// DRX-Config ::= SEQUENCE -SRSASN_CODE drx_cfg_s::pack(bit_ref& bref) const +// FailureInformation ::= SEQUENCE +SRSASN_CODE fail_info_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(short_drx_present, 1)); - - HANDLE_CODE(drx_on_dur_timer.pack(bref)); - HANDLE_CODE(drx_inactivity_timer.pack(bref)); - HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_dl, (uint8_t)0u, (uint8_t)56u)); - HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_ul, (uint8_t)0u, (uint8_t)56u)); - HANDLE_CODE(drx_retx_timer_dl.pack(bref)); - HANDLE_CODE(drx_retx_timer_ul.pack(bref)); - HANDLE_CODE(drx_long_cycle_start_offset.pack(bref)); - if (short_drx_present) { - HANDLE_CODE(short_drx.drx_short_cycle.pack(bref)); - HANDLE_CODE(pack_integer(bref, short_drx.drx_short_cycle_timer, (uint8_t)1u, (uint8_t)16u)); - } - HANDLE_CODE(pack_integer(bref, drx_slot_offset, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE drx_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE fail_info_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(short_drx_present, 1)); - - HANDLE_CODE(drx_on_dur_timer.unpack(bref)); - HANDLE_CODE(drx_inactivity_timer.unpack(bref)); - HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_dl, bref, (uint8_t)0u, (uint8_t)56u)); - HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_ul, bref, (uint8_t)0u, (uint8_t)56u)); - HANDLE_CODE(drx_retx_timer_dl.unpack(bref)); - HANDLE_CODE(drx_retx_timer_ul.unpack(bref)); - HANDLE_CODE(drx_long_cycle_start_offset.unpack(bref)); - if (short_drx_present) { - HANDLE_CODE(short_drx.drx_short_cycle.unpack(bref)); - HANDLE_CODE(unpack_integer(short_drx.drx_short_cycle_timer, bref, (uint8_t)1u, (uint8_t)16u)); - } - HANDLE_CODE(unpack_integer(drx_slot_offset, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void drx_cfg_s::to_json(json_writer& j) const +void fail_info_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("drx-onDurationTimer"); - drx_on_dur_timer.to_json(j); - j.write_str("drx-InactivityTimer", drx_inactivity_timer.to_string()); - j.write_int("drx-HARQ-RTT-TimerDL", drx_harq_rtt_timer_dl); - j.write_int("drx-HARQ-RTT-TimerUL", drx_harq_rtt_timer_ul); - j.write_str("drx-RetransmissionTimerDL", drx_retx_timer_dl.to_string()); - j.write_str("drx-RetransmissionTimerUL", drx_retx_timer_ul.to_string()); - j.write_fieldname("drx-LongCycleStartOffset"); - drx_long_cycle_start_offset.to_json(j); - if (short_drx_present) { - j.write_fieldname("shortDRX"); - j.start_obj(); - j.write_str("drx-ShortCycle", short_drx.drx_short_cycle.to_string()); - j.write_int("drx-ShortCycleTimer", short_drx.drx_short_cycle_timer); - j.end_obj(); - } - j.write_int("drx-SlotOffset", drx_slot_offset); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -void drx_cfg_s::drx_on_dur_timer_c_::destroy_() {} -void drx_cfg_s::drx_on_dur_timer_c_::set(types::options e) +void fail_info_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::fail_info: + c.destroy(); + break; + default: + break; + } +} +void fail_info_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; + switch (type_) { + case types::fail_info: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); + } } -drx_cfg_s::drx_on_dur_timer_c_::drx_on_dur_timer_c_(const drx_cfg_s::drx_on_dur_timer_c_& other) +fail_info_s::crit_exts_c_::crit_exts_c_(const fail_info_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::sub_milli_seconds: - c.init(other.c.get()); + case types::fail_info: + c.init(other.c.get()); break; - case types::milli_seconds: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); } } -drx_cfg_s::drx_on_dur_timer_c_& drx_cfg_s::drx_on_dur_timer_c_::operator=(const drx_cfg_s::drx_on_dur_timer_c_& other) +fail_info_s::crit_exts_c_& fail_info_s::crit_exts_c_::operator=(const fail_info_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::sub_milli_seconds: - c.set(other.c.get()); + case types::fail_info: + c.set(other.c.get()); break; - case types::milli_seconds: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); } return *this; } -void drx_cfg_s::drx_on_dur_timer_c_::to_json(json_writer& j) const +void fail_info_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::sub_milli_seconds: - j.write_int("subMilliSeconds", c.get()); + case types::fail_info: + j.write_fieldname("failureInformation"); + c.get().to_json(j); break; - case types::milli_seconds: - j.write_str("milliSeconds", c.get().to_string()); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE drx_cfg_s::drx_on_dur_timer_c_::pack(bit_ref& bref) const +SRSASN_CODE fail_info_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::sub_milli_seconds: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)31u)); + case types::fail_info: + HANDLE_CODE(c.get().pack(bref)); break; - case types::milli_seconds: - HANDLE_CODE(c.get().pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE drx_cfg_s::drx_on_dur_timer_c_::unpack(cbit_ref& bref) +SRSASN_CODE fail_info_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::sub_milli_seconds: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)31u)); + case types::fail_info: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::milli_seconds: - HANDLE_CODE(c.get().unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_opts::to_string() const -{ - 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 +std::string fail_info_s::crit_exts_c_::types_opts::to_string() const { - 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_"); + static const char* options[] = {"failureInformation", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "fail_info_s::crit_exts_c_::types"); } -std::string drx_cfg_s::drx_on_dur_timer_c_::types_opts::to_string() const +// LocationMeasurementIndication ::= SEQUENCE +SRSASN_CODE location_meas_ind_s::pack(bit_ref& bref) const { - static const char* options[] = {"subMilliSeconds", "milliSeconds"}; - return convert_enum_idx(options, 2, value, "drx_cfg_s::drx_on_dur_timer_c_::types"); -} + HANDLE_CODE(crit_exts.pack(bref)); -std::string drx_cfg_s::drx_inactivity_timer_opts::to_string() const -{ - 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_"); + return SRSASN_SUCCESS; } -uint16_t drx_cfg_s::drx_inactivity_timer_opts::to_number() const +SRSASN_CODE location_meas_ind_s::unpack(cbit_ref& bref) { - 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_"); -} + HANDLE_CODE(crit_exts.unpack(bref)); -std::string drx_cfg_s::drx_retx_timer_dl_opts::to_string() const -{ - 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_"); + return SRSASN_SUCCESS; } -uint16_t drx_cfg_s::drx_retx_timer_dl_opts::to_number() const +void location_meas_ind_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); } -std::string drx_cfg_s::drx_retx_timer_ul_opts::to_string() const -{ - 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 +void location_meas_ind_s::crit_exts_c_::destroy_() { - 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_"); + switch (type_) { + case types::location_meas_ind: + c.destroy(); + break; + default: + break; + } } - -void drx_cfg_s::drx_long_cycle_start_offset_c_::destroy_() {} -void drx_cfg_s::drx_long_cycle_start_offset_c_::set(types::options e) +void location_meas_ind_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; -} -drx_cfg_s::drx_long_cycle_start_offset_c_::drx_long_cycle_start_offset_c_( - const drx_cfg_s::drx_long_cycle_start_offset_c_& other) -{ - type_ = other.type(); switch (type_) { - case types::ms10: - c.init(other.c.get()); - break; - case types::ms20: - c.init(other.c.get()); - break; - case types::ms32: - c.init(other.c.get()); - break; - case types::ms40: - c.init(other.c.get()); - break; - case types::ms60: - c.init(other.c.get()); - break; - case types::ms64: - c.init(other.c.get()); - break; - case types::ms70: - c.init(other.c.get()); - break; - case types::ms80: - c.init(other.c.get()); - break; - case types::ms128: - c.init(other.c.get()); - break; - case types::ms160: - c.init(other.c.get()); - break; - case types::ms256: - c.init(other.c.get()); - break; - case types::ms320: - c.init(other.c.get()); - break; - case types::ms512: - c.init(other.c.get()); - break; - case types::ms640: - c.init(other.c.get()); - break; - case types::ms1024: - c.init(other.c.get()); - break; - case types::ms1280: - c.init(other.c.get()); + case types::location_meas_ind: + c.init(); break; - case types::ms2048: - c.init(other.c.get()); + case types::crit_exts_future: break; - case types::ms2560: - c.init(other.c.get()); + case types::nulltype: break; - case types::ms5120: - c.init(other.c.get()); + default: + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); + } +} +location_meas_ind_s::crit_exts_c_::crit_exts_c_(const location_meas_ind_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::location_meas_ind: + c.init(other.c.get()); break; - case types::ms10240: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); } } -drx_cfg_s::drx_long_cycle_start_offset_c_& drx_cfg_s::drx_long_cycle_start_offset_c_:: - operator=(const drx_cfg_s::drx_long_cycle_start_offset_c_& other) +location_meas_ind_s::crit_exts_c_& +location_meas_ind_s::crit_exts_c_::operator=(const location_meas_ind_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ms10: - c.set(other.c.get()); - break; - case types::ms20: - c.set(other.c.get()); - break; - case types::ms32: - c.set(other.c.get()); - break; - case types::ms40: - c.set(other.c.get()); - break; - case types::ms60: - c.set(other.c.get()); - break; - case types::ms64: - c.set(other.c.get()); - break; - case types::ms70: - c.set(other.c.get()); - break; - case types::ms80: - c.set(other.c.get()); - break; - case types::ms128: - c.set(other.c.get()); - break; - case types::ms160: - c.set(other.c.get()); - break; - case types::ms256: - c.set(other.c.get()); - break; - case types::ms320: - c.set(other.c.get()); - break; - case types::ms512: - c.set(other.c.get()); - break; - case types::ms640: - c.set(other.c.get()); - break; - case types::ms1024: - c.set(other.c.get()); - break; - case types::ms1280: - c.set(other.c.get()); - break; - case types::ms2048: - c.set(other.c.get()); - break; - case types::ms2560: - c.set(other.c.get()); - break; - case types::ms5120: - c.set(other.c.get()); + case types::location_meas_ind: + c.set(other.c.get()); break; - case types::ms10240: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); } return *this; } -void drx_cfg_s::drx_long_cycle_start_offset_c_::to_json(json_writer& j) const +void location_meas_ind_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ms10: - j.write_int("ms10", c.get()); - break; - case types::ms20: - j.write_int("ms20", c.get()); - break; - case types::ms32: - j.write_int("ms32", c.get()); - break; - case types::ms40: - j.write_int("ms40", c.get()); - break; - case types::ms60: - j.write_int("ms60", c.get()); - break; - case types::ms64: - j.write_int("ms64", c.get()); - break; - case types::ms70: - j.write_int("ms70", c.get()); - break; - case types::ms80: - j.write_int("ms80", c.get()); - break; - case types::ms128: - j.write_int("ms128", c.get()); - break; - case types::ms160: - j.write_int("ms160", c.get()); - break; - case types::ms256: - j.write_int("ms256", c.get()); - break; - case types::ms320: - j.write_int("ms320", c.get()); - break; - case types::ms512: - j.write_int("ms512", c.get()); - break; - case types::ms640: - j.write_int("ms640", c.get()); - break; - case types::ms1024: - j.write_int("ms1024", c.get()); - break; - case types::ms1280: - j.write_int("ms1280", c.get()); - break; - case types::ms2048: - j.write_int("ms2048", c.get()); - break; - case types::ms2560: - j.write_int("ms2560", c.get()); - break; - case types::ms5120: - j.write_int("ms5120", c.get()); + case types::location_meas_ind: + j.write_fieldname("locationMeasurementIndication"); + c.get().to_json(j); break; - case types::ms10240: - j.write_int("ms10240", c.get()); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE drx_cfg_s::drx_long_cycle_start_offset_c_::pack(bit_ref& bref) const +SRSASN_CODE location_meas_ind_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ms10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::ms20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::ms32: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); - break; - case types::ms40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::ms60: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)59u)); - break; - case types::ms64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::ms70: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)69u)); - break; - case types::ms80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::ms128: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - case types::ms160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::ms256: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); - break; - case types::ms320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::ms512: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)511u)); - break; - case types::ms640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::ms1024: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1023u)); - break; - case types::ms1280: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); - break; - case types::ms2048: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2047u)); - break; - case types::ms2560: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); - break; - case types::ms5120: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + case types::location_meas_ind: + HANDLE_CODE(c.get().pack(bref)); break; - case types::ms10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE drx_cfg_s::drx_long_cycle_start_offset_c_::unpack(cbit_ref& bref) +SRSASN_CODE location_meas_ind_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ms10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::ms20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::ms32: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::ms40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::ms60: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)59u)); - break; - case types::ms64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::ms70: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)69u)); - break; - case types::ms80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::ms128: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - case types::ms160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::ms256: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); - break; - case types::ms320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::ms512: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)511u)); - break; - case types::ms640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::ms1024: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1023u)); - break; - case types::ms1280: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); - break; - case types::ms2048: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2047u)); - break; - case types::ms2560: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); - break; - case types::ms5120: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + case types::location_meas_ind: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::ms10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string drx_cfg_s::drx_long_cycle_start_offset_c_::types_opts::to_string() const +std::string location_meas_ind_s::crit_exts_c_::types_opts::to_string() const { - 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 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 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 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 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 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"); + static const char* options[] = {"locationMeasurementIndication", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "location_meas_ind_s::crit_exts_c_::types"); } -// LogicalChannelConfig ::= SEQUENCE -SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const +// MeasurementReport ::= SEQUENCE +SRSASN_CODE meas_report_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ul_specific_params_present, 1)); - - if (ul_specific_params_present) { - HANDLE_CODE(ul_specific_params.pack(bref)); - } + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE lc_ch_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_report_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ul_specific_params_present, 1)); - - if (ul_specific_params_present) { - HANDLE_CODE(ul_specific_params.unpack(bref)); - } + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void lc_ch_cfg_s::to_json(json_writer& j) const +void meas_report_s::to_json(json_writer& j) const { j.start_obj(); - if (ul_specific_params_present) { - j.write_fieldname("ul-SpecificParameters"); - ul_specific_params.to_json(j); - } + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -SRSASN_CODE lc_ch_cfg_s::ul_specific_params_s_::pack(bit_ref& bref) const +void meas_report_s::crit_exts_c_::destroy_() { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(allowed_serving_cells_present, 1)); - HANDLE_CODE(bref.pack(allowed_scs_list_present, 1)); - HANDLE_CODE(bref.pack(max_pusch_dur_present, 1)); - HANDLE_CODE(bref.pack(cfgured_grant_type1_allowed_present, 1)); - HANDLE_CODE(bref.pack(lc_ch_group_present, 1)); - HANDLE_CODE(bref.pack(sched_request_id_present, 1)); - - HANDLE_CODE(pack_integer(bref, prio, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(prioritised_bit_rate.pack(bref)); - HANDLE_CODE(bucket_size_dur.pack(bref)); - if (allowed_serving_cells_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, allowed_serving_cells, 1, 31, integer_packer(0, 31))); - } - if (allowed_scs_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, allowed_scs_list, 1, 5)); - } - if (max_pusch_dur_present) { - HANDLE_CODE(max_pusch_dur.pack(bref)); - } - if (lc_ch_group_present) { - HANDLE_CODE(pack_integer(bref, lc_ch_group, (uint8_t)0u, (uint8_t)7u)); - } - if (sched_request_id_present) { - HANDLE_CODE(pack_integer(bref, sched_request_id, (uint8_t)0u, (uint8_t)7u)); - } - HANDLE_CODE(bref.pack(lc_ch_sr_mask, 1)); - HANDLE_CODE(bref.pack(lc_ch_sr_delay_timer_applied, 1)); - - if (ext) { - HANDLE_CODE(bref.pack(bit_rate_query_prohibit_timer_present, 1)); - - if (bit_rate_query_prohibit_timer_present) { - HANDLE_CODE(bit_rate_query_prohibit_timer.pack(bref)); - } + switch (type_) { + case types::meas_report: + c.destroy(); + break; + default: + break; } - return SRSASN_SUCCESS; } -SRSASN_CODE lc_ch_cfg_s::ul_specific_params_s_::unpack(cbit_ref& bref) +void meas_report_s::crit_exts_c_::set(types::options e) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(allowed_serving_cells_present, 1)); - HANDLE_CODE(bref.unpack(allowed_scs_list_present, 1)); - HANDLE_CODE(bref.unpack(max_pusch_dur_present, 1)); - HANDLE_CODE(bref.unpack(cfgured_grant_type1_allowed_present, 1)); - HANDLE_CODE(bref.unpack(lc_ch_group_present, 1)); - HANDLE_CODE(bref.unpack(sched_request_id_present, 1)); - - HANDLE_CODE(unpack_integer(prio, bref, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(prioritised_bit_rate.unpack(bref)); - HANDLE_CODE(bucket_size_dur.unpack(bref)); - if (allowed_serving_cells_present) { - HANDLE_CODE(unpack_dyn_seq_of(allowed_serving_cells, bref, 1, 31, integer_packer(0, 31))); - } - if (allowed_scs_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(allowed_scs_list, bref, 1, 5)); + destroy_(); + type_ = e; + switch (type_) { + case types::meas_report: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); } - if (max_pusch_dur_present) { - HANDLE_CODE(max_pusch_dur.unpack(bref)); +} +meas_report_s::crit_exts_c_::crit_exts_c_(const meas_report_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::meas_report: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); } - if (lc_ch_group_present) { - HANDLE_CODE(unpack_integer(lc_ch_group, bref, (uint8_t)0u, (uint8_t)7u)); +} +meas_report_s::crit_exts_c_& meas_report_s::crit_exts_c_::operator=(const meas_report_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; } - if (sched_request_id_present) { - HANDLE_CODE(unpack_integer(sched_request_id, bref, (uint8_t)0u, (uint8_t)7u)); + set(other.type()); + switch (type_) { + case types::meas_report: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); } - HANDLE_CODE(bref.unpack(lc_ch_sr_mask, 1)); - HANDLE_CODE(bref.unpack(lc_ch_sr_delay_timer_applied, 1)); - - if (ext) { - HANDLE_CODE(bref.unpack(bit_rate_query_prohibit_timer_present, 1)); - if (bit_rate_query_prohibit_timer_present) { - HANDLE_CODE(bit_rate_query_prohibit_timer.unpack(bref)); - } - } - return SRSASN_SUCCESS; + return *this; } -void lc_ch_cfg_s::ul_specific_params_s_::to_json(json_writer& j) const +void meas_report_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_int("priority", prio); - j.write_str("prioritisedBitRate", prioritised_bit_rate.to_string()); - j.write_str("bucketSizeDuration", bucket_size_dur.to_string()); - if (allowed_serving_cells_present) { - j.start_array("allowedServingCells"); - 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 (const auto& e1 : allowed_scs_list) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (max_pusch_dur_present) { - j.write_str("maxPUSCH-Duration", max_pusch_dur.to_string()); - } - if (cfgured_grant_type1_allowed_present) { - j.write_str("configuredGrantType1Allowed", "true"); - } - if (lc_ch_group_present) { - j.write_int("logicalChannelGroup", lc_ch_group); - } - if (sched_request_id_present) { - j.write_int("schedulingRequestID", sched_request_id); - } - j.write_bool("logicalChannelSR-Mask", lc_ch_sr_mask); - j.write_bool("logicalChannelSR-DelayTimerApplied", lc_ch_sr_delay_timer_applied); - if (ext) { - if (bit_rate_query_prohibit_timer_present) { - j.write_str("bitRateQueryProhibitTimer", bit_rate_query_prohibit_timer.to_string()); - } + switch (type_) { + case types::meas_report: + j.write_fieldname("measurementReport"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); } j.end_obj(); } - -std::string lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_opts::to_string() const -{ - 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 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 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 +SRSASN_CODE meas_report_s::crit_exts_c_::pack(bit_ref& bref) const { - 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_"); + type_.pack(bref); + switch (type_) { + case types::meas_report: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } - -std::string lc_ch_cfg_s::ul_specific_params_s_::max_pusch_dur_opts::to_string() const +SRSASN_CODE meas_report_s::crit_exts_c_::unpack(cbit_ref& bref) { - 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_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::meas_report: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -std::string lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_opts::to_string() const -{ - 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 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 +std::string meas_report_s::crit_exts_c_::types_opts::to_string() const { - 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_"); + static const char* options[] = {"measurementReport", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "meas_report_s::crit_exts_c_::types"); } -// PHR-Config ::= SEQUENCE -SRSASN_CODE phr_cfg_s::pack(bit_ref& bref) const +// RRCReconfigurationComplete ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(phr_periodic_timer.pack(bref)); - HANDLE_CODE(phr_prohibit_timer.pack(bref)); - HANDLE_CODE(phr_tx_pwr_factor_change.pack(bref)); - HANDLE_CODE(bref.pack(multiple_phr, 1)); - HANDLE_CODE(bref.pack(dummy, 1)); - HANDLE_CODE(bref.pack(phr_type2_other_cell, 1)); - HANDLE_CODE(phr_mode_other_cg.pack(bref)); + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE phr_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_recfg_complete_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(phr_periodic_timer.unpack(bref)); - HANDLE_CODE(phr_prohibit_timer.unpack(bref)); - HANDLE_CODE(phr_tx_pwr_factor_change.unpack(bref)); - HANDLE_CODE(bref.unpack(multiple_phr, 1)); - HANDLE_CODE(bref.unpack(dummy, 1)); - HANDLE_CODE(bref.unpack(phr_type2_other_cell, 1)); - HANDLE_CODE(phr_mode_other_cg.unpack(bref)); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void phr_cfg_s::to_json(json_writer& j) const +void rrc_recfg_complete_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("phr-PeriodicTimer", phr_periodic_timer.to_string()); - j.write_str("phr-ProhibitTimer", phr_prohibit_timer.to_string()); - j.write_str("phr-Tx-PowerFactorChange", phr_tx_pwr_factor_change.to_string()); - j.write_bool("multiplePHR", multiple_phr); - j.write_bool("dummy", dummy); - j.write_bool("phr-Type2OtherCell", phr_type2_other_cell); - j.write_str("phr-ModeOtherCG", phr_mode_other_cg.to_string()); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -std::string phr_cfg_s::phr_periodic_timer_opts::to_string() const -{ - 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 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 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 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 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 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 const char* options[] = {"real", "virtual"}; - return convert_enum_idx(options, 2, value, "phr_cfg_s::phr_mode_other_cg_e_"); -} - -// RLC-Config ::= CHOICE -void rlc_cfg_c::destroy_() +void rrc_recfg_complete_s::crit_exts_c_::destroy_() { switch (type_) { - case types::am: - c.destroy(); - break; - case types::um_bi_dir: - c.destroy(); - break; - case types::um_uni_dir_ul: - c.destroy(); - break; - case types::um_uni_dir_dl: - c.destroy(); + case types::rrc_recfg_complete: + c.destroy(); break; default: break; } } -void rlc_cfg_c::set(types::options e) +void rrc_recfg_complete_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::am: - c.init(); - break; - case types::um_bi_dir: - c.init(); - break; - case types::um_uni_dir_ul: - c.init(); + case types::rrc_recfg_complete: + c.init(); break; - case types::um_uni_dir_dl: - c.init(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rlc_cfg_c"); + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); } } -rlc_cfg_c::rlc_cfg_c(const rlc_cfg_c& other) +rrc_recfg_complete_s::crit_exts_c_::crit_exts_c_(const rrc_recfg_complete_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::am: - c.init(other.c.get()); - break; - case types::um_bi_dir: - c.init(other.c.get()); - break; - case types::um_uni_dir_ul: - c.init(other.c.get()); + case types::rrc_recfg_complete: + c.init(other.c.get()); break; - case types::um_uni_dir_dl: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rlc_cfg_c"); + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); } } -rlc_cfg_c& rlc_cfg_c::operator=(const rlc_cfg_c& other) +rrc_recfg_complete_s::crit_exts_c_& +rrc_recfg_complete_s::crit_exts_c_::operator=(const rrc_recfg_complete_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::am: - c.set(other.c.get()); - break; - case types::um_bi_dir: - c.set(other.c.get()); - break; - case types::um_uni_dir_ul: - c.set(other.c.get()); + case types::rrc_recfg_complete: + c.set(other.c.get()); break; - case types::um_uni_dir_dl: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rlc_cfg_c"); + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); } return *this; } -void rlc_cfg_c::to_json(json_writer& j) const +void rrc_recfg_complete_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::am: - j.write_fieldname("am"); - j.start_obj(); - j.write_fieldname("ul-AM-RLC"); - c.get().ul_am_rlc.to_json(j); - j.write_fieldname("dl-AM-RLC"); - c.get().dl_am_rlc.to_json(j); - j.end_obj(); - break; - case types::um_bi_dir: - j.write_fieldname("um-Bi-Directional"); - j.start_obj(); - j.write_fieldname("ul-UM-RLC"); - c.get().ul_um_rlc.to_json(j); - j.write_fieldname("dl-UM-RLC"); - c.get().dl_um_rlc.to_json(j); - j.end_obj(); - break; - case types::um_uni_dir_ul: - j.write_fieldname("um-Uni-Directional-UL"); - j.start_obj(); - j.write_fieldname("ul-UM-RLC"); - c.get().ul_um_rlc.to_json(j); - j.end_obj(); + case types::rrc_recfg_complete: + j.write_fieldname("rrcReconfigurationComplete"); + c.get().to_json(j); break; - case types::um_uni_dir_dl: - j.write_fieldname("um-Uni-Directional-DL"); - j.start_obj(); - j.write_fieldname("dl-UM-RLC"); - c.get().dl_um_rlc.to_json(j); - j.end_obj(); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rlc_cfg_c"); + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE rlc_cfg_c::pack(bit_ref& bref) const +SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::am: - HANDLE_CODE(c.get().ul_am_rlc.pack(bref)); - HANDLE_CODE(c.get().dl_am_rlc.pack(bref)); - break; - case types::um_bi_dir: - HANDLE_CODE(c.get().ul_um_rlc.pack(bref)); - HANDLE_CODE(c.get().dl_um_rlc.pack(bref)); - break; - case types::um_uni_dir_ul: - HANDLE_CODE(c.get().ul_um_rlc.pack(bref)); + case types::rrc_recfg_complete: + HANDLE_CODE(c.get().pack(bref)); break; - case types::um_uni_dir_dl: - HANDLE_CODE(c.get().dl_um_rlc.pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rlc_cfg_c"); + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rlc_cfg_c::unpack(cbit_ref& bref) +SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::am: - HANDLE_CODE(c.get().ul_am_rlc.unpack(bref)); - HANDLE_CODE(c.get().dl_am_rlc.unpack(bref)); - break; - case types::um_bi_dir: - HANDLE_CODE(c.get().ul_um_rlc.unpack(bref)); - HANDLE_CODE(c.get().dl_um_rlc.unpack(bref)); - break; - case types::um_uni_dir_ul: - HANDLE_CODE(c.get().ul_um_rlc.unpack(bref)); + case types::rrc_recfg_complete: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::um_uni_dir_dl: - HANDLE_CODE(c.get().dl_um_rlc.unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rlc_cfg_c"); + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rlc_cfg_c::types_opts::to_string() const +std::string rrc_recfg_complete_s::crit_exts_c_::types_opts::to_string() const { - 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"); + static const char* options[] = {"rrcReconfigurationComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_recfg_complete_s::crit_exts_c_::types"); } -// RLF-TimersAndConstants ::= SEQUENCE -SRSASN_CODE rlf_timers_and_consts_s::pack(bit_ref& bref) const +// RRCReestablishmentComplete ::= SEQUENCE +SRSASN_CODE rrc_reest_complete_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(t310.pack(bref)); - HANDLE_CODE(n310.pack(bref)); - HANDLE_CODE(n311.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= t311_v1530; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); - HANDLE_CODE(t311_v1530.pack(bref)); - } - } return SRSASN_SUCCESS; } -SRSASN_CODE rlf_timers_and_consts_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_reest_complete_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(t310.unpack(bref)); - HANDLE_CODE(n310.unpack(bref)); - HANDLE_CODE(n311.unpack(bref)); - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); - HANDLE_CODE(t311_v1530.unpack(bref)); - } - } return SRSASN_SUCCESS; } -void rlf_timers_and_consts_s::to_json(json_writer& j) const +void rrc_reest_complete_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("t310", t310.to_string()); - j.write_str("n310", n310.to_string()); - j.write_str("n311", n311.to_string()); - if (ext) { - j.write_str("t311-v1530", t311_v1530.to_string()); - } + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -std::string rlf_timers_and_consts_s::t310_opts::to_string() const +void rrc_reest_complete_s::crit_exts_c_::destroy_() { - 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_"); + switch (type_) { + case types::rrc_reest_complete: + c.destroy(); + break; + default: + break; + } } -uint16_t rlf_timers_and_consts_s::t310_opts::to_number() const +void rrc_reest_complete_s::crit_exts_c_::set(types::options 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_"); + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_reest_complete: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); + } } - -std::string rlf_timers_and_consts_s::n310_opts::to_string() const +rrc_reest_complete_s::crit_exts_c_::crit_exts_c_(const rrc_reest_complete_s::crit_exts_c_& other) { - 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_"); + type_ = other.type(); + switch (type_) { + case types::rrc_reest_complete: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); + } } -uint8_t rlf_timers_and_consts_s::n310_opts::to_number() const +rrc_reest_complete_s::crit_exts_c_& +rrc_reest_complete_s::crit_exts_c_::operator=(const rrc_reest_complete_s::crit_exts_c_& other) { - 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_"); -} + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_reest_complete: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); + } -std::string rlf_timers_and_consts_s::n311_opts::to_string() const -{ - 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_"); + return *this; } -uint8_t rlf_timers_and_consts_s::n311_opts::to_number() const +void rrc_reest_complete_s::crit_exts_c_::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + switch (type_) { + case types::rrc_reest_complete: + j.write_fieldname("rrcReestablishmentComplete"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); + } + j.end_obj(); } - -std::string rlf_timers_and_consts_s::t311_v1530_opts::to_string() const +SRSASN_CODE rrc_reest_complete_s::crit_exts_c_::pack(bit_ref& bref) const { - 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_"); + type_.pack(bref); + switch (type_) { + case types::rrc_reest_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -uint16_t rlf_timers_and_consts_s::t311_v1530_opts::to_number() const +SRSASN_CODE rrc_reest_complete_s::crit_exts_c_::unpack(cbit_ref& bref) { - 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_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_reest_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -// ReconfigurationWithSync ::= SEQUENCE -SRSASN_CODE recfg_with_sync_s::pack(bit_ref& bref) const +std::string rrc_reest_complete_s::crit_exts_c_::types_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sp_cell_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(rach_cfg_ded_present, 1)); - - if (sp_cell_cfg_common_present) { - HANDLE_CODE(sp_cell_cfg_common.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, new_ue_id, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(t304.pack(bref)); - if (rach_cfg_ded_present) { - HANDLE_CODE(rach_cfg_ded.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= smtc.is_present(); - group_flags.pack(bref); + static const char* options[] = {"rrcReestablishmentComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_reest_complete_s::crit_exts_c_::types"); +} - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); +// RRCResumeComplete ::= SEQUENCE +SRSASN_CODE rrc_resume_complete_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); - HANDLE_CODE(bref.pack(smtc.is_present(), 1)); - if (smtc.is_present()) { - HANDLE_CODE(smtc->pack(bref)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE recfg_with_sync_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_resume_complete_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sp_cell_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(rach_cfg_ded_present, 1)); - - if (sp_cell_cfg_common_present) { - HANDLE_CODE(sp_cell_cfg_common.unpack(bref)); - } - HANDLE_CODE(unpack_integer(new_ue_id, bref, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(t304.unpack(bref)); - if (rach_cfg_ded_present) { - HANDLE_CODE(rach_cfg_ded.unpack(bref)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); - bool smtc_present; - HANDLE_CODE(bref.unpack(smtc_present, 1)); - smtc.set_present(smtc_present); - if (smtc.is_present()) { - HANDLE_CODE(smtc->unpack(bref)); - } - } - } return SRSASN_SUCCESS; } -void recfg_with_sync_s::to_json(json_writer& j) const +void rrc_resume_complete_s::to_json(json_writer& j) const { j.start_obj(); - if (sp_cell_cfg_common_present) { - j.write_fieldname("spCellConfigCommon"); - sp_cell_cfg_common.to_json(j); - } - j.write_int("newUE-Identity", new_ue_id); - j.write_str("t304", t304.to_string()); - if (rach_cfg_ded_present) { - j.write_fieldname("rach-ConfigDedicated"); - rach_cfg_ded.to_json(j); - } - if (ext) { - if (smtc.is_present()) { - j.write_fieldname("smtc"); - smtc->to_json(j); - } - } + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -std::string recfg_with_sync_s::t304_opts::to_string() const -{ - 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 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_() +void rrc_resume_complete_s::crit_exts_c_::destroy_() { switch (type_) { - case types::ul: - c.destroy(); - break; - case types::supplementary_ul: - c.destroy(); + case types::rrc_resume_complete: + c.destroy(); break; default: break; } } -void recfg_with_sync_s::rach_cfg_ded_c_::set(types::options e) +void rrc_resume_complete_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ul: - c.init(); + case types::rrc_resume_complete: + c.init(); break; - case types::supplementary_ul: - c.init(); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); } } -recfg_with_sync_s::rach_cfg_ded_c_::rach_cfg_ded_c_(const recfg_with_sync_s::rach_cfg_ded_c_& other) +rrc_resume_complete_s::crit_exts_c_::crit_exts_c_(const rrc_resume_complete_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::ul: - c.init(other.c.get()); + case types::rrc_resume_complete: + c.init(other.c.get()); break; - case types::supplementary_ul: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); } } -recfg_with_sync_s::rach_cfg_ded_c_& recfg_with_sync_s::rach_cfg_ded_c_:: - operator=(const recfg_with_sync_s::rach_cfg_ded_c_& other) +rrc_resume_complete_s::crit_exts_c_& +rrc_resume_complete_s::crit_exts_c_::operator=(const rrc_resume_complete_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ul: - c.set(other.c.get()); + case types::rrc_resume_complete: + c.set(other.c.get()); break; - case types::supplementary_ul: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); } return *this; } -void recfg_with_sync_s::rach_cfg_ded_c_::to_json(json_writer& j) const +void rrc_resume_complete_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ul: - j.write_fieldname("uplink"); - c.get().to_json(j); + case types::rrc_resume_complete: + j.write_fieldname("rrcResumeComplete"); + c.get().to_json(j); break; - case types::supplementary_ul: - j.write_fieldname("supplementaryUplink"); - c.get().to_json(j); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE recfg_with_sync_s::rach_cfg_ded_c_::pack(bit_ref& bref) const +SRSASN_CODE rrc_resume_complete_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ul: - HANDLE_CODE(c.get().pack(bref)); + case types::rrc_resume_complete: + HANDLE_CODE(c.get().pack(bref)); break; - case types::supplementary_ul: - HANDLE_CODE(c.get().pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE recfg_with_sync_s::rach_cfg_ded_c_::unpack(cbit_ref& bref) +SRSASN_CODE rrc_resume_complete_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ul: - HANDLE_CODE(c.get().unpack(bref)); + case types::rrc_resume_complete: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::supplementary_ul: - HANDLE_CODE(c.get().unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string recfg_with_sync_s::rach_cfg_ded_c_::types_opts::to_string() const +std::string rrc_resume_complete_s::crit_exts_c_::types_opts::to_string() const { - static const char* options[] = {"uplink", "supplementaryUplink"}; - return convert_enum_idx(options, 2, value, "recfg_with_sync_s::rach_cfg_ded_c_::types"); + static const char* options[] = {"rrcResumeComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_resume_complete_s::crit_exts_c_::types"); } -// SRB-ToAddMod ::= SEQUENCE -SRSASN_CODE srb_to_add_mod_s::pack(bit_ref& bref) const +// RRCSetupComplete ::= SEQUENCE +SRSASN_CODE rrc_setup_complete_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(reestablish_pdcp_present, 1)); - HANDLE_CODE(bref.pack(discard_on_pdcp_present, 1)); - HANDLE_CODE(bref.pack(pdcp_cfg_present, 1)); - - HANDLE_CODE(pack_integer(bref, srb_id, (uint8_t)1u, (uint8_t)3u)); - if (pdcp_cfg_present) { - HANDLE_CODE(pdcp_cfg.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE srb_to_add_mod_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_setup_complete_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(reestablish_pdcp_present, 1)); - HANDLE_CODE(bref.unpack(discard_on_pdcp_present, 1)); - HANDLE_CODE(bref.unpack(pdcp_cfg_present, 1)); - - HANDLE_CODE(unpack_integer(srb_id, bref, (uint8_t)1u, (uint8_t)3u)); - if (pdcp_cfg_present) { - HANDLE_CODE(pdcp_cfg.unpack(bref)); - } + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void srb_to_add_mod_s::to_json(json_writer& j) const +void rrc_setup_complete_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("srb-Identity", srb_id); - if (reestablish_pdcp_present) { - j.write_str("reestablishPDCP", "true"); - } - if (discard_on_pdcp_present) { - j.write_str("discardOnPDCP", "true"); - } - if (pdcp_cfg_present) { - j.write_fieldname("pdcp-Config"); - pdcp_cfg.to_json(j); - } + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -// SchedulingRequestConfig ::= SEQUENCE -SRSASN_CODE sched_request_cfg_s::pack(bit_ref& bref) const +void rrc_setup_complete_s::crit_exts_c_::destroy_() { - HANDLE_CODE(bref.pack(sched_request_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(sched_request_to_release_list_present, 1)); - - if (sched_request_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_to_add_mod_list, 1, 8)); - } - if (sched_request_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_to_release_list, 1, 8, integer_packer(0, 7))); + switch (type_) { + case types::rrc_setup_complete: + c.destroy(); + break; + default: + break; } - - return SRSASN_SUCCESS; } -SRSASN_CODE sched_request_cfg_s::unpack(cbit_ref& bref) +void rrc_setup_complete_s::crit_exts_c_::set(types::options e) { - HANDLE_CODE(bref.unpack(sched_request_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(sched_request_to_release_list_present, 1)); - - if (sched_request_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(sched_request_to_add_mod_list, bref, 1, 8)); - } - if (sched_request_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(sched_request_to_release_list, bref, 1, 8, integer_packer(0, 7))); + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_setup_complete: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); } - - return SRSASN_SUCCESS; } -void sched_request_cfg_s::to_json(json_writer& j) const +rrc_setup_complete_s::crit_exts_c_::crit_exts_c_(const rrc_setup_complete_s::crit_exts_c_& other) { - j.start_obj(); - if (sched_request_to_add_mod_list_present) { - j.start_array("schedulingRequestToAddModList"); - 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 (const auto& e1 : sched_request_to_release_list) { - j.write_int(e1); - } - j.end_array(); + type_ = other.type(); + switch (type_) { + case types::rrc_setup_complete: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); } - j.end_obj(); } - -// SecurityAlgorithmConfig ::= SEQUENCE -SRSASN_CODE security_algorithm_cfg_s::pack(bit_ref& bref) const +rrc_setup_complete_s::crit_exts_c_& +rrc_setup_complete_s::crit_exts_c_::operator=(const rrc_setup_complete_s::crit_exts_c_& other) { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(integrity_prot_algorithm_present, 1)); - - HANDLE_CODE(ciphering_algorithm.pack(bref)); - if (integrity_prot_algorithm_present) { - HANDLE_CODE(integrity_prot_algorithm.pack(bref)); + if (this == &other) { + return *this; } - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_algorithm_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(integrity_prot_algorithm_present, 1)); - - HANDLE_CODE(ciphering_algorithm.unpack(bref)); - if (integrity_prot_algorithm_present) { - HANDLE_CODE(integrity_prot_algorithm.unpack(bref)); + set(other.type()); + switch (type_) { + case types::rrc_setup_complete: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); } - return SRSASN_SUCCESS; + return *this; } -void security_algorithm_cfg_s::to_json(json_writer& j) const +void rrc_setup_complete_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_str("cipheringAlgorithm", ciphering_algorithm.to_string()); - if (integrity_prot_algorithm_present) { - j.write_str("integrityProtAlgorithm", integrity_prot_algorithm.to_string()); + switch (type_) { + case types::rrc_setup_complete: + j.write_fieldname("rrcSetupComplete"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); } j.end_obj(); } - -// ServingCellConfig ::= SEQUENCE -SRSASN_CODE serving_cell_cfg_s::pack(bit_ref& bref) const +SRSASN_CODE rrc_setup_complete_s::crit_exts_c_::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(tdd_ul_dl_cfg_ded_present, 1)); - HANDLE_CODE(bref.pack(init_dl_bwp_present, 1)); - HANDLE_CODE(bref.pack(dl_bwp_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(dl_bwp_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(first_active_dl_bwp_id_present, 1)); - HANDLE_CODE(bref.pack(bwp_inactivity_timer_present, 1)); - HANDLE_CODE(bref.pack(default_dl_bwp_id_present, 1)); - HANDLE_CODE(bref.pack(ul_cfg_present, 1)); - HANDLE_CODE(bref.pack(supplementary_ul_present, 1)); - HANDLE_CODE(bref.pack(pdcch_serving_cell_cfg_present, 1)); - HANDLE_CODE(bref.pack(pdsch_serving_cell_cfg_present, 1)); - HANDLE_CODE(bref.pack(csi_meas_cfg_present, 1)); - HANDLE_CODE(bref.pack(scell_deactivation_timer_present, 1)); - HANDLE_CODE(bref.pack(cross_carrier_sched_cfg_present, 1)); - HANDLE_CODE(bref.pack(dummy_present, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_linking_present, 1)); - HANDLE_CODE(bref.pack(serving_cell_mo_present, 1)); - - if (tdd_ul_dl_cfg_ded_present) { - HANDLE_CODE(tdd_ul_dl_cfg_ded.pack(bref)); - } - if (init_dl_bwp_present) { - HANDLE_CODE(init_dl_bwp.pack(bref)); - } - if (dl_bwp_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, dl_bwp_to_release_list, 1, 4, integer_packer(0, 4))); - } - if (dl_bwp_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, dl_bwp_to_add_mod_list, 1, 4)); - } - if (first_active_dl_bwp_id_present) { - HANDLE_CODE(pack_integer(bref, first_active_dl_bwp_id, (uint8_t)0u, (uint8_t)4u)); - } - if (bwp_inactivity_timer_present) { - HANDLE_CODE(bwp_inactivity_timer.pack(bref)); - } - if (default_dl_bwp_id_present) { - HANDLE_CODE(pack_integer(bref, default_dl_bwp_id, (uint8_t)0u, (uint8_t)4u)); - } - if (ul_cfg_present) { - HANDLE_CODE(ul_cfg.pack(bref)); - } - if (supplementary_ul_present) { - HANDLE_CODE(supplementary_ul.pack(bref)); - } - if (pdcch_serving_cell_cfg_present) { - HANDLE_CODE(pdcch_serving_cell_cfg.pack(bref)); - } - if (pdsch_serving_cell_cfg_present) { - HANDLE_CODE(pdsch_serving_cell_cfg.pack(bref)); - } - if (csi_meas_cfg_present) { - HANDLE_CODE(csi_meas_cfg.pack(bref)); - } - if (scell_deactivation_timer_present) { - HANDLE_CODE(scell_deactivation_timer.pack(bref)); - } - if (cross_carrier_sched_cfg_present) { - HANDLE_CODE(cross_carrier_sched_cfg.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, tag_id, (uint8_t)0u, (uint8_t)3u)); - if (pathloss_ref_linking_present) { - HANDLE_CODE(pathloss_ref_linking.pack(bref)); + type_.pack(bref); + switch (type_) { + case types::rrc_setup_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - if (serving_cell_mo_present) { - HANDLE_CODE(pack_integer(bref, serving_cell_mo, (uint8_t)1u, (uint8_t)64u)); + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_setup_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_setup_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; } + return SRSASN_SUCCESS; +} - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= lte_crs_to_match_around.is_present(); - group_flags[0] |= rate_match_pattern_to_add_mod_list.is_present(); - group_flags[0] |= rate_match_pattern_to_release_list.is_present(); - group_flags[0] |= dl_ch_bw_per_scs_list.is_present(); - group_flags.pack(bref); +std::string rrc_setup_complete_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* options[] = {"rrcSetupComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "rrc_setup_complete_s::crit_exts_c_::types"); +} - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); +// SCGFailureInformation ::= SEQUENCE +SRSASN_CODE scg_fail_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); - HANDLE_CODE(bref.pack(lte_crs_to_match_around.is_present(), 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_to_add_mod_list.is_present(), 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_to_release_list.is_present(), 1)); - HANDLE_CODE(bref.pack(dl_ch_bw_per_scs_list.is_present(), 1)); - if (lte_crs_to_match_around.is_present()) { - HANDLE_CODE(lte_crs_to_match_around->pack(bref)); - } - if (rate_match_pattern_to_add_mod_list.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *rate_match_pattern_to_add_mod_list, 1, 4)); - } - if (rate_match_pattern_to_release_list.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *rate_match_pattern_to_release_list, 1, 4, integer_packer(0, 3))); - } - if (dl_ch_bw_per_scs_list.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *dl_ch_bw_per_scs_list, 1, 5)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE serving_cell_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE scg_fail_info_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(tdd_ul_dl_cfg_ded_present, 1)); - HANDLE_CODE(bref.unpack(init_dl_bwp_present, 1)); - HANDLE_CODE(bref.unpack(dl_bwp_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(dl_bwp_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(first_active_dl_bwp_id_present, 1)); - HANDLE_CODE(bref.unpack(bwp_inactivity_timer_present, 1)); - HANDLE_CODE(bref.unpack(default_dl_bwp_id_present, 1)); - HANDLE_CODE(bref.unpack(ul_cfg_present, 1)); - HANDLE_CODE(bref.unpack(supplementary_ul_present, 1)); - HANDLE_CODE(bref.unpack(pdcch_serving_cell_cfg_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_serving_cell_cfg_present, 1)); - HANDLE_CODE(bref.unpack(csi_meas_cfg_present, 1)); - HANDLE_CODE(bref.unpack(scell_deactivation_timer_present, 1)); - HANDLE_CODE(bref.unpack(cross_carrier_sched_cfg_present, 1)); - HANDLE_CODE(bref.unpack(dummy_present, 1)); - HANDLE_CODE(bref.unpack(pathloss_ref_linking_present, 1)); - HANDLE_CODE(bref.unpack(serving_cell_mo_present, 1)); - - if (tdd_ul_dl_cfg_ded_present) { - HANDLE_CODE(tdd_ul_dl_cfg_ded.unpack(bref)); - } - if (init_dl_bwp_present) { - HANDLE_CODE(init_dl_bwp.unpack(bref)); - } - if (dl_bwp_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(dl_bwp_to_release_list, bref, 1, 4, integer_packer(0, 4))); - } - if (dl_bwp_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(dl_bwp_to_add_mod_list, bref, 1, 4)); - } - if (first_active_dl_bwp_id_present) { - HANDLE_CODE(unpack_integer(first_active_dl_bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); - } - if (bwp_inactivity_timer_present) { - HANDLE_CODE(bwp_inactivity_timer.unpack(bref)); - } - if (default_dl_bwp_id_present) { - HANDLE_CODE(unpack_integer(default_dl_bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); - } - if (ul_cfg_present) { - HANDLE_CODE(ul_cfg.unpack(bref)); - } - if (supplementary_ul_present) { - HANDLE_CODE(supplementary_ul.unpack(bref)); - } - if (pdcch_serving_cell_cfg_present) { - HANDLE_CODE(pdcch_serving_cell_cfg.unpack(bref)); - } - if (pdsch_serving_cell_cfg_present) { - HANDLE_CODE(pdsch_serving_cell_cfg.unpack(bref)); - } - if (csi_meas_cfg_present) { - HANDLE_CODE(csi_meas_cfg.unpack(bref)); - } - if (scell_deactivation_timer_present) { - HANDLE_CODE(scell_deactivation_timer.unpack(bref)); - } - if (cross_carrier_sched_cfg_present) { - HANDLE_CODE(cross_carrier_sched_cfg.unpack(bref)); - } - HANDLE_CODE(unpack_integer(tag_id, bref, (uint8_t)0u, (uint8_t)3u)); - if (pathloss_ref_linking_present) { - HANDLE_CODE(pathloss_ref_linking.unpack(bref)); - } - if (serving_cell_mo_present) { - HANDLE_CODE(unpack_integer(serving_cell_mo, bref, (uint8_t)1u, (uint8_t)64u)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(crit_exts.unpack(bref)); - bool lte_crs_to_match_around_present; - HANDLE_CODE(bref.unpack(lte_crs_to_match_around_present, 1)); - lte_crs_to_match_around.set_present(lte_crs_to_match_around_present); - bool rate_match_pattern_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_present, 1)); - rate_match_pattern_to_add_mod_list.set_present(rate_match_pattern_to_add_mod_list_present); - bool rate_match_pattern_to_release_list_present; - HANDLE_CODE(bref.unpack(rate_match_pattern_to_release_list_present, 1)); - rate_match_pattern_to_release_list.set_present(rate_match_pattern_to_release_list_present); - bool dl_ch_bw_per_scs_list_present; - HANDLE_CODE(bref.unpack(dl_ch_bw_per_scs_list_present, 1)); - dl_ch_bw_per_scs_list.set_present(dl_ch_bw_per_scs_list_present); - if (lte_crs_to_match_around.is_present()) { - HANDLE_CODE(lte_crs_to_match_around->unpack(bref)); - } - if (rate_match_pattern_to_add_mod_list.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*rate_match_pattern_to_add_mod_list, bref, 1, 4)); - } - if (rate_match_pattern_to_release_list.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*rate_match_pattern_to_release_list, bref, 1, 4, integer_packer(0, 3))); - } - if (dl_ch_bw_per_scs_list.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*dl_ch_bw_per_scs_list, bref, 1, 5)); - } - } - } return SRSASN_SUCCESS; } -void serving_cell_cfg_s::to_json(json_writer& j) const +void scg_fail_info_s::to_json(json_writer& j) const { j.start_obj(); - if (tdd_ul_dl_cfg_ded_present) { - j.write_fieldname("tdd-UL-DL-ConfigurationDedicated"); - tdd_ul_dl_cfg_ded.to_json(j); - } - if (init_dl_bwp_present) { - j.write_fieldname("initialDownlinkBWP"); - init_dl_bwp.to_json(j); - } - if (dl_bwp_to_release_list_present) { - j.start_array("downlinkBWP-ToReleaseList"); - 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 (const auto& e1 : dl_bwp_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } - if (first_active_dl_bwp_id_present) { - j.write_int("firstActiveDownlinkBWP-Id", first_active_dl_bwp_id); - } - if (bwp_inactivity_timer_present) { - j.write_str("bwp-InactivityTimer", bwp_inactivity_timer.to_string()); - } - if (default_dl_bwp_id_present) { - j.write_int("defaultDownlinkBWP-Id", default_dl_bwp_id); - } - if (ul_cfg_present) { - j.write_fieldname("uplinkConfig"); - ul_cfg.to_json(j); - } - if (supplementary_ul_present) { - j.write_fieldname("supplementaryUplink"); - supplementary_ul.to_json(j); - } - if (pdcch_serving_cell_cfg_present) { - j.write_fieldname("pdcch-ServingCellConfig"); - pdcch_serving_cell_cfg.to_json(j); - } - if (pdsch_serving_cell_cfg_present) { - j.write_fieldname("pdsch-ServingCellConfig"); - pdsch_serving_cell_cfg.to_json(j); - } - if (csi_meas_cfg_present) { - j.write_fieldname("csi-MeasConfig"); - csi_meas_cfg.to_json(j); - } - if (scell_deactivation_timer_present) { - j.write_str("sCellDeactivationTimer", scell_deactivation_timer.to_string()); - } - if (cross_carrier_sched_cfg_present) { - j.write_fieldname("crossCarrierSchedulingConfig"); - cross_carrier_sched_cfg.to_json(j); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void scg_fail_info_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::scg_fail_info: + c.destroy(); + break; + default: + break; } - j.write_int("tag-Id", tag_id); - if (dummy_present) { - j.write_str("dummy", "enabled"); +} +void scg_fail_info_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::scg_fail_info: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_s::crit_exts_c_"); } - if (pathloss_ref_linking_present) { - j.write_str("pathlossReferenceLinking", pathloss_ref_linking.to_string()); +} +scg_fail_info_s::crit_exts_c_::crit_exts_c_(const scg_fail_info_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::scg_fail_info: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_s::crit_exts_c_"); } - if (serving_cell_mo_present) { - j.write_int("servingCellMO", serving_cell_mo); +} +scg_fail_info_s::crit_exts_c_& scg_fail_info_s::crit_exts_c_::operator=(const scg_fail_info_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; } - if (ext) { - if (lte_crs_to_match_around.is_present()) { - j.write_fieldname("lte-CRS-ToMatchAround"); - lte_crs_to_match_around->to_json(j); - } - if (rate_match_pattern_to_add_mod_list.is_present()) { - j.start_array("rateMatchPatternToAddModList"); - 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 (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 (const auto& e1 : *dl_ch_bw_per_scs_list) { - e1.to_json(j); - } - j.end_array(); - } + set(other.type()); + switch (type_) { + case types::scg_fail_info: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_s::crit_exts_c_"); } - j.end_obj(); -} -std::string serving_cell_cfg_s::bwp_inactivity_timer_opts::to_string() const -{ - 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_"); + return *this; } -uint16_t serving_cell_cfg_s::bwp_inactivity_timer_opts::to_number() const +void scg_fail_info_s::crit_exts_c_::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + switch (type_) { + case types::scg_fail_info: + j.write_fieldname("scgFailureInformation"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_s::crit_exts_c_"); + } + j.end_obj(); } - -std::string serving_cell_cfg_s::scell_deactivation_timer_opts::to_string() const +SRSASN_CODE scg_fail_info_s::crit_exts_c_::pack(bit_ref& bref) const { - 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_"); + type_.pack(bref); + switch (type_) { + case types::scg_fail_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -uint16_t serving_cell_cfg_s::scell_deactivation_timer_opts::to_number() const +SRSASN_CODE scg_fail_info_s::crit_exts_c_::unpack(cbit_ref& bref) { - 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_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scg_fail_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -std::string serving_cell_cfg_s::pathloss_ref_linking_opts::to_string() const +std::string scg_fail_info_s::crit_exts_c_::types_opts::to_string() const { - static const char* options[] = {"pCell", "sCell"}; - return convert_enum_idx(options, 2, value, "serving_cell_cfg_s::pathloss_ref_linking_e_"); + static const char* options[] = {"scgFailureInformation", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "scg_fail_info_s::crit_exts_c_::types"); } -// TAG-Config ::= SEQUENCE -SRSASN_CODE tag_cfg_s::pack(bit_ref& bref) const +// SCGFailureInformationEUTRA ::= SEQUENCE +SRSASN_CODE scg_fail_info_eutra_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(tag_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(tag_to_add_mod_list_present, 1)); - - if (tag_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, tag_to_release_list, 1, 4, integer_packer(0, 3))); - } - if (tag_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, tag_to_add_mod_list, 1, 4)); - } + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE tag_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE scg_fail_info_eutra_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(tag_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(tag_to_add_mod_list_present, 1)); - - if (tag_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(tag_to_release_list, bref, 1, 4, integer_packer(0, 3))); - } - if (tag_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(tag_to_add_mod_list, bref, 1, 4)); - } + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void tag_cfg_s::to_json(json_writer& j) const +void scg_fail_info_eutra_s::to_json(json_writer& j) const { j.start_obj(); - if (tag_to_release_list_present) { - j.start_array("tag-ToReleaseList"); - 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 (const auto& e1 : tag_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -// MAC-CellGroupConfig ::= SEQUENCE -SRSASN_CODE mac_cell_group_cfg_s::pack(bit_ref& bref) const +void scg_fail_info_eutra_s::crit_exts_c_::destroy_() { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(drx_cfg_present, 1)); - HANDLE_CODE(bref.pack(sched_request_cfg_present, 1)); - HANDLE_CODE(bref.pack(bsr_cfg_present, 1)); - HANDLE_CODE(bref.pack(tag_cfg_present, 1)); - HANDLE_CODE(bref.pack(phr_cfg_present, 1)); - - if (drx_cfg_present) { - HANDLE_CODE(drx_cfg.pack(bref)); - } - if (sched_request_cfg_present) { - HANDLE_CODE(sched_request_cfg.pack(bref)); - } - if (bsr_cfg_present) { - HANDLE_CODE(bsr_cfg.pack(bref)); - } - if (tag_cfg_present) { - HANDLE_CODE(tag_cfg.pack(bref)); - } - if (phr_cfg_present) { - HANDLE_CODE(phr_cfg.pack(bref)); - } - HANDLE_CODE(bref.pack(skip_ul_tx_dynamic, 1)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= csi_mask_v1530_present; - group_flags[0] |= data_inactivity_timer_v1530.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(csi_mask_v1530_present, 1)); - HANDLE_CODE(bref.pack(data_inactivity_timer_v1530.is_present(), 1)); - if (csi_mask_v1530_present) { - HANDLE_CODE(bref.pack(csi_mask_v1530, 1)); - } - if (data_inactivity_timer_v1530.is_present()) { - HANDLE_CODE(data_inactivity_timer_v1530->pack(bref)); - } - } + switch (type_) { + case types::scg_fail_info_eutra: + c.destroy(); + break; + default: + break; } - return SRSASN_SUCCESS; } -SRSASN_CODE mac_cell_group_cfg_s::unpack(cbit_ref& bref) +void scg_fail_info_eutra_s::crit_exts_c_::set(types::options e) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(drx_cfg_present, 1)); - HANDLE_CODE(bref.unpack(sched_request_cfg_present, 1)); - HANDLE_CODE(bref.unpack(bsr_cfg_present, 1)); - HANDLE_CODE(bref.unpack(tag_cfg_present, 1)); - HANDLE_CODE(bref.unpack(phr_cfg_present, 1)); - - if (drx_cfg_present) { - HANDLE_CODE(drx_cfg.unpack(bref)); - } - if (sched_request_cfg_present) { - HANDLE_CODE(sched_request_cfg.unpack(bref)); + destroy_(); + type_ = e; + switch (type_) { + case types::scg_fail_info_eutra: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_eutra_s::crit_exts_c_"); } - if (bsr_cfg_present) { - HANDLE_CODE(bsr_cfg.unpack(bref)); +} +scg_fail_info_eutra_s::crit_exts_c_::crit_exts_c_(const scg_fail_info_eutra_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::scg_fail_info_eutra: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_eutra_s::crit_exts_c_"); } - if (tag_cfg_present) { - HANDLE_CODE(tag_cfg.unpack(bref)); +} +scg_fail_info_eutra_s::crit_exts_c_& +scg_fail_info_eutra_s::crit_exts_c_::operator=(const scg_fail_info_eutra_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; } - if (phr_cfg_present) { - HANDLE_CODE(phr_cfg.unpack(bref)); + set(other.type()); + switch (type_) { + case types::scg_fail_info_eutra: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_eutra_s::crit_exts_c_"); } - HANDLE_CODE(bref.unpack(skip_ul_tx_dynamic, 1)); - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(csi_mask_v1530_present, 1)); - bool data_inactivity_timer_v1530_present; - HANDLE_CODE(bref.unpack(data_inactivity_timer_v1530_present, 1)); - data_inactivity_timer_v1530.set_present(data_inactivity_timer_v1530_present); - if (csi_mask_v1530_present) { - HANDLE_CODE(bref.unpack(csi_mask_v1530, 1)); - } - if (data_inactivity_timer_v1530.is_present()) { - HANDLE_CODE(data_inactivity_timer_v1530->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; + return *this; } -void mac_cell_group_cfg_s::to_json(json_writer& j) const +void scg_fail_info_eutra_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); - if (drx_cfg_present) { - j.write_fieldname("drx-Config"); - drx_cfg.to_json(j); - } - if (sched_request_cfg_present) { - j.write_fieldname("schedulingRequestConfig"); - sched_request_cfg.to_json(j); - } - if (bsr_cfg_present) { - j.write_fieldname("bsr-Config"); - bsr_cfg.to_json(j); - } - if (tag_cfg_present) { - j.write_fieldname("tag-Config"); - tag_cfg.to_json(j); - } - if (phr_cfg_present) { - j.write_fieldname("phr-Config"); - phr_cfg.to_json(j); - } - j.write_bool("skipUplinkTxDynamic", skip_ul_tx_dynamic); - if (ext) { - if (csi_mask_v1530_present) { - j.write_bool("csi-Mask-v1530", csi_mask_v1530); - } - if (data_inactivity_timer_v1530.is_present()) { - j.write_fieldname("dataInactivityTimer-v1530"); - data_inactivity_timer_v1530->to_json(j); - } + switch (type_) { + case types::scg_fail_info_eutra: + j.write_fieldname("scgFailureInformationEUTRA"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_eutra_s::crit_exts_c_"); } j.end_obj(); } - -// PhysicalCellGroupConfig ::= SEQUENCE -SRSASN_CODE phys_cell_group_cfg_s::pack(bit_ref& bref) const +SRSASN_CODE scg_fail_info_eutra_s::crit_exts_c_::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(harq_ack_spatial_bundling_pucch_present, 1)); - HANDLE_CODE(bref.pack(harq_ack_spatial_bundling_pusch_present, 1)); - HANDLE_CODE(bref.pack(p_nr_fr1_present, 1)); - HANDLE_CODE(bref.pack(tpc_srs_rnti_present, 1)); - HANDLE_CODE(bref.pack(tpc_pucch_rnti_present, 1)); - HANDLE_CODE(bref.pack(tpc_pusch_rnti_present, 1)); - HANDLE_CODE(bref.pack(sp_csi_rnti_present, 1)); - HANDLE_CODE(bref.pack(cs_rnti_present, 1)); - - if (p_nr_fr1_present) { - HANDLE_CODE(pack_integer(bref, p_nr_fr1, (int8_t)-30, (int8_t)33)); - } - HANDLE_CODE(pdsch_harq_ack_codebook.pack(bref)); - if (tpc_srs_rnti_present) { - HANDLE_CODE(pack_integer(bref, tpc_srs_rnti, (uint32_t)0u, (uint32_t)65535u)); - } - if (tpc_pucch_rnti_present) { - HANDLE_CODE(pack_integer(bref, tpc_pucch_rnti, (uint32_t)0u, (uint32_t)65535u)); - } - if (tpc_pusch_rnti_present) { - HANDLE_CODE(pack_integer(bref, tpc_pusch_rnti, (uint32_t)0u, (uint32_t)65535u)); - } - if (sp_csi_rnti_present) { - HANDLE_CODE(pack_integer(bref, sp_csi_rnti, (uint32_t)0u, (uint32_t)65535u)); - } - if (cs_rnti_present) { - HANDLE_CODE(cs_rnti.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= mcs_c_rnti_present; - group_flags[0] |= p_ue_fr1_present; - group_flags[1] |= xscale_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(mcs_c_rnti_present, 1)); - HANDLE_CODE(bref.pack(p_ue_fr1_present, 1)); - if (mcs_c_rnti_present) { - HANDLE_CODE(pack_integer(bref, mcs_c_rnti, (uint32_t)0u, (uint32_t)65535u)); - } - if (p_ue_fr1_present) { - HANDLE_CODE(pack_integer(bref, p_ue_fr1, (int8_t)-30, (int8_t)33)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(xscale_present, 1)); - if (xscale_present) { - HANDLE_CODE(xscale.pack(bref)); - } - } + type_.pack(bref); + switch (type_) { + case types::scg_fail_info_eutra: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_eutra_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE phys_cell_group_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE scg_fail_info_eutra_s::crit_exts_c_::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(harq_ack_spatial_bundling_pucch_present, 1)); - HANDLE_CODE(bref.unpack(harq_ack_spatial_bundling_pusch_present, 1)); - HANDLE_CODE(bref.unpack(p_nr_fr1_present, 1)); - HANDLE_CODE(bref.unpack(tpc_srs_rnti_present, 1)); - HANDLE_CODE(bref.unpack(tpc_pucch_rnti_present, 1)); - HANDLE_CODE(bref.unpack(tpc_pusch_rnti_present, 1)); - HANDLE_CODE(bref.unpack(sp_csi_rnti_present, 1)); - HANDLE_CODE(bref.unpack(cs_rnti_present, 1)); - - if (p_nr_fr1_present) { - HANDLE_CODE(unpack_integer(p_nr_fr1, bref, (int8_t)-30, (int8_t)33)); - } - HANDLE_CODE(pdsch_harq_ack_codebook.unpack(bref)); - if (tpc_srs_rnti_present) { - HANDLE_CODE(unpack_integer(tpc_srs_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (tpc_pucch_rnti_present) { - HANDLE_CODE(unpack_integer(tpc_pucch_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (tpc_pusch_rnti_present) { - HANDLE_CODE(unpack_integer(tpc_pusch_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (sp_csi_rnti_present) { - HANDLE_CODE(unpack_integer(sp_csi_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (cs_rnti_present) { - HANDLE_CODE(cs_rnti.unpack(bref)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(2); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(mcs_c_rnti_present, 1)); - HANDLE_CODE(bref.unpack(p_ue_fr1_present, 1)); - if (mcs_c_rnti_present) { - HANDLE_CODE(unpack_integer(mcs_c_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (p_ue_fr1_present) { - HANDLE_CODE(unpack_integer(p_ue_fr1, bref, (int8_t)-30, (int8_t)33)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(xscale_present, 1)); - if (xscale_present) { - HANDLE_CODE(xscale.unpack(bref)); - } - } + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scg_fail_info_eutra: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_eutra_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void phys_cell_group_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (harq_ack_spatial_bundling_pucch_present) { - j.write_str("harq-ACK-SpatialBundlingPUCCH", "true"); - } - if (harq_ack_spatial_bundling_pusch_present) { - j.write_str("harq-ACK-SpatialBundlingPUSCH", "true"); - } - if (p_nr_fr1_present) { - j.write_int("p-NR-FR1", p_nr_fr1); - } - j.write_str("pdsch-HARQ-ACK-Codebook", pdsch_harq_ack_codebook.to_string()); - if (tpc_srs_rnti_present) { - j.write_int("tpc-SRS-RNTI", tpc_srs_rnti); - } - if (tpc_pucch_rnti_present) { - j.write_int("tpc-PUCCH-RNTI", tpc_pucch_rnti); - } - if (tpc_pusch_rnti_present) { - j.write_int("tpc-PUSCH-RNTI", tpc_pusch_rnti); - } - if (sp_csi_rnti_present) { - j.write_int("sp-CSI-RNTI", sp_csi_rnti); - } - if (cs_rnti_present) { - j.write_fieldname("cs-RNTI"); - cs_rnti.to_json(j); - } - if (ext) { - if (mcs_c_rnti_present) { - j.write_int("mcs-C-RNTI", mcs_c_rnti); - } - if (p_ue_fr1_present) { - j.write_int("p-UE-FR1", p_ue_fr1); - } - if (xscale_present) { - j.write_str("xScale", xscale.to_string()); - } - } - j.end_obj(); -} - -std::string phys_cell_group_cfg_s::pdsch_harq_ack_codebook_opts::to_string() const -{ - 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 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 +std::string scg_fail_info_eutra_s::crit_exts_c_::types_opts::to_string() const { - static const uint8_t options[] = {0, 6}; - return map_enum_number(options, 2, value, "phys_cell_group_cfg_s::xscale_e_"); + static const char* options[] = {"scgFailureInformationEUTRA", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "scg_fail_info_eutra_s::crit_exts_c_::types"); } -// RLC-BearerConfig ::= SEQUENCE -SRSASN_CODE rlc_bearer_cfg_s::pack(bit_ref& bref) const +// SecurityModeComplete ::= SEQUENCE +SRSASN_CODE security_mode_complete_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(served_radio_bearer_present, 1)); - HANDLE_CODE(bref.pack(reestablish_rlc_present, 1)); - HANDLE_CODE(bref.pack(rlc_cfg_present, 1)); - HANDLE_CODE(bref.pack(mac_lc_ch_cfg_present, 1)); - - HANDLE_CODE(pack_integer(bref, lc_ch_id, (uint8_t)1u, (uint8_t)32u)); - if (served_radio_bearer_present) { - HANDLE_CODE(served_radio_bearer.pack(bref)); - } - if (rlc_cfg_present) { - HANDLE_CODE(rlc_cfg.pack(bref)); - } - if (mac_lc_ch_cfg_present) { - HANDLE_CODE(mac_lc_ch_cfg.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE rlc_bearer_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE security_mode_complete_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(served_radio_bearer_present, 1)); - HANDLE_CODE(bref.unpack(reestablish_rlc_present, 1)); - HANDLE_CODE(bref.unpack(rlc_cfg_present, 1)); - HANDLE_CODE(bref.unpack(mac_lc_ch_cfg_present, 1)); - - HANDLE_CODE(unpack_integer(lc_ch_id, bref, (uint8_t)1u, (uint8_t)32u)); - if (served_radio_bearer_present) { - HANDLE_CODE(served_radio_bearer.unpack(bref)); - } - if (rlc_cfg_present) { - HANDLE_CODE(rlc_cfg.unpack(bref)); - } - if (mac_lc_ch_cfg_present) { - HANDLE_CODE(mac_lc_ch_cfg.unpack(bref)); - } + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void rlc_bearer_cfg_s::to_json(json_writer& j) const +void security_mode_complete_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("logicalChannelIdentity", lc_ch_id); - if (served_radio_bearer_present) { - j.write_fieldname("servedRadioBearer"); - served_radio_bearer.to_json(j); - } - if (reestablish_rlc_present) { - j.write_str("reestablishRLC", "true"); - } - if (rlc_cfg_present) { - j.write_fieldname("rlc-Config"); - rlc_cfg.to_json(j); - } - if (mac_lc_ch_cfg_present) { - j.write_fieldname("mac-LogicalChannelConfig"); - mac_lc_ch_cfg.to_json(j); - } + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -void rlc_bearer_cfg_s::served_radio_bearer_c_::destroy_() {} -void rlc_bearer_cfg_s::served_radio_bearer_c_::set(types::options e) +void security_mode_complete_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::security_mode_complete: + c.destroy(); + break; + default: + break; + } +} +void security_mode_complete_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; + switch (type_) { + case types::security_mode_complete: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + } } -rlc_bearer_cfg_s::served_radio_bearer_c_::served_radio_bearer_c_(const rlc_bearer_cfg_s::served_radio_bearer_c_& other) +security_mode_complete_s::crit_exts_c_::crit_exts_c_(const security_mode_complete_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::srb_id: - c.init(other.c.get()); + case types::security_mode_complete: + c.init(other.c.get()); break; - case types::drb_id: - c.init(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); } } -rlc_bearer_cfg_s::served_radio_bearer_c_& rlc_bearer_cfg_s::served_radio_bearer_c_:: - operator=(const rlc_bearer_cfg_s::served_radio_bearer_c_& other) +security_mode_complete_s::crit_exts_c_& +security_mode_complete_s::crit_exts_c_::operator=(const security_mode_complete_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::srb_id: - c.set(other.c.get()); + case types::security_mode_complete: + c.set(other.c.get()); break; - case types::drb_id: - c.set(other.c.get()); + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); } return *this; } -void rlc_bearer_cfg_s::served_radio_bearer_c_::to_json(json_writer& j) const +void security_mode_complete_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::srb_id: - j.write_int("srb-Identity", c.get()); + case types::security_mode_complete: + j.write_fieldname("securityModeComplete"); + c.get().to_json(j); break; - case types::drb_id: - j.write_int("drb-Identity", c.get()); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE rlc_bearer_cfg_s::served_radio_bearer_c_::pack(bit_ref& bref) const +SRSASN_CODE security_mode_complete_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::srb_id: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)3u)); + case types::security_mode_complete: + HANDLE_CODE(c.get().pack(bref)); break; - case types::drb_id: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)32u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rlc_bearer_cfg_s::served_radio_bearer_c_::unpack(cbit_ref& bref) +SRSASN_CODE security_mode_complete_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::srb_id: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)3u)); + case types::security_mode_complete: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::drb_id: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)32u)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rlc_bearer_cfg_s::served_radio_bearer_c_::types_opts::to_string() const +std::string security_mode_complete_s::crit_exts_c_::types_opts::to_string() const { - static const char* options[] = {"srb-Identity", "drb-Identity"}; - return convert_enum_idx(options, 2, value, "rlc_bearer_cfg_s::served_radio_bearer_c_::types"); + static const char* options[] = {"securityModeComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "security_mode_complete_s::crit_exts_c_::types"); } -// SCellConfig ::= SEQUENCE -SRSASN_CODE scell_cfg_s::pack(bit_ref& bref) const +// SecurityModeFailure ::= SEQUENCE +SRSASN_CODE security_mode_fail_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(scell_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(scell_cfg_ded_present, 1)); - - HANDLE_CODE(pack_integer(bref, scell_idx, (uint8_t)1u, (uint8_t)31u)); - if (scell_cfg_common_present) { - HANDLE_CODE(scell_cfg_common.pack(bref)); - } - if (scell_cfg_ded_present) { - HANDLE_CODE(scell_cfg_ded.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= smtc.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); - HANDLE_CODE(bref.pack(smtc.is_present(), 1)); - if (smtc.is_present()) { - HANDLE_CODE(smtc->pack(bref)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE scell_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE security_mode_fail_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(scell_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(scell_cfg_ded_present, 1)); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); - HANDLE_CODE(unpack_integer(scell_idx, bref, (uint8_t)1u, (uint8_t)31u)); - if (scell_cfg_common_present) { - HANDLE_CODE(scell_cfg_common.unpack(bref)); - } - if (scell_cfg_ded_present) { - HANDLE_CODE(scell_cfg_ded.unpack(bref)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - bool smtc_present; - HANDLE_CODE(bref.unpack(smtc_present, 1)); - smtc.set_present(smtc_present); - if (smtc.is_present()) { - HANDLE_CODE(smtc->unpack(bref)); - } - } - } return SRSASN_SUCCESS; } -void scell_cfg_s::to_json(json_writer& j) const +void security_mode_fail_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("sCellIndex", scell_idx); - if (scell_cfg_common_present) { - j.write_fieldname("sCellConfigCommon"); - scell_cfg_common.to_json(j); - } - if (scell_cfg_ded_present) { - j.write_fieldname("sCellConfigDedicated"); - scell_cfg_ded.to_json(j); - } - if (ext) { - if (smtc.is_present()) { - j.write_fieldname("smtc"); - smtc->to_json(j); - } - } + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -// SecurityConfig ::= SEQUENCE -SRSASN_CODE security_cfg_s::pack(bit_ref& bref) const +void security_mode_fail_s::crit_exts_c_::destroy_() { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(security_algorithm_cfg_present, 1)); - HANDLE_CODE(bref.pack(key_to_use_present, 1)); - - if (security_algorithm_cfg_present) { - HANDLE_CODE(security_algorithm_cfg.pack(bref)); + switch (type_) { + case types::security_mode_fail: + c.destroy(); + break; + default: + break; } - if (key_to_use_present) { - HANDLE_CODE(key_to_use.pack(bref)); +} +void security_mode_fail_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::security_mode_fail: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE security_cfg_s::unpack(cbit_ref& bref) +security_mode_fail_s::crit_exts_c_::crit_exts_c_(const security_mode_fail_s::crit_exts_c_& other) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(security_algorithm_cfg_present, 1)); - HANDLE_CODE(bref.unpack(key_to_use_present, 1)); - - if (security_algorithm_cfg_present) { - HANDLE_CODE(security_algorithm_cfg.unpack(bref)); + type_ = other.type(); + switch (type_) { + case types::security_mode_fail: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); } - if (key_to_use_present) { - HANDLE_CODE(key_to_use.unpack(bref)); +} +security_mode_fail_s::crit_exts_c_& +security_mode_fail_s::crit_exts_c_::operator=(const security_mode_fail_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::security_mode_fail: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); } - return SRSASN_SUCCESS; + return *this; } -void security_cfg_s::to_json(json_writer& j) const +void security_mode_fail_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); - if (security_algorithm_cfg_present) { - j.write_fieldname("securityAlgorithmConfig"); - security_algorithm_cfg.to_json(j); - } - if (key_to_use_present) { - j.write_str("keyToUse", key_to_use.to_string()); + switch (type_) { + case types::security_mode_fail: + j.write_fieldname("securityModeFailure"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); } j.end_obj(); } - -std::string security_cfg_s::key_to_use_opts::to_string() const +SRSASN_CODE security_mode_fail_s::crit_exts_c_::pack(bit_ref& bref) const { - static const char* options[] = {"master", "secondary"}; - return convert_enum_idx(options, 2, value, "security_cfg_s::key_to_use_e_"); + type_.pack(bref); + switch (type_) { + case types::security_mode_fail: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_fail_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::security_mode_fail: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -// SpCellConfig ::= SEQUENCE -SRSASN_CODE sp_cell_cfg_s::pack(bit_ref& bref) const +std::string security_mode_fail_s::crit_exts_c_::types_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(serv_cell_idx_present, 1)); - HANDLE_CODE(bref.pack(recfg_with_sync_present, 1)); - HANDLE_CODE(bref.pack(rlf_timers_and_consts_present, 1)); - HANDLE_CODE(bref.pack(rlm_in_sync_out_of_sync_thres_present, 1)); - HANDLE_CODE(bref.pack(sp_cell_cfg_ded_present, 1)); + static const char* options[] = {"securityModeFailure", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "security_mode_fail_s::crit_exts_c_::types"); +} - if (serv_cell_idx_present) { - HANDLE_CODE(pack_integer(bref, serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); - } - if (recfg_with_sync_present) { - HANDLE_CODE(recfg_with_sync.pack(bref)); - } - if (rlf_timers_and_consts_present) { - HANDLE_CODE(rlf_timers_and_consts.pack(bref)); - } - if (sp_cell_cfg_ded_present) { - HANDLE_CODE(sp_cell_cfg_ded.pack(bref)); - } +// UEAssistanceInformation ::= SEQUENCE +SRSASN_CODE ueassist_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE sp_cell_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE ueassist_info_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(serv_cell_idx_present, 1)); - HANDLE_CODE(bref.unpack(recfg_with_sync_present, 1)); - HANDLE_CODE(bref.unpack(rlf_timers_and_consts_present, 1)); - HANDLE_CODE(bref.unpack(rlm_in_sync_out_of_sync_thres_present, 1)); - HANDLE_CODE(bref.unpack(sp_cell_cfg_ded_present, 1)); - - if (serv_cell_idx_present) { - HANDLE_CODE(unpack_integer(serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (recfg_with_sync_present) { - HANDLE_CODE(recfg_with_sync.unpack(bref)); - } - if (rlf_timers_and_consts_present) { - HANDLE_CODE(rlf_timers_and_consts.unpack(bref)); - } - if (sp_cell_cfg_ded_present) { - HANDLE_CODE(sp_cell_cfg_ded.unpack(bref)); - } + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void sp_cell_cfg_s::to_json(json_writer& j) const +void ueassist_info_s::to_json(json_writer& j) const { j.start_obj(); - if (serv_cell_idx_present) { - j.write_int("servCellIndex", serv_cell_idx); - } - if (recfg_with_sync_present) { - j.write_fieldname("reconfigurationWithSync"); - recfg_with_sync.to_json(j); - } - if (rlf_timers_and_consts_present) { - j.write_fieldname("rlf-TimersAndConstants"); - rlf_timers_and_consts.to_json(j); - } - if (rlm_in_sync_out_of_sync_thres_present) { - j.write_str("rlmInSyncOutOfSyncThreshold", "n1"); - } - if (sp_cell_cfg_ded_present) { - j.write_fieldname("spCellConfigDedicated"); - sp_cell_cfg_ded.to_json(j); - } + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -// CellGroupConfig ::= SEQUENCE -SRSASN_CODE cell_group_cfg_s::pack(bit_ref& bref) const +void ueassist_info_s::crit_exts_c_::destroy_() { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rlc_bearer_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(rlc_bearer_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(mac_cell_group_cfg_present, 1)); - HANDLE_CODE(bref.pack(phys_cell_group_cfg_present, 1)); - HANDLE_CODE(bref.pack(sp_cell_cfg_present, 1)); - HANDLE_CODE(bref.pack(scell_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(scell_to_release_list_present, 1)); - - HANDLE_CODE(pack_integer(bref, cell_group_id, (uint8_t)0u, (uint8_t)3u)); - if (rlc_bearer_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, rlc_bearer_to_add_mod_list, 1, 32)); - } - if (rlc_bearer_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, rlc_bearer_to_release_list, 1, 32, integer_packer(1, 32))); - } - if (mac_cell_group_cfg_present) { - HANDLE_CODE(mac_cell_group_cfg.pack(bref)); - } - if (phys_cell_group_cfg_present) { - HANDLE_CODE(phys_cell_group_cfg.pack(bref)); - } - if (sp_cell_cfg_present) { - HANDLE_CODE(sp_cell_cfg.pack(bref)); - } - if (scell_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, scell_to_add_mod_list, 1, 31)); - } - if (scell_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, scell_to_release_list, 1, 31, integer_packer(1, 31))); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= report_ul_tx_direct_current_v1530_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(report_ul_tx_direct_current_v1530_present, 1)); - } + switch (type_) { + case types::ue_assist_info: + c.destroy(); + break; + default: + break; } - return SRSASN_SUCCESS; } -SRSASN_CODE cell_group_cfg_s::unpack(cbit_ref& bref) +void ueassist_info_s::crit_exts_c_::set(types::options e) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rlc_bearer_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(rlc_bearer_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(mac_cell_group_cfg_present, 1)); - HANDLE_CODE(bref.unpack(phys_cell_group_cfg_present, 1)); - HANDLE_CODE(bref.unpack(sp_cell_cfg_present, 1)); - HANDLE_CODE(bref.unpack(scell_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(scell_to_release_list_present, 1)); - - HANDLE_CODE(unpack_integer(cell_group_id, bref, (uint8_t)0u, (uint8_t)3u)); - if (rlc_bearer_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(rlc_bearer_to_add_mod_list, bref, 1, 32)); - } - if (rlc_bearer_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(rlc_bearer_to_release_list, bref, 1, 32, integer_packer(1, 32))); - } - if (mac_cell_group_cfg_present) { - HANDLE_CODE(mac_cell_group_cfg.unpack(bref)); - } - if (phys_cell_group_cfg_present) { - HANDLE_CODE(phys_cell_group_cfg.unpack(bref)); + destroy_(); + type_ = e; + switch (type_) { + case types::ue_assist_info: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); } - if (sp_cell_cfg_present) { - HANDLE_CODE(sp_cell_cfg.unpack(bref)); +} +ueassist_info_s::crit_exts_c_::crit_exts_c_(const ueassist_info_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ue_assist_info: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); } - if (scell_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(scell_to_add_mod_list, bref, 1, 31)); +} +ueassist_info_s::crit_exts_c_& ueassist_info_s::crit_exts_c_::operator=(const ueassist_info_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; } - if (scell_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(scell_to_release_list, bref, 1, 31, integer_packer(1, 31))); + set(other.type()); + switch (type_) { + case types::ue_assist_info: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); } - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(report_ul_tx_direct_current_v1530_present, 1)); - } - } - return SRSASN_SUCCESS; + return *this; } -void cell_group_cfg_s::to_json(json_writer& j) const +void ueassist_info_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_int("cellGroupId", cell_group_id); - if (rlc_bearer_to_add_mod_list_present) { - j.start_array("rlc-BearerToAddModList"); - 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 (const auto& e1 : rlc_bearer_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (mac_cell_group_cfg_present) { - j.write_fieldname("mac-CellGroupConfig"); - mac_cell_group_cfg.to_json(j); - } - if (phys_cell_group_cfg_present) { - j.write_fieldname("physicalCellGroupConfig"); - phys_cell_group_cfg.to_json(j); - } - if (sp_cell_cfg_present) { - j.write_fieldname("spCellConfig"); - sp_cell_cfg.to_json(j); - } - if (scell_to_add_mod_list_present) { - j.start_array("sCellToAddModList"); - for (const auto& e1 : scell_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); + switch (type_) { + case types::ue_assist_info: + j.write_fieldname("ueAssistanceInformation"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); } - if (scell_to_release_list_present) { - j.start_array("sCellToReleaseList"); - for (const auto& e1 : scell_to_release_list) { - j.write_int(e1); - } - j.end_array(); + j.end_obj(); +} +SRSASN_CODE ueassist_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ue_assist_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - if (ext) { - if (report_ul_tx_direct_current_v1530_present) { - j.write_str("reportUplinkTxDirectCurrent-v1530", "true"); - } + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ue_assist_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - j.end_obj(); + return SRSASN_SUCCESS; } -// RadioBearerConfig ::= SEQUENCE -SRSASN_CODE radio_bearer_cfg_s::pack(bit_ref& bref) const +std::string ueassist_info_s::crit_exts_c_::types_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(srb_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(srb3_to_release_present, 1)); - HANDLE_CODE(bref.pack(drb_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(drb_to_release_list_present, 1)); - HANDLE_CODE(bref.pack(security_cfg_present, 1)); + static const char* options[] = {"ueAssistanceInformation", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "ueassist_info_s::crit_exts_c_::types"); +} - if (srb_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, srb_to_add_mod_list, 1, 2)); - } - if (drb_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_add_mod_list, 1, 29)); - } - if (drb_to_release_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_release_list, 1, 29, integer_packer(1, 32))); - } - if (security_cfg_present) { - HANDLE_CODE(security_cfg.pack(bref)); - } +// UECapabilityInformation ::= SEQUENCE +SRSASN_CODE ue_cap_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE radio_bearer_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_info_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(srb_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(srb3_to_release_present, 1)); - HANDLE_CODE(bref.unpack(drb_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(drb_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(security_cfg_present, 1)); - - if (srb_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(srb_to_add_mod_list, bref, 1, 2)); - } - if (drb_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(drb_to_add_mod_list, bref, 1, 29)); - } - if (drb_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(drb_to_release_list, bref, 1, 29, integer_packer(1, 32))); - } - if (security_cfg_present) { - HANDLE_CODE(security_cfg.unpack(bref)); - } + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -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 (const auto& e1 : srb_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } - if (srb3_to_release_present) { - j.write_str("srb3-ToRelease", "true"); - } - if (drb_to_add_mod_list_present) { - j.start_array("drb-ToAddModList"); - 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 (const auto& e1 : drb_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (security_cfg_present) { - j.write_fieldname("securityConfig"); - security_cfg.to_json(j); - } - j.end_obj(); -} - -// RRCReject-IEs ::= SEQUENCE -SRSASN_CODE rrc_reject_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(wait_time_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (wait_time_present) { - HANDLE_CODE(pack_integer(bref, wait_time, (uint8_t)1u, (uint8_t)16u)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reject_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(wait_time_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (wait_time_present) { - HANDLE_CODE(unpack_integer(wait_time, bref, (uint8_t)1u, (uint8_t)16u)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_reject_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (wait_time_present) { - j.write_int("waitTime", wait_time); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// RRCSetup-IEs ::= SEQUENCE -SRSASN_CODE rrc_setup_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(radio_bearer_cfg.pack(bref)); - HANDLE_CODE(master_cell_group.pack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(radio_bearer_cfg.unpack(bref)); - HANDLE_CODE(master_cell_group.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_setup_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("radioBearerConfig"); - radio_bearer_cfg.to_json(j); - j.write_str("masterCellGroup", master_cell_group.to_string()); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// RRCReject ::= SEQUENCE -SRSASN_CODE rrc_reject_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reject_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void rrc_reject_s::to_json(json_writer& j) const +void ue_cap_info_s::to_json(json_writer& j) const { j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); j.write_fieldname("criticalExtensions"); crit_exts.to_json(j); j.end_obj(); } -void rrc_reject_s::crit_exts_c_::destroy_() +void ue_cap_info_s::crit_exts_c_::destroy_() { switch (type_) { - case types::rrc_reject: - c.destroy(); + case types::ue_cap_info: + c.destroy(); break; default: break; } } -void rrc_reject_s::crit_exts_c_::set(types::options e) +void ue_cap_info_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::rrc_reject: - c.init(); + case types::ue_cap_info: + c.init(); break; case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); } } -rrc_reject_s::crit_exts_c_::crit_exts_c_(const rrc_reject_s::crit_exts_c_& other) +ue_cap_info_s::crit_exts_c_::crit_exts_c_(const ue_cap_info_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::rrc_reject: - c.init(other.c.get()); + case types::ue_cap_info: + c.init(other.c.get()); break; case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); } } -rrc_reject_s::crit_exts_c_& rrc_reject_s::crit_exts_c_::operator=(const rrc_reject_s::crit_exts_c_& other) +ue_cap_info_s::crit_exts_c_& ue_cap_info_s::crit_exts_c_::operator=(const ue_cap_info_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_reject: - c.set(other.c.get()); + case types::ue_cap_info: + c.set(other.c.get()); break; case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); } return *this; } -void rrc_reject_s::crit_exts_c_::to_json(json_writer& j) const +void ue_cap_info_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_reject: - j.write_fieldname("rrcReject"); - c.get().to_json(j); + case types::ue_cap_info: + j.write_fieldname("ueCapabilityInformation"); + c.get().to_json(j); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE rrc_reject_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE ue_cap_info_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rrc_reject: - HANDLE_CODE(c.get().pack(bref)); + case types::ue_cap_info: + HANDLE_CODE(c.get().pack(bref)); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_reject_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_info_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rrc_reject: - HANDLE_CODE(c.get().unpack(bref)); + case types::ue_cap_info: + HANDLE_CODE(c.get().unpack(bref)); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rrc_reject_s::crit_exts_c_::types_opts::to_string() const +std::string ue_cap_info_s::crit_exts_c_::types_opts::to_string() const { - static const char* options[] = {"rrcReject", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_reject_s::crit_exts_c_::types"); + static const char* options[] = {"ueCapabilityInformation", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "ue_cap_info_s::crit_exts_c_::types"); } -// RRCSetup ::= SEQUENCE -SRSASN_CODE rrc_setup_s::pack(bit_ref& bref) const +// ULInformationTransfer ::= SEQUENCE +SRSASN_CODE ul_info_transfer_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE rrc_setup_s::unpack(cbit_ref& bref) +SRSASN_CODE ul_info_transfer_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void rrc_setup_s::to_json(json_writer& j) const +void ul_info_transfer_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); j.write_fieldname("criticalExtensions"); crit_exts.to_json(j); j.end_obj(); } -void rrc_setup_s::crit_exts_c_::destroy_() +void ul_info_transfer_s::crit_exts_c_::destroy_() { switch (type_) { - case types::rrc_setup: - c.destroy(); + case types::ul_info_transfer: + c.destroy(); break; default: break; } } -void rrc_setup_s::crit_exts_c_::set(types::options e) +void ul_info_transfer_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::rrc_setup: - c.init(); + case types::ul_info_transfer: + c.init(); break; case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); } } -rrc_setup_s::crit_exts_c_::crit_exts_c_(const rrc_setup_s::crit_exts_c_& other) +ul_info_transfer_s::crit_exts_c_::crit_exts_c_(const ul_info_transfer_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { - case types::rrc_setup: - c.init(other.c.get()); + case types::ul_info_transfer: + c.init(other.c.get()); break; case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); } } -rrc_setup_s::crit_exts_c_& rrc_setup_s::crit_exts_c_::operator=(const rrc_setup_s::crit_exts_c_& other) +ul_info_transfer_s::crit_exts_c_& +ul_info_transfer_s::crit_exts_c_::operator=(const ul_info_transfer_s::crit_exts_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_setup: - c.set(other.c.get()); + case types::ul_info_transfer: + c.set(other.c.get()); break; case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); } return *this; } -void rrc_setup_s::crit_exts_c_::to_json(json_writer& j) const +void ul_info_transfer_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_setup: - j.write_fieldname("rrcSetup"); - c.get().to_json(j); + case types::ul_info_transfer: + j.write_fieldname("ulInformationTransfer"); + c.get().to_json(j); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE rrc_setup_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE ul_info_transfer_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rrc_setup: - HANDLE_CODE(c.get().pack(bref)); + case types::ul_info_transfer: + HANDLE_CODE(c.get().pack(bref)); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_setup_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE ul_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rrc_setup: - HANDLE_CODE(c.get().unpack(bref)); + case types::ul_info_transfer: + HANDLE_CODE(c.get().unpack(bref)); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rrc_setup_s::crit_exts_c_::types_opts::to_string() const +std::string ul_info_transfer_s::crit_exts_c_::types_opts::to_string() const { - static const char* options[] = {"rrcSetup", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_setup_s::crit_exts_c_::types"); + static const char* options[] = {"ulInformationTransfer", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "ul_info_transfer_s::crit_exts_c_::types"); } -// DL-CCCH-MessageType ::= CHOICE -void dl_ccch_msg_type_c::destroy_() +// ULInformationTransferMRDC ::= SEQUENCE +SRSASN_CODE ul_info_transfer_mrdc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_mrdc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_info_transfer_mrdc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ul_info_transfer_mrdc_s::crit_exts_c_::destroy_() { switch (type_) { case types::c1: @@ -28219,7 +24506,7 @@ void dl_ccch_msg_type_c::destroy_() break; } } -void dl_ccch_msg_type_c::set(types::options e) +void ul_info_transfer_mrdc_s::crit_exts_c_::set(types::options e) { destroy_(); type_ = e; @@ -28227,30 +24514,31 @@ void dl_ccch_msg_type_c::set(types::options e) case types::c1: c.init(); break; - case types::msg_class_ext: + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); } } -dl_ccch_msg_type_c::dl_ccch_msg_type_c(const dl_ccch_msg_type_c& other) +ul_info_transfer_mrdc_s::crit_exts_c_::crit_exts_c_(const ul_info_transfer_mrdc_s::crit_exts_c_& other) { type_ = other.type(); switch (type_) { case types::c1: c.init(other.c.get()); break; - case types::msg_class_ext: + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); } } -dl_ccch_msg_type_c& dl_ccch_msg_type_c::operator=(const dl_ccch_msg_type_c& other) +ul_info_transfer_mrdc_s::crit_exts_c_& +ul_info_transfer_mrdc_s::crit_exts_c_::operator=(const ul_info_transfer_mrdc_s::crit_exts_c_& other) { if (this == &other) { return *this; @@ -28260,17 +24548,17 @@ dl_ccch_msg_type_c& dl_ccch_msg_type_c::operator=(const dl_ccch_msg_type_c& othe case types::c1: c.set(other.c.get()); break; - case types::msg_class_ext: + case types::crit_exts_future: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); } return *this; } -void dl_ccch_msg_type_c::to_json(json_writer& j) const +void ul_info_transfer_mrdc_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { @@ -28278,29 +24566,29 @@ void dl_ccch_msg_type_c::to_json(json_writer& j) const j.write_fieldname("c1"); c.get().to_json(j); break; - case types::msg_class_ext: + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE dl_ccch_msg_type_c::pack(bit_ref& bref) const +SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { case types::c1: HANDLE_CODE(c.get().pack(bref)); break; - case types::msg_class_ext: + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE dl_ccch_msg_type_c::unpack(cbit_ref& bref) +SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); @@ -28309,14218 +24597,20575 @@ SRSASN_CODE dl_ccch_msg_type_c::unpack(cbit_ref& bref) case types::c1: HANDLE_CODE(c.get().unpack(bref)); break; - case types::msg_class_ext: + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void dl_ccch_msg_type_c::c1_c_::destroy_() +void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set(types::options e) { + type_ = e; +} +void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); switch (type_) { - case types::rrc_reject: - c.destroy(); + case types::ul_info_transfer_mrdc: + j.write_fieldname("ulInformationTransferMRDC"); + c.to_json(j); break; - case types::rrc_setup: - c.destroy(); + case types::spare3: break; - default: + case types::spare2: break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_"); } + j.end_obj(); } -void dl_ccch_msg_type_c::c1_c_::set(types::options e) +SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const { - destroy_(); - type_ = e; + type_.pack(bref); switch (type_) { - case types::rrc_reject: - c.init(); + case types::ul_info_transfer_mrdc: + HANDLE_CODE(c.pack(bref)); break; - case types::rrc_setup: - c.init(); + case types::spare3: break; case types::spare2: break; case types::spare1: break; - case types::nulltype: - break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } + return SRSASN_SUCCESS; } -dl_ccch_msg_type_c::c1_c_::c1_c_(const dl_ccch_msg_type_c::c1_c_& other) +SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) { - type_ = other.type(); + types e; + e.unpack(bref); + set(e); switch (type_) { - case types::rrc_reject: - c.init(other.c.get()); + case types::ul_info_transfer_mrdc: + HANDLE_CODE(c.unpack(bref)); break; - case types::rrc_setup: - c.init(other.c.get()); + case types::spare3: break; case types::spare2: break; case types::spare1: break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::types_opts::to_string() const +{ + static const char* options[] = {"ulInformationTransferMRDC", "spare3", "spare2", "spare1"}; + return convert_enum_idx(options, 4, value, "ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::types"); +} + +std::string ul_info_transfer_mrdc_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* options[] = {"c1", "criticalExtensionsFuture"}; + return convert_enum_idx(options, 2, value, "ul_info_transfer_mrdc_s::crit_exts_c_::types"); +} +uint8_t ul_info_transfer_mrdc_s::crit_exts_c_::types_opts::to_number() const +{ + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_info_transfer_mrdc_s::crit_exts_c_::types"); +} + +// UL-DCCH-MessageType ::= CHOICE +void ul_dcch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ul_dcch_msg_type_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::msg_class_ext: + break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); } } -dl_ccch_msg_type_c::c1_c_& dl_ccch_msg_type_c::c1_c_::operator=(const dl_ccch_msg_type_c::c1_c_& other) +ul_dcch_msg_type_c::ul_dcch_msg_type_c(const ul_dcch_msg_type_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + } +} +ul_dcch_msg_type_c& ul_dcch_msg_type_c::operator=(const ul_dcch_msg_type_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_reject: - c.set(other.c.get()); - break; - case types::rrc_setup: - c.set(other.c.get()); - break; - case types::spare2: + case types::c1: + c.set(other.c.get()); break; - case types::spare1: + case types::msg_class_ext: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); } return *this; } -void dl_ccch_msg_type_c::c1_c_::to_json(json_writer& j) const +void ul_dcch_msg_type_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_reject: - j.write_fieldname("rrcReject"); - c.get().to_json(j); - break; - case types::rrc_setup: - j.write_fieldname("rrcSetup"); - c.get().to_json(j); - break; - case types::spare2: + case types::c1: + j.write_fieldname("c1"); + c.get().to_json(j); break; - case types::spare1: + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); } j.end_obj(); } -SRSASN_CODE dl_ccch_msg_type_c::c1_c_::pack(bit_ref& bref) const +SRSASN_CODE ul_dcch_msg_type_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rrc_reject: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_setup: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::spare2: + case types::c1: + HANDLE_CODE(c.get().pack(bref)); break; - case types::spare1: + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE dl_ccch_msg_type_c::c1_c_::unpack(cbit_ref& bref) +SRSASN_CODE ul_dcch_msg_type_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rrc_reject: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_setup: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::spare2: + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::spare1: + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string dl_ccch_msg_type_c::c1_c_::types_opts::to_string() const -{ - 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 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 const uint8_t options[] = {1}; - return map_enum_number(options, 1, value, "dl_ccch_msg_type_c::types"); -} - -// DL-CCCH-Message ::= SEQUENCE -SRSASN_CODE dl_ccch_msg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ccch_msg_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); - - return SRSASN_SUCCESS; -} -void dl_ccch_msg_s::to_json(json_writer& j) const +void ul_dcch_msg_type_c::c1_c_::destroy_() { - j.start_array(); - j.start_obj(); - j.start_obj("DL-CCCH-Message"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); - j.end_obj(); - j.end_array(); -} - -// CSI-RS-Resource-Mobility ::= SEQUENCE -SRSASN_CODE csi_rs_res_mob_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(associated_ssb_present, 1)); - - HANDLE_CODE(pack_integer(bref, csi_rs_idx, (uint8_t)0u, (uint8_t)95u)); - HANDLE_CODE(slot_cfg.pack(bref)); - if (associated_ssb_present) { - HANDLE_CODE(pack_integer(bref, associated_ssb.ssb_idx, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(bref.pack(associated_ssb.is_quasi_colocated, 1)); - } - HANDLE_CODE(freq_domain_alloc.pack(bref)); - HANDLE_CODE(pack_integer(bref, first_ofdm_symbol_in_time_domain, (uint8_t)0u, (uint8_t)13u)); - HANDLE_CODE(pack_integer(bref, seq_generation_cfg, (uint16_t)0u, (uint16_t)1023u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_rs_res_mob_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(associated_ssb_present, 1)); - - HANDLE_CODE(unpack_integer(csi_rs_idx, bref, (uint8_t)0u, (uint8_t)95u)); - HANDLE_CODE(slot_cfg.unpack(bref)); - if (associated_ssb_present) { - HANDLE_CODE(unpack_integer(associated_ssb.ssb_idx, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(bref.unpack(associated_ssb.is_quasi_colocated, 1)); - } - HANDLE_CODE(freq_domain_alloc.unpack(bref)); - HANDLE_CODE(unpack_integer(first_ofdm_symbol_in_time_domain, bref, (uint8_t)0u, (uint8_t)13u)); - HANDLE_CODE(unpack_integer(seq_generation_cfg, bref, (uint16_t)0u, (uint16_t)1023u)); - - return SRSASN_SUCCESS; -} -void csi_rs_res_mob_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("csi-RS-Index", csi_rs_idx); - j.write_fieldname("slotConfig"); - slot_cfg.to_json(j); - if (associated_ssb_present) { - j.write_fieldname("associatedSSB"); - j.start_obj(); - j.write_int("ssb-Index", associated_ssb.ssb_idx); - j.write_bool("isQuasiColocated", associated_ssb.is_quasi_colocated); - j.end_obj(); - } - j.write_fieldname("frequencyDomainAllocation"); - freq_domain_alloc.to_json(j); - j.write_int("firstOFDMSymbolInTimeDomain", first_ofdm_symbol_in_time_domain); - j.write_int("sequenceGenerationConfig", seq_generation_cfg); - j.end_obj(); -} - -void csi_rs_res_mob_s::slot_cfg_c_::destroy_() {} -void csi_rs_res_mob_s::slot_cfg_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -csi_rs_res_mob_s::slot_cfg_c_::slot_cfg_c_(const csi_rs_res_mob_s::slot_cfg_c_& other) -{ - type_ = other.type(); switch (type_) { - case types::ms4: - c.init(other.c.get()); - break; - case types::ms5: - c.init(other.c.get()); + case types::meas_report: + c.destroy(); break; - case types::ms10: - c.init(other.c.get()); + case types::rrc_recfg_complete: + c.destroy(); break; - case types::ms20: - c.init(other.c.get()); + case types::rrc_setup_complete: + c.destroy(); break; - case types::ms40: - c.init(other.c.get()); + case types::rrc_reest_complete: + c.destroy(); break; - case types::nulltype: + case types::rrc_resume_complete: + c.destroy(); break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); - } -} -csi_rs_res_mob_s::slot_cfg_c_& csi_rs_res_mob_s::slot_cfg_c_::operator=(const csi_rs_res_mob_s::slot_cfg_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ms4: - c.set(other.c.get()); + case types::security_mode_complete: + c.destroy(); break; - case types::ms5: - c.set(other.c.get()); + case types::security_mode_fail: + c.destroy(); break; - case types::ms10: - c.set(other.c.get()); + case types::ul_info_transfer: + c.destroy(); break; - case types::ms20: - c.set(other.c.get()); + case types::location_meas_ind: + c.destroy(); break; - case types::ms40: - c.set(other.c.get()); + case types::ue_cap_info: + c.destroy(); break; - case types::nulltype: + case types::counter_check_resp: + c.destroy(); break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); - } - - return *this; -} -void csi_rs_res_mob_s::slot_cfg_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ms4: - j.write_int("ms4", c.get()); + case types::ue_assist_info: + c.destroy(); break; - case types::ms5: - j.write_int("ms5", c.get()); + case types::fail_info: + c.destroy(); break; - case types::ms10: - j.write_int("ms10", c.get()); + case types::ul_info_transfer_mrdc: + c.destroy(); break; - case types::ms20: - j.write_int("ms20", c.get()); + case types::scg_fail_info: + c.destroy(); break; - case types::ms40: - j.write_int("ms40", c.get()); + case types::scg_fail_info_eutra: + c.destroy(); break; default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); + break; } - j.end_obj(); } -SRSASN_CODE csi_rs_res_mob_s::slot_cfg_c_::pack(bit_ref& bref) const +void ul_dcch_msg_type_c::c1_c_::set(types::options e) { - type_.pack(bref); + destroy_(); + type_ = e; switch (type_) { - case types::ms4: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + case types::meas_report: + c.init(); break; - case types::ms5: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + case types::rrc_recfg_complete: + c.init(); break; - case types::ms10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + case types::rrc_setup_complete: + c.init(); break; - case types::ms20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + case types::rrc_reest_complete: + c.init(); break; - case types::ms40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + case types::rrc_resume_complete: + c.init(); break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_rs_res_mob_s::slot_cfg_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ms4: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + case types::security_mode_complete: + c.init(); break; - case types::ms5: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + case types::security_mode_fail: + c.init(); break; - case types::ms10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + case types::ul_info_transfer: + c.init(); break; - case types::ms20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + case types::location_meas_ind: + c.init(); break; - case types::ms40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + case types::ue_cap_info: + c.init(); break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string csi_rs_res_mob_s::slot_cfg_c_::types_opts::to_string() const -{ - 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 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_() -{ - switch (type_) { - case types::row1: - c.destroy >(); + case types::counter_check_resp: + c.init(); break; - case types::row2: - c.destroy >(); + case types::ue_assist_info: + c.init(); break; - default: + case types::fail_info: + c.init(); break; - } -} -void csi_rs_res_mob_s::freq_domain_alloc_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::row1: - c.init >(); + case types::ul_info_transfer_mrdc: + c.init(); break; - case types::row2: - c.init >(); + case types::scg_fail_info: + c.init(); + break; + case types::scg_fail_info_eutra: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); } } -csi_rs_res_mob_s::freq_domain_alloc_c_::freq_domain_alloc_c_(const csi_rs_res_mob_s::freq_domain_alloc_c_& other) +ul_dcch_msg_type_c::c1_c_::c1_c_(const ul_dcch_msg_type_c::c1_c_& other) { type_ = other.type(); switch (type_) { - case types::row1: - c.init(other.c.get >()); + case types::meas_report: + c.init(other.c.get()); break; - case types::row2: - c.init(other.c.get >()); + case types::rrc_recfg_complete: + c.init(other.c.get()); + break; + case types::rrc_setup_complete: + c.init(other.c.get()); + break; + case types::rrc_reest_complete: + c.init(other.c.get()); + break; + case types::rrc_resume_complete: + c.init(other.c.get()); + break; + case types::security_mode_complete: + c.init(other.c.get()); + break; + case types::security_mode_fail: + c.init(other.c.get()); + break; + case types::ul_info_transfer: + c.init(other.c.get()); + break; + case types::location_meas_ind: + c.init(other.c.get()); + break; + case types::ue_cap_info: + c.init(other.c.get()); + break; + case types::counter_check_resp: + c.init(other.c.get()); + break; + case types::ue_assist_info: + c.init(other.c.get()); + break; + case types::fail_info: + c.init(other.c.get()); + break; + case types::ul_info_transfer_mrdc: + c.init(other.c.get()); + break; + case types::scg_fail_info: + c.init(other.c.get()); + break; + case types::scg_fail_info_eutra: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); } } -csi_rs_res_mob_s::freq_domain_alloc_c_& csi_rs_res_mob_s::freq_domain_alloc_c_:: - operator=(const csi_rs_res_mob_s::freq_domain_alloc_c_& other) +ul_dcch_msg_type_c::c1_c_& ul_dcch_msg_type_c::c1_c_::operator=(const ul_dcch_msg_type_c::c1_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::row1: - c.set(other.c.get >()); + case types::meas_report: + c.set(other.c.get()); break; - case types::row2: - c.set(other.c.get >()); + case types::rrc_recfg_complete: + c.set(other.c.get()); + break; + case types::rrc_setup_complete: + c.set(other.c.get()); + break; + case types::rrc_reest_complete: + c.set(other.c.get()); + break; + case types::rrc_resume_complete: + c.set(other.c.get()); + break; + case types::security_mode_complete: + c.set(other.c.get()); + break; + case types::security_mode_fail: + c.set(other.c.get()); + break; + case types::ul_info_transfer: + c.set(other.c.get()); + break; + case types::location_meas_ind: + c.set(other.c.get()); + break; + case types::ue_cap_info: + c.set(other.c.get()); + break; + case types::counter_check_resp: + c.set(other.c.get()); + break; + case types::ue_assist_info: + c.set(other.c.get()); + break; + case types::fail_info: + c.set(other.c.get()); + break; + case types::ul_info_transfer_mrdc: + c.set(other.c.get()); + break; + case types::scg_fail_info: + c.set(other.c.get()); + break; + case types::scg_fail_info_eutra: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); } return *this; } -void csi_rs_res_mob_s::freq_domain_alloc_c_::to_json(json_writer& j) const +void ul_dcch_msg_type_c::c1_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::row1: - j.write_str("row1", c.get >().to_string()); + case types::meas_report: + j.write_fieldname("measurementReport"); + c.get().to_json(j); break; - case types::row2: - j.write_str("row2", c.get >().to_string()); + case types::rrc_recfg_complete: + j.write_fieldname("rrcReconfigurationComplete"); + c.get().to_json(j); + break; + case types::rrc_setup_complete: + j.write_fieldname("rrcSetupComplete"); + c.get().to_json(j); + break; + case types::rrc_reest_complete: + j.write_fieldname("rrcReestablishmentComplete"); + c.get().to_json(j); + break; + case types::rrc_resume_complete: + j.write_fieldname("rrcResumeComplete"); + c.get().to_json(j); + break; + case types::security_mode_complete: + j.write_fieldname("securityModeComplete"); + c.get().to_json(j); + break; + case types::security_mode_fail: + j.write_fieldname("securityModeFailure"); + c.get().to_json(j); + break; + case types::ul_info_transfer: + j.write_fieldname("ulInformationTransfer"); + c.get().to_json(j); + break; + case types::location_meas_ind: + j.write_fieldname("locationMeasurementIndication"); + c.get().to_json(j); + break; + case types::ue_cap_info: + j.write_fieldname("ueCapabilityInformation"); + c.get().to_json(j); + break; + case types::counter_check_resp: + j.write_fieldname("counterCheckResponse"); + c.get().to_json(j); + break; + case types::ue_assist_info: + j.write_fieldname("ueAssistanceInformation"); + c.get().to_json(j); + break; + case types::fail_info: + j.write_fieldname("failureInformation"); + c.get().to_json(j); + break; + case types::ul_info_transfer_mrdc: + j.write_fieldname("ulInformationTransferMRDC"); + c.get().to_json(j); + break; + case types::scg_fail_info: + j.write_fieldname("scgFailureInformation"); + c.get().to_json(j); + break; + case types::scg_fail_info_eutra: + j.write_fieldname("scgFailureInformationEUTRA"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); } j.end_obj(); } -SRSASN_CODE csi_rs_res_mob_s::freq_domain_alloc_c_::pack(bit_ref& bref) const +SRSASN_CODE ul_dcch_msg_type_c::c1_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::row1: - HANDLE_CODE(c.get >().pack(bref)); + case types::meas_report: + HANDLE_CODE(c.get().pack(bref)); break; - case types::row2: - HANDLE_CODE(c.get >().pack(bref)); + case types::rrc_recfg_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_setup_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_reest_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_resume_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::security_mode_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::security_mode_fail: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_info_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::location_meas_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_cap_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::counter_check_resp: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_assist_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::fail_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_info_transfer_mrdc: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::scg_fail_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::scg_fail_info_eutra: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE csi_rs_res_mob_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) +SRSASN_CODE ul_dcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::row1: - HANDLE_CODE(c.get >().unpack(bref)); + case types::meas_report: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::row2: - HANDLE_CODE(c.get >().unpack(bref)); + case types::rrc_recfg_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_setup_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_reest_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_resume_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::security_mode_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::security_mode_fail: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_info_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::location_meas_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_cap_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::counter_check_resp: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_assist_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::fail_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_info_transfer_mrdc: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::scg_fail_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::scg_fail_info_eutra: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_string() const -{ - 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 +std::string ul_dcch_msg_type_c::c1_c_::types_opts::to_string() const { - static const uint8_t options[] = {1, 2}; - return map_enum_number(options, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); + static const char* options[] = {"measurementReport", + "rrcReconfigurationComplete", + "rrcSetupComplete", + "rrcReestablishmentComplete", + "rrcResumeComplete", + "securityModeComplete", + "securityModeFailure", + "ulInformationTransfer", + "locationMeasurementIndication", + "ueCapabilityInformation", + "counterCheckResponse", + "ueAssistanceInformation", + "failureInformation", + "ulInformationTransferMRDC", + "scgFailureInformation", + "scgFailureInformationEUTRA"}; + return convert_enum_idx(options, 16, value, "ul_dcch_msg_type_c::c1_c_::types"); } -// CSI-RS-CellMobility ::= SEQUENCE -SRSASN_CODE csi_rs_cell_mob_s::pack(bit_ref& bref) const +std::string ul_dcch_msg_type_c::types_opts::to_string() const { - HANDLE_CODE(bref.pack(density_present, 1)); + 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 const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_dcch_msg_type_c::types"); +} - HANDLE_CODE(pack_integer(bref, cell_id, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(csi_rs_meas_bw.nrof_prbs.pack(bref)); - HANDLE_CODE(pack_integer(bref, csi_rs_meas_bw.start_prb, (uint16_t)0u, (uint16_t)2169u)); - if (density_present) { - HANDLE_CODE(density.pack(bref)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_res_list_mob, 1, 96)); +// UL-DCCH-Message ::= SEQUENCE +SRSASN_CODE ul_dcch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); return SRSASN_SUCCESS; } -SRSASN_CODE csi_rs_cell_mob_s::unpack(cbit_ref& bref) +SRSASN_CODE ul_dcch_msg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(density_present, 1)); + HANDLE_CODE(msg.unpack(bref)); - HANDLE_CODE(unpack_integer(cell_id, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(csi_rs_meas_bw.nrof_prbs.unpack(bref)); - HANDLE_CODE(unpack_integer(csi_rs_meas_bw.start_prb, bref, (uint16_t)0u, (uint16_t)2169u)); - if (density_present) { - HANDLE_CODE(density.unpack(bref)); - } - HANDLE_CODE(unpack_dyn_seq_of(csi_rs_res_list_mob, bref, 1, 96)); + bref.align_bytes(); return SRSASN_SUCCESS; } -void csi_rs_cell_mob_s::to_json(json_writer& j) const +void ul_dcch_msg_s::to_json(json_writer& j) const { + j.start_array(); j.start_obj(); - j.write_int("cellId", cell_id); - j.write_fieldname("csi-rs-MeasurementBW"); - j.start_obj(); - j.write_str("nrofPRBs", csi_rs_meas_bw.nrof_prbs.to_string()); - j.write_int("startPRB", csi_rs_meas_bw.start_prb); + j.start_obj("UL-DCCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); j.end_obj(); - if (density_present) { - j.write_str("density", density.to_string()); - } - j.start_array("csi-rs-ResourceList-Mobility"); - for (const auto& e1 : csi_rs_res_list_mob) { - e1.to_json(j); - } - j.end_array(); j.end_obj(); + j.end_array(); } -std::string csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_opts::to_string() const -{ - 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 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 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 const uint8_t options[] = {1, 3}; - return map_enum_number(options, 2, value, "csi_rs_cell_mob_s::density_e_"); -} - -// Q-OffsetRangeList ::= SEQUENCE -SRSASN_CODE q_offset_range_list_s::pack(bit_ref& bref) const +// BFR-CSIRS-Resource ::= SEQUENCE +SRSASN_CODE bfr_csirs_res_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(rsrp_offset_ssb_present, 1)); - HANDLE_CODE(bref.pack(rsrq_offset_ssb_present, 1)); - HANDLE_CODE(bref.pack(sinr_offset_ssb_present, 1)); - HANDLE_CODE(bref.pack(rsrp_offset_csi_rs_present, 1)); - HANDLE_CODE(bref.pack(rsrq_offset_csi_rs_present, 1)); - HANDLE_CODE(bref.pack(sinr_offset_csi_rs_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ra_occasion_list_present, 1)); + HANDLE_CODE(bref.pack(ra_preamb_idx_present, 1)); - if (rsrp_offset_ssb_present) { - HANDLE_CODE(rsrp_offset_ssb.pack(bref)); - } - if (rsrq_offset_ssb_present) { - HANDLE_CODE(rsrq_offset_ssb.pack(bref)); - } - if (sinr_offset_ssb_present) { - HANDLE_CODE(sinr_offset_ssb.pack(bref)); - } - if (rsrp_offset_csi_rs_present) { - HANDLE_CODE(rsrp_offset_csi_rs.pack(bref)); - } - if (rsrq_offset_csi_rs_present) { - HANDLE_CODE(rsrq_offset_csi_rs.pack(bref)); + HANDLE_CODE(pack_integer(bref, csi_rs, (uint8_t)0u, (uint8_t)191u)); + if (ra_occasion_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ra_occasion_list, 1, 64, integer_packer(0, 511))); } - if (sinr_offset_csi_rs_present) { - HANDLE_CODE(sinr_offset_csi_rs.pack(bref)); + if (ra_preamb_idx_present) { + HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); } return SRSASN_SUCCESS; } -SRSASN_CODE q_offset_range_list_s::unpack(cbit_ref& bref) +SRSASN_CODE bfr_csirs_res_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(rsrp_offset_ssb_present, 1)); - HANDLE_CODE(bref.unpack(rsrq_offset_ssb_present, 1)); - HANDLE_CODE(bref.unpack(sinr_offset_ssb_present, 1)); - HANDLE_CODE(bref.unpack(rsrp_offset_csi_rs_present, 1)); - HANDLE_CODE(bref.unpack(rsrq_offset_csi_rs_present, 1)); - HANDLE_CODE(bref.unpack(sinr_offset_csi_rs_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ra_occasion_list_present, 1)); + HANDLE_CODE(bref.unpack(ra_preamb_idx_present, 1)); - if (rsrp_offset_ssb_present) { - HANDLE_CODE(rsrp_offset_ssb.unpack(bref)); - } - if (rsrq_offset_ssb_present) { - HANDLE_CODE(rsrq_offset_ssb.unpack(bref)); - } - if (sinr_offset_ssb_present) { - HANDLE_CODE(sinr_offset_ssb.unpack(bref)); - } - if (rsrp_offset_csi_rs_present) { - HANDLE_CODE(rsrp_offset_csi_rs.unpack(bref)); - } - if (rsrq_offset_csi_rs_present) { - HANDLE_CODE(rsrq_offset_csi_rs.unpack(bref)); + HANDLE_CODE(unpack_integer(csi_rs, bref, (uint8_t)0u, (uint8_t)191u)); + if (ra_occasion_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ra_occasion_list, bref, 1, 64, integer_packer(0, 511))); } - if (sinr_offset_csi_rs_present) { - HANDLE_CODE(sinr_offset_csi_rs.unpack(bref)); + if (ra_preamb_idx_present) { + HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); } return SRSASN_SUCCESS; } -void q_offset_range_list_s::to_json(json_writer& j) const +void bfr_csirs_res_s::to_json(json_writer& j) const { j.start_obj(); - if (rsrp_offset_ssb_present) { - j.write_str("rsrpOffsetSSB", rsrp_offset_ssb.to_string()); - } - if (rsrq_offset_ssb_present) { - j.write_str("rsrqOffsetSSB", rsrq_offset_ssb.to_string()); - } - if (sinr_offset_ssb_present) { - j.write_str("sinrOffsetSSB", sinr_offset_ssb.to_string()); - } - if (rsrp_offset_csi_rs_present) { - j.write_str("rsrpOffsetCSI-RS", rsrp_offset_csi_rs.to_string()); - } - if (rsrq_offset_csi_rs_present) { - j.write_str("rsrqOffsetCSI-RS", rsrq_offset_csi_rs.to_string()); + j.write_int("csi-RS", csi_rs); + if (ra_occasion_list_present) { + j.start_array("ra-OccasionList"); + for (const auto& e1 : ra_occasion_list) { + j.write_int(e1); + } + j.end_array(); } - if (sinr_offset_csi_rs_present) { - j.write_str("sinrOffsetCSI-RS", sinr_offset_csi_rs.to_string()); + if (ra_preamb_idx_present) { + j.write_int("ra-PreambleIndex", ra_preamb_idx); } j.end_obj(); } -// CSI-RS-ResourceConfigMobility ::= SEQUENCE -SRSASN_CODE csi_rs_res_cfg_mob_s::pack(bit_ref& bref) const +// BFR-SSB-Resource ::= SEQUENCE +SRSASN_CODE bfr_ssb_res_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(subcarrier_spacing.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_cell_list_mob, 1, 96)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ref_serv_cell_idx_v1530_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(pack_integer(bref, ssb, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(bref.pack(ref_serv_cell_idx_v1530_present, 1)); - if (ref_serv_cell_idx_v1530_present) { - HANDLE_CODE(pack_integer(bref, ref_serv_cell_idx_v1530, (uint8_t)0u, (uint8_t)31u)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE csi_rs_res_cfg_mob_s::unpack(cbit_ref& bref) +SRSASN_CODE bfr_ssb_res_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(subcarrier_spacing.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(csi_rs_cell_list_mob, bref, 1, 96)); - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(unpack_integer(ssb, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(bref.unpack(ref_serv_cell_idx_v1530_present, 1)); - if (ref_serv_cell_idx_v1530_present) { - HANDLE_CODE(unpack_integer(ref_serv_cell_idx_v1530, bref, (uint8_t)0u, (uint8_t)31u)); - } - } - } return SRSASN_SUCCESS; } -void csi_rs_res_cfg_mob_s::to_json(json_writer& j) const +void bfr_ssb_res_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 (const auto& e1 : csi_rs_cell_list_mob) { - e1.to_json(j); - } - j.end_array(); - if (ext) { - if (ref_serv_cell_idx_v1530_present) { - j.write_int("refServCellIndex-v1530", ref_serv_cell_idx_v1530); - } - } + j.write_int("ssb", ssb); + j.write_int("ra-PreambleIndex", ra_preamb_idx); j.end_obj(); } -// CellsToAddMod ::= SEQUENCE -SRSASN_CODE cells_to_add_mod_s::pack(bit_ref& bref) const +// CSI-FrequencyOccupation ::= SEQUENCE +SRSASN_CODE csi_freq_occupation_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(cell_individual_offset.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, start_rb, (uint16_t)0u, (uint16_t)274u)); + HANDLE_CODE(pack_integer(bref, nrof_rbs, (uint16_t)24u, (uint16_t)276u)); return SRSASN_SUCCESS; } -SRSASN_CODE cells_to_add_mod_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_freq_occupation_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(cell_individual_offset.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(start_rb, bref, (uint16_t)0u, (uint16_t)274u)); + HANDLE_CODE(unpack_integer(nrof_rbs, bref, (uint16_t)24u, (uint16_t)276u)); return SRSASN_SUCCESS; } -void cells_to_add_mod_s::to_json(json_writer& j) const +void csi_freq_occupation_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("physCellId", pci); - j.write_fieldname("cellIndividualOffset"); - cell_individual_offset.to_json(j); + j.write_int("startingRB", start_rb); + j.write_int("nrofRBs", nrof_rbs); j.end_obj(); } -// FilterCoefficient ::= ENUMERATED -std::string filt_coef_opts::to_string() const -{ - 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 +// CSI-RS-ResourceMapping ::= SEQUENCE +SRSASN_CODE csi_rs_res_map_s::pack(bit_ref& bref) const { - 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"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(first_ofdm_symbol_in_time_domain2_present, 1)); -// MeasReportQuantity ::= SEQUENCE -SRSASN_CODE meas_report_quant_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(rsrp, 1)); - HANDLE_CODE(bref.pack(rsrq, 1)); - HANDLE_CODE(bref.pack(sinr, 1)); + HANDLE_CODE(freq_domain_alloc.pack(bref)); + HANDLE_CODE(nrof_ports.pack(bref)); + HANDLE_CODE(pack_integer(bref, first_ofdm_symbol_in_time_domain, (uint8_t)0u, (uint8_t)13u)); + if (first_ofdm_symbol_in_time_domain2_present) { + HANDLE_CODE(pack_integer(bref, first_ofdm_symbol_in_time_domain2, (uint8_t)2u, (uint8_t)12u)); + } + HANDLE_CODE(cdm_type.pack(bref)); + HANDLE_CODE(density.pack(bref)); + HANDLE_CODE(freq_band.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_report_quant_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_rs_res_map_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(rsrp, 1)); - HANDLE_CODE(bref.unpack(rsrq, 1)); - HANDLE_CODE(bref.unpack(sinr, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(first_ofdm_symbol_in_time_domain2_present, 1)); + + HANDLE_CODE(freq_domain_alloc.unpack(bref)); + HANDLE_CODE(nrof_ports.unpack(bref)); + HANDLE_CODE(unpack_integer(first_ofdm_symbol_in_time_domain, bref, (uint8_t)0u, (uint8_t)13u)); + if (first_ofdm_symbol_in_time_domain2_present) { + HANDLE_CODE(unpack_integer(first_ofdm_symbol_in_time_domain2, bref, (uint8_t)2u, (uint8_t)12u)); + } + HANDLE_CODE(cdm_type.unpack(bref)); + HANDLE_CODE(density.unpack(bref)); + HANDLE_CODE(freq_band.unpack(bref)); return SRSASN_SUCCESS; } -void meas_report_quant_s::to_json(json_writer& j) const +void csi_rs_res_map_s::to_json(json_writer& j) const { j.start_obj(); - j.write_bool("rsrp", rsrp); - j.write_bool("rsrq", rsrq); - j.write_bool("sinr", sinr); + j.write_fieldname("frequencyDomainAllocation"); + freq_domain_alloc.to_json(j); + j.write_str("nrofPorts", nrof_ports.to_string()); + j.write_int("firstOFDMSymbolInTimeDomain", first_ofdm_symbol_in_time_domain); + if (first_ofdm_symbol_in_time_domain2_present) { + j.write_int("firstOFDMSymbolInTimeDomain2", first_ofdm_symbol_in_time_domain2); + } + j.write_str("cdm-Type", cdm_type.to_string()); + j.write_fieldname("density"); + density.to_json(j); + j.write_fieldname("freqBand"); + freq_band.to_json(j); j.end_obj(); } -// MeasTriggerQuantity ::= CHOICE -void meas_trigger_quant_c::destroy_() {} -void meas_trigger_quant_c::set(types::options e) +void csi_rs_res_map_s::freq_domain_alloc_c_::destroy_() +{ + switch (type_) { + case types::row1: + c.destroy >(); + break; + case types::row2: + c.destroy >(); + break; + case types::row4: + c.destroy >(); + break; + case types::other: + c.destroy >(); + break; + default: + break; + } +} +void csi_rs_res_map_s::freq_domain_alloc_c_::set(types::options e) { destroy_(); type_ = e; + switch (type_) { + case types::row1: + c.init >(); + break; + case types::row2: + c.init >(); + break; + case types::row4: + c.init >(); + break; + case types::other: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); + } } -meas_trigger_quant_c::meas_trigger_quant_c(const meas_trigger_quant_c& other) +csi_rs_res_map_s::freq_domain_alloc_c_::freq_domain_alloc_c_(const csi_rs_res_map_s::freq_domain_alloc_c_& other) { type_ = other.type(); switch (type_) { - case types::rsrp: - c.init(other.c.get()); + case types::row1: + c.init(other.c.get >()); break; - case types::rsrq: - c.init(other.c.get()); + case types::row2: + c.init(other.c.get >()); break; - case types::sinr: - c.init(other.c.get()); + case types::row4: + c.init(other.c.get >()); + break; + case types::other: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_c"); + log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); } } -meas_trigger_quant_c& meas_trigger_quant_c::operator=(const meas_trigger_quant_c& other) +csi_rs_res_map_s::freq_domain_alloc_c_& +csi_rs_res_map_s::freq_domain_alloc_c_::operator=(const csi_rs_res_map_s::freq_domain_alloc_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rsrp: - c.set(other.c.get()); + case types::row1: + c.set(other.c.get >()); break; - case types::rsrq: - c.set(other.c.get()); + case types::row2: + c.set(other.c.get >()); break; - case types::sinr: - c.set(other.c.get()); + case types::row4: + c.set(other.c.get >()); + break; + case types::other: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_c"); + log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); } return *this; } -void meas_trigger_quant_c::to_json(json_writer& j) const +void csi_rs_res_map_s::freq_domain_alloc_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rsrp: - j.write_int("rsrp", c.get()); + case types::row1: + j.write_str("row1", c.get >().to_string()); break; - case types::rsrq: - j.write_int("rsrq", c.get()); + case types::row2: + j.write_str("row2", c.get >().to_string()); break; - case types::sinr: - j.write_int("sinr", c.get()); + case types::row4: + j.write_str("row4", c.get >().to_string()); + break; + case types::other: + j.write_str("other", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_c"); + log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); } j.end_obj(); } -SRSASN_CODE meas_trigger_quant_c::pack(bit_ref& bref) const +SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rsrp: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + case types::row1: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::rsrq: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + case types::row2: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::sinr: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + case types::row4: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::other: + HANDLE_CODE(c.get >().pack(bref)); break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_c"); + log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE meas_trigger_quant_c::unpack(cbit_ref& bref) +SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rsrp: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + case types::row1: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::rsrq: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + case types::row2: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::sinr: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + case types::row4: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::other: + HANDLE_CODE(c.get >().unpack(bref)); break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_c"); + log_invalid_choice_id(type_, "csi_rs_res_map_s::freq_domain_alloc_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string meas_trigger_quant_c::types_opts::to_string() const +std::string csi_rs_res_map_s::freq_domain_alloc_c_::types_opts::to_string() const { - static const char* options[] = {"rsrp", "rsrq", "sinr"}; - return convert_enum_idx(options, 3, value, "meas_trigger_quant_c::types"); + 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 const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "csi_rs_res_map_s::freq_domain_alloc_c_::types"); } -// MeasTriggerQuantityEUTRA ::= CHOICE -void meas_trigger_quant_eutra_c::destroy_() {} -void meas_trigger_quant_eutra_c::set(types::options e) +std::string csi_rs_res_map_s::nrof_ports_opts::to_string() const { - destroy_(); - type_ = e; + 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_"); } -meas_trigger_quant_eutra_c::meas_trigger_quant_eutra_c(const meas_trigger_quant_eutra_c& other) +uint8_t csi_rs_res_map_s::nrof_ports_opts::to_number() const { - type_ = other.type(); - switch (type_) { - case types::rsrp: - c.init(other.c.get()); - break; - case types::rsrq: - c.init(other.c.get()); - break; - case types::sinr: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); - } + 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_"); } -meas_trigger_quant_eutra_c& meas_trigger_quant_eutra_c::operator=(const meas_trigger_quant_eutra_c& other) + +std::string csi_rs_res_map_s::cdm_type_opts::to_string() const { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::rsrp: - c.set(other.c.get()); - break; - case types::rsrq: - c.set(other.c.get()); - break; - case types::sinr: - c.set(other.c.get()); - break; - case types::nulltype: - break; + 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 +{ + switch (value) { + case fd_cdm2: + return 2; + case cdm4_fd2_td2: + return 4; + case cdm8_fd2_td4: + return 8; default: - log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + invalid_enum_number(value, "csi_rs_res_map_s::cdm_type_e_"); } + return 0; +} - return *this; +void csi_rs_res_map_s::density_c_::set(types::options e) +{ + type_ = e; } -void meas_trigger_quant_eutra_c::to_json(json_writer& j) const +void csi_rs_res_map_s::density_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rsrp: - j.write_int("rsrp", c.get()); + case types::dot5: + j.write_str("dot5", c.to_string()); break; - case types::rsrq: - j.write_int("rsrq", c.get()); + case types::one: break; - case types::sinr: - j.write_int("sinr", c.get()); + case types::three: + break; + case types::spare: break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + log_invalid_choice_id(type_, "csi_rs_res_map_s::density_c_"); } j.end_obj(); } -SRSASN_CODE meas_trigger_quant_eutra_c::pack(bit_ref& bref) const +SRSASN_CODE csi_rs_res_map_s::density_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rsrp: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)97u)); + case types::dot5: + HANDLE_CODE(c.pack(bref)); break; - case types::rsrq: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)34u)); + case types::one: break; - case types::sinr: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + case types::three: + break; + case types::spare: break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + log_invalid_choice_id(type_, "csi_rs_res_map_s::density_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE meas_trigger_quant_eutra_c::unpack(cbit_ref& bref) +SRSASN_CODE csi_rs_res_map_s::density_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rsrp: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)97u)); + case types::dot5: + HANDLE_CODE(c.unpack(bref)); break; - case types::rsrq: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)34u)); + case types::one: break; - case types::sinr: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + case types::three: + break; + case types::spare: break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + log_invalid_choice_id(type_, "csi_rs_res_map_s::density_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string meas_trigger_quant_eutra_c::types_opts::to_string() const +std::string csi_rs_res_map_s::density_c_::dot5_opts::to_string() const { - static const char* options[] = {"rsrp", "rsrq", "sinr"}; - return convert_enum_idx(options, 3, value, "meas_trigger_quant_eutra_c::types"); + static const char* options[] = {"evenPRBs", "oddPRBs"}; + return convert_enum_idx(options, 2, value, "csi_rs_res_map_s::density_c_::dot5_e_"); } -// MeasTriggerQuantityOffset ::= CHOICE -void meas_trigger_quant_offset_c::destroy_() {} -void meas_trigger_quant_offset_c::set(types::options e) +std::string csi_rs_res_map_s::density_c_::types_opts::to_string() const +{ + 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 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 +void csi_res_periodicity_and_offset_c::destroy_() {} +void csi_res_periodicity_and_offset_c::set(types::options e) { destroy_(); type_ = e; } -meas_trigger_quant_offset_c::meas_trigger_quant_offset_c(const meas_trigger_quant_offset_c& other) +csi_res_periodicity_and_offset_c::csi_res_periodicity_and_offset_c(const csi_res_periodicity_and_offset_c& other) { type_ = other.type(); switch (type_) { - case types::rsrp: - c.init(other.c.get()); + case types::slots4: + c.init(other.c.get()); break; - case types::rsrq: - c.init(other.c.get()); + case types::slots5: + c.init(other.c.get()); break; - case types::sinr: - c.init(other.c.get()); + case types::slots8: + c.init(other.c.get()); + break; + case types::slots10: + c.init(other.c.get()); + break; + case types::slots16: + c.init(other.c.get()); + break; + case types::slots20: + c.init(other.c.get()); + break; + case types::slots32: + c.init(other.c.get()); + break; + case types::slots40: + c.init(other.c.get()); + break; + case types::slots64: + c.init(other.c.get()); + break; + case types::slots80: + c.init(other.c.get()); + break; + case types::slots160: + c.init(other.c.get()); + break; + case types::slots320: + c.init(other.c.get()); + break; + case types::slots640: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); + log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); } } -meas_trigger_quant_offset_c& meas_trigger_quant_offset_c::operator=(const meas_trigger_quant_offset_c& other) +csi_res_periodicity_and_offset_c& +csi_res_periodicity_and_offset_c::operator=(const csi_res_periodicity_and_offset_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rsrp: - c.set(other.c.get()); + case types::slots4: + c.set(other.c.get()); break; - case types::rsrq: - c.set(other.c.get()); + case types::slots5: + c.set(other.c.get()); break; - case types::sinr: - c.set(other.c.get()); + case types::slots8: + c.set(other.c.get()); + break; + case types::slots10: + c.set(other.c.get()); + break; + case types::slots16: + c.set(other.c.get()); + break; + case types::slots20: + c.set(other.c.get()); + break; + case types::slots32: + c.set(other.c.get()); + break; + case types::slots40: + c.set(other.c.get()); + break; + case types::slots64: + c.set(other.c.get()); + break; + case types::slots80: + c.set(other.c.get()); + break; + case types::slots160: + c.set(other.c.get()); + break; + case types::slots320: + c.set(other.c.get()); + break; + case types::slots640: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); + log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); } return *this; } -void meas_trigger_quant_offset_c::to_json(json_writer& j) const +void csi_res_periodicity_and_offset_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rsrp: - j.write_int("rsrp", c.get()); + case types::slots4: + j.write_int("slots4", c.get()); break; - case types::rsrq: - j.write_int("rsrq", c.get()); + case types::slots5: + j.write_int("slots5", c.get()); break; - case types::sinr: - j.write_int("sinr", c.get()); + case types::slots8: + j.write_int("slots8", c.get()); + break; + case types::slots10: + j.write_int("slots10", c.get()); + break; + case types::slots16: + j.write_int("slots16", c.get()); + break; + case types::slots20: + j.write_int("slots20", c.get()); + break; + case types::slots32: + j.write_int("slots32", c.get()); + break; + case types::slots40: + j.write_int("slots40", c.get()); + break; + case types::slots64: + j.write_int("slots64", c.get()); + break; + case types::slots80: + j.write_int("slots80", c.get()); + break; + case types::slots160: + j.write_int("slots160", c.get()); + break; + case types::slots320: + j.write_int("slots320", c.get()); + break; + case types::slots640: + j.write_int("slots640", c.get()); break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); + log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); } j.end_obj(); } -SRSASN_CODE meas_trigger_quant_offset_c::pack(bit_ref& bref) const +SRSASN_CODE csi_res_periodicity_and_offset_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rsrp: - HANDLE_CODE(pack_integer(bref, c.get(), (int8_t)-30, (int8_t)30)); + case types::slots4: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); break; - case types::rsrq: - HANDLE_CODE(pack_integer(bref, c.get(), (int8_t)-30, (int8_t)30)); + case types::slots5: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); break; - case types::sinr: - HANDLE_CODE(pack_integer(bref, c.get(), (int8_t)-30, (int8_t)30)); + case types::slots8: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); + break; + case types::slots10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::slots16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + break; + case types::slots20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::slots32: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::slots40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::slots64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::slots80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::slots160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::slots320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::slots640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); + log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE meas_trigger_quant_offset_c::unpack(cbit_ref& bref) +SRSASN_CODE csi_res_periodicity_and_offset_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rsrp: - HANDLE_CODE(unpack_integer(c.get(), bref, (int8_t)-30, (int8_t)30)); + case types::slots4: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); break; - case types::rsrq: - HANDLE_CODE(unpack_integer(c.get(), bref, (int8_t)-30, (int8_t)30)); + case types::slots5: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); break; - case types::sinr: - HANDLE_CODE(unpack_integer(c.get(), bref, (int8_t)-30, (int8_t)30)); + case types::slots8: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); + break; + case types::slots10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::slots16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::slots20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::slots32: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::slots40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::slots64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::slots80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::slots160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::slots320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::slots640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); break; default: - log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); + log_invalid_choice_id(type_, "csi_res_periodicity_and_offset_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string meas_trigger_quant_offset_c::types_opts::to_string() const +std::string csi_res_periodicity_and_offset_c::types_opts::to_string() const { - static const char* options[] = {"rsrp", "rsrq", "sinr"}; - return convert_enum_idx(options, 3, value, "meas_trigger_quant_offset_c::types"); + 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"); } - -// NR-RS-Type ::= ENUMERATED -std::string nr_rs_type_opts::to_string() const +uint16_t csi_res_periodicity_and_offset_c::types_opts::to_number() const { - static const char* options[] = {"ssb", "csi-rs"}; - return convert_enum_idx(options, 2, value, "nr_rs_type_e"); + 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"); } -// ReportInterval ::= ENUMERATED -std::string report_interv_opts::to_string() const +// INT-ConfigurationPerServingCell ::= SEQUENCE +SRSASN_CODE int_cfg_per_serving_cell_s::pack(bit_ref& bref) const { - 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"); + HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, position_in_dci, (uint8_t)0u, (uint8_t)125u)); + + return SRSASN_SUCCESS; } -uint16_t report_interv_opts::to_number() const +SRSASN_CODE int_cfg_per_serving_cell_s::unpack(cbit_ref& bref) { - 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"); + HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(position_in_dci, bref, (uint8_t)0u, (uint8_t)125u)); + + return SRSASN_SUCCESS; +} +void int_cfg_per_serving_cell_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servingCellId", serving_cell_id); + j.write_int("positionInDCI", position_in_dci); + j.end_obj(); } -// SSB-ConfigMobility ::= SEQUENCE -SRSASN_CODE ssb_cfg_mob_s::pack(bit_ref& bref) const +// PTRS-DownlinkConfig ::= SEQUENCE +SRSASN_CODE ptrs_dl_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ssb_to_measure_present, 1)); - HANDLE_CODE(bref.pack(ss_rssi_meas_present, 1)); + HANDLE_CODE(bref.pack(freq_density_present, 1)); + HANDLE_CODE(bref.pack(time_density_present, 1)); + HANDLE_CODE(bref.pack(epre_ratio_present, 1)); + HANDLE_CODE(bref.pack(res_elem_offset_present, 1)); - if (ssb_to_measure_present) { - HANDLE_CODE(ssb_to_measure.pack(bref)); + if (freq_density_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(freq_density)[0], freq_density.size(), integer_packer(1, 276))); } - HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell, 1)); - if (ss_rssi_meas_present) { - HANDLE_CODE(ss_rssi_meas.pack(bref)); + if (time_density_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(time_density)[0], time_density.size(), integer_packer(0, 29))); + } + if (epre_ratio_present) { + HANDLE_CODE(pack_integer(bref, epre_ratio, (uint8_t)0u, (uint8_t)3u)); + } + if (res_elem_offset_present) { + HANDLE_CODE(res_elem_offset.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE ssb_cfg_mob_s::unpack(cbit_ref& bref) +SRSASN_CODE ptrs_dl_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ssb_to_measure_present, 1)); - HANDLE_CODE(bref.unpack(ss_rssi_meas_present, 1)); + HANDLE_CODE(bref.unpack(freq_density_present, 1)); + HANDLE_CODE(bref.unpack(time_density_present, 1)); + HANDLE_CODE(bref.unpack(epre_ratio_present, 1)); + HANDLE_CODE(bref.unpack(res_elem_offset_present, 1)); - if (ssb_to_measure_present) { - HANDLE_CODE(ssb_to_measure.unpack(bref)); + if (freq_density_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(freq_density)[0], bref, freq_density.size(), integer_packer(1, 276))); } - HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell, 1)); - if (ss_rssi_meas_present) { - HANDLE_CODE(ss_rssi_meas.unpack(bref)); + if (time_density_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(time_density)[0], bref, time_density.size(), integer_packer(0, 29))); + } + if (epre_ratio_present) { + HANDLE_CODE(unpack_integer(epre_ratio, bref, (uint8_t)0u, (uint8_t)3u)); + } + if (res_elem_offset_present) { + HANDLE_CODE(res_elem_offset.unpack(bref)); } return SRSASN_SUCCESS; } -void ssb_cfg_mob_s::to_json(json_writer& j) const +void ptrs_dl_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (ssb_to_measure_present) { - j.write_fieldname("ssb-ToMeasure"); - ssb_to_measure.to_json(j); + if (freq_density_present) { + j.start_array("frequencyDensity"); + for (const auto& e1 : freq_density) { + j.write_int(e1); + } + j.end_array(); } - j.write_bool("deriveSSB-IndexFromCell", derive_ssb_idx_from_cell); - if (ss_rssi_meas_present) { - j.write_fieldname("ss-RSSI-Measurement"); - ss_rssi_meas.to_json(j); + if (time_density_present) { + j.start_array("timeDensity"); + for (const auto& e1 : time_density) { + j.write_int(e1); + } + j.end_array(); + } + if (epre_ratio_present) { + j.write_int("epre-Ratio", epre_ratio); + } + if (res_elem_offset_present) { + j.write_str("resourceElementOffset", res_elem_offset.to_string()); } j.end_obj(); } -// TimeToTrigger ::= ENUMERATED -std::string time_to_trigger_opts::to_string() const +std::string ptrs_dl_cfg_s::res_elem_offset_opts::to_string() const { - 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"); + static const char* options[] = {"offset01", "offset10", "offset11"}; + return convert_enum_idx(options, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); } -uint16_t time_to_trigger_opts::to_number() const +float ptrs_dl_cfg_s::res_elem_offset_opts::to_number() const { - 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"); + 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_"); } - -// EUTRA-BlackCell ::= SEQUENCE -SRSASN_CODE eutra_black_cell_s::pack(bit_ref& bref) const +std::string ptrs_dl_cfg_s::res_elem_offset_opts::to_number_string() const { - HANDLE_CODE(pack_integer(bref, cell_idx_eutra, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pci_range.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE eutra_black_cell_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(cell_idx_eutra, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pci_range.unpack(bref)); - - return SRSASN_SUCCESS; -} -void eutra_black_cell_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("cellIndexEUTRA", cell_idx_eutra); - j.write_fieldname("physCellIdRange"); - pci_range.to_json(j); - j.end_obj(); -} - -// EUTRA-Cell ::= SEQUENCE -SRSASN_CODE eutra_cell_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, cell_idx_eutra, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(cell_individual_offset.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE eutra_cell_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(cell_idx_eutra, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(cell_individual_offset.unpack(bref)); - - return SRSASN_SUCCESS; -} -void eutra_cell_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("cellIndexEUTRA", cell_idx_eutra); - j.write_int("physCellId", pci); - j.write_str("cellIndividualOffset", cell_individual_offset.to_string()); - j.end_obj(); + 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_"); } -// EventTriggerConfig ::= SEQUENCE -SRSASN_CODE event_trigger_cfg_s::pack(bit_ref& bref) const +// QCL-Info ::= SEQUENCE +SRSASN_CODE qcl_info_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(report_quant_rs_idxes_present, 1)); - HANDLE_CODE(bref.pack(max_nrof_rs_idxes_to_report_present, 1)); - HANDLE_CODE(bref.pack(report_add_neigh_meas_present, 1)); + HANDLE_CODE(bref.pack(cell_present, 1)); + HANDLE_CODE(bref.pack(bwp_id_present, 1)); - HANDLE_CODE(event_id.pack(bref)); - HANDLE_CODE(rs_type.pack(bref)); - HANDLE_CODE(report_interv.pack(bref)); - HANDLE_CODE(report_amount.pack(bref)); - HANDLE_CODE(report_quant_cell.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_report_cells, (uint8_t)1u, (uint8_t)8u)); - if (report_quant_rs_idxes_present) { - HANDLE_CODE(report_quant_rs_idxes.pack(bref)); + if (cell_present) { + HANDLE_CODE(pack_integer(bref, cell, (uint8_t)0u, (uint8_t)31u)); } - if (max_nrof_rs_idxes_to_report_present) { - HANDLE_CODE(pack_integer(bref, max_nrof_rs_idxes_to_report, (uint8_t)1u, (uint8_t)32u)); + if (bwp_id_present) { + HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); } - HANDLE_CODE(bref.pack(include_beam_meass, 1)); + HANDLE_CODE(ref_sig.pack(bref)); + HANDLE_CODE(qcl_type.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE event_trigger_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE qcl_info_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(report_quant_rs_idxes_present, 1)); - HANDLE_CODE(bref.unpack(max_nrof_rs_idxes_to_report_present, 1)); - HANDLE_CODE(bref.unpack(report_add_neigh_meas_present, 1)); + HANDLE_CODE(bref.unpack(cell_present, 1)); + HANDLE_CODE(bref.unpack(bwp_id_present, 1)); - HANDLE_CODE(event_id.unpack(bref)); - HANDLE_CODE(rs_type.unpack(bref)); - HANDLE_CODE(report_interv.unpack(bref)); - HANDLE_CODE(report_amount.unpack(bref)); - HANDLE_CODE(report_quant_cell.unpack(bref)); - HANDLE_CODE(unpack_integer(max_report_cells, bref, (uint8_t)1u, (uint8_t)8u)); - if (report_quant_rs_idxes_present) { - HANDLE_CODE(report_quant_rs_idxes.unpack(bref)); + if (cell_present) { + HANDLE_CODE(unpack_integer(cell, bref, (uint8_t)0u, (uint8_t)31u)); } - if (max_nrof_rs_idxes_to_report_present) { - HANDLE_CODE(unpack_integer(max_nrof_rs_idxes_to_report, bref, (uint8_t)1u, (uint8_t)32u)); + if (bwp_id_present) { + HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); } - HANDLE_CODE(bref.unpack(include_beam_meass, 1)); + HANDLE_CODE(ref_sig.unpack(bref)); + HANDLE_CODE(qcl_type.unpack(bref)); return SRSASN_SUCCESS; } -void event_trigger_cfg_s::to_json(json_writer& j) const +void qcl_info_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("eventId"); - event_id.to_json(j); - j.write_str("rsType", rs_type.to_string()); - j.write_str("reportInterval", report_interv.to_string()); - j.write_str("reportAmount", report_amount.to_string()); - j.write_fieldname("reportQuantityCell"); - report_quant_cell.to_json(j); - j.write_int("maxReportCells", max_report_cells); - if (report_quant_rs_idxes_present) { - j.write_fieldname("reportQuantityRS-Indexes"); - report_quant_rs_idxes.to_json(j); - } - if (max_nrof_rs_idxes_to_report_present) { - j.write_int("maxNrofRS-IndexesToReport", max_nrof_rs_idxes_to_report); + if (cell_present) { + j.write_int("cell", cell); } - j.write_bool("includeBeamMeasurements", include_beam_meass); - if (report_add_neigh_meas_present) { - j.write_str("reportAddNeighMeas", "setup"); + if (bwp_id_present) { + j.write_int("bwp-Id", bwp_id); } + j.write_fieldname("referenceSignal"); + ref_sig.to_json(j); + j.write_str("qcl-Type", qcl_type.to_string()); j.end_obj(); } -void event_trigger_cfg_s::event_id_c_::destroy_() -{ - switch (type_) { - case types::event_a1: - c.destroy(); - break; - case types::event_a2: - c.destroy(); - break; - case types::event_a3: - c.destroy(); - break; - case types::event_a4: - c.destroy(); - break; - case types::event_a5: - c.destroy(); - break; - case types::event_a6: - c.destroy(); - break; - default: - break; - } -} -void event_trigger_cfg_s::event_id_c_::set(types::options e) +void qcl_info_s::ref_sig_c_::destroy_() {} +void qcl_info_s::ref_sig_c_::set(types::options e) { destroy_(); type_ = e; - switch (type_) { - case types::event_a1: - c.init(); - break; - case types::event_a2: - c.init(); - break; - case types::event_a3: - c.init(); - break; - case types::event_a4: - c.init(); - break; - case types::event_a5: - c.init(); - break; - case types::event_a6: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); - } } -event_trigger_cfg_s::event_id_c_::event_id_c_(const event_trigger_cfg_s::event_id_c_& other) +qcl_info_s::ref_sig_c_::ref_sig_c_(const qcl_info_s::ref_sig_c_& other) { type_ = other.type(); switch (type_) { - case types::event_a1: - c.init(other.c.get()); - break; - case types::event_a2: - c.init(other.c.get()); - break; - case types::event_a3: - c.init(other.c.get()); - break; - case types::event_a4: - c.init(other.c.get()); - break; - case types::event_a5: - c.init(other.c.get()); + case types::csi_rs: + c.init(other.c.get()); break; - case types::event_a6: - c.init(other.c.get()); + case types::ssb: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); } } -event_trigger_cfg_s::event_id_c_& event_trigger_cfg_s::event_id_c_:: - operator=(const event_trigger_cfg_s::event_id_c_& other) +qcl_info_s::ref_sig_c_& qcl_info_s::ref_sig_c_::operator=(const qcl_info_s::ref_sig_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::event_a1: - c.set(other.c.get()); - break; - case types::event_a2: - c.set(other.c.get()); - break; - case types::event_a3: - c.set(other.c.get()); - break; - case types::event_a4: - c.set(other.c.get()); - break; - case types::event_a5: - c.set(other.c.get()); + case types::csi_rs: + c.set(other.c.get()); break; - case types::event_a6: - c.set(other.c.get()); + case types::ssb: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); } return *this; } -void event_trigger_cfg_s::event_id_c_::to_json(json_writer& j) const +void qcl_info_s::ref_sig_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::event_a1: - j.write_fieldname("eventA1"); - j.start_obj(); - j.write_fieldname("a1-Threshold"); - c.get().a1_thres.to_json(j); - j.write_bool("reportOnLeave", c.get().report_on_leave); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.end_obj(); - break; - case types::event_a2: - j.write_fieldname("eventA2"); - j.start_obj(); - j.write_fieldname("a2-Threshold"); - c.get().a2_thres.to_json(j); - j.write_bool("reportOnLeave", c.get().report_on_leave); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.end_obj(); - break; - case types::event_a3: - j.write_fieldname("eventA3"); - j.start_obj(); - j.write_fieldname("a3-Offset"); - c.get().a3_offset.to_json(j); - j.write_bool("reportOnLeave", c.get().report_on_leave); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.write_bool("useWhiteCellList", c.get().use_white_cell_list); - j.end_obj(); - break; - case types::event_a4: - j.write_fieldname("eventA4"); - j.start_obj(); - j.write_fieldname("a4-Threshold"); - c.get().a4_thres.to_json(j); - j.write_bool("reportOnLeave", c.get().report_on_leave); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.write_bool("useWhiteCellList", c.get().use_white_cell_list); - j.end_obj(); - break; - case types::event_a5: - j.write_fieldname("eventA5"); - j.start_obj(); - j.write_fieldname("a5-Threshold1"); - c.get().a5_thres1.to_json(j); - j.write_fieldname("a5-Threshold2"); - c.get().a5_thres2.to_json(j); - j.write_bool("reportOnLeave", c.get().report_on_leave); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.write_bool("useWhiteCellList", c.get().use_white_cell_list); - j.end_obj(); + case types::csi_rs: + j.write_int("csi-rs", c.get()); break; - case types::event_a6: - j.write_fieldname("eventA6"); - j.start_obj(); - j.write_fieldname("a6-Offset"); - c.get().a6_offset.to_json(j); - j.write_bool("reportOnLeave", c.get().report_on_leave); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.write_bool("useWhiteCellList", c.get().use_white_cell_list); - j.end_obj(); + case types::ssb: + j.write_int("ssb", c.get()); break; default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); } j.end_obj(); } -SRSASN_CODE event_trigger_cfg_s::event_id_c_::pack(bit_ref& bref) const +SRSASN_CODE qcl_info_s::ref_sig_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::event_a1: - HANDLE_CODE(c.get().a1_thres.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.pack(bref)); - break; - case types::event_a2: - HANDLE_CODE(c.get().a2_thres.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.pack(bref)); - break; - case types::event_a3: - HANDLE_CODE(c.get().a3_offset.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.pack(bref)); - HANDLE_CODE(bref.pack(c.get().use_white_cell_list, 1)); - break; - case types::event_a4: - HANDLE_CODE(c.get().a4_thres.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.pack(bref)); - HANDLE_CODE(bref.pack(c.get().use_white_cell_list, 1)); - break; - case types::event_a5: - HANDLE_CODE(c.get().a5_thres1.pack(bref)); - HANDLE_CODE(c.get().a5_thres2.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.pack(bref)); - HANDLE_CODE(bref.pack(c.get().use_white_cell_list, 1)); + case types::csi_rs: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); break; - case types::event_a6: - HANDLE_CODE(c.get().a6_offset.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.pack(bref)); - HANDLE_CODE(bref.pack(c.get().use_white_cell_list, 1)); + case types::ssb: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); break; default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE event_trigger_cfg_s::event_id_c_::unpack(cbit_ref& bref) +SRSASN_CODE qcl_info_s::ref_sig_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::event_a1: - HANDLE_CODE(c.get().a1_thres.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); - break; - case types::event_a2: - HANDLE_CODE(c.get().a2_thres.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); - break; - case types::event_a3: - HANDLE_CODE(c.get().a3_offset.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().use_white_cell_list, 1)); - break; - case types::event_a4: - HANDLE_CODE(c.get().a4_thres.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().use_white_cell_list, 1)); - break; - case types::event_a5: - HANDLE_CODE(c.get().a5_thres1.unpack(bref)); - HANDLE_CODE(c.get().a5_thres2.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().use_white_cell_list, 1)); + case types::csi_rs: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); break; - case types::event_a6: - HANDLE_CODE(c.get().a6_offset.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().use_white_cell_list, 1)); + case types::ssb: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); break; default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + log_invalid_choice_id(type_, "qcl_info_s::ref_sig_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string event_trigger_cfg_s::event_id_c_::types_opts::to_string() const -{ - 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 +std::string qcl_info_s::ref_sig_c_::types_opts::to_string() const { - 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"); + static const char* options[] = {"csi-rs", "ssb"}; + return convert_enum_idx(options, 2, value, "qcl_info_s::ref_sig_c_::types"); } -std::string event_trigger_cfg_s::report_amount_opts::to_string() const -{ - 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 +std::string qcl_info_s::qcl_type_opts::to_string() const { - 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_"); + static const char* options[] = {"typeA", "typeB", "typeC", "typeD"}; + return convert_enum_idx(options, 4, value, "qcl_info_s::qcl_type_e_"); } -// EventTriggerConfigInterRAT ::= SEQUENCE -SRSASN_CODE event_trigger_cfg_inter_rat_s::pack(bit_ref& bref) const +// DMRS-DownlinkConfig ::= SEQUENCE +SRSASN_CODE dmrs_dl_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(event_id.pack(bref)); - HANDLE_CODE(rs_type.pack(bref)); - HANDLE_CODE(report_interv.pack(bref)); - HANDLE_CODE(report_amount.pack(bref)); - HANDLE_CODE(report_quant.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_report_cells, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(bref.pack(dmrs_type_present, 1)); + HANDLE_CODE(bref.pack(dmrs_add_position_present, 1)); + HANDLE_CODE(bref.pack(max_len_present, 1)); + HANDLE_CODE(bref.pack(scrambling_id0_present, 1)); + HANDLE_CODE(bref.pack(scrambling_id1_present, 1)); + HANDLE_CODE(bref.pack(phase_tracking_rs_present, 1)); + + if (dmrs_add_position_present) { + HANDLE_CODE(dmrs_add_position.pack(bref)); + } + if (scrambling_id0_present) { + HANDLE_CODE(pack_integer(bref, scrambling_id0, (uint32_t)0u, (uint32_t)65535u)); + } + if (scrambling_id1_present) { + HANDLE_CODE(pack_integer(bref, scrambling_id1, (uint32_t)0u, (uint32_t)65535u)); + } + if (phase_tracking_rs_present) { + HANDLE_CODE(phase_tracking_rs.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE event_trigger_cfg_inter_rat_s::unpack(cbit_ref& bref) +SRSASN_CODE dmrs_dl_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(event_id.unpack(bref)); - HANDLE_CODE(rs_type.unpack(bref)); - HANDLE_CODE(report_interv.unpack(bref)); - HANDLE_CODE(report_amount.unpack(bref)); - HANDLE_CODE(report_quant.unpack(bref)); - HANDLE_CODE(unpack_integer(max_report_cells, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(bref.unpack(dmrs_type_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_add_position_present, 1)); + HANDLE_CODE(bref.unpack(max_len_present, 1)); + HANDLE_CODE(bref.unpack(scrambling_id0_present, 1)); + HANDLE_CODE(bref.unpack(scrambling_id1_present, 1)); + HANDLE_CODE(bref.unpack(phase_tracking_rs_present, 1)); + + if (dmrs_add_position_present) { + HANDLE_CODE(dmrs_add_position.unpack(bref)); + } + if (scrambling_id0_present) { + HANDLE_CODE(unpack_integer(scrambling_id0, bref, (uint32_t)0u, (uint32_t)65535u)); + } + if (scrambling_id1_present) { + HANDLE_CODE(unpack_integer(scrambling_id1, bref, (uint32_t)0u, (uint32_t)65535u)); + } + if (phase_tracking_rs_present) { + HANDLE_CODE(phase_tracking_rs.unpack(bref)); + } return SRSASN_SUCCESS; } -void event_trigger_cfg_inter_rat_s::to_json(json_writer& j) const +void dmrs_dl_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("eventId"); - event_id.to_json(j); - j.write_str("rsType", rs_type.to_string()); - j.write_str("reportInterval", report_interv.to_string()); - j.write_str("reportAmount", report_amount.to_string()); - j.write_fieldname("reportQuantity"); - report_quant.to_json(j); - j.write_int("maxReportCells", max_report_cells); + if (dmrs_type_present) { + j.write_str("dmrs-Type", "type2"); + } + if (dmrs_add_position_present) { + j.write_str("dmrs-AdditionalPosition", dmrs_add_position.to_string()); + } + if (max_len_present) { + j.write_str("maxLength", "len2"); + } + if (scrambling_id0_present) { + j.write_int("scramblingID0", scrambling_id0); + } + if (scrambling_id1_present) { + j.write_int("scramblingID1", scrambling_id1); + } + if (phase_tracking_rs_present) { + j.write_fieldname("phaseTrackingRS"); + phase_tracking_rs.to_json(j); + } j.end_obj(); } -void event_trigger_cfg_inter_rat_s::event_id_c_::destroy_() +std::string dmrs_dl_cfg_s::dmrs_add_position_opts::to_string() const { - switch (type_) { - case types::event_b1: - c.destroy(); - break; - case types::event_b2: - c.destroy(); - break; - default: - break; - } + static const char* options[] = {"pos0", "pos1", "pos3"}; + return convert_enum_idx(options, 3, value, "dmrs_dl_cfg_s::dmrs_add_position_e_"); } -void event_trigger_cfg_inter_rat_s::event_id_c_::set(types::options e) +uint8_t dmrs_dl_cfg_s::dmrs_add_position_opts::to_number() const { - destroy_(); - type_ = e; - switch (type_) { - case types::event_b1: - c.init(); - break; - case types::event_b2: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); - } + static const uint8_t options[] = {0, 1, 3}; + return map_enum_number(options, 3, value, "dmrs_dl_cfg_s::dmrs_add_position_e_"); } -event_trigger_cfg_inter_rat_s::event_id_c_::event_id_c_(const event_trigger_cfg_inter_rat_s::event_id_c_& other) + +// DownlinkPreemption ::= SEQUENCE +SRSASN_CODE dl_preemption_s::pack(bit_ref& bref) const { - type_ = other.type(); - switch (type_) { - case types::event_b1: - c.init(other.c.get()); - break; - case types::event_b2: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); - } + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, int_rnti, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(time_freq_set.pack(bref)); + HANDLE_CODE(pack_integer(bref, dci_payload_size, (uint8_t)0u, (uint8_t)126u)); + HANDLE_CODE(pack_dyn_seq_of(bref, int_cfg_per_serving_cell, 1, 32)); + + return SRSASN_SUCCESS; } -event_trigger_cfg_inter_rat_s::event_id_c_& event_trigger_cfg_inter_rat_s::event_id_c_:: - operator=(const event_trigger_cfg_inter_rat_s::event_id_c_& other) +SRSASN_CODE dl_preemption_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::event_b1: - c.set(other.c.get()); - break; - case types::event_b2: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); - } + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(int_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(time_freq_set.unpack(bref)); + HANDLE_CODE(unpack_integer(dci_payload_size, bref, (uint8_t)0u, (uint8_t)126u)); + HANDLE_CODE(unpack_dyn_seq_of(int_cfg_per_serving_cell, bref, 1, 32)); - return *this; + return SRSASN_SUCCESS; } -void event_trigger_cfg_inter_rat_s::event_id_c_::to_json(json_writer& j) const +void dl_preemption_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::event_b1: - j.write_fieldname("eventB1"); - j.start_obj(); - j.write_fieldname("b1-ThresholdEUTRA"); - c.get().b1_thres_eutra.to_json(j); - j.write_bool("reportOnLeave", c.get().report_on_leave); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.end_obj(); - break; - case types::event_b2: - j.write_fieldname("eventB2"); - j.start_obj(); - j.write_fieldname("b2-Threshold1"); - c.get().b2_thres1.to_json(j); - j.write_fieldname("b2-Threshold2EUTRA"); - c.get().b2_thres2_eutra.to_json(j); - j.write_bool("reportOnLeave", c.get().report_on_leave); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); + j.write_int("int-RNTI", int_rnti); + j.write_str("timeFrequencySet", time_freq_set.to_string()); + j.write_int("dci-PayloadSize", dci_payload_size); + j.start_array("int-ConfigurationPerServingCell"); + for (const auto& e1 : int_cfg_per_serving_cell) { + e1.to_json(j); } + j.end_array(); j.end_obj(); } -SRSASN_CODE event_trigger_cfg_inter_rat_s::event_id_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::event_b1: - bref.pack(c.get().ext, 1); - HANDLE_CODE(c.get().b1_thres_eutra.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.pack(bref)); - break; - case types::event_b2: - bref.pack(c.get().ext, 1); - HANDLE_CODE(c.get().b2_thres1.pack(bref)); - HANDLE_CODE(c.get().b2_thres2_eutra.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.pack(bref)); - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE event_trigger_cfg_inter_rat_s::event_id_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::event_b1: - bref.unpack(c.get().ext, 1); - HANDLE_CODE(c.get().b1_thres_eutra.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); - break; - case types::event_b2: - bref.unpack(c.get().ext, 1); - HANDLE_CODE(c.get().b2_thres1.unpack(bref)); - HANDLE_CODE(c.get().b2_thres2_eutra.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger.unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string event_trigger_cfg_inter_rat_s::event_id_c_::types_opts::to_string() const -{ - 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 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 +std::string dl_preemption_s::time_freq_set_opts::to_string() const { - 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_"); + static const char* options[] = {"set0", "set1"}; + return convert_enum_idx(options, 2, value, "dl_preemption_s::time_freq_set_e_"); } -int8_t event_trigger_cfg_inter_rat_s::report_amount_opts::to_number() const +uint8_t dl_preemption_s::time_freq_set_opts::to_number() const { - 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_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "dl_preemption_s::time_freq_set_e_"); } -// FilterConfig ::= SEQUENCE -SRSASN_CODE filt_cfg_s::pack(bit_ref& bref) const +// PUCCH-TPC-CommandConfig ::= SEQUENCE +SRSASN_CODE pucch_tpc_cmd_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(filt_coef_rsrp_present, 1)); - HANDLE_CODE(bref.pack(filt_coef_rsrq_present, 1)); - HANDLE_CODE(bref.pack(filt_coef_rs_sinr_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(tpc_idx_pcell_present, 1)); + HANDLE_CODE(bref.pack(tpc_idx_pucch_scell_present, 1)); - if (filt_coef_rsrp_present) { - HANDLE_CODE(filt_coef_rsrp.pack(bref)); - } - if (filt_coef_rsrq_present) { - HANDLE_CODE(filt_coef_rsrq.pack(bref)); + if (tpc_idx_pcell_present) { + HANDLE_CODE(pack_integer(bref, tpc_idx_pcell, (uint8_t)1u, (uint8_t)15u)); } - if (filt_coef_rs_sinr_present) { - HANDLE_CODE(filt_coef_rs_sinr.pack(bref)); + if (tpc_idx_pucch_scell_present) { + HANDLE_CODE(pack_integer(bref, tpc_idx_pucch_scell, (uint8_t)1u, (uint8_t)15u)); } return SRSASN_SUCCESS; } -SRSASN_CODE filt_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE pucch_tpc_cmd_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(filt_coef_rsrp_present, 1)); - HANDLE_CODE(bref.unpack(filt_coef_rsrq_present, 1)); - HANDLE_CODE(bref.unpack(filt_coef_rs_sinr_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(tpc_idx_pcell_present, 1)); + HANDLE_CODE(bref.unpack(tpc_idx_pucch_scell_present, 1)); - if (filt_coef_rsrp_present) { - HANDLE_CODE(filt_coef_rsrp.unpack(bref)); - } - if (filt_coef_rsrq_present) { - HANDLE_CODE(filt_coef_rsrq.unpack(bref)); + if (tpc_idx_pcell_present) { + HANDLE_CODE(unpack_integer(tpc_idx_pcell, bref, (uint8_t)1u, (uint8_t)15u)); } - if (filt_coef_rs_sinr_present) { - HANDLE_CODE(filt_coef_rs_sinr.unpack(bref)); + if (tpc_idx_pucch_scell_present) { + HANDLE_CODE(unpack_integer(tpc_idx_pucch_scell, bref, (uint8_t)1u, (uint8_t)15u)); } return SRSASN_SUCCESS; } -void filt_cfg_s::to_json(json_writer& j) const +void pucch_tpc_cmd_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (filt_coef_rsrp_present) { - j.write_str("filterCoefficientRSRP", filt_coef_rsrp.to_string()); - } - if (filt_coef_rsrq_present) { - j.write_str("filterCoefficientRSRQ", filt_coef_rsrq.to_string()); + if (tpc_idx_pcell_present) { + j.write_int("tpc-IndexPCell", tpc_idx_pcell); } - if (filt_coef_rs_sinr_present) { - j.write_str("filterCoefficientRS-SINR", filt_coef_rs_sinr.to_string()); + if (tpc_idx_pucch_scell_present) { + j.write_int("tpc-IndexPUCCH-SCell", tpc_idx_pucch_scell); } j.end_obj(); } -// PCI-RangeElement ::= SEQUENCE -SRSASN_CODE pci_range_elem_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pci_range_idx, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pci_range.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pci_range_elem_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pci_range_idx, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pci_range.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pci_range_elem_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pci-RangeIndex", pci_range_idx); - j.write_fieldname("pci-Range"); - pci_range.to_json(j); - j.end_obj(); -} - -// PeriodicalReportConfig ::= SEQUENCE -SRSASN_CODE periodical_report_cfg_s::pack(bit_ref& bref) const +// PUSCH-TPC-CommandConfig ::= SEQUENCE +SRSASN_CODE pusch_tpc_cmd_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(report_quant_rs_idxes_present, 1)); - HANDLE_CODE(bref.pack(max_nrof_rs_idxes_to_report_present, 1)); + HANDLE_CODE(bref.pack(tpc_idx_present, 1)); + HANDLE_CODE(bref.pack(tpc_idx_sul_present, 1)); + HANDLE_CODE(bref.pack(target_cell_present, 1)); - HANDLE_CODE(rs_type.pack(bref)); - HANDLE_CODE(report_interv.pack(bref)); - HANDLE_CODE(report_amount.pack(bref)); - HANDLE_CODE(report_quant_cell.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_report_cells, (uint8_t)1u, (uint8_t)8u)); - if (report_quant_rs_idxes_present) { - HANDLE_CODE(report_quant_rs_idxes.pack(bref)); + if (tpc_idx_present) { + HANDLE_CODE(pack_integer(bref, tpc_idx, (uint8_t)1u, (uint8_t)15u)); } - if (max_nrof_rs_idxes_to_report_present) { - HANDLE_CODE(pack_integer(bref, max_nrof_rs_idxes_to_report, (uint8_t)1u, (uint8_t)32u)); + if (tpc_idx_sul_present) { + HANDLE_CODE(pack_integer(bref, tpc_idx_sul, (uint8_t)1u, (uint8_t)15u)); + } + if (target_cell_present) { + HANDLE_CODE(pack_integer(bref, target_cell, (uint8_t)0u, (uint8_t)31u)); } - HANDLE_CODE(bref.pack(include_beam_meass, 1)); - HANDLE_CODE(bref.pack(use_white_cell_list, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE periodical_report_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE pusch_tpc_cmd_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(report_quant_rs_idxes_present, 1)); - HANDLE_CODE(bref.unpack(max_nrof_rs_idxes_to_report_present, 1)); + HANDLE_CODE(bref.unpack(tpc_idx_present, 1)); + HANDLE_CODE(bref.unpack(tpc_idx_sul_present, 1)); + HANDLE_CODE(bref.unpack(target_cell_present, 1)); - HANDLE_CODE(rs_type.unpack(bref)); - HANDLE_CODE(report_interv.unpack(bref)); - HANDLE_CODE(report_amount.unpack(bref)); - HANDLE_CODE(report_quant_cell.unpack(bref)); - HANDLE_CODE(unpack_integer(max_report_cells, bref, (uint8_t)1u, (uint8_t)8u)); - if (report_quant_rs_idxes_present) { - HANDLE_CODE(report_quant_rs_idxes.unpack(bref)); + if (tpc_idx_present) { + HANDLE_CODE(unpack_integer(tpc_idx, bref, (uint8_t)1u, (uint8_t)15u)); } - if (max_nrof_rs_idxes_to_report_present) { - HANDLE_CODE(unpack_integer(max_nrof_rs_idxes_to_report, bref, (uint8_t)1u, (uint8_t)32u)); + if (tpc_idx_sul_present) { + HANDLE_CODE(unpack_integer(tpc_idx_sul, bref, (uint8_t)1u, (uint8_t)15u)); + } + if (target_cell_present) { + HANDLE_CODE(unpack_integer(target_cell, bref, (uint8_t)0u, (uint8_t)31u)); } - HANDLE_CODE(bref.unpack(include_beam_meass, 1)); - HANDLE_CODE(bref.unpack(use_white_cell_list, 1)); return SRSASN_SUCCESS; } -void periodical_report_cfg_s::to_json(json_writer& j) const +void pusch_tpc_cmd_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("rsType", rs_type.to_string()); - j.write_str("reportInterval", report_interv.to_string()); - j.write_str("reportAmount", report_amount.to_string()); - j.write_fieldname("reportQuantityCell"); - report_quant_cell.to_json(j); - j.write_int("maxReportCells", max_report_cells); - if (report_quant_rs_idxes_present) { - j.write_fieldname("reportQuantityRS-Indexes"); - report_quant_rs_idxes.to_json(j); + if (tpc_idx_present) { + j.write_int("tpc-Index", tpc_idx); } - if (max_nrof_rs_idxes_to_report_present) { - j.write_int("maxNrofRS-IndexesToReport", max_nrof_rs_idxes_to_report); + if (tpc_idx_sul_present) { + j.write_int("tpc-IndexSUL", tpc_idx_sul); + } + if (target_cell_present) { + j.write_int("targetCell", target_cell); } - j.write_bool("includeBeamMeasurements", include_beam_meass); - j.write_bool("useWhiteCellList", use_white_cell_list); j.end_obj(); } -std::string periodical_report_cfg_s::report_amount_opts::to_string() const -{ - 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 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 -SRSASN_CODE periodical_report_cfg_inter_rat_s::pack(bit_ref& bref) const +// RadioLinkMonitoringRS ::= SEQUENCE +SRSASN_CODE radio_link_monitoring_rs_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(report_interv.pack(bref)); - HANDLE_CODE(report_amount.pack(bref)); - HANDLE_CODE(report_quant.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_report_cells, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_integer(bref, radio_link_monitoring_rs_id, (uint8_t)0u, (uint8_t)9u)); + HANDLE_CODE(purpose.pack(bref)); + HANDLE_CODE(detection_res.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE periodical_report_cfg_inter_rat_s::unpack(cbit_ref& bref) +SRSASN_CODE radio_link_monitoring_rs_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(report_interv.unpack(bref)); - HANDLE_CODE(report_amount.unpack(bref)); - HANDLE_CODE(report_quant.unpack(bref)); - HANDLE_CODE(unpack_integer(max_report_cells, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_integer(radio_link_monitoring_rs_id, bref, (uint8_t)0u, (uint8_t)9u)); + HANDLE_CODE(purpose.unpack(bref)); + HANDLE_CODE(detection_res.unpack(bref)); return SRSASN_SUCCESS; } -void periodical_report_cfg_inter_rat_s::to_json(json_writer& j) const +void radio_link_monitoring_rs_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("reportInterval", report_interv.to_string()); - j.write_str("reportAmount", report_amount.to_string()); - j.write_fieldname("reportQuantity"); - report_quant.to_json(j); - j.write_int("maxReportCells", max_report_cells); + j.write_int("radioLinkMonitoringRS-Id", radio_link_monitoring_rs_id); + j.write_str("purpose", purpose.to_string()); + j.write_fieldname("detectionResource"); + detection_res.to_json(j); j.end_obj(); } -std::string periodical_report_cfg_inter_rat_s::report_amount_opts::to_string() const +std::string radio_link_monitoring_rs_s::purpose_opts::to_string() const { - 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_"); + static const char* options[] = {"beamFailure", "rlf", "both"}; + return convert_enum_idx(options, 3, value, "radio_link_monitoring_rs_s::purpose_e_"); } -int8_t periodical_report_cfg_inter_rat_s::report_amount_opts::to_number() const + +void radio_link_monitoring_rs_s::detection_res_c_::destroy_() {} +void radio_link_monitoring_rs_s::detection_res_c_::set(types::options 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_"); + destroy_(); + type_ = e; } - -// RAN-AreaConfig ::= SEQUENCE -SRSASN_CODE ran_area_cfg_s::pack(bit_ref& bref) const +radio_link_monitoring_rs_s::detection_res_c_::detection_res_c_( + const radio_link_monitoring_rs_s::detection_res_c_& other) { - HANDLE_CODE(bref.pack(ran_area_code_list_present, 1)); - - HANDLE_CODE(tac.pack(bref)); - if (ran_area_code_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_code_list, 1, 32, integer_packer(0, 255))); + type_ = other.type(); + switch (type_) { + case types::ssb_idx: + c.init(other.c.get()); + break; + case types::csi_rs_idx: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE ran_area_cfg_s::unpack(cbit_ref& bref) +radio_link_monitoring_rs_s::detection_res_c_& +radio_link_monitoring_rs_s::detection_res_c_::operator=(const radio_link_monitoring_rs_s::detection_res_c_& other) { - HANDLE_CODE(bref.unpack(ran_area_code_list_present, 1)); - - HANDLE_CODE(tac.unpack(bref)); - if (ran_area_code_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ran_area_code_list, bref, 1, 32, integer_packer(0, 255))); + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb_idx: + c.set(other.c.get()); + break; + case types::csi_rs_idx: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); } - return SRSASN_SUCCESS; + return *this; } -void ran_area_cfg_s::to_json(json_writer& j) const +void radio_link_monitoring_rs_s::detection_res_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_str("trackingAreaCode", tac.to_string()); - if (ran_area_code_list_present) { - j.start_array("ran-AreaCodeList"); - for (const auto& e1 : ran_area_code_list) { - j.write_int(e1); - } - j.end_array(); + switch (type_) { + case types::ssb_idx: + j.write_int("ssb-Index", c.get()); + break; + case types::csi_rs_idx: + j.write_int("csi-RS-Index", c.get()); + break; + default: + log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); } j.end_obj(); } - -// ReferenceSignalConfig ::= SEQUENCE -SRSASN_CODE ref_sig_cfg_s::pack(bit_ref& bref) const +SRSASN_CODE radio_link_monitoring_rs_s::detection_res_c_::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ssb_cfg_mob_present, 1)); - HANDLE_CODE(bref.pack(csi_rs_res_cfg_mob_present, 1)); - - if (ssb_cfg_mob_present) { - HANDLE_CODE(ssb_cfg_mob.pack(bref)); - } - if (csi_rs_res_cfg_mob_present) { - HANDLE_CODE(csi_rs_res_cfg_mob.pack(bref)); + type_.pack(bref); + switch (type_) { + case types::ssb_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + break; + default: + log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - return SRSASN_SUCCESS; } -SRSASN_CODE ref_sig_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE radio_link_monitoring_rs_s::detection_res_c_::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ssb_cfg_mob_present, 1)); - HANDLE_CODE(bref.unpack(csi_rs_res_cfg_mob_present, 1)); - - if (ssb_cfg_mob_present) { - HANDLE_CODE(ssb_cfg_mob.unpack(bref)); - } - if (csi_rs_res_cfg_mob_present) { - HANDLE_CODE(csi_rs_res_cfg_mob.unpack(bref)); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + break; + default: + log_invalid_choice_id(type_, "radio_link_monitoring_rs_s::detection_res_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - return SRSASN_SUCCESS; } -void ref_sig_cfg_s::to_json(json_writer& j) const + +std::string radio_link_monitoring_rs_s::detection_res_c_::types_opts::to_string() const { - j.start_obj(); - if (ssb_cfg_mob_present) { - j.write_fieldname("ssb-ConfigMobility"); - ssb_cfg_mob.to_json(j); - } - if (csi_rs_res_cfg_mob_present) { - j.write_fieldname("csi-rs-ResourceConfigMobility"); - csi_rs_res_cfg_mob.to_json(j); - } - j.end_obj(); + 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"); } -// ReportCGI ::= SEQUENCE -SRSASN_CODE report_cgi_s::pack(bit_ref& bref) const +// RateMatchPattern ::= SEQUENCE +SRSASN_CODE rate_match_pattern_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(bref.pack(subcarrier_spacing_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE report_cgi_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(cell_for_which_to_report_cgi, bref, (uint16_t)0u, (uint16_t)1007u)); - - return SRSASN_SUCCESS; -} -void report_cgi_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("cellForWhichToReportCGI", cell_for_which_to_report_cgi); - j.end_obj(); -} - -// ReportCGI-EUTRA ::= SEQUENCE -SRSASN_CODE report_cgi_eutra_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(pack_integer(bref, rate_match_pattern_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pattern_type.pack(bref)); + if (subcarrier_spacing_present) { + HANDLE_CODE(subcarrier_spacing.pack(bref)); + } + HANDLE_CODE(dummy.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE report_cgi_eutra_s::unpack(cbit_ref& bref) +SRSASN_CODE rate_match_pattern_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(cell_for_which_to_report_cgi, bref, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(bref.unpack(subcarrier_spacing_present, 1)); + + HANDLE_CODE(unpack_integer(rate_match_pattern_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pattern_type.unpack(bref)); + if (subcarrier_spacing_present) { + HANDLE_CODE(subcarrier_spacing.unpack(bref)); + } + HANDLE_CODE(dummy.unpack(bref)); return SRSASN_SUCCESS; } -void report_cgi_eutra_s::to_json(json_writer& j) const +void rate_match_pattern_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("cellForWhichToReportCGI", cell_for_which_to_report_cgi); + j.write_int("rateMatchPatternId", rate_match_pattern_id); + j.write_fieldname("patternType"); + pattern_type.to_json(j); + if (subcarrier_spacing_present) { + j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); + } + j.write_str("dummy", dummy.to_string()); j.end_obj(); } -// SSB-MTC2 ::= SEQUENCE -SRSASN_CODE ssb_mtc2_s::pack(bit_ref& bref) const +void rate_match_pattern_s::pattern_type_c_::destroy_() { - HANDLE_CODE(bref.pack(pci_list_present, 1)); - - if (pci_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, pci_list, 1, 64, integer_packer(0, 1007))); + switch (type_) { + case types::bitmaps: + c.destroy(); + break; + default: + break; } - HANDLE_CODE(periodicity.pack(bref)); - - return SRSASN_SUCCESS; } -SRSASN_CODE ssb_mtc2_s::unpack(cbit_ref& bref) +void rate_match_pattern_s::pattern_type_c_::set(types::options e) { - HANDLE_CODE(bref.unpack(pci_list_present, 1)); - - if (pci_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(pci_list, bref, 1, 64, integer_packer(0, 1007))); + destroy_(); + type_ = e; + switch (type_) { + case types::bitmaps: + c.init(); + break; + case types::ctrl_res_set: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + } +} +rate_match_pattern_s::pattern_type_c_::pattern_type_c_(const rate_match_pattern_s::pattern_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::bitmaps: + c.init(other.c.get()); + break; + case types::ctrl_res_set: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + } +} +rate_match_pattern_s::pattern_type_c_& +rate_match_pattern_s::pattern_type_c_::operator=(const rate_match_pattern_s::pattern_type_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::bitmaps: + c.set(other.c.get()); + break; + case types::ctrl_res_set: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); } - HANDLE_CODE(periodicity.unpack(bref)); - return SRSASN_SUCCESS; + return *this; } -void ssb_mtc2_s::to_json(json_writer& j) const +void rate_match_pattern_s::pattern_type_c_::to_json(json_writer& j) const { j.start_obj(); - if (pci_list_present) { - j.start_array("pci-List"); - for (const auto& e1 : pci_list) { - j.write_int(e1); - } - j.end_array(); + switch (type_) { + case types::bitmaps: + j.write_fieldname("bitmaps"); + j.start_obj(); + j.write_str("resourceBlocks", c.get().res_blocks.to_string()); + j.write_fieldname("symbolsInResourceBlock"); + c.get().symbols_in_res_block.to_json(j); + if (c.get().periodicity_and_pattern_present) { + j.write_fieldname("periodicityAndPattern"); + c.get().periodicity_and_pattern.to_json(j); + } + j.end_obj(); + break; + case types::ctrl_res_set: + j.write_int("controlResourceSet", c.get()); + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); } - j.write_str("periodicity", periodicity.to_string()); j.end_obj(); } - -std::string ssb_mtc2_s::periodicity_opts::to_string() const +SRSASN_CODE rate_match_pattern_s::pattern_type_c_::pack(bit_ref& bref) const { - static const char* options[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "spare3", "spare2", "spare1"}; - return convert_enum_idx(options, 8, value, "ssb_mtc2_s::periodicity_e_"); + type_.pack(bref); + switch (type_) { + case types::bitmaps: + bref.pack(c.get().ext, 1); + HANDLE_CODE(bref.pack(c.get().periodicity_and_pattern_present, 1)); + HANDLE_CODE(c.get().res_blocks.pack(bref)); + HANDLE_CODE(c.get().symbols_in_res_block.pack(bref)); + if (c.get().periodicity_and_pattern_present) { + HANDLE_CODE(c.get().periodicity_and_pattern.pack(bref)); + } + break; + case types::ctrl_res_set: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)11u)); + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -uint8_t ssb_mtc2_s::periodicity_opts::to_number() const +SRSASN_CODE rate_match_pattern_s::pattern_type_c_::unpack(cbit_ref& bref) { - static const uint8_t options[] = {5, 10, 20, 40, 80}; - return map_enum_number(options, 5, value, "ssb_mtc2_s::periodicity_e_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::bitmaps: + bref.unpack(c.get().ext, 1); + HANDLE_CODE(bref.unpack(c.get().periodicity_and_pattern_present, 1)); + HANDLE_CODE(c.get().res_blocks.unpack(bref)); + HANDLE_CODE(c.get().symbols_in_res_block.unpack(bref)); + if (c.get().periodicity_and_pattern_present) { + HANDLE_CODE(c.get().periodicity_and_pattern.unpack(bref)); + } + break; + case types::ctrl_res_set: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)11u)); + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -// MeasObjectEUTRA ::= SEQUENCE -SRSASN_CODE meas_obj_eutra_s::pack(bit_ref& bref) const +void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::destroy_() { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cells_to_rem_list_eutran_present, 1)); - HANDLE_CODE(bref.pack(cells_to_add_mod_list_eutran_present, 1)); - HANDLE_CODE(bref.pack(black_cells_to_rem_list_eutran_present, 1)); - HANDLE_CODE(bref.pack(black_cells_to_add_mod_list_eutran_present, 1)); - HANDLE_CODE(bref.pack(eutra_q_offset_range_present, 1)); - - HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(allowed_meas_bw.pack(bref)); - if (cells_to_rem_list_eutran_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list_eutran, 1, 32, integer_packer(1, 32))); - } - if (cells_to_add_mod_list_eutran_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list_eutran, 1, 32)); - } - if (black_cells_to_rem_list_eutran_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_rem_list_eutran, 1, 32, integer_packer(1, 32))); - } - if (black_cells_to_add_mod_list_eutran_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_add_mod_list_eutran, 1, 32)); - } - HANDLE_CODE(bref.pack(eutra_presence_ant_port1, 1)); - if (eutra_q_offset_range_present) { - HANDLE_CODE(eutra_q_offset_range.pack(bref)); + switch (type_) { + case types::one_slot: + c.destroy >(); + break; + case types::two_slots: + c.destroy >(); + break; + default: + break; } - HANDLE_CODE(bref.pack(wideband_rsrq_meas, 1)); - - return SRSASN_SUCCESS; } -SRSASN_CODE meas_obj_eutra_s::unpack(cbit_ref& bref) +void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::set(types::options e) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cells_to_rem_list_eutran_present, 1)); - HANDLE_CODE(bref.unpack(cells_to_add_mod_list_eutran_present, 1)); - HANDLE_CODE(bref.unpack(black_cells_to_rem_list_eutran_present, 1)); - HANDLE_CODE(bref.unpack(black_cells_to_add_mod_list_eutran_present, 1)); - HANDLE_CODE(bref.unpack(eutra_q_offset_range_present, 1)); - - HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(allowed_meas_bw.unpack(bref)); - if (cells_to_rem_list_eutran_present) { - HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list_eutran, bref, 1, 32, integer_packer(1, 32))); - } - if (cells_to_add_mod_list_eutran_present) { - HANDLE_CODE(unpack_dyn_seq_of(cells_to_add_mod_list_eutran, bref, 1, 32)); + destroy_(); + type_ = e; + switch (type_) { + case types::one_slot: + c.init >(); + break; + case types::two_slots: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); } - if (black_cells_to_rem_list_eutran_present) { - HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_rem_list_eutran, bref, 1, 32, integer_packer(1, 32))); +} +rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::symbols_in_res_block_c_( + const rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::one_slot: + c.init(other.c.get >()); + break; + case types::two_slots: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); } - if (black_cells_to_add_mod_list_eutran_present) { - HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_add_mod_list_eutran, bref, 1, 32)); +} +rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_& +rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::operator=( + const rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_& other) +{ + if (this == &other) { + return *this; } - HANDLE_CODE(bref.unpack(eutra_presence_ant_port1, 1)); - if (eutra_q_offset_range_present) { - HANDLE_CODE(eutra_q_offset_range.unpack(bref)); + set(other.type()); + switch (type_) { + case types::one_slot: + c.set(other.c.get >()); + break; + case types::two_slots: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); } - HANDLE_CODE(bref.unpack(wideband_rsrq_meas, 1)); - return SRSASN_SUCCESS; + return *this; } -void meas_obj_eutra_s::to_json(json_writer& j) const +void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_int("carrierFreq", carrier_freq); - j.write_str("allowedMeasBandwidth", allowed_meas_bw.to_string()); - if (cells_to_rem_list_eutran_present) { - j.start_array("cellsToRemoveListEUTRAN"); - 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 (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 (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 (const auto& e1 : black_cells_to_add_mod_list_eutran) { - e1.to_json(j); - } - j.end_array(); - } - j.write_bool("eutra-PresenceAntennaPort1", eutra_presence_ant_port1); - if (eutra_q_offset_range_present) { - j.write_str("eutra-Q-OffsetRange", eutra_q_offset_range.to_string()); + switch (type_) { + case types::one_slot: + j.write_str("oneSlot", c.get >().to_string()); + break; + case types::two_slots: + j.write_str("twoSlots", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); } - j.write_bool("widebandRSRQ-Meas", wideband_rsrq_meas); j.end_obj(); } - -// MeasObjectNR ::= SEQUENCE -SRSASN_CODE meas_obj_nr_s::pack(bit_ref& bref) const +SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ssb_freq_present, 1)); - HANDLE_CODE(bref.pack(ssb_subcarrier_spacing_present, 1)); - HANDLE_CODE(bref.pack(smtc1_present, 1)); - HANDLE_CODE(bref.pack(smtc2_present, 1)); - HANDLE_CODE(bref.pack(ref_freq_csi_rs_present, 1)); - HANDLE_CODE(bref.pack(abs_thresh_ss_blocks_consolidation_present, 1)); - HANDLE_CODE(bref.pack(abs_thresh_csi_rs_consolidation_present, 1)); - HANDLE_CODE(bref.pack(nrof_ss_blocks_to_average_present, 1)); - HANDLE_CODE(bref.pack(nrof_csi_rs_res_to_average_present, 1)); - HANDLE_CODE(bref.pack(cells_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(cells_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(black_cells_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(black_cells_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(white_cells_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(white_cells_to_add_mod_list_present, 1)); - - if (ssb_freq_present) { - HANDLE_CODE(pack_integer(bref, ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); - } - if (ssb_subcarrier_spacing_present) { - HANDLE_CODE(ssb_subcarrier_spacing.pack(bref)); - } - if (smtc1_present) { - HANDLE_CODE(smtc1.pack(bref)); - } - if (smtc2_present) { - HANDLE_CODE(smtc2.pack(bref)); - } - if (ref_freq_csi_rs_present) { - HANDLE_CODE(pack_integer(bref, ref_freq_csi_rs, (uint32_t)0u, (uint32_t)3279165u)); - } - HANDLE_CODE(ref_sig_cfg.pack(bref)); - if (abs_thresh_ss_blocks_consolidation_present) { - HANDLE_CODE(abs_thresh_ss_blocks_consolidation.pack(bref)); - } - if (abs_thresh_csi_rs_consolidation_present) { - HANDLE_CODE(abs_thresh_csi_rs_consolidation.pack(bref)); - } - if (nrof_ss_blocks_to_average_present) { - HANDLE_CODE(pack_integer(bref, nrof_ss_blocks_to_average, (uint8_t)2u, (uint8_t)16u)); - } - if (nrof_csi_rs_res_to_average_present) { - HANDLE_CODE(pack_integer(bref, nrof_csi_rs_res_to_average, (uint8_t)2u, (uint8_t)16u)); - } - HANDLE_CODE(pack_integer(bref, quant_cfg_idx, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(offset_mo.pack(bref)); - if (cells_to_rem_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list, 1, 32, integer_packer(0, 1007))); - } - if (cells_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list, 1, 32)); - } - if (black_cells_to_rem_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_rem_list, 1, 8, integer_packer(1, 8))); - } - if (black_cells_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_add_mod_list, 1, 8)); - } - if (white_cells_to_rem_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, white_cells_to_rem_list, 1, 8, integer_packer(1, 8))); - } - if (white_cells_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, white_cells_to_add_mod_list, 1, 8)); + type_.pack(bref); + switch (type_) { + case types::one_slot: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::two_slots: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= freq_band_ind_nr_v1530_present; - group_flags[0] |= meas_cycle_scell_v1530_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(freq_band_ind_nr_v1530_present, 1)); - HANDLE_CODE(bref.pack(meas_cycle_scell_v1530_present, 1)); - if (freq_band_ind_nr_v1530_present) { - HANDLE_CODE(pack_integer(bref, freq_band_ind_nr_v1530, (uint16_t)1u, (uint16_t)1024u)); - } - if (meas_cycle_scell_v1530_present) { - HANDLE_CODE(meas_cycle_scell_v1530.pack(bref)); - } - } + return SRSASN_SUCCESS; +} +SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::one_slot: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::two_slots: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE meas_obj_nr_s::unpack(cbit_ref& bref) + +std::string rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types_opts::to_string() const { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ssb_freq_present, 1)); - HANDLE_CODE(bref.unpack(ssb_subcarrier_spacing_present, 1)); - HANDLE_CODE(bref.unpack(smtc1_present, 1)); - HANDLE_CODE(bref.unpack(smtc2_present, 1)); - HANDLE_CODE(bref.unpack(ref_freq_csi_rs_present, 1)); - HANDLE_CODE(bref.unpack(abs_thresh_ss_blocks_consolidation_present, 1)); - HANDLE_CODE(bref.unpack(abs_thresh_csi_rs_consolidation_present, 1)); - HANDLE_CODE(bref.unpack(nrof_ss_blocks_to_average_present, 1)); - HANDLE_CODE(bref.unpack(nrof_csi_rs_res_to_average_present, 1)); - HANDLE_CODE(bref.unpack(cells_to_rem_list_present, 1)); - HANDLE_CODE(bref.unpack(cells_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(black_cells_to_rem_list_present, 1)); - HANDLE_CODE(bref.unpack(black_cells_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(white_cells_to_rem_list_present, 1)); - HANDLE_CODE(bref.unpack(white_cells_to_add_mod_list_present, 1)); + 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 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"); +} - if (ssb_freq_present) { - HANDLE_CODE(unpack_integer(ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); +void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::destroy_() +{ + switch (type_) { + case types::n2: + c.destroy >(); + break; + case types::n4: + c.destroy >(); + break; + case types::n5: + c.destroy >(); + break; + case types::n8: + c.destroy >(); + break; + case types::n10: + c.destroy >(); + break; + case types::n20: + c.destroy >(); + break; + case types::n40: + c.destroy >(); + break; + default: + break; } - if (ssb_subcarrier_spacing_present) { - HANDLE_CODE(ssb_subcarrier_spacing.unpack(bref)); - } - if (smtc1_present) { - HANDLE_CODE(smtc1.unpack(bref)); - } - if (smtc2_present) { - HANDLE_CODE(smtc2.unpack(bref)); - } - if (ref_freq_csi_rs_present) { - HANDLE_CODE(unpack_integer(ref_freq_csi_rs, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - HANDLE_CODE(ref_sig_cfg.unpack(bref)); - if (abs_thresh_ss_blocks_consolidation_present) { - HANDLE_CODE(abs_thresh_ss_blocks_consolidation.unpack(bref)); - } - if (abs_thresh_csi_rs_consolidation_present) { - HANDLE_CODE(abs_thresh_csi_rs_consolidation.unpack(bref)); - } - if (nrof_ss_blocks_to_average_present) { - HANDLE_CODE(unpack_integer(nrof_ss_blocks_to_average, bref, (uint8_t)2u, (uint8_t)16u)); - } - if (nrof_csi_rs_res_to_average_present) { - HANDLE_CODE(unpack_integer(nrof_csi_rs_res_to_average, bref, (uint8_t)2u, (uint8_t)16u)); - } - HANDLE_CODE(unpack_integer(quant_cfg_idx, bref, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(offset_mo.unpack(bref)); - if (cells_to_rem_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list, bref, 1, 32, integer_packer(0, 1007))); - } - if (cells_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(cells_to_add_mod_list, bref, 1, 32)); - } - if (black_cells_to_rem_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_rem_list, bref, 1, 8, integer_packer(1, 8))); - } - if (black_cells_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_add_mod_list, bref, 1, 8)); - } - if (white_cells_to_rem_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(white_cells_to_rem_list, bref, 1, 8, integer_packer(1, 8))); - } - if (white_cells_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(white_cells_to_add_mod_list, bref, 1, 8)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(freq_band_ind_nr_v1530_present, 1)); - HANDLE_CODE(bref.unpack(meas_cycle_scell_v1530_present, 1)); - if (freq_band_ind_nr_v1530_present) { - HANDLE_CODE(unpack_integer(freq_band_ind_nr_v1530, bref, (uint16_t)1u, (uint16_t)1024u)); - } - if (meas_cycle_scell_v1530_present) { - HANDLE_CODE(meas_cycle_scell_v1530.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void meas_obj_nr_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ssb_freq_present) { - j.write_int("ssbFrequency", ssb_freq); - } - if (ssb_subcarrier_spacing_present) { - j.write_str("ssbSubcarrierSpacing", ssb_subcarrier_spacing.to_string()); - } - if (smtc1_present) { - j.write_fieldname("smtc1"); - smtc1.to_json(j); - } - if (smtc2_present) { - j.write_fieldname("smtc2"); - smtc2.to_json(j); - } - if (ref_freq_csi_rs_present) { - j.write_int("refFreqCSI-RS", ref_freq_csi_rs); - } - j.write_fieldname("referenceSignalConfig"); - ref_sig_cfg.to_json(j); - if (abs_thresh_ss_blocks_consolidation_present) { - j.write_fieldname("absThreshSS-BlocksConsolidation"); - abs_thresh_ss_blocks_consolidation.to_json(j); - } - if (abs_thresh_csi_rs_consolidation_present) { - j.write_fieldname("absThreshCSI-RS-Consolidation"); - abs_thresh_csi_rs_consolidation.to_json(j); - } - if (nrof_ss_blocks_to_average_present) { - j.write_int("nrofSS-BlocksToAverage", nrof_ss_blocks_to_average); - } - if (nrof_csi_rs_res_to_average_present) { - j.write_int("nrofCSI-RS-ResourcesToAverage", nrof_csi_rs_res_to_average); - } - j.write_int("quantityConfigIndex", quant_cfg_idx); - j.write_fieldname("offsetMO"); - offset_mo.to_json(j); - if (cells_to_rem_list_present) { - j.start_array("cellsToRemoveList"); - 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 (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 (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 (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 (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 (const auto& e1 : white_cells_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } - if (ext) { - if (freq_band_ind_nr_v1530_present) { - j.write_int("freqBandIndicatorNR-v1530", freq_band_ind_nr_v1530); - } - if (meas_cycle_scell_v1530_present) { - j.write_str("measCycleSCell-v1530", meas_cycle_scell_v1530.to_string()); - } - } - j.end_obj(); -} - -std::string meas_obj_nr_s::meas_cycle_scell_v1530_opts::to_string() const -{ - 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 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 -SRSASN_CODE overheat_assist_cfg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(overheat_ind_prohibit_timer.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE overheat_assist_cfg_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(overheat_ind_prohibit_timer.unpack(bref)); - - return SRSASN_SUCCESS; -} -void overheat_assist_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("overheatingIndicationProhibitTimer", overheat_ind_prohibit_timer.to_string()); - j.end_obj(); -} - -std::string overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_string() const -{ - 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 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 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_"); -} - -// PLMN-RAN-AreaCell ::= SEQUENCE -SRSASN_CODE plmn_ran_area_cell_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(plmn_id_present, 1)); - - if (plmn_id_present) { - HANDLE_CODE(plmn_id.pack(bref)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_cells, 1, 32)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE plmn_ran_area_cell_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(plmn_id_present, 1)); - - if (plmn_id_present) { - HANDLE_CODE(plmn_id.unpack(bref)); - } - HANDLE_CODE(unpack_dyn_seq_of(ran_area_cells, bref, 1, 32)); - - return SRSASN_SUCCESS; -} -void plmn_ran_area_cell_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (plmn_id_present) { - j.write_fieldname("plmn-Identity"); - plmn_id.to_json(j); - } - j.start_array("ran-AreaCells"); - for (const auto& e1 : ran_area_cells) { - j.write_str(e1.to_string()); - } - j.end_array(); - j.end_obj(); -} - -// PLMN-RAN-AreaConfig ::= SEQUENCE -SRSASN_CODE plmn_ran_area_cfg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(plmn_id_present, 1)); - - if (plmn_id_present) { - HANDLE_CODE(plmn_id.pack(bref)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, ran_area, 1, 16)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE plmn_ran_area_cfg_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(plmn_id_present, 1)); - - if (plmn_id_present) { - HANDLE_CODE(plmn_id.unpack(bref)); - } - HANDLE_CODE(unpack_dyn_seq_of(ran_area, bref, 1, 16)); - - return SRSASN_SUCCESS; -} -void plmn_ran_area_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (plmn_id_present) { - j.write_fieldname("plmn-Identity"); - plmn_id.to_json(j); - } - j.start_array("ran-Area"); - for (const auto& e1 : ran_area) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// QuantityConfigRS ::= SEQUENCE -SRSASN_CODE quant_cfg_rs_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(ssb_filt_cfg.pack(bref)); - HANDLE_CODE(csi_rs_filt_cfg.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE quant_cfg_rs_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(ssb_filt_cfg.unpack(bref)); - HANDLE_CODE(csi_rs_filt_cfg.unpack(bref)); - - return SRSASN_SUCCESS; -} -void quant_cfg_rs_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("ssb-FilterConfig"); - ssb_filt_cfg.to_json(j); - j.write_fieldname("csi-RS-FilterConfig"); - csi_rs_filt_cfg.to_json(j); - j.end_obj(); -} - -// ReportConfigInterRAT ::= SEQUENCE -SRSASN_CODE report_cfg_inter_rat_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(report_type.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE report_cfg_inter_rat_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(report_type.unpack(bref)); - - return SRSASN_SUCCESS; -} -void report_cfg_inter_rat_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("reportType"); - report_type.to_json(j); - j.end_obj(); } - -void report_cfg_inter_rat_s::report_type_c_::destroy_() +void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set(types::options e) { + destroy_(); + type_ = e; switch (type_) { - case types::periodical: - c.destroy(); + case types::n2: + c.init >(); break; - case types::event_triggered: - c.destroy(); + case types::n4: + c.init >(); break; - case types::report_cgi: - c.destroy(); + case types::n5: + c.init >(); break; - default: + case types::n8: + c.init >(); break; - } -} -void report_cfg_inter_rat_s::report_type_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::periodical: - c.init(); + case types::n10: + c.init >(); break; - case types::event_triggered: - c.init(); + case types::n20: + c.init >(); break; - case types::report_cgi: - c.init(); + case types::n40: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); } } -report_cfg_inter_rat_s::report_type_c_::report_type_c_(const report_cfg_inter_rat_s::report_type_c_& other) +rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::periodicity_and_pattern_c_( + const rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_& other) { type_ = other.type(); switch (type_) { - case types::periodical: - c.init(other.c.get()); + case types::n2: + c.init(other.c.get >()); break; - case types::event_triggered: - c.init(other.c.get()); + case types::n4: + c.init(other.c.get >()); break; - case types::report_cgi: - c.init(other.c.get()); + case types::n5: + c.init(other.c.get >()); + break; + case types::n8: + c.init(other.c.get >()); + break; + case types::n10: + c.init(other.c.get >()); + break; + case types::n20: + c.init(other.c.get >()); + break; + case types::n40: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); } } -report_cfg_inter_rat_s::report_type_c_& report_cfg_inter_rat_s::report_type_c_:: - operator=(const report_cfg_inter_rat_s::report_type_c_& other) +rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_& +rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::operator=( + const rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::periodical: - c.set(other.c.get()); + case types::n2: + c.set(other.c.get >()); break; - case types::event_triggered: - c.set(other.c.get()); + case types::n4: + c.set(other.c.get >()); break; - case types::report_cgi: - c.set(other.c.get()); + case types::n5: + c.set(other.c.get >()); + break; + case types::n8: + c.set(other.c.get >()); + break; + case types::n10: + c.set(other.c.get >()); + break; + case types::n20: + c.set(other.c.get >()); + break; + case types::n40: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); } return *this; } -void report_cfg_inter_rat_s::report_type_c_::to_json(json_writer& j) const +void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::periodical: - j.write_fieldname("periodical"); - c.get().to_json(j); + case types::n2: + j.write_str("n2", c.get >().to_string()); break; - case types::event_triggered: - j.write_fieldname("eventTriggered"); - c.get().to_json(j); + case types::n4: + j.write_str("n4", c.get >().to_string()); break; - case types::report_cgi: - j.write_fieldname("reportCGI"); - c.get().to_json(j); + case types::n5: + j.write_str("n5", c.get >().to_string()); + break; + case types::n8: + j.write_str("n8", c.get >().to_string()); + break; + case types::n10: + j.write_str("n10", c.get >().to_string()); + break; + case types::n20: + j.write_str("n20", c.get >().to_string()); + break; + case types::n40: + j.write_str("n40", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); } j.end_obj(); } -SRSASN_CODE report_cfg_inter_rat_s::report_type_c_::pack(bit_ref& bref) const +SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().pack(bref)); + case types::n2: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::event_triggered: - HANDLE_CODE(c.get().pack(bref)); + case types::n4: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::report_cgi: - HANDLE_CODE(c.get().pack(bref)); + case types::n5: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n8: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n20: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n40: + HANDLE_CODE(c.get >().pack(bref)); break; default: - log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE report_cfg_inter_rat_s::report_type_c_::unpack(cbit_ref& bref) +SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().unpack(bref)); + case types::n2: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::event_triggered: - HANDLE_CODE(c.get().unpack(bref)); + case types::n4: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::report_cgi: - HANDLE_CODE(c.get().unpack(bref)); + case types::n5: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n8: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n20: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n40: + HANDLE_CODE(c.get >().unpack(bref)); break; default: - log_invalid_choice_id(type_, "report_cfg_inter_rat_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string report_cfg_inter_rat_s::report_type_c_::types_opts::to_string() const +std::string rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types_opts::to_string() const { - static const char* options[] = {"periodical", "eventTriggered", "reportCGI"}; - return convert_enum_idx(options, 3, value, "report_cfg_inter_rat_s::report_type_c_::types"); -} - -// ReportConfigNR ::= SEQUENCE -SRSASN_CODE report_cfg_nr_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(report_type.pack(bref)); - - return SRSASN_SUCCESS; + 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"); } -SRSASN_CODE report_cfg_nr_s::unpack(cbit_ref& bref) +uint8_t rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types_opts::to_number() const { - HANDLE_CODE(report_type.unpack(bref)); - - return SRSASN_SUCCESS; + 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"); } -void report_cfg_nr_s::to_json(json_writer& j) const + +std::string rate_match_pattern_s::pattern_type_c_::types_opts::to_string() const { - j.start_obj(); - j.write_fieldname("reportType"); - report_type.to_json(j); - j.end_obj(); + static const char* options[] = {"bitmaps", "controlResourceSet"}; + return convert_enum_idx(options, 2, value, "rate_match_pattern_s::pattern_type_c_::types"); } -void report_cfg_nr_s::report_type_c_::destroy_() +std::string rate_match_pattern_s::dummy_opts::to_string() const { - switch (type_) { - case types::periodical: - c.destroy(); - break; - case types::event_triggered: - c.destroy(); - break; - case types::report_cgi: - c.destroy(); - break; - default: - break; - } + static const char* options[] = {"dynamic", "semiStatic"}; + return convert_enum_idx(options, 2, value, "rate_match_pattern_s::dummy_e_"); } -void report_cfg_nr_s::report_type_c_::set(types::options e) + +void rate_match_pattern_group_item_c_::destroy_() {} +void rate_match_pattern_group_item_c_::set(types::options e) { destroy_(); type_ = e; - switch (type_) { - case types::periodical: - c.init(); - break; - case types::event_triggered: - c.init(); - break; - case types::report_cgi: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); - } } -report_cfg_nr_s::report_type_c_::report_type_c_(const report_cfg_nr_s::report_type_c_& other) +rate_match_pattern_group_item_c_::rate_match_pattern_group_item_c_(const rate_match_pattern_group_item_c_& other) { type_ = other.type(); switch (type_) { - case types::periodical: - c.init(other.c.get()); - break; - case types::event_triggered: - c.init(other.c.get()); + case types::cell_level: + c.init(other.c.get()); break; - case types::report_cgi: - c.init(other.c.get()); + case types::bwp_level: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); } } -report_cfg_nr_s::report_type_c_& report_cfg_nr_s::report_type_c_:: - operator=(const report_cfg_nr_s::report_type_c_& other) +rate_match_pattern_group_item_c_& +rate_match_pattern_group_item_c_::operator=(const rate_match_pattern_group_item_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::periodical: - c.set(other.c.get()); - break; - case types::event_triggered: - c.set(other.c.get()); + case types::cell_level: + c.set(other.c.get()); break; - case types::report_cgi: - c.set(other.c.get()); + case types::bwp_level: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); } return *this; } -void report_cfg_nr_s::report_type_c_::to_json(json_writer& j) const +void rate_match_pattern_group_item_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::periodical: - j.write_fieldname("periodical"); - c.get().to_json(j); - break; - case types::event_triggered: - j.write_fieldname("eventTriggered"); - c.get().to_json(j); + case types::cell_level: + j.write_int("cellLevel", c.get()); break; - case types::report_cgi: - j.write_fieldname("reportCGI"); - c.get().to_json(j); + case types::bwp_level: + j.write_int("bwpLevel", c.get()); break; default: - log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); } j.end_obj(); } -SRSASN_CODE report_cfg_nr_s::report_type_c_::pack(bit_ref& bref) const +SRSASN_CODE rate_match_pattern_group_item_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().pack(bref)); + case types::cell_level: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); break; - case types::event_triggered: - HANDLE_CODE(c.get().pack(bref)); + case types::bwp_level: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); break; - case types::report_cgi: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; default: - log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE report_cfg_nr_s::report_type_c_::unpack(cbit_ref& bref) +SRSASN_CODE rate_match_pattern_group_item_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().unpack(bref)); + case types::cell_level: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); break; - case types::event_triggered: - HANDLE_CODE(c.get().unpack(bref)); + case types::bwp_level: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); break; - case types::report_cgi: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; default: - log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); + log_invalid_choice_id(type_, "rate_match_pattern_group_item_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string report_cfg_nr_s::report_type_c_::types_opts::to_string() const +std::string rate_match_pattern_group_item_c_::types_opts::to_string() const { - static const char* options[] = {"periodical", "eventTriggered", "reportCGI"}; - return convert_enum_idx(options, 3, value, "report_cfg_nr_s::report_type_c_::types"); + static const char* options[] = {"cellLevel", "bwpLevel"}; + return convert_enum_idx(options, 2, value, "rate_match_pattern_group_item_c_::types"); } -// FreqPriorityEUTRA ::= SEQUENCE -SRSASN_CODE freq_prio_eutra_s::pack(bit_ref& bref) const +// SRS-TPC-CommandConfig ::= SEQUENCE +SRSASN_CODE srs_tpc_cmd_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(cell_resel_sub_prio_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(start_bit_of_format2_minus3_present, 1)); + HANDLE_CODE(bref.pack(field_type_format2_minus3_present, 1)); - HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(pack_integer(bref, cell_resel_prio, (uint8_t)0u, (uint8_t)7u)); - if (cell_resel_sub_prio_present) { - HANDLE_CODE(cell_resel_sub_prio.pack(bref)); + if (start_bit_of_format2_minus3_present) { + HANDLE_CODE(pack_integer(bref, start_bit_of_format2_minus3, (uint8_t)1u, (uint8_t)31u)); + } + if (field_type_format2_minus3_present) { + HANDLE_CODE(pack_integer(bref, field_type_format2_minus3, (uint8_t)0u, (uint8_t)1u)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= start_bit_of_format2_minus3_sul_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(start_bit_of_format2_minus3_sul_present, 1)); + if (start_bit_of_format2_minus3_sul_present) { + HANDLE_CODE(pack_integer(bref, start_bit_of_format2_minus3_sul, (uint8_t)1u, (uint8_t)31u)); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE freq_prio_eutra_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_tpc_cmd_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(cell_resel_sub_prio_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(start_bit_of_format2_minus3_present, 1)); + HANDLE_CODE(bref.unpack(field_type_format2_minus3_present, 1)); - HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(unpack_integer(cell_resel_prio, bref, (uint8_t)0u, (uint8_t)7u)); - if (cell_resel_sub_prio_present) { - HANDLE_CODE(cell_resel_sub_prio.unpack(bref)); + if (start_bit_of_format2_minus3_present) { + HANDLE_CODE(unpack_integer(start_bit_of_format2_minus3, bref, (uint8_t)1u, (uint8_t)31u)); } + if (field_type_format2_minus3_present) { + HANDLE_CODE(unpack_integer(field_type_format2_minus3, bref, (uint8_t)0u, (uint8_t)1u)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(bref.unpack(start_bit_of_format2_minus3_sul_present, 1)); + if (start_bit_of_format2_minus3_sul_present) { + HANDLE_CODE(unpack_integer(start_bit_of_format2_minus3_sul, bref, (uint8_t)1u, (uint8_t)31u)); + } + } + } return SRSASN_SUCCESS; } -void freq_prio_eutra_s::to_json(json_writer& j) const +void srs_tpc_cmd_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("carrierFreq", carrier_freq); - j.write_int("cellReselectionPriority", cell_resel_prio); - if (cell_resel_sub_prio_present) { - j.write_str("cellReselectionSubPriority", cell_resel_sub_prio.to_string()); + if (start_bit_of_format2_minus3_present) { + j.write_int("startingBitOfFormat2-3", start_bit_of_format2_minus3); + } + if (field_type_format2_minus3_present) { + j.write_int("fieldTypeFormat2-3", field_type_format2_minus3); + } + if (ext) { + if (start_bit_of_format2_minus3_sul_present) { + j.write_int("startingBitOfFormat2-3SUL", start_bit_of_format2_minus3_sul); + } } j.end_obj(); } -// FreqPriorityNR ::= SEQUENCE -SRSASN_CODE freq_prio_nr_s::pack(bit_ref& bref) const +// TCI-State ::= SEQUENCE +SRSASN_CODE tci_state_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(cell_resel_sub_prio_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(qcl_type2_present, 1)); - HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_integer(bref, cell_resel_prio, (uint8_t)0u, (uint8_t)7u)); - if (cell_resel_sub_prio_present) { - HANDLE_CODE(cell_resel_sub_prio.pack(bref)); + HANDLE_CODE(pack_integer(bref, tci_state_id, (uint8_t)0u, (uint8_t)127u)); + HANDLE_CODE(qcl_type1.pack(bref)); + if (qcl_type2_present) { + HANDLE_CODE(qcl_type2.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE freq_prio_nr_s::unpack(cbit_ref& bref) +SRSASN_CODE tci_state_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(cell_resel_sub_prio_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(qcl_type2_present, 1)); - HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_integer(cell_resel_prio, bref, (uint8_t)0u, (uint8_t)7u)); - if (cell_resel_sub_prio_present) { - HANDLE_CODE(cell_resel_sub_prio.unpack(bref)); + HANDLE_CODE(unpack_integer(tci_state_id, bref, (uint8_t)0u, (uint8_t)127u)); + HANDLE_CODE(qcl_type1.unpack(bref)); + if (qcl_type2_present) { + HANDLE_CODE(qcl_type2.unpack(bref)); } return SRSASN_SUCCESS; } -void freq_prio_nr_s::to_json(json_writer& j) const +void tci_state_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("carrierFreq", carrier_freq); - j.write_int("cellReselectionPriority", cell_resel_prio); - if (cell_resel_sub_prio_present) { - j.write_str("cellReselectionSubPriority", cell_resel_sub_prio.to_string()); + j.write_int("tci-StateId", tci_state_id); + j.write_fieldname("qcl-Type1"); + qcl_type1.to_json(j); + if (qcl_type2_present) { + j.write_fieldname("qcl-Type2"); + qcl_type2.to_json(j); } j.end_obj(); } -// GapConfig ::= SEQUENCE -SRSASN_CODE gap_cfg_s::pack(bit_ref& bref) const +// ZP-CSI-RS-Resource ::= SEQUENCE +SRSASN_CODE zp_csi_rs_res_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, gap_offset, (uint8_t)0u, (uint8_t)159u)); - HANDLE_CODE(mgl.pack(bref)); - HANDLE_CODE(mgrp.pack(bref)); - HANDLE_CODE(mgta.pack(bref)); + HANDLE_CODE(bref.pack(periodicity_and_offset_present, 1)); + + HANDLE_CODE(pack_integer(bref, zp_csi_rs_res_id, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(res_map.pack(bref)); + if (periodicity_and_offset_present) { + HANDLE_CODE(periodicity_and_offset.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE gap_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE zp_csi_rs_res_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(gap_offset, bref, (uint8_t)0u, (uint8_t)159u)); - HANDLE_CODE(mgl.unpack(bref)); - HANDLE_CODE(mgrp.unpack(bref)); - HANDLE_CODE(mgta.unpack(bref)); + HANDLE_CODE(bref.unpack(periodicity_and_offset_present, 1)); + + HANDLE_CODE(unpack_integer(zp_csi_rs_res_id, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(res_map.unpack(bref)); + if (periodicity_and_offset_present) { + HANDLE_CODE(periodicity_and_offset.unpack(bref)); + } return SRSASN_SUCCESS; } -void gap_cfg_s::to_json(json_writer& j) const +void zp_csi_rs_res_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("gapOffset", gap_offset); - j.write_str("mgl", mgl.to_string()); - j.write_str("mgrp", mgrp.to_string()); - j.write_str("mgta", mgta.to_string()); + j.write_int("zp-CSI-RS-ResourceId", zp_csi_rs_res_id); + j.write_fieldname("resourceMapping"); + res_map.to_json(j); + if (periodicity_and_offset_present) { + j.write_fieldname("periodicityAndOffset"); + periodicity_and_offset.to_json(j); + } j.end_obj(); } -std::string gap_cfg_s::mgl_opts::to_string() const -{ - 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 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 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 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 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 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 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 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 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 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 const char* options[] = {"0.0", "0.1", "1.0", "1.1"}; - return convert_enum_idx(options, 4, value, "meas_gap_sharing_scheme_e"); -} - -// MeasIdToAddMod ::= SEQUENCE -SRSASN_CODE meas_id_to_add_mod_s::pack(bit_ref& bref) const +// ZP-CSI-RS-ResourceSet ::= SEQUENCE +SRSASN_CODE zp_csi_rs_res_set_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, meas_id, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(pack_integer(bref, meas_obj_id, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(pack_integer(bref, report_cfg_id, (uint8_t)1u, (uint8_t)64u)); + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, zp_csi_rs_res_set_id, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(pack_dyn_seq_of(bref, zp_csi_rs_res_id_list, 1, 16, integer_packer(0, 31))); return SRSASN_SUCCESS; } -SRSASN_CODE meas_id_to_add_mod_s::unpack(cbit_ref& bref) +SRSASN_CODE zp_csi_rs_res_set_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(meas_id, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(unpack_integer(meas_obj_id, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(unpack_integer(report_cfg_id, bref, (uint8_t)1u, (uint8_t)64u)); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(zp_csi_rs_res_set_id, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(unpack_dyn_seq_of(zp_csi_rs_res_id_list, bref, 1, 16, integer_packer(0, 31))); return SRSASN_SUCCESS; } -void meas_id_to_add_mod_s::to_json(json_writer& j) const +void zp_csi_rs_res_set_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("measId", meas_id); - j.write_int("measObjectId", meas_obj_id); - j.write_int("reportConfigId", report_cfg_id); + j.write_int("zp-CSI-RS-ResourceSetId", zp_csi_rs_res_set_id); + j.start_array("zp-CSI-RS-ResourceIdList"); + for (const auto& e1 : zp_csi_rs_res_id_list) { + j.write_int(e1); + } + j.end_array(); j.end_obj(); } -// MeasObjectToAddMod ::= SEQUENCE -SRSASN_CODE meas_obj_to_add_mod_s::pack(bit_ref& bref) const +// PDCCH-Config ::= SEQUENCE +SRSASN_CODE pdcch_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, meas_obj_id, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(meas_obj.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ctrl_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(ctrl_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(search_spaces_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(search_spaces_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(dl_preemption_present, 1)); + HANDLE_CODE(bref.pack(tpc_pusch_present, 1)); + HANDLE_CODE(bref.pack(tpc_pucch_present, 1)); + HANDLE_CODE(bref.pack(tpc_srs_present, 1)); + + if (ctrl_res_set_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ctrl_res_set_to_add_mod_list, 1, 3)); + } + if (ctrl_res_set_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ctrl_res_set_to_release_list, 1, 3, integer_packer(0, 11))); + } + if (search_spaces_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, search_spaces_to_add_mod_list, 1, 10)); + } + if (search_spaces_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, search_spaces_to_release_list, 1, 10, integer_packer(0, 39))); + } + if (dl_preemption_present) { + HANDLE_CODE(dl_preemption.pack(bref)); + } + if (tpc_pusch_present) { + HANDLE_CODE(tpc_pusch.pack(bref)); + } + if (tpc_pucch_present) { + HANDLE_CODE(tpc_pucch.pack(bref)); + } + if (tpc_srs_present) { + HANDLE_CODE(tpc_srs.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE meas_obj_to_add_mod_s::unpack(cbit_ref& bref) +SRSASN_CODE pdcch_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(meas_obj_id, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(meas_obj.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ctrl_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(ctrl_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(search_spaces_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(search_spaces_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(dl_preemption_present, 1)); + HANDLE_CODE(bref.unpack(tpc_pusch_present, 1)); + HANDLE_CODE(bref.unpack(tpc_pucch_present, 1)); + HANDLE_CODE(bref.unpack(tpc_srs_present, 1)); + + if (ctrl_res_set_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ctrl_res_set_to_add_mod_list, bref, 1, 3)); + } + if (ctrl_res_set_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ctrl_res_set_to_release_list, bref, 1, 3, integer_packer(0, 11))); + } + if (search_spaces_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(search_spaces_to_add_mod_list, bref, 1, 10)); + } + if (search_spaces_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(search_spaces_to_release_list, bref, 1, 10, integer_packer(0, 39))); + } + if (dl_preemption_present) { + HANDLE_CODE(dl_preemption.unpack(bref)); + } + if (tpc_pusch_present) { + HANDLE_CODE(tpc_pusch.unpack(bref)); + } + if (tpc_pucch_present) { + HANDLE_CODE(tpc_pucch.unpack(bref)); + } + if (tpc_srs_present) { + HANDLE_CODE(tpc_srs.unpack(bref)); + } return SRSASN_SUCCESS; } -void meas_obj_to_add_mod_s::to_json(json_writer& j) const +void pdcch_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("measObjectId", meas_obj_id); - j.write_fieldname("measObject"); - meas_obj.to_json(j); + if (ctrl_res_set_to_add_mod_list_present) { + j.start_array("controlResourceSetToAddModList"); + 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 (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 (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 (const auto& e1 : search_spaces_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (dl_preemption_present) { + j.write_fieldname("downlinkPreemption"); + dl_preemption.to_json(j); + } + if (tpc_pusch_present) { + j.write_fieldname("tpc-PUSCH"); + tpc_pusch.to_json(j); + } + if (tpc_pucch_present) { + j.write_fieldname("tpc-PUCCH"); + tpc_pucch.to_json(j); + } + if (tpc_srs_present) { + j.write_fieldname("tpc-SRS"); + tpc_srs.to_json(j); + } j.end_obj(); } -void meas_obj_to_add_mod_s::meas_obj_c_::destroy_() +// PDSCH-Config ::= SEQUENCE +SRSASN_CODE pdsch_cfg_s::pack(bit_ref& bref) const { - switch (type_) { - case types::meas_obj_nr: - c.destroy(); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(data_scrambling_id_pdsch_present, 1)); + HANDLE_CODE(bref.pack(dmrs_dl_for_pdsch_map_type_a_present, 1)); + HANDLE_CODE(bref.pack(dmrs_dl_for_pdsch_map_type_b_present, 1)); + HANDLE_CODE(bref.pack(tci_states_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(tci_states_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(vrb_to_prb_interleaver_present, 1)); + HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_present, 1)); + HANDLE_CODE(bref.pack(pdsch_aggregation_factor_present, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_group1_present, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_group2_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_present, 1)); + HANDLE_CODE(bref.pack(max_nrof_code_words_sched_by_dci_present, 1)); + HANDLE_CODE(bref.pack(zp_csi_rs_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(zp_csi_rs_res_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(sp_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(sp_zp_csi_rs_res_sets_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(p_zp_csi_rs_res_set_present, 1)); + + if (data_scrambling_id_pdsch_present) { + HANDLE_CODE(pack_integer(bref, data_scrambling_id_pdsch, (uint16_t)0u, (uint16_t)1023u)); + } + if (dmrs_dl_for_pdsch_map_type_a_present) { + HANDLE_CODE(dmrs_dl_for_pdsch_map_type_a.pack(bref)); + } + if (dmrs_dl_for_pdsch_map_type_b_present) { + HANDLE_CODE(dmrs_dl_for_pdsch_map_type_b.pack(bref)); + } + if (tci_states_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_to_add_mod_list, 1, 128)); + } + if (tci_states_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_to_release_list, 1, 128, integer_packer(0, 127))); + } + if (vrb_to_prb_interleaver_present) { + HANDLE_CODE(vrb_to_prb_interleaver.pack(bref)); + } + HANDLE_CODE(res_alloc.pack(bref)); + if (pdsch_time_domain_alloc_list_present) { + HANDLE_CODE(pdsch_time_domain_alloc_list.pack(bref)); + } + if (pdsch_aggregation_factor_present) { + HANDLE_CODE(pdsch_aggregation_factor.pack(bref)); + } + if (rate_match_pattern_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_add_mod_list, 1, 4)); + } + if (rate_match_pattern_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_release_list, 1, 4, integer_packer(0, 3))); + } + if (rate_match_pattern_group1_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_group1, 1, 8)); + } + if (rate_match_pattern_group2_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_group2, 1, 8)); + } + HANDLE_CODE(rbg_size.pack(bref)); + if (mcs_table_present) { + HANDLE_CODE(mcs_table.pack(bref)); + } + if (max_nrof_code_words_sched_by_dci_present) { + HANDLE_CODE(max_nrof_code_words_sched_by_dci.pack(bref)); + } + HANDLE_CODE(prb_bundling_type.pack(bref)); + if (zp_csi_rs_res_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, zp_csi_rs_res_to_add_mod_list, 1, 32)); + } + if (zp_csi_rs_res_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, zp_csi_rs_res_to_release_list, 1, 32, integer_packer(0, 31))); + } + if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, aperiodic_zp_csi_rs_res_sets_to_add_mod_list, 1, 16)); + } + if (aperiodic_zp_csi_rs_res_sets_to_release_list_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, aperiodic_zp_csi_rs_res_sets_to_release_list, 1, 16, integer_packer(0, 15))); + } + if (sp_zp_csi_rs_res_sets_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sp_zp_csi_rs_res_sets_to_add_mod_list, 1, 16)); + } + if (sp_zp_csi_rs_res_sets_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sp_zp_csi_rs_res_sets_to_release_list, 1, 16, integer_packer(0, 15))); + } + if (p_zp_csi_rs_res_set_present) { + HANDLE_CODE(p_zp_csi_rs_res_set.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(data_scrambling_id_pdsch_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_dl_for_pdsch_map_type_a_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_dl_for_pdsch_map_type_b_present, 1)); + HANDLE_CODE(bref.unpack(tci_states_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(tci_states_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(vrb_to_prb_interleaver_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_time_domain_alloc_list_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_aggregation_factor_present, 1)); + HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(rate_match_pattern_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(rate_match_pattern_group1_present, 1)); + HANDLE_CODE(bref.unpack(rate_match_pattern_group2_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_present, 1)); + HANDLE_CODE(bref.unpack(max_nrof_code_words_sched_by_dci_present, 1)); + HANDLE_CODE(bref.unpack(zp_csi_rs_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(zp_csi_rs_res_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(aperiodic_zp_csi_rs_res_sets_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(sp_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(sp_zp_csi_rs_res_sets_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(p_zp_csi_rs_res_set_present, 1)); + + if (data_scrambling_id_pdsch_present) { + HANDLE_CODE(unpack_integer(data_scrambling_id_pdsch, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (dmrs_dl_for_pdsch_map_type_a_present) { + HANDLE_CODE(dmrs_dl_for_pdsch_map_type_a.unpack(bref)); + } + if (dmrs_dl_for_pdsch_map_type_b_present) { + HANDLE_CODE(dmrs_dl_for_pdsch_map_type_b.unpack(bref)); + } + if (tci_states_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(tci_states_to_add_mod_list, bref, 1, 128)); + } + if (tci_states_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(tci_states_to_release_list, bref, 1, 128, integer_packer(0, 127))); + } + if (vrb_to_prb_interleaver_present) { + HANDLE_CODE(vrb_to_prb_interleaver.unpack(bref)); + } + HANDLE_CODE(res_alloc.unpack(bref)); + if (pdsch_time_domain_alloc_list_present) { + HANDLE_CODE(pdsch_time_domain_alloc_list.unpack(bref)); + } + if (pdsch_aggregation_factor_present) { + HANDLE_CODE(pdsch_aggregation_factor.unpack(bref)); + } + if (rate_match_pattern_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_add_mod_list, bref, 1, 4)); + } + if (rate_match_pattern_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_release_list, bref, 1, 4, integer_packer(0, 3))); + } + if (rate_match_pattern_group1_present) { + HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_group1, bref, 1, 8)); + } + if (rate_match_pattern_group2_present) { + HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_group2, bref, 1, 8)); + } + HANDLE_CODE(rbg_size.unpack(bref)); + if (mcs_table_present) { + HANDLE_CODE(mcs_table.unpack(bref)); + } + if (max_nrof_code_words_sched_by_dci_present) { + HANDLE_CODE(max_nrof_code_words_sched_by_dci.unpack(bref)); + } + HANDLE_CODE(prb_bundling_type.unpack(bref)); + if (zp_csi_rs_res_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(zp_csi_rs_res_to_add_mod_list, bref, 1, 32)); + } + if (zp_csi_rs_res_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(zp_csi_rs_res_to_release_list, bref, 1, 32, integer_packer(0, 31))); + } + if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(aperiodic_zp_csi_rs_res_sets_to_add_mod_list, bref, 1, 16)); + } + if (aperiodic_zp_csi_rs_res_sets_to_release_list_present) { + HANDLE_CODE( + unpack_dyn_seq_of(aperiodic_zp_csi_rs_res_sets_to_release_list, bref, 1, 16, integer_packer(0, 15))); + } + if (sp_zp_csi_rs_res_sets_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(sp_zp_csi_rs_res_sets_to_add_mod_list, bref, 1, 16)); + } + if (sp_zp_csi_rs_res_sets_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(sp_zp_csi_rs_res_sets_to_release_list, bref, 1, 16, integer_packer(0, 15))); + } + if (p_zp_csi_rs_res_set_present) { + HANDLE_CODE(p_zp_csi_rs_res_set.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (data_scrambling_id_pdsch_present) { + j.write_int("dataScramblingIdentityPDSCH", data_scrambling_id_pdsch); + } + if (dmrs_dl_for_pdsch_map_type_a_present) { + j.write_fieldname("dmrs-DownlinkForPDSCH-MappingTypeA"); + dmrs_dl_for_pdsch_map_type_a.to_json(j); + } + if (dmrs_dl_for_pdsch_map_type_b_present) { + j.write_fieldname("dmrs-DownlinkForPDSCH-MappingTypeB"); + dmrs_dl_for_pdsch_map_type_b.to_json(j); + } + if (tci_states_to_add_mod_list_present) { + j.start_array("tci-StatesToAddModList"); + 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 (const auto& e1 : tci_states_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (vrb_to_prb_interleaver_present) { + j.write_str("vrb-ToPRB-Interleaver", vrb_to_prb_interleaver.to_string()); + } + j.write_str("resourceAllocation", res_alloc.to_string()); + if (pdsch_time_domain_alloc_list_present) { + j.write_fieldname("pdsch-TimeDomainAllocationList"); + pdsch_time_domain_alloc_list.to_json(j); + } + if (pdsch_aggregation_factor_present) { + j.write_str("pdsch-AggregationFactor", pdsch_aggregation_factor.to_string()); + } + if (rate_match_pattern_to_add_mod_list_present) { + j.start_array("rateMatchPatternToAddModList"); + 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 (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 (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 (const auto& e1 : rate_match_pattern_group2) { + e1.to_json(j); + } + j.end_array(); + } + j.write_str("rbg-Size", rbg_size.to_string()); + if (mcs_table_present) { + j.write_str("mcs-Table", mcs_table.to_string()); + } + if (max_nrof_code_words_sched_by_dci_present) { + j.write_str("maxNrofCodeWordsScheduledByDCI", max_nrof_code_words_sched_by_dci.to_string()); + } + j.write_fieldname("prb-BundlingType"); + prb_bundling_type.to_json(j); + if (zp_csi_rs_res_to_add_mod_list_present) { + j.start_array("zp-CSI-RS-ResourceToAddModList"); + 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 (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 (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 (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 (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 (const auto& e1 : sp_zp_csi_rs_res_sets_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (p_zp_csi_rs_res_set_present) { + j.write_fieldname("p-ZP-CSI-RS-ResourceSet"); + p_zp_csi_rs_res_set.to_json(j); + } + j.end_obj(); +} + +std::string pdsch_cfg_s::vrb_to_prb_interleaver_opts::to_string() const +{ + 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 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 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 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 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 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 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 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 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 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 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 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_() +{ + switch (type_) { + case types::static_bundling: + c.destroy(); break; - case types::meas_obj_eutra: - c.destroy(); + case types::dynamic_bundling: + c.destroy(); break; default: break; } } -void meas_obj_to_add_mod_s::meas_obj_c_::set(types::options e) +void pdsch_cfg_s::prb_bundling_type_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::meas_obj_nr: - c.init(); + case types::static_bundling: + c.init(); break; - case types::meas_obj_eutra: - c.init(); + case types::dynamic_bundling: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); } } -meas_obj_to_add_mod_s::meas_obj_c_::meas_obj_c_(const meas_obj_to_add_mod_s::meas_obj_c_& other) +pdsch_cfg_s::prb_bundling_type_c_::prb_bundling_type_c_(const pdsch_cfg_s::prb_bundling_type_c_& other) { type_ = other.type(); switch (type_) { - case types::meas_obj_nr: - c.init(other.c.get()); + case types::static_bundling: + c.init(other.c.get()); break; - case types::meas_obj_eutra: - c.init(other.c.get()); + case types::dynamic_bundling: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); } } -meas_obj_to_add_mod_s::meas_obj_c_& meas_obj_to_add_mod_s::meas_obj_c_:: - operator=(const meas_obj_to_add_mod_s::meas_obj_c_& other) +pdsch_cfg_s::prb_bundling_type_c_& +pdsch_cfg_s::prb_bundling_type_c_::operator=(const pdsch_cfg_s::prb_bundling_type_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::meas_obj_nr: - c.set(other.c.get()); + case types::static_bundling: + c.set(other.c.get()); break; - case types::meas_obj_eutra: - c.set(other.c.get()); + case types::dynamic_bundling: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); } return *this; } -void meas_obj_to_add_mod_s::meas_obj_c_::to_json(json_writer& j) const +void pdsch_cfg_s::prb_bundling_type_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::meas_obj_nr: - j.write_fieldname("measObjectNR"); - c.get().to_json(j); + case types::static_bundling: + j.write_fieldname("staticBundling"); + j.start_obj(); + if (c.get().bundle_size_present) { + j.write_str("bundleSize", c.get().bundle_size.to_string()); + } + j.end_obj(); break; - case types::meas_obj_eutra: - j.write_fieldname("measObjectEUTRA"); - c.get().to_json(j); + case types::dynamic_bundling: + j.write_fieldname("dynamicBundling"); + j.start_obj(); + if (c.get().bundle_size_set1_present) { + j.write_str("bundleSizeSet1", c.get().bundle_size_set1.to_string()); + } + if (c.get().bundle_size_set2_present) { + j.write_str("bundleSizeSet2", c.get().bundle_size_set2.to_string()); + } + j.end_obj(); break; default: - log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); } j.end_obj(); } -SRSASN_CODE meas_obj_to_add_mod_s::meas_obj_c_::pack(bit_ref& bref) const +SRSASN_CODE pdsch_cfg_s::prb_bundling_type_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::meas_obj_nr: - HANDLE_CODE(c.get().pack(bref)); + case types::static_bundling: + HANDLE_CODE(bref.pack(c.get().bundle_size_present, 1)); + if (c.get().bundle_size_present) { + HANDLE_CODE(c.get().bundle_size.pack(bref)); + } + break; + case types::dynamic_bundling: + HANDLE_CODE(bref.pack(c.get().bundle_size_set1_present, 1)); + HANDLE_CODE(bref.pack(c.get().bundle_size_set2_present, 1)); + if (c.get().bundle_size_set1_present) { + HANDLE_CODE(c.get().bundle_size_set1.pack(bref)); + } + if (c.get().bundle_size_set2_present) { + HANDLE_CODE(c.get().bundle_size_set2.pack(bref)); + } break; - case types::meas_obj_eutra: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; default: - log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE meas_obj_to_add_mod_s::meas_obj_c_::unpack(cbit_ref& bref) +SRSASN_CODE pdsch_cfg_s::prb_bundling_type_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::meas_obj_nr: - HANDLE_CODE(c.get().unpack(bref)); + case types::static_bundling: + HANDLE_CODE(bref.unpack(c.get().bundle_size_present, 1)); + if (c.get().bundle_size_present) { + HANDLE_CODE(c.get().bundle_size.unpack(bref)); + } + break; + case types::dynamic_bundling: + HANDLE_CODE(bref.unpack(c.get().bundle_size_set1_present, 1)); + HANDLE_CODE(bref.unpack(c.get().bundle_size_set2_present, 1)); + if (c.get().bundle_size_set1_present) { + HANDLE_CODE(c.get().bundle_size_set1.unpack(bref)); + } + if (c.get().bundle_size_set2_present) { + HANDLE_CODE(c.get().bundle_size_set2.unpack(bref)); + } break; - case types::meas_obj_eutra: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; default: - log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_string() const +std::string pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_string() const { - static const char* options[] = {"measObjectNR", "measObjectEUTRA"}; - return convert_enum_idx(options, 2, value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); + 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_"); } - -// OtherConfig-v1540 ::= SEQUENCE -SRSASN_CODE other_cfg_v1540_s::pack(bit_ref& bref) const +uint8_t pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_number() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(overheat_assist_cfg_present, 1)); - - if (overheat_assist_cfg_present) { - HANDLE_CODE(overheat_assist_cfg.pack(bref)); - } - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE other_cfg_v1540_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(overheat_assist_cfg_present, 1)); - - if (overheat_assist_cfg_present) { - HANDLE_CODE(overheat_assist_cfg.unpack(bref)); - } - return SRSASN_SUCCESS; -} -void other_cfg_v1540_s::to_json(json_writer& j) const +std::string pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set1_opts::to_string() const { - j.start_obj(); - if (overheat_assist_cfg_present) { - j.write_fieldname("overheatingAssistanceConfig"); - overheat_assist_cfg.to_json(j); - } - j.end_obj(); + 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_"); } -// QuantityConfigNR ::= SEQUENCE -SRSASN_CODE quant_cfg_nr_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(quant_cfg_rs_idx_present, 1)); - - HANDLE_CODE(quant_cfg_cell.pack(bref)); - if (quant_cfg_rs_idx_present) { - HANDLE_CODE(quant_cfg_rs_idx.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE quant_cfg_nr_s::unpack(cbit_ref& bref) +std::string pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set2_opts::to_string() const { - HANDLE_CODE(bref.unpack(quant_cfg_rs_idx_present, 1)); - - HANDLE_CODE(quant_cfg_cell.unpack(bref)); - if (quant_cfg_rs_idx_present) { - HANDLE_CODE(quant_cfg_rs_idx.unpack(bref)); - } - - return SRSASN_SUCCESS; + 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_"); } -void quant_cfg_nr_s::to_json(json_writer& j) const +uint8_t pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set2_opts::to_number() const { - j.start_obj(); - j.write_fieldname("quantityConfigCell"); - quant_cfg_cell.to_json(j); - if (quant_cfg_rs_idx_present) { - j.write_fieldname("quantityConfigRS-Index"); - quant_cfg_rs_idx.to_json(j); - } - j.end_obj(); + 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_"); } -// RAT-Type ::= ENUMERATED -std::string rat_type_opts::to_string() const +std::string pdsch_cfg_s::prb_bundling_type_c_::types_opts::to_string() const { - static const char* options[] = {"nr", "eutra-nr", "eutra", "spare1"}; - return convert_enum_idx(options, 4, value, "rat_type_e"); + static const char* options[] = {"staticBundling", "dynamicBundling"}; + return convert_enum_idx(options, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::types"); } -// ReportConfigToAddMod ::= SEQUENCE -SRSASN_CODE report_cfg_to_add_mod_s::pack(bit_ref& bref) const +// RadioLinkMonitoringConfig ::= SEQUENCE +SRSASN_CODE radio_link_monitoring_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, report_cfg_id, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(report_cfg.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(fail_detection_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(fail_detection_res_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(beam_fail_instance_max_count_present, 1)); + HANDLE_CODE(bref.pack(beam_fail_detection_timer_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE report_cfg_to_add_mod_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(report_cfg_id, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(report_cfg.unpack(bref)); + if (fail_detection_res_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, fail_detection_res_to_add_mod_list, 1, 10)); + } + if (fail_detection_res_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, fail_detection_res_to_release_list, 1, 10, integer_packer(0, 9))); + } + if (beam_fail_instance_max_count_present) { + HANDLE_CODE(beam_fail_instance_max_count.pack(bref)); + } + if (beam_fail_detection_timer_present) { + HANDLE_CODE(beam_fail_detection_timer.pack(bref)); + } return SRSASN_SUCCESS; } -void report_cfg_to_add_mod_s::to_json(json_writer& j) const +SRSASN_CODE radio_link_monitoring_cfg_s::unpack(cbit_ref& bref) { - j.start_obj(); - j.write_int("reportConfigId", report_cfg_id); - j.write_fieldname("reportConfig"); - report_cfg.to_json(j); - j.end_obj(); -} + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(fail_detection_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(fail_detection_res_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(beam_fail_instance_max_count_present, 1)); + HANDLE_CODE(bref.unpack(beam_fail_detection_timer_present, 1)); -void report_cfg_to_add_mod_s::report_cfg_c_::destroy_() -{ - switch (type_) { - case types::report_cfg_nr: - c.destroy(); - break; - case types::report_cfg_inter_rat: - c.destroy(); - break; - default: - break; - } -} -void report_cfg_to_add_mod_s::report_cfg_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::report_cfg_nr: - c.init(); - break; - case types::report_cfg_inter_rat: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + if (fail_detection_res_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(fail_detection_res_to_add_mod_list, bref, 1, 10)); } -} -report_cfg_to_add_mod_s::report_cfg_c_::report_cfg_c_(const report_cfg_to_add_mod_s::report_cfg_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::report_cfg_nr: - c.init(other.c.get()); - break; - case types::report_cfg_inter_rat: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + if (fail_detection_res_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(fail_detection_res_to_release_list, bref, 1, 10, integer_packer(0, 9))); } -} -report_cfg_to_add_mod_s::report_cfg_c_& report_cfg_to_add_mod_s::report_cfg_c_:: - operator=(const report_cfg_to_add_mod_s::report_cfg_c_& other) -{ - if (this == &other) { - return *this; + if (beam_fail_instance_max_count_present) { + HANDLE_CODE(beam_fail_instance_max_count.unpack(bref)); } - set(other.type()); - switch (type_) { - case types::report_cfg_nr: - c.set(other.c.get()); - break; - case types::report_cfg_inter_rat: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + if (beam_fail_detection_timer_present) { + HANDLE_CODE(beam_fail_detection_timer.unpack(bref)); } - return *this; + return SRSASN_SUCCESS; } -void report_cfg_to_add_mod_s::report_cfg_c_::to_json(json_writer& j) const +void radio_link_monitoring_cfg_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::report_cfg_nr: - j.write_fieldname("reportConfigNR"); - c.get().to_json(j); - break; - case types::report_cfg_inter_rat: - j.write_fieldname("reportConfigInterRAT"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + if (fail_detection_res_to_add_mod_list_present) { + j.start_array("failureDetectionResourcesToAddModList"); + 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 (const auto& e1 : fail_detection_res_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (beam_fail_instance_max_count_present) { + j.write_str("beamFailureInstanceMaxCount", beam_fail_instance_max_count.to_string()); + } + if (beam_fail_detection_timer_present) { + j.write_str("beamFailureDetectionTimer", beam_fail_detection_timer.to_string()); } j.end_obj(); } -SRSASN_CODE report_cfg_to_add_mod_s::report_cfg_c_::pack(bit_ref& bref) const + +std::string radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_string() const { - type_.pack(bref); - switch (type_) { - case types::report_cfg_nr: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::report_cfg_inter_rat: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - default: - log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE report_cfg_to_add_mod_s::report_cfg_c_::unpack(cbit_ref& bref) +uint8_t radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_number() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::report_cfg_nr: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::report_cfg_inter_rat: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - default: - log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + 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 report_cfg_to_add_mod_s::report_cfg_c_::types_opts::to_string() const +std::string radio_link_monitoring_cfg_s::beam_fail_detection_timer_opts::to_string() const { - static const char* options[] = {"reportConfigNR", "reportConfigInterRAT"}; - return convert_enum_idx(options, 2, value, "report_cfg_to_add_mod_s::report_cfg_c_::types"); + 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 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_"); } -// CarrierInfoNR ::= SEQUENCE -SRSASN_CODE carrier_info_nr_s::pack(bit_ref& bref) const +// SPS-Config ::= SEQUENCE +SRSASN_CODE sps_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(smtc_present, 1)); + HANDLE_CODE(bref.pack(n1_pucch_an_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_present, 1)); - HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(ssb_subcarrier_spacing.pack(bref)); - if (smtc_present) { - HANDLE_CODE(smtc.pack(bref)); + HANDLE_CODE(periodicity.pack(bref)); + HANDLE_CODE(pack_integer(bref, nrof_harq_processes, (uint8_t)1u, (uint8_t)8u)); + if (n1_pucch_an_present) { + HANDLE_CODE(pack_integer(bref, n1_pucch_an, (uint8_t)0u, (uint8_t)127u)); } return SRSASN_SUCCESS; } -SRSASN_CODE carrier_info_nr_s::unpack(cbit_ref& bref) +SRSASN_CODE sps_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(smtc_present, 1)); + HANDLE_CODE(bref.unpack(n1_pucch_an_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_present, 1)); - HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(ssb_subcarrier_spacing.unpack(bref)); - if (smtc_present) { - HANDLE_CODE(smtc.unpack(bref)); + HANDLE_CODE(periodicity.unpack(bref)); + HANDLE_CODE(unpack_integer(nrof_harq_processes, bref, (uint8_t)1u, (uint8_t)8u)); + if (n1_pucch_an_present) { + HANDLE_CODE(unpack_integer(n1_pucch_an, bref, (uint8_t)0u, (uint8_t)127u)); } return SRSASN_SUCCESS; } -void carrier_info_nr_s::to_json(json_writer& j) const +void sps_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("carrierFreq", carrier_freq); - j.write_str("ssbSubcarrierSpacing", ssb_subcarrier_spacing.to_string()); - if (smtc_present) { - j.write_fieldname("smtc"); - smtc.to_json(j); + j.write_str("periodicity", periodicity.to_string()); + j.write_int("nrofHARQ-Processes", nrof_harq_processes); + if (n1_pucch_an_present) { + j.write_int("n1PUCCH-AN", n1_pucch_an); + } + if (mcs_table_present) { + j.write_str("mcs-Table", "qam64LowSE"); } j.end_obj(); } -// DRB-CountMSB-Info ::= SEQUENCE -SRSASN_CODE drb_count_msb_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, drb_id, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pack_integer(bref, count_msb_ul, (uint32_t)0u, (uint32_t)33554431u)); - HANDLE_CODE(pack_integer(bref, count_msb_dl, (uint32_t)0u, (uint32_t)33554431u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE drb_count_msb_info_s::unpack(cbit_ref& bref) +std::string sps_cfg_s::periodicity_opts::to_string() const { - HANDLE_CODE(unpack_integer(drb_id, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(unpack_integer(count_msb_ul, bref, (uint32_t)0u, (uint32_t)33554431u)); - HANDLE_CODE(unpack_integer(count_msb_dl, bref, (uint32_t)0u, (uint32_t)33554431u)); - - return SRSASN_SUCCESS; + 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_"); } -void drb_count_msb_info_s::to_json(json_writer& j) const +uint16_t sps_cfg_s::periodicity_opts::to_number() const { - j.start_obj(); - j.write_int("drb-Identity", drb_id); - j.write_int("countMSB-Uplink", count_msb_ul); - j.write_int("countMSB-Downlink", count_msb_dl); - j.end_obj(); + 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_"); } -// MasterKeyUpdate ::= SEQUENCE -SRSASN_CODE master_key_upd_s::pack(bit_ref& bref) const +// BWP-DownlinkDedicated ::= SEQUENCE +SRSASN_CODE bwp_dl_ded_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(nas_container_present, 1)); + HANDLE_CODE(bref.pack(pdcch_cfg_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_present, 1)); + HANDLE_CODE(bref.pack(radio_link_monitoring_cfg_present, 1)); - HANDLE_CODE(bref.pack(key_set_change_ind, 1)); - HANDLE_CODE(pack_integer(bref, next_hop_chaining_count, (uint8_t)0u, (uint8_t)7u)); - if (nas_container_present) { - HANDLE_CODE(nas_container.pack(bref)); + if (pdcch_cfg_present) { + HANDLE_CODE(pdcch_cfg.pack(bref)); + } + if (pdsch_cfg_present) { + HANDLE_CODE(pdsch_cfg.pack(bref)); + } + if (sps_cfg_present) { + HANDLE_CODE(sps_cfg.pack(bref)); + } + if (radio_link_monitoring_cfg_present) { + HANDLE_CODE(radio_link_monitoring_cfg.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE master_key_upd_s::unpack(cbit_ref& bref) +SRSASN_CODE bwp_dl_ded_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(nas_container_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_cfg_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_present, 1)); + HANDLE_CODE(bref.unpack(radio_link_monitoring_cfg_present, 1)); - HANDLE_CODE(bref.unpack(key_set_change_ind, 1)); - HANDLE_CODE(unpack_integer(next_hop_chaining_count, bref, (uint8_t)0u, (uint8_t)7u)); - if (nas_container_present) { - HANDLE_CODE(nas_container.unpack(bref)); + if (pdcch_cfg_present) { + HANDLE_CODE(pdcch_cfg.unpack(bref)); + } + if (pdsch_cfg_present) { + HANDLE_CODE(pdsch_cfg.unpack(bref)); + } + if (sps_cfg_present) { + HANDLE_CODE(sps_cfg.unpack(bref)); + } + if (radio_link_monitoring_cfg_present) { + HANDLE_CODE(radio_link_monitoring_cfg.unpack(bref)); } return SRSASN_SUCCESS; } -void master_key_upd_s::to_json(json_writer& j) const +void bwp_dl_ded_s::to_json(json_writer& j) const { j.start_obj(); - j.write_bool("keySetChangeIndicator", key_set_change_ind); - j.write_int("nextHopChainingCount", next_hop_chaining_count); - if (nas_container_present) { - j.write_str("nas-Container", nas_container.to_string()); + if (pdcch_cfg_present) { + j.write_fieldname("pdcch-Config"); + pdcch_cfg.to_json(j); + } + if (pdsch_cfg_present) { + j.write_fieldname("pdsch-Config"); + pdsch_cfg.to_json(j); + } + if (sps_cfg_present) { + j.write_fieldname("sps-Config"); + sps_cfg.to_json(j); + } + if (radio_link_monitoring_cfg_present) { + j.write_fieldname("radioLinkMonitoringConfig"); + radio_link_monitoring_cfg.to_json(j); } j.end_obj(); } -// MeasGapConfig ::= SEQUENCE -SRSASN_CODE meas_gap_cfg_s::pack(bit_ref& bref) const +// BWP-Downlink ::= SEQUENCE +SRSASN_CODE bwp_dl_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(gap_fr2_present, 1)); + HANDLE_CODE(bref.pack(bwp_common_present, 1)); + HANDLE_CODE(bref.pack(bwp_ded_present, 1)); - if (gap_fr2_present) { - HANDLE_CODE(gap_fr2.pack(bref)); + HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); + if (bwp_common_present) { + HANDLE_CODE(bwp_common.pack(bref)); } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= gap_fr1.is_present(); - group_flags[0] |= gap_ue.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(gap_fr1.is_present(), 1)); - HANDLE_CODE(bref.pack(gap_ue.is_present(), 1)); - if (gap_fr1.is_present()) { - HANDLE_CODE(gap_fr1->pack(bref)); - } - if (gap_ue.is_present()) { - HANDLE_CODE(gap_ue->pack(bref)); - } - } + if (bwp_ded_present) { + HANDLE_CODE(bwp_ded.pack(bref)); } + return SRSASN_SUCCESS; } -SRSASN_CODE meas_gap_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE bwp_dl_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(gap_fr2_present, 1)); + HANDLE_CODE(bref.unpack(bwp_common_present, 1)); + HANDLE_CODE(bref.unpack(bwp_ded_present, 1)); - if (gap_fr2_present) { - HANDLE_CODE(gap_fr2.unpack(bref)); + HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); + if (bwp_common_present) { + HANDLE_CODE(bwp_common.unpack(bref)); } - - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - bool gap_fr1_present; - HANDLE_CODE(bref.unpack(gap_fr1_present, 1)); - gap_fr1.set_present(gap_fr1_present); - bool gap_ue_present; - HANDLE_CODE(bref.unpack(gap_ue_present, 1)); - gap_ue.set_present(gap_ue_present); - if (gap_fr1.is_present()) { - HANDLE_CODE(gap_fr1->unpack(bref)); - } - if (gap_ue.is_present()) { - HANDLE_CODE(gap_ue->unpack(bref)); - } - } + if (bwp_ded_present) { + HANDLE_CODE(bwp_ded.unpack(bref)); } + return SRSASN_SUCCESS; } -void meas_gap_cfg_s::to_json(json_writer& j) const +void bwp_dl_s::to_json(json_writer& j) const { j.start_obj(); - if (gap_fr2_present) { - j.write_fieldname("gapFR2"); - gap_fr2.to_json(j); + j.write_int("bwp-Id", bwp_id); + if (bwp_common_present) { + j.write_fieldname("bwp-Common"); + bwp_common.to_json(j); } - if (ext) { - if (gap_fr1.is_present()) { - j.write_fieldname("gapFR1"); - gap_fr1->to_json(j); - } - if (gap_ue.is_present()) { - j.write_fieldname("gapUE"); - gap_ue->to_json(j); - } + if (bwp_ded_present) { + j.write_fieldname("bwp-Dedicated"); + bwp_ded.to_json(j); } j.end_obj(); } -// MeasGapSharingConfig ::= SEQUENCE -SRSASN_CODE meas_gap_sharing_cfg_s::pack(bit_ref& bref) const +// Alpha ::= ENUMERATED +std::string alpha_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(gap_sharing_fr2_present, 1)); + 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 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 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"); +} - if (gap_sharing_fr2_present) { - HANDLE_CODE(gap_sharing_fr2.pack(bref)); +// BetaOffsets ::= SEQUENCE +SRSASN_CODE beta_offsets_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(beta_offset_ack_idx1_present, 1)); + HANDLE_CODE(bref.pack(beta_offset_ack_idx2_present, 1)); + HANDLE_CODE(bref.pack(beta_offset_ack_idx3_present, 1)); + HANDLE_CODE(bref.pack(beta_offset_csi_part1_idx1_present, 1)); + HANDLE_CODE(bref.pack(beta_offset_csi_part1_idx2_present, 1)); + HANDLE_CODE(bref.pack(beta_offset_csi_part2_idx1_present, 1)); + HANDLE_CODE(bref.pack(beta_offset_csi_part2_idx2_present, 1)); + + if (beta_offset_ack_idx1_present) { + HANDLE_CODE(pack_integer(bref, beta_offset_ack_idx1, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_ack_idx2_present) { + HANDLE_CODE(pack_integer(bref, beta_offset_ack_idx2, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_ack_idx3_present) { + HANDLE_CODE(pack_integer(bref, beta_offset_ack_idx3, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_csi_part1_idx1_present) { + HANDLE_CODE(pack_integer(bref, beta_offset_csi_part1_idx1, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_csi_part1_idx2_present) { + HANDLE_CODE(pack_integer(bref, beta_offset_csi_part1_idx2, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_csi_part2_idx1_present) { + HANDLE_CODE(pack_integer(bref, beta_offset_csi_part2_idx1, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_csi_part2_idx2_present) { + HANDLE_CODE(pack_integer(bref, beta_offset_csi_part2_idx2, (uint8_t)0u, (uint8_t)31u)); } - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= gap_sharing_fr1.is_present(); - group_flags[0] |= gap_sharing_ue.is_present(); - group_flags.pack(bref); + return SRSASN_SUCCESS; +} +SRSASN_CODE beta_offsets_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(beta_offset_ack_idx1_present, 1)); + HANDLE_CODE(bref.unpack(beta_offset_ack_idx2_present, 1)); + HANDLE_CODE(bref.unpack(beta_offset_ack_idx3_present, 1)); + HANDLE_CODE(bref.unpack(beta_offset_csi_part1_idx1_present, 1)); + HANDLE_CODE(bref.unpack(beta_offset_csi_part1_idx2_present, 1)); + HANDLE_CODE(bref.unpack(beta_offset_csi_part2_idx1_present, 1)); + HANDLE_CODE(bref.unpack(beta_offset_csi_part2_idx2_present, 1)); - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); + if (beta_offset_ack_idx1_present) { + HANDLE_CODE(unpack_integer(beta_offset_ack_idx1, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_ack_idx2_present) { + HANDLE_CODE(unpack_integer(beta_offset_ack_idx2, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_ack_idx3_present) { + HANDLE_CODE(unpack_integer(beta_offset_ack_idx3, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_csi_part1_idx1_present) { + HANDLE_CODE(unpack_integer(beta_offset_csi_part1_idx1, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_csi_part1_idx2_present) { + HANDLE_CODE(unpack_integer(beta_offset_csi_part1_idx2, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_csi_part2_idx1_present) { + HANDLE_CODE(unpack_integer(beta_offset_csi_part2_idx1, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (beta_offset_csi_part2_idx2_present) { + HANDLE_CODE(unpack_integer(beta_offset_csi_part2_idx2, bref, (uint8_t)0u, (uint8_t)31u)); + } - HANDLE_CODE(bref.pack(gap_sharing_fr1.is_present(), 1)); - HANDLE_CODE(bref.pack(gap_sharing_ue.is_present(), 1)); - if (gap_sharing_fr1.is_present()) { - HANDLE_CODE(gap_sharing_fr1->pack(bref)); - } - if (gap_sharing_ue.is_present()) { - HANDLE_CODE(gap_sharing_ue->pack(bref)); - } - } + return SRSASN_SUCCESS; +} +void beta_offsets_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (beta_offset_ack_idx1_present) { + j.write_int("betaOffsetACK-Index1", beta_offset_ack_idx1); + } + if (beta_offset_ack_idx2_present) { + j.write_int("betaOffsetACK-Index2", beta_offset_ack_idx2); + } + if (beta_offset_ack_idx3_present) { + j.write_int("betaOffsetACK-Index3", beta_offset_ack_idx3); + } + if (beta_offset_csi_part1_idx1_present) { + j.write_int("betaOffsetCSI-Part1-Index1", beta_offset_csi_part1_idx1); } + if (beta_offset_csi_part1_idx2_present) { + j.write_int("betaOffsetCSI-Part1-Index2", beta_offset_csi_part1_idx2); + } + if (beta_offset_csi_part2_idx1_present) { + j.write_int("betaOffsetCSI-Part2-Index1", beta_offset_csi_part2_idx1); + } + if (beta_offset_csi_part2_idx2_present) { + j.write_int("betaOffsetCSI-Part2-Index2", beta_offset_csi_part2_idx2); + } + j.end_obj(); +} + +// P0-PUCCH ::= SEQUENCE +SRSASN_CODE p0_pucch_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, p0_pucch_id, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_integer(bref, p0_pucch_value, (int8_t)-16, (int8_t)15)); + return SRSASN_SUCCESS; } -SRSASN_CODE meas_gap_sharing_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE p0_pucch_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(gap_sharing_fr2_present, 1)); + HANDLE_CODE(unpack_integer(p0_pucch_id, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_integer(p0_pucch_value, bref, (int8_t)-16, (int8_t)15)); - if (gap_sharing_fr2_present) { - HANDLE_CODE(gap_sharing_fr2.unpack(bref)); - } + return SRSASN_SUCCESS; +} +void p0_pucch_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p0-PUCCH-Id", p0_pucch_id); + j.write_int("p0-PUCCH-Value", p0_pucch_value); + j.end_obj(); +} - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); +// P0-PUSCH-AlphaSet ::= SEQUENCE +SRSASN_CODE p0_pusch_alpha_set_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p0_present, 1)); + HANDLE_CODE(bref.pack(alpha_present, 1)); - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(pack_integer(bref, p0_pusch_alpha_set_id, (uint8_t)0u, (uint8_t)29u)); + if (p0_present) { + HANDLE_CODE(pack_integer(bref, p0, (int8_t)-16, (int8_t)15)); + } + if (alpha_present) { + HANDLE_CODE(alpha.pack(bref)); + } - bool gap_sharing_fr1_present; - HANDLE_CODE(bref.unpack(gap_sharing_fr1_present, 1)); - gap_sharing_fr1.set_present(gap_sharing_fr1_present); - bool gap_sharing_ue_present; - HANDLE_CODE(bref.unpack(gap_sharing_ue_present, 1)); - gap_sharing_ue.set_present(gap_sharing_ue_present); - if (gap_sharing_fr1.is_present()) { - HANDLE_CODE(gap_sharing_fr1->unpack(bref)); - } - if (gap_sharing_ue.is_present()) { - HANDLE_CODE(gap_sharing_ue->unpack(bref)); - } - } + return SRSASN_SUCCESS; +} +SRSASN_CODE p0_pusch_alpha_set_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p0_present, 1)); + HANDLE_CODE(bref.unpack(alpha_present, 1)); + + HANDLE_CODE(unpack_integer(p0_pusch_alpha_set_id, bref, (uint8_t)0u, (uint8_t)29u)); + if (p0_present) { + HANDLE_CODE(unpack_integer(p0, bref, (int8_t)-16, (int8_t)15)); } + if (alpha_present) { + HANDLE_CODE(alpha.unpack(bref)); + } + return SRSASN_SUCCESS; } -void meas_gap_sharing_cfg_s::to_json(json_writer& j) const +void p0_pusch_alpha_set_s::to_json(json_writer& j) const { j.start_obj(); - if (gap_sharing_fr2_present) { - j.write_fieldname("gapSharingFR2"); - gap_sharing_fr2.to_json(j); + j.write_int("p0-PUSCH-AlphaSetId", p0_pusch_alpha_set_id); + if (p0_present) { + j.write_int("p0", p0); } - if (ext) { - if (gap_sharing_fr1.is_present()) { - j.write_fieldname("gapSharingFR1"); - gap_sharing_fr1->to_json(j); - } - if (gap_sharing_ue.is_present()) { - j.write_fieldname("gapSharingUE"); - gap_sharing_ue->to_json(j); - } + if (alpha_present) { + j.write_str("alpha", alpha.to_string()); } j.end_obj(); } -// OtherConfig ::= SEQUENCE -SRSASN_CODE other_cfg_s::pack(bit_ref& bref) const +// PTRS-UplinkConfig ::= SEQUENCE +SRSASN_CODE ptrs_ul_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(delay_budget_report_cfg_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(transform_precoder_disabled_present, 1)); + HANDLE_CODE(bref.pack(transform_precoder_enabled_present, 1)); - if (delay_budget_report_cfg_present) { - HANDLE_CODE(delay_budget_report_cfg.pack(bref)); + if (transform_precoder_disabled_present) { + HANDLE_CODE(bref.pack(transform_precoder_disabled.freq_density_present, 1)); + HANDLE_CODE(bref.pack(transform_precoder_disabled.time_density_present, 1)); + HANDLE_CODE(bref.pack(transform_precoder_disabled.res_elem_offset_present, 1)); + if (transform_precoder_disabled.freq_density_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(transform_precoder_disabled.freq_density)[0], + transform_precoder_disabled.freq_density.size(), + integer_packer(1, 276))); + } + if (transform_precoder_disabled.time_density_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(transform_precoder_disabled.time_density)[0], + transform_precoder_disabled.time_density.size(), + integer_packer(0, 29))); + } + HANDLE_CODE(transform_precoder_disabled.max_nrof_ports.pack(bref)); + if (transform_precoder_disabled.res_elem_offset_present) { + HANDLE_CODE(transform_precoder_disabled.res_elem_offset.pack(bref)); + } + HANDLE_CODE(transform_precoder_disabled.ptrs_pwr.pack(bref)); + } + if (transform_precoder_enabled_present) { + HANDLE_CODE(bref.pack(transform_precoder_enabled.time_density_transform_precoding_present, 1)); + HANDLE_CODE(pack_fixed_seq_of(bref, + &(transform_precoder_enabled.sample_density)[0], + transform_precoder_enabled.sample_density.size(), + integer_packer(1, 276))); } return SRSASN_SUCCESS; } -SRSASN_CODE other_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE ptrs_ul_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(delay_budget_report_cfg_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(transform_precoder_disabled_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoder_enabled_present, 1)); - if (delay_budget_report_cfg_present) { - HANDLE_CODE(delay_budget_report_cfg.unpack(bref)); + if (transform_precoder_disabled_present) { + HANDLE_CODE(bref.unpack(transform_precoder_disabled.freq_density_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoder_disabled.time_density_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoder_disabled.res_elem_offset_present, 1)); + if (transform_precoder_disabled.freq_density_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(transform_precoder_disabled.freq_density)[0], + bref, + transform_precoder_disabled.freq_density.size(), + integer_packer(1, 276))); + } + if (transform_precoder_disabled.time_density_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(transform_precoder_disabled.time_density)[0], + bref, + transform_precoder_disabled.time_density.size(), + integer_packer(0, 29))); + } + HANDLE_CODE(transform_precoder_disabled.max_nrof_ports.unpack(bref)); + if (transform_precoder_disabled.res_elem_offset_present) { + HANDLE_CODE(transform_precoder_disabled.res_elem_offset.unpack(bref)); + } + HANDLE_CODE(transform_precoder_disabled.ptrs_pwr.unpack(bref)); + } + if (transform_precoder_enabled_present) { + HANDLE_CODE(bref.unpack(transform_precoder_enabled.time_density_transform_precoding_present, 1)); + HANDLE_CODE(unpack_fixed_seq_of(&(transform_precoder_enabled.sample_density)[0], + bref, + transform_precoder_enabled.sample_density.size(), + integer_packer(1, 276))); } return SRSASN_SUCCESS; } -void other_cfg_s::to_json(json_writer& j) const +void ptrs_ul_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (delay_budget_report_cfg_present) { - j.write_fieldname("delayBudgetReportingConfig"); - delay_budget_report_cfg.to_json(j); + if (transform_precoder_disabled_present) { + j.write_fieldname("transformPrecoderDisabled"); + j.start_obj(); + if (transform_precoder_disabled.freq_density_present) { + j.start_array("frequencyDensity"); + 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 (const auto& e1 : transform_precoder_disabled.time_density) { + j.write_int(e1); + } + j.end_array(); + } + j.write_str("maxNrofPorts", transform_precoder_disabled.max_nrof_ports.to_string()); + if (transform_precoder_disabled.res_elem_offset_present) { + j.write_str("resourceElementOffset", transform_precoder_disabled.res_elem_offset.to_string()); + } + j.write_str("ptrs-Power", transform_precoder_disabled.ptrs_pwr.to_string()); + j.end_obj(); + } + if (transform_precoder_enabled_present) { + j.write_fieldname("transformPrecoderEnabled"); + j.start_obj(); + j.start_array("sampleDensity"); + 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) { + j.write_str("timeDensityTransformPrecoding", "d2"); + } + j.end_obj(); } j.end_obj(); } -void other_cfg_s::delay_budget_report_cfg_c_::set(types::options e) +std::string ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_opts::to_string() const +{ + 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 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 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 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 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 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 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 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 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 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 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"); +} + +// PUCCH-PathlossReferenceRS ::= SEQUENCE +SRSASN_CODE pucch_pathloss_ref_rs_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(ref_sig.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_pathloss_ref_rs_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(ref_sig.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pucch_pathloss_ref_rs_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pucch-PathlossReferenceRS-Id", pucch_pathloss_ref_rs_id); + j.write_fieldname("referenceSignal"); + ref_sig.to_json(j); + j.end_obj(); +} + +void pucch_pathloss_ref_rs_s::ref_sig_c_::destroy_() {} +void pucch_pathloss_ref_rs_s::ref_sig_c_::set(types::options e) { + destroy_(); type_ = e; } -void other_cfg_s::delay_budget_report_cfg_c_::to_json(json_writer& j) const +pucch_pathloss_ref_rs_s::ref_sig_c_::ref_sig_c_(const pucch_pathloss_ref_rs_s::ref_sig_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ssb_idx: + c.init(other.c.get()); + break; + case types::csi_rs_idx: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + } +} +pucch_pathloss_ref_rs_s::ref_sig_c_& +pucch_pathloss_ref_rs_s::ref_sig_c_::operator=(const pucch_pathloss_ref_rs_s::ref_sig_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb_idx: + c.set(other.c.get()); + break; + case types::csi_rs_idx: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + } + + return *this; +} +void pucch_pathloss_ref_rs_s::ref_sig_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::release: + case types::ssb_idx: + j.write_int("ssb-Index", c.get()); break; - case types::setup: - j.write_fieldname("setup"); - j.start_obj(); - j.write_str("delayBudgetReportingProhibitTimer", c.delay_budget_report_prohibit_timer.to_string()); - j.end_obj(); + case types::csi_rs_idx: + j.write_int("csi-RS-Index", c.get()); break; default: - log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); } j.end_obj(); } -SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::pack(bit_ref& bref) const +SRSASN_CODE pucch_pathloss_ref_rs_s::ref_sig_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::release: + case types::ssb_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); break; - case types::setup: - HANDLE_CODE(c.delay_budget_report_prohibit_timer.pack(bref)); + case types::csi_rs_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); break; default: - log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::unpack(cbit_ref& bref) +SRSASN_CODE pucch_pathloss_ref_rs_s::ref_sig_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::release: + case types::ssb_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); break; - case types::setup: - HANDLE_CODE(c.delay_budget_report_prohibit_timer.unpack(bref)); + case types::csi_rs_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); break; default: - log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string -other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_string() const +std::string pucch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const { - 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_"); + 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"); } -float other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_number() const + +// PUCCH-format0 ::= SEQUENCE +SRSASN_CODE pucch_format0_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(pack_integer(bref, init_cyclic_shift, (uint8_t)0u, (uint8_t)11u)); + HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)13u)); + + return SRSASN_SUCCESS; } -std::string -other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_number_string() const +SRSASN_CODE pucch_format0_s::unpack(cbit_ref& bref) { - 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_"); -} + HANDLE_CODE(unpack_integer(init_cyclic_shift, bref, (uint8_t)0u, (uint8_t)11u)); + HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)13u)); -std::string other_cfg_s::delay_budget_report_cfg_c_::types_opts::to_string() const + return SRSASN_SUCCESS; +} +void pucch_format0_s::to_json(json_writer& j) const { - static const char* options[] = {"release", "setup"}; - return convert_enum_idx(options, 2, value, "other_cfg_s::delay_budget_report_cfg_c_::types"); + j.start_obj(); + j.write_int("initialCyclicShift", init_cyclic_shift); + j.write_int("nrofSymbols", nrof_symbols); + j.write_int("startingSymbolIndex", start_symbol_idx); + j.end_obj(); } -// PeriodicRNAU-TimerValue ::= ENUMERATED -std::string periodic_rnau_timer_value_opts::to_string() const +// PUCCH-format1 ::= SEQUENCE +SRSASN_CODE pucch_format1_s::pack(bit_ref& bref) const { - static const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min360", "min720"}; - return convert_enum_idx(options, 8, value, "periodic_rnau_timer_value_e"); + HANDLE_CODE(pack_integer(bref, init_cyclic_shift, (uint8_t)0u, (uint8_t)11u)); + HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)4u, (uint8_t)14u)); + HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)10u)); + HANDLE_CODE(pack_integer(bref, time_domain_occ, (uint8_t)0u, (uint8_t)6u)); + + return SRSASN_SUCCESS; } -uint16_t periodic_rnau_timer_value_opts::to_number() const +SRSASN_CODE pucch_format1_s::unpack(cbit_ref& bref) { - 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"); + HANDLE_CODE(unpack_integer(init_cyclic_shift, bref, (uint8_t)0u, (uint8_t)11u)); + HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)4u, (uint8_t)14u)); + HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)10u)); + HANDLE_CODE(unpack_integer(time_domain_occ, bref, (uint8_t)0u, (uint8_t)6u)); + + return SRSASN_SUCCESS; +} +void pucch_format1_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("initialCyclicShift", init_cyclic_shift); + j.write_int("nrofSymbols", nrof_symbols); + j.write_int("startingSymbolIndex", start_symbol_idx); + j.write_int("timeDomainOCC", time_domain_occ); + j.end_obj(); } -// QuantityConfig ::= SEQUENCE -SRSASN_CODE quant_cfg_s::pack(bit_ref& bref) const +// PUCCH-format2 ::= SEQUENCE +SRSASN_CODE pucch_format2_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(quant_cfg_nr_list_present, 1)); + HANDLE_CODE(pack_integer(bref, nrof_prbs, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)13u)); - if (quant_cfg_nr_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, quant_cfg_nr_list, 1, 2)); - } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format2_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(nrof_prbs, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)13u)); - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= quant_cfg_eutra.is_present(); - group_flags.pack(bref); + return SRSASN_SUCCESS; +} +void pucch_format2_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("nrofPRBs", nrof_prbs); + j.write_int("nrofSymbols", nrof_symbols); + j.write_int("startingSymbolIndex", start_symbol_idx); + j.end_obj(); +} - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); +// PUCCH-format3 ::= SEQUENCE +SRSASN_CODE pucch_format3_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, nrof_prbs, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)4u, (uint8_t)14u)); + HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)10u)); - HANDLE_CODE(bref.pack(quant_cfg_eutra.is_present(), 1)); - if (quant_cfg_eutra.is_present()) { - HANDLE_CODE(quant_cfg_eutra->pack(bref)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE quant_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE pucch_format3_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(quant_cfg_nr_list_present, 1)); + HANDLE_CODE(unpack_integer(nrof_prbs, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)4u, (uint8_t)14u)); + HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)10u)); - if (quant_cfg_nr_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(quant_cfg_nr_list, bref, 1, 2)); - } + return SRSASN_SUCCESS; +} +void pucch_format3_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("nrofPRBs", nrof_prbs); + j.write_int("nrofSymbols", nrof_symbols); + j.write_int("startingSymbolIndex", start_symbol_idx); + j.end_obj(); +} - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); +// PUCCH-format4 ::= SEQUENCE +SRSASN_CODE pucch_format4_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, nrof_symbols, (uint8_t)4u, (uint8_t)14u)); + HANDLE_CODE(occ_len.pack(bref)); + HANDLE_CODE(occ_idx.pack(bref)); + HANDLE_CODE(pack_integer(bref, start_symbol_idx, (uint8_t)0u, (uint8_t)10u)); - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format4_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(nrof_symbols, bref, (uint8_t)4u, (uint8_t)14u)); + HANDLE_CODE(occ_len.unpack(bref)); + HANDLE_CODE(occ_idx.unpack(bref)); + HANDLE_CODE(unpack_integer(start_symbol_idx, bref, (uint8_t)0u, (uint8_t)10u)); - bool quant_cfg_eutra_present; - HANDLE_CODE(bref.unpack(quant_cfg_eutra_present, 1)); - quant_cfg_eutra.set_present(quant_cfg_eutra_present); - if (quant_cfg_eutra.is_present()) { - HANDLE_CODE(quant_cfg_eutra->unpack(bref)); - } - } - } return SRSASN_SUCCESS; } -void quant_cfg_s::to_json(json_writer& j) const +void pucch_format4_s::to_json(json_writer& j) const { j.start_obj(); - if (quant_cfg_nr_list_present) { - j.start_array("quantityConfigNR-List"); - for (const auto& e1 : quant_cfg_nr_list) { - e1.to_json(j); - } - j.end_array(); - } - if (ext) { - if (quant_cfg_eutra.is_present()) { - j.write_fieldname("quantityConfigEUTRA"); - quant_cfg_eutra->to_json(j); - } - } + j.write_int("nrofSymbols", nrof_symbols); + j.write_str("occ-Length", occ_len.to_string()); + j.write_str("occ-Index", occ_idx.to_string()); + j.write_int("startingSymbolIndex", start_symbol_idx); j.end_obj(); } -// RAN-NotificationAreaInfo ::= CHOICE -void ran_notif_area_info_c::destroy_() +std::string pucch_format4_s::occ_len_opts::to_string() const { - switch (type_) { - case types::cell_list: - c.destroy(); - break; - case types::ran_area_cfg_list: - c.destroy(); - break; - default: - break; - } + static const char* options[] = {"n2", "n4"}; + return convert_enum_idx(options, 2, value, "pucch_format4_s::occ_len_e_"); } -void ran_notif_area_info_c::set(types::options e) +uint8_t pucch_format4_s::occ_len_opts::to_number() const +{ + 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 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 const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "pucch_format4_s::occ_idx_e_"); +} + +// PUSCH-PathlossReferenceRS ::= SEQUENCE +SRSASN_CODE pusch_pathloss_ref_rs_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pusch_pathloss_ref_rs_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(ref_sig.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_pathloss_ref_rs_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pusch_pathloss_ref_rs_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(ref_sig.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pusch_pathloss_ref_rs_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pusch-PathlossReferenceRS-Id", pusch_pathloss_ref_rs_id); + j.write_fieldname("referenceSignal"); + ref_sig.to_json(j); + j.end_obj(); +} + +void pusch_pathloss_ref_rs_s::ref_sig_c_::destroy_() {} +void pusch_pathloss_ref_rs_s::ref_sig_c_::set(types::options e) { destroy_(); type_ = e; - switch (type_) { - case types::cell_list: - c.init(); - break; - case types::ran_area_cfg_list: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); - } } -ran_notif_area_info_c::ran_notif_area_info_c(const ran_notif_area_info_c& other) +pusch_pathloss_ref_rs_s::ref_sig_c_::ref_sig_c_(const pusch_pathloss_ref_rs_s::ref_sig_c_& other) { type_ = other.type(); switch (type_) { - case types::cell_list: - c.init(other.c.get()); + case types::ssb_idx: + c.init(other.c.get()); break; - case types::ran_area_cfg_list: - c.init(other.c.get()); + case types::csi_rs_idx: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); } } -ran_notif_area_info_c& ran_notif_area_info_c::operator=(const ran_notif_area_info_c& other) +pusch_pathloss_ref_rs_s::ref_sig_c_& +pusch_pathloss_ref_rs_s::ref_sig_c_::operator=(const pusch_pathloss_ref_rs_s::ref_sig_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::cell_list: - c.set(other.c.get()); + case types::ssb_idx: + c.set(other.c.get()); break; - case types::ran_area_cfg_list: - c.set(other.c.get()); + case types::csi_rs_idx: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); } return *this; } -void ran_notif_area_info_c::to_json(json_writer& j) const +void pusch_pathloss_ref_rs_s::ref_sig_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::cell_list: - j.start_array("cellList"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::ssb_idx: + j.write_int("ssb-Index", c.get()); break; - case types::ran_area_cfg_list: - j.start_array("ran-AreaConfigList"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::csi_rs_idx: + j.write_int("csi-RS-Index", c.get()); break; default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); } j.end_obj(); } -SRSASN_CODE ran_notif_area_info_c::pack(bit_ref& bref) const +SRSASN_CODE pusch_pathloss_ref_rs_s::ref_sig_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::cell_list: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + case types::ssb_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); break; - case types::ran_area_cfg_list: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + case types::csi_rs_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); break; default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE ran_notif_area_info_c::unpack(cbit_ref& bref) +SRSASN_CODE pusch_pathloss_ref_rs_s::ref_sig_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::cell_list: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + case types::ssb_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); break; - case types::ran_area_cfg_list: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + case types::csi_rs_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); break; default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string ran_notif_area_info_c::types_opts::to_string() const -{ - static const char* options[] = {"cellList", "ran-AreaConfigList"}; - return convert_enum_idx(options, 2, value, "ran_notif_area_info_c::types"); -} - -// RRCReconfiguration-v1540-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_v1540_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(other_cfg_v1540_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (other_cfg_v1540_present) { - HANDLE_CODE(other_cfg_v1540.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_v1540_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(other_cfg_v1540_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (other_cfg_v1540_present) { - HANDLE_CODE(other_cfg_v1540.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_v1540_ies_s::to_json(json_writer& j) const +std::string pusch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const { - j.start_obj(); - if (other_cfg_v1540_present) { - j.write_fieldname("otherConfig-v1540"); - other_cfg_v1540.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); + 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"); } -// RedirectedCarrierInfo-EUTRA ::= SEQUENCE -SRSASN_CODE redirected_carrier_info_eutra_s::pack(bit_ref& bref) const +// SRI-PUSCH-PowerControl ::= SEQUENCE +SRSASN_CODE sri_pusch_pwr_ctrl_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(cn_type_present, 1)); - - HANDLE_CODE(pack_integer(bref, eutra_freq, (uint32_t)0u, (uint32_t)262143u)); - if (cn_type_present) { - HANDLE_CODE(cn_type.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, sri_pusch_pwr_ctrl_id, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(pack_integer(bref, sri_pusch_pathloss_ref_rs_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pack_integer(bref, sri_p0_pusch_alpha_set_id, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(sri_pusch_closed_loop_idx.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE redirected_carrier_info_eutra_s::unpack(cbit_ref& bref) +SRSASN_CODE sri_pusch_pwr_ctrl_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(cn_type_present, 1)); - - HANDLE_CODE(unpack_integer(eutra_freq, bref, (uint32_t)0u, (uint32_t)262143u)); - if (cn_type_present) { - HANDLE_CODE(cn_type.unpack(bref)); - } + HANDLE_CODE(unpack_integer(sri_pusch_pwr_ctrl_id, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(unpack_integer(sri_pusch_pathloss_ref_rs_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(unpack_integer(sri_p0_pusch_alpha_set_id, bref, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(sri_pusch_closed_loop_idx.unpack(bref)); return SRSASN_SUCCESS; } -void redirected_carrier_info_eutra_s::to_json(json_writer& j) const +void sri_pusch_pwr_ctrl_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("eutraFrequency", eutra_freq); - if (cn_type_present) { - j.write_str("cnType", cn_type.to_string()); - } + j.write_int("sri-PUSCH-PowerControlId", sri_pusch_pwr_ctrl_id); + j.write_int("sri-PUSCH-PathlossReferenceRS-Id", sri_pusch_pathloss_ref_rs_id); + j.write_int("sri-P0-PUSCH-AlphaSetId", sri_p0_pusch_alpha_set_id); + j.write_str("sri-PUSCH-ClosedLoopIndex", sri_pusch_closed_loop_idx.to_string()); j.end_obj(); } -std::string redirected_carrier_info_eutra_s::cn_type_opts::to_string() const +std::string sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_string() const { - static const char* options[] = {"epc", "fiveGC"}; - return convert_enum_idx(options, 2, value, "redirected_carrier_info_eutra_s::cn_type_e_"); + 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 redirected_carrier_info_eutra_s::cn_type_opts::to_number() const +uint8_t sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_number() const { - if (value == five_gc) { - return 5; - } - invalid_enum_number(value, "redirected_carrier_info_eutra_s::cn_type_e_"); - return 0; + 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_"); } -// UE-CapabilityRAT-Request ::= SEQUENCE -SRSASN_CODE ue_cap_rat_request_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cap_request_filt_present, 1)); - - HANDLE_CODE(rat_type.pack(bref)); - if (cap_request_filt_present) { - HANDLE_CODE(cap_request_filt.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_rat_request_s::unpack(cbit_ref& bref) +// SRS-PeriodicityAndOffset ::= CHOICE +void srs_periodicity_and_offset_c::destroy_() {} +void srs_periodicity_and_offset_c::set(types::options e) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cap_request_filt_present, 1)); - - HANDLE_CODE(rat_type.unpack(bref)); - if (cap_request_filt_present) { - HANDLE_CODE(cap_request_filt.unpack(bref)); - } - - return SRSASN_SUCCESS; + destroy_(); + type_ = e; } -void ue_cap_rat_request_s::to_json(json_writer& j) const +srs_periodicity_and_offset_c::srs_periodicity_and_offset_c(const srs_periodicity_and_offset_c& other) { - j.start_obj(); - j.write_str("rat-Type", rat_type.to_string()); - if (cap_request_filt_present) { - j.write_str("capabilityRequestFilter", cap_request_filt.to_string()); + type_ = other.type(); + switch (type_) { + case types::sl1: + break; + case types::sl2: + c.init(other.c.get()); + break; + case types::sl4: + c.init(other.c.get()); + break; + case types::sl5: + c.init(other.c.get()); + break; + case types::sl8: + c.init(other.c.get()); + break; + case types::sl10: + c.init(other.c.get()); + break; + case types::sl16: + c.init(other.c.get()); + break; + case types::sl20: + c.init(other.c.get()); + break; + case types::sl32: + c.init(other.c.get()); + break; + case types::sl40: + c.init(other.c.get()); + break; + case types::sl64: + c.init(other.c.get()); + break; + case types::sl80: + c.init(other.c.get()); + break; + case types::sl160: + c.init(other.c.get()); + break; + case types::sl320: + c.init(other.c.get()); + break; + case types::sl640: + c.init(other.c.get()); + break; + case types::sl1280: + c.init(other.c.get()); + break; + case types::sl2560: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); } - j.end_obj(); } - -// CellReselectionPriorities ::= SEQUENCE -SRSASN_CODE cell_resel_priorities_s::pack(bit_ref& bref) const +srs_periodicity_and_offset_c& srs_periodicity_and_offset_c::operator=(const srs_periodicity_and_offset_c& other) { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_prio_list_eutra_present, 1)); - HANDLE_CODE(bref.pack(freq_prio_list_nr_present, 1)); - HANDLE_CODE(bref.pack(t320_present, 1)); - - if (freq_prio_list_eutra_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_eutra, 1, 8)); - } - if (freq_prio_list_nr_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_nr, 1, 8)); - } - if (t320_present) { - HANDLE_CODE(t320.pack(bref)); + if (this == &other) { + return *this; } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cell_resel_priorities_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(freq_prio_list_eutra_present, 1)); - HANDLE_CODE(bref.unpack(freq_prio_list_nr_present, 1)); - HANDLE_CODE(bref.unpack(t320_present, 1)); - - if (freq_prio_list_eutra_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_eutra, bref, 1, 8)); - } - if (freq_prio_list_nr_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_nr, bref, 1, 8)); - } - if (t320_present) { - HANDLE_CODE(t320.unpack(bref)); + set(other.type()); + switch (type_) { + case types::sl1: + break; + case types::sl2: + c.set(other.c.get()); + break; + case types::sl4: + c.set(other.c.get()); + break; + case types::sl5: + c.set(other.c.get()); + break; + case types::sl8: + c.set(other.c.get()); + break; + case types::sl10: + c.set(other.c.get()); + break; + case types::sl16: + c.set(other.c.get()); + break; + case types::sl20: + c.set(other.c.get()); + break; + case types::sl32: + c.set(other.c.get()); + break; + case types::sl40: + c.set(other.c.get()); + break; + case types::sl64: + c.set(other.c.get()); + break; + case types::sl80: + c.set(other.c.get()); + break; + case types::sl160: + c.set(other.c.get()); + break; + case types::sl320: + c.set(other.c.get()); + break; + case types::sl640: + c.set(other.c.get()); + break; + case types::sl1280: + c.set(other.c.get()); + break; + case types::sl2560: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); } - return SRSASN_SUCCESS; + return *this; } -void cell_resel_priorities_s::to_json(json_writer& j) const +void srs_periodicity_and_offset_c::to_json(json_writer& j) const { j.start_obj(); - if (freq_prio_list_eutra_present) { - j.start_array("freqPriorityListEUTRA"); - for (const auto& e1 : freq_prio_list_eutra) { - e1.to_json(j); - } - j.end_array(); + switch (type_) { + case types::sl1: + break; + case types::sl2: + j.write_int("sl2", c.get()); + break; + case types::sl4: + j.write_int("sl4", c.get()); + break; + case types::sl5: + j.write_int("sl5", c.get()); + break; + case types::sl8: + j.write_int("sl8", c.get()); + break; + case types::sl10: + j.write_int("sl10", c.get()); + break; + case types::sl16: + j.write_int("sl16", c.get()); + break; + case types::sl20: + j.write_int("sl20", c.get()); + break; + case types::sl32: + j.write_int("sl32", c.get()); + break; + case types::sl40: + j.write_int("sl40", c.get()); + break; + case types::sl64: + j.write_int("sl64", c.get()); + break; + case types::sl80: + j.write_int("sl80", c.get()); + break; + case types::sl160: + j.write_int("sl160", c.get()); + break; + case types::sl320: + j.write_int("sl320", c.get()); + break; + case types::sl640: + j.write_int("sl640", c.get()); + break; + case types::sl1280: + j.write_int("sl1280", c.get()); + break; + case types::sl2560: + j.write_int("sl2560", c.get()); + break; + default: + log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); } - if (freq_prio_list_nr_present) { - j.start_array("freqPriorityListNR"); - for (const auto& e1 : freq_prio_list_nr) { - e1.to_json(j); - } - j.end_array(); + j.end_obj(); +} +SRSASN_CODE srs_periodicity_and_offset_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sl1: + break; + case types::sl2: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)1u)); + break; + case types::sl4: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); + break; + case types::sl5: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); + break; + case types::sl8: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); + break; + case types::sl10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::sl16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + break; + case types::sl20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::sl32: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::sl40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::sl64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::sl80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::sl160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::sl320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::sl640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::sl1280: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + case types::sl2560: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + break; + default: + log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); + return SRSASN_ERROR_ENCODE_FAIL; } - if (t320_present) { - j.write_str("t320", t320.to_string()); + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_periodicity_and_offset_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sl1: + break; + case types::sl2: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)1u)); + break; + case types::sl4: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); + break; + case types::sl5: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); + break; + case types::sl8: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); + break; + case types::sl10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::sl16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::sl20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::sl32: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::sl40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::sl64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::sl80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::sl160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::sl320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::sl640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::sl1280: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + case types::sl2560: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + break; + default: + log_invalid_choice_id(type_, "srs_periodicity_and_offset_c"); + return SRSASN_ERROR_DECODE_FAIL; } - j.end_obj(); + return SRSASN_SUCCESS; } -std::string cell_resel_priorities_s::t320_opts::to_string() const +std::string srs_periodicity_and_offset_c::types_opts::to_string() const { - 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_"); + 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"); } -uint8_t cell_resel_priorities_s::t320_opts::to_number() const +uint16_t srs_periodicity_and_offset_c::types_opts::to_number() const { - 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_"); + 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"); } -// MeasConfig ::= SEQUENCE -SRSASN_CODE meas_cfg_s::pack(bit_ref& bref) const +// SRS-SpatialRelationInfo ::= SEQUENCE +SRSASN_CODE srs_spatial_relation_info_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_obj_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(report_cfg_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(report_cfg_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(meas_id_to_rem_list_present, 1)); - HANDLE_CODE(bref.pack(meas_id_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.pack(s_measure_cfg_present, 1)); - HANDLE_CODE(bref.pack(quant_cfg_present, 1)); - HANDLE_CODE(bref.pack(meas_gap_cfg_present, 1)); - HANDLE_CODE(bref.pack(meas_gap_sharing_cfg_present, 1)); + HANDLE_CODE(bref.pack(serving_cell_id_present, 1)); - if (meas_obj_to_rem_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_rem_list, 1, 64, integer_packer(1, 64))); - } - if (meas_obj_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_add_mod_list, 1, 64)); - } - if (report_cfg_to_rem_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_to_rem_list, 1, 64, integer_packer(1, 64))); - } - if (report_cfg_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_to_add_mod_list, 1, 64)); - } - if (meas_id_to_rem_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_to_rem_list, 1, 64, integer_packer(1, 64))); - } - if (meas_id_to_add_mod_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_to_add_mod_list, 1, 64)); - } - if (s_measure_cfg_present) { - HANDLE_CODE(s_measure_cfg.pack(bref)); - } - if (quant_cfg_present) { - HANDLE_CODE(quant_cfg.pack(bref)); - } - if (meas_gap_cfg_present) { - HANDLE_CODE(meas_gap_cfg.pack(bref)); - } - if (meas_gap_sharing_cfg_present) { - HANDLE_CODE(meas_gap_sharing_cfg.pack(bref)); + if (serving_cell_id_present) { + HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); } + HANDLE_CODE(ref_sig.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_spatial_relation_info_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(meas_obj_to_rem_list_present, 1)); - HANDLE_CODE(bref.unpack(meas_obj_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(report_cfg_to_rem_list_present, 1)); - HANDLE_CODE(bref.unpack(report_cfg_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(meas_id_to_rem_list_present, 1)); - HANDLE_CODE(bref.unpack(meas_id_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(s_measure_cfg_present, 1)); - HANDLE_CODE(bref.unpack(quant_cfg_present, 1)); - HANDLE_CODE(bref.unpack(meas_gap_cfg_present, 1)); - HANDLE_CODE(bref.unpack(meas_gap_sharing_cfg_present, 1)); + HANDLE_CODE(bref.unpack(serving_cell_id_present, 1)); - if (meas_obj_to_rem_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_obj_to_rem_list, bref, 1, 64, integer_packer(1, 64))); - } - if (meas_obj_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_obj_to_add_mod_list, bref, 1, 64)); - } - if (report_cfg_to_rem_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(report_cfg_to_rem_list, bref, 1, 64, integer_packer(1, 64))); - } - if (report_cfg_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(report_cfg_to_add_mod_list, bref, 1, 64)); - } - if (meas_id_to_rem_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_id_to_rem_list, bref, 1, 64, integer_packer(1, 64))); - } - if (meas_id_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_id_to_add_mod_list, bref, 1, 64)); - } - if (s_measure_cfg_present) { - HANDLE_CODE(s_measure_cfg.unpack(bref)); - } - if (quant_cfg_present) { - HANDLE_CODE(quant_cfg.unpack(bref)); - } - if (meas_gap_cfg_present) { - HANDLE_CODE(meas_gap_cfg.unpack(bref)); - } - if (meas_gap_sharing_cfg_present) { - HANDLE_CODE(meas_gap_sharing_cfg.unpack(bref)); + if (serving_cell_id_present) { + HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); } + HANDLE_CODE(ref_sig.unpack(bref)); return SRSASN_SUCCESS; } -void meas_cfg_s::to_json(json_writer& j) const +void srs_spatial_relation_info_s::to_json(json_writer& j) const { j.start_obj(); - if (meas_obj_to_rem_list_present) { - j.start_array("measObjectToRemoveList"); - 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 (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 (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 (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 (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 (const auto& e1 : meas_id_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } - if (s_measure_cfg_present) { - j.write_fieldname("s-MeasureConfig"); - s_measure_cfg.to_json(j); - } - if (quant_cfg_present) { - j.write_fieldname("quantityConfig"); - quant_cfg.to_json(j); - } - if (meas_gap_cfg_present) { - j.write_fieldname("measGapConfig"); - meas_gap_cfg.to_json(j); - } - if (meas_gap_sharing_cfg_present) { - j.write_fieldname("measGapSharingConfig"); - meas_gap_sharing_cfg.to_json(j); + if (serving_cell_id_present) { + j.write_int("servingCellId", serving_cell_id); } + j.write_fieldname("referenceSignal"); + ref_sig.to_json(j); j.end_obj(); } -void meas_cfg_s::s_measure_cfg_c_::destroy_() {} -void meas_cfg_s::s_measure_cfg_c_::set(types::options e) +void srs_spatial_relation_info_s::ref_sig_c_::destroy_() +{ + switch (type_) { + case types::srs: + c.destroy(); + break; + default: + break; + } +} +void srs_spatial_relation_info_s::ref_sig_c_::set(types::options e) { destroy_(); type_ = e; + switch (type_) { + case types::ssb_idx: + break; + case types::csi_rs_idx: + break; + case types::srs: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); + } } -meas_cfg_s::s_measure_cfg_c_::s_measure_cfg_c_(const meas_cfg_s::s_measure_cfg_c_& other) +srs_spatial_relation_info_s::ref_sig_c_::ref_sig_c_(const srs_spatial_relation_info_s::ref_sig_c_& other) { type_ = other.type(); switch (type_) { - case types::ssb_rsrp: + case types::ssb_idx: c.init(other.c.get()); break; - case types::csi_rsrp: + case types::csi_rs_idx: c.init(other.c.get()); break; + case types::srs: + c.init(other.c.get()); + break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); } } -meas_cfg_s::s_measure_cfg_c_& meas_cfg_s::s_measure_cfg_c_::operator=(const meas_cfg_s::s_measure_cfg_c_& other) +srs_spatial_relation_info_s::ref_sig_c_& +srs_spatial_relation_info_s::ref_sig_c_::operator=(const srs_spatial_relation_info_s::ref_sig_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb_rsrp: + case types::ssb_idx: c.set(other.c.get()); break; - case types::csi_rsrp: + case types::csi_rs_idx: c.set(other.c.get()); break; + case types::srs: + c.set(other.c.get()); + break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); } return *this; } -void meas_cfg_s::s_measure_cfg_c_::to_json(json_writer& j) const +void srs_spatial_relation_info_s::ref_sig_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb_rsrp: - j.write_int("ssb-RSRP", c.get()); + case types::ssb_idx: + j.write_int("ssb-Index", c.get()); break; - case types::csi_rsrp: - j.write_int("csi-RSRP", c.get()); + case types::csi_rs_idx: + j.write_int("csi-RS-Index", c.get()); + break; + case types::srs: + j.write_fieldname("srs"); + j.start_obj(); + j.write_int("resourceId", c.get().res_id); + j.write_int("uplinkBWP", c.get().ul_bwp); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); } j.end_obj(); } -SRSASN_CODE meas_cfg_s::s_measure_cfg_c_::pack(bit_ref& bref) const +SRSASN_CODE srs_spatial_relation_info_s::ref_sig_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb_rsrp: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + case types::ssb_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); break; - case types::csi_rsrp: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + case types::csi_rs_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + break; + case types::srs: + HANDLE_CODE(pack_integer(bref, c.get().res_id, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, c.get().ul_bwp, (uint8_t)0u, (uint8_t)4u)); break; default: - log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE meas_cfg_s::s_measure_cfg_c_::unpack(cbit_ref& bref) +SRSASN_CODE srs_spatial_relation_info_s::ref_sig_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb_rsrp: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + case types::ssb_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); break; - case types::csi_rsrp: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + case types::csi_rs_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + break; + case types::srs: + HANDLE_CODE(unpack_integer(c.get().res_id, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(c.get().ul_bwp, bref, (uint8_t)0u, (uint8_t)4u)); break; default: - log_invalid_choice_id(type_, "meas_cfg_s::s_measure_cfg_c_"); + log_invalid_choice_id(type_, "srs_spatial_relation_info_s::ref_sig_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string meas_cfg_s::s_measure_cfg_c_::types_opts::to_string() const +std::string srs_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const { - static const char* options[] = {"ssb-RSRP", "csi-RSRP"}; - return convert_enum_idx(options, 2, value, "meas_cfg_s::s_measure_cfg_c_::types"); + 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"); } -// RRCReconfiguration-v1530-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_v1530_ies_s::pack(bit_ref& bref) const +// CG-UCI-OnPUSCH ::= CHOICE +void cg_uci_on_pusch_c::destroy_() { - HANDLE_CODE(bref.pack(master_cell_group_present, 1)); - HANDLE_CODE(bref.pack(full_cfg_present, 1)); - HANDLE_CODE(bref.pack(ded_nas_msg_list_present, 1)); - HANDLE_CODE(bref.pack(master_key_upd_present, 1)); - HANDLE_CODE(bref.pack(ded_sib1_delivery_present, 1)); - HANDLE_CODE(bref.pack(ded_sys_info_delivery_present, 1)); - HANDLE_CODE(bref.pack(other_cfg_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (master_cell_group_present) { - HANDLE_CODE(master_cell_group.pack(bref)); - } - if (ded_nas_msg_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ded_nas_msg_list, 1, 29)); - } - if (master_key_upd_present) { - HANDLE_CODE(master_key_upd.pack(bref)); - } - if (ded_sib1_delivery_present) { - HANDLE_CODE(ded_sib1_delivery.pack(bref)); - } - if (ded_sys_info_delivery_present) { - HANDLE_CODE(ded_sys_info_delivery.pack(bref)); - } - if (other_cfg_present) { - HANDLE_CODE(other_cfg.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); + switch (type_) { + case types::dynamic_type: + c.destroy(); + break; + case types::semi_static: + c.destroy(); + break; + default: + break; } - - return SRSASN_SUCCESS; } -SRSASN_CODE rrc_recfg_v1530_ies_s::unpack(cbit_ref& bref) +void cg_uci_on_pusch_c::set(types::options e) { - HANDLE_CODE(bref.unpack(master_cell_group_present, 1)); - HANDLE_CODE(bref.unpack(full_cfg_present, 1)); - HANDLE_CODE(bref.unpack(ded_nas_msg_list_present, 1)); - HANDLE_CODE(bref.unpack(master_key_upd_present, 1)); - HANDLE_CODE(bref.unpack(ded_sib1_delivery_present, 1)); - HANDLE_CODE(bref.unpack(ded_sys_info_delivery_present, 1)); - HANDLE_CODE(bref.unpack(other_cfg_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (master_cell_group_present) { - HANDLE_CODE(master_cell_group.unpack(bref)); - } - if (ded_nas_msg_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ded_nas_msg_list, bref, 1, 29)); - } - if (master_key_upd_present) { - HANDLE_CODE(master_key_upd.unpack(bref)); - } - if (ded_sib1_delivery_present) { - HANDLE_CODE(ded_sib1_delivery.unpack(bref)); + destroy_(); + type_ = e; + switch (type_) { + case types::dynamic_type: + c.init(); + break; + case types::semi_static: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); } - if (ded_sys_info_delivery_present) { - HANDLE_CODE(ded_sys_info_delivery.unpack(bref)); +} +cg_uci_on_pusch_c::cg_uci_on_pusch_c(const cg_uci_on_pusch_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::dynamic_type: + c.init(other.c.get()); + break; + case types::semi_static: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); } - if (other_cfg_present) { - HANDLE_CODE(other_cfg.unpack(bref)); +} +cg_uci_on_pusch_c& cg_uci_on_pusch_c::operator=(const cg_uci_on_pusch_c& other) +{ + if (this == &other) { + return *this; } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); + set(other.type()); + switch (type_) { + case types::dynamic_type: + c.set(other.c.get()); + break; + case types::semi_static: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); } - return SRSASN_SUCCESS; + return *this; } -void rrc_recfg_v1530_ies_s::to_json(json_writer& j) const +void cg_uci_on_pusch_c::to_json(json_writer& j) const { j.start_obj(); - if (master_cell_group_present) { - j.write_str("masterCellGroup", master_cell_group.to_string()); - } - if (full_cfg_present) { - j.write_str("fullConfig", "true"); - } - if (ded_nas_msg_list_present) { - j.start_array("dedicatedNAS-MessageList"); - for (const auto& e1 : ded_nas_msg_list) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (master_key_upd_present) { - j.write_fieldname("masterKeyUpdate"); - master_key_upd.to_json(j); - } - if (ded_sib1_delivery_present) { - j.write_str("dedicatedSIB1-Delivery", ded_sib1_delivery.to_string()); - } - if (ded_sys_info_delivery_present) { - j.write_str("dedicatedSystemInformationDelivery", ded_sys_info_delivery.to_string()); + switch (type_) { + case types::dynamic_type: + j.start_array("dynamic"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::semi_static: + j.write_fieldname("semiStatic"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); } - if (other_cfg_present) { - j.write_fieldname("otherConfig"); - other_cfg.to_json(j); + j.end_obj(); +} +SRSASN_CODE cg_uci_on_pusch_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dynamic_type: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4)); + break; + case types::semi_static: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); + return SRSASN_ERROR_ENCODE_FAIL; } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_uci_on_pusch_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dynamic_type: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4)); + break; + case types::semi_static: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cg_uci_on_pusch_c"); + return SRSASN_ERROR_DECODE_FAIL; } - j.end_obj(); + return SRSASN_SUCCESS; } -// RRCRelease-v1540-IEs ::= SEQUENCE -SRSASN_CODE rrc_release_v1540_ies_s::pack(bit_ref& bref) const +std::string cg_uci_on_pusch_c::types_opts::to_string() const { - HANDLE_CODE(bref.pack(wait_time_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + static const char* options[] = {"dynamic", "semiStatic"}; + return convert_enum_idx(options, 2, value, "cg_uci_on_pusch_c::types"); +} - if (wait_time_present) { - HANDLE_CODE(pack_integer(bref, wait_time, (uint8_t)1u, (uint8_t)16u)); +// DMRS-UplinkConfig ::= SEQUENCE +SRSASN_CODE dmrs_ul_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dmrs_type_present, 1)); + HANDLE_CODE(bref.pack(dmrs_add_position_present, 1)); + HANDLE_CODE(bref.pack(phase_tracking_rs_present, 1)); + HANDLE_CODE(bref.pack(max_len_present, 1)); + HANDLE_CODE(bref.pack(transform_precoding_disabled_present, 1)); + HANDLE_CODE(bref.pack(transform_precoding_enabled_present, 1)); + + if (dmrs_add_position_present) { + HANDLE_CODE(dmrs_add_position.pack(bref)); + } + if (phase_tracking_rs_present) { + HANDLE_CODE(phase_tracking_rs.pack(bref)); + } + if (transform_precoding_disabled_present) { + bref.pack(transform_precoding_disabled.ext, 1); + HANDLE_CODE(bref.pack(transform_precoding_disabled.scrambling_id0_present, 1)); + HANDLE_CODE(bref.pack(transform_precoding_disabled.scrambling_id1_present, 1)); + if (transform_precoding_disabled.scrambling_id0_present) { + HANDLE_CODE(pack_integer(bref, transform_precoding_disabled.scrambling_id0, (uint32_t)0u, (uint32_t)65535u)); + } + if (transform_precoding_disabled.scrambling_id1_present) { + HANDLE_CODE(pack_integer(bref, transform_precoding_disabled.scrambling_id1, (uint32_t)0u, (uint32_t)65535u)); + } + } + if (transform_precoding_enabled_present) { + bref.pack(transform_precoding_enabled.ext, 1); + HANDLE_CODE(bref.pack(transform_precoding_enabled.npusch_id_present, 1)); + HANDLE_CODE(bref.pack(transform_precoding_enabled.seq_group_hop_present, 1)); + HANDLE_CODE(bref.pack(transform_precoding_enabled.seq_hop_present, 1)); + if (transform_precoding_enabled.npusch_id_present) { + HANDLE_CODE(pack_integer(bref, transform_precoding_enabled.npusch_id, (uint16_t)0u, (uint16_t)1007u)); + } } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_release_v1540_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE dmrs_ul_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(wait_time_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dmrs_type_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_add_position_present, 1)); + HANDLE_CODE(bref.unpack(phase_tracking_rs_present, 1)); + HANDLE_CODE(bref.unpack(max_len_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoding_disabled_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoding_enabled_present, 1)); - if (wait_time_present) { - HANDLE_CODE(unpack_integer(wait_time, bref, (uint8_t)1u, (uint8_t)16u)); + if (dmrs_add_position_present) { + HANDLE_CODE(dmrs_add_position.unpack(bref)); + } + if (phase_tracking_rs_present) { + HANDLE_CODE(phase_tracking_rs.unpack(bref)); + } + if (transform_precoding_disabled_present) { + bref.unpack(transform_precoding_disabled.ext, 1); + HANDLE_CODE(bref.unpack(transform_precoding_disabled.scrambling_id0_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoding_disabled.scrambling_id1_present, 1)); + if (transform_precoding_disabled.scrambling_id0_present) { + HANDLE_CODE(unpack_integer(transform_precoding_disabled.scrambling_id0, bref, (uint32_t)0u, (uint32_t)65535u)); + } + if (transform_precoding_disabled.scrambling_id1_present) { + HANDLE_CODE(unpack_integer(transform_precoding_disabled.scrambling_id1, bref, (uint32_t)0u, (uint32_t)65535u)); + } + } + if (transform_precoding_enabled_present) { + bref.unpack(transform_precoding_enabled.ext, 1); + HANDLE_CODE(bref.unpack(transform_precoding_enabled.npusch_id_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoding_enabled.seq_group_hop_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoding_enabled.seq_hop_present, 1)); + if (transform_precoding_enabled.npusch_id_present) { + HANDLE_CODE(unpack_integer(transform_precoding_enabled.npusch_id, bref, (uint16_t)0u, (uint16_t)1007u)); + } } return SRSASN_SUCCESS; } -void rrc_release_v1540_ies_s::to_json(json_writer& j) const +void dmrs_ul_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (wait_time_present) { - j.write_int("waitTime", wait_time); + if (dmrs_type_present) { + j.write_str("dmrs-Type", "type2"); } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); + if (dmrs_add_position_present) { + j.write_str("dmrs-AdditionalPosition", dmrs_add_position.to_string()); + } + if (phase_tracking_rs_present) { + j.write_fieldname("phaseTrackingRS"); + phase_tracking_rs.to_json(j); + } + if (max_len_present) { + j.write_str("maxLength", "len2"); + } + if (transform_precoding_disabled_present) { + j.write_fieldname("transformPrecodingDisabled"); + j.start_obj(); + if (transform_precoding_disabled.scrambling_id0_present) { + j.write_int("scramblingID0", transform_precoding_disabled.scrambling_id0); + } + if (transform_precoding_disabled.scrambling_id1_present) { + j.write_int("scramblingID1", transform_precoding_disabled.scrambling_id1); + } + j.end_obj(); + } + if (transform_precoding_enabled_present) { + j.write_fieldname("transformPrecodingEnabled"); j.start_obj(); + if (transform_precoding_enabled.npusch_id_present) { + j.write_int("nPUSCH-Identity", transform_precoding_enabled.npusch_id); + } + if (transform_precoding_enabled.seq_group_hop_present) { + j.write_str("sequenceGroupHopping", "disabled"); + } + if (transform_precoding_enabled.seq_hop_present) { + j.write_str("sequenceHopping", "enabled"); + } j.end_obj(); } j.end_obj(); } -// RedirectedCarrierInfo ::= CHOICE -void redirected_carrier_info_c::destroy_() +std::string dmrs_ul_cfg_s::dmrs_add_position_opts::to_string() const +{ + 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 const uint8_t options[] = {0, 1, 3}; + return map_enum_number(options, 3, value, "dmrs_ul_cfg_s::dmrs_add_position_e_"); +} + +// PRACH-ResourceDedicatedBFR ::= CHOICE +void prach_res_ded_bfr_c::destroy_() { switch (type_) { - case types::nr: - c.destroy(); + case types::ssb: + c.destroy(); break; - case types::eutra: - c.destroy(); + case types::csi_rs: + c.destroy(); break; default: break; } } -void redirected_carrier_info_c::set(types::options e) +void prach_res_ded_bfr_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::nr: - c.init(); + case types::ssb: + c.init(); break; - case types::eutra: - c.init(); + case types::csi_rs: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); } } -redirected_carrier_info_c::redirected_carrier_info_c(const redirected_carrier_info_c& other) +prach_res_ded_bfr_c::prach_res_ded_bfr_c(const prach_res_ded_bfr_c& other) { type_ = other.type(); switch (type_) { - case types::nr: - c.init(other.c.get()); + case types::ssb: + c.init(other.c.get()); break; - case types::eutra: - c.init(other.c.get()); + case types::csi_rs: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); } } -redirected_carrier_info_c& redirected_carrier_info_c::operator=(const redirected_carrier_info_c& other) +prach_res_ded_bfr_c& prach_res_ded_bfr_c::operator=(const prach_res_ded_bfr_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::nr: - c.set(other.c.get()); + case types::ssb: + c.set(other.c.get()); break; - case types::eutra: - c.set(other.c.get()); + case types::csi_rs: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); } return *this; } -void redirected_carrier_info_c::to_json(json_writer& j) const +void prach_res_ded_bfr_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::nr: - j.write_fieldname("nr"); - c.get().to_json(j); + case types::ssb: + j.write_fieldname("ssb"); + c.get().to_json(j); break; - case types::eutra: - j.write_fieldname("eutra"); - c.get().to_json(j); + case types::csi_rs: + j.write_fieldname("csi-RS"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); } j.end_obj(); } -SRSASN_CODE redirected_carrier_info_c::pack(bit_ref& bref) const +SRSASN_CODE prach_res_ded_bfr_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::nr: - HANDLE_CODE(c.get().pack(bref)); + case types::ssb: + HANDLE_CODE(c.get().pack(bref)); break; - case types::eutra: - HANDLE_CODE(c.get().pack(bref)); + case types::csi_rs: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE redirected_carrier_info_c::unpack(cbit_ref& bref) +SRSASN_CODE prach_res_ded_bfr_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::nr: - HANDLE_CODE(c.get().unpack(bref)); + case types::ssb: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::eutra: - HANDLE_CODE(c.get().unpack(bref)); + case types::csi_rs: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string redirected_carrier_info_c::types_opts::to_string() const +std::string prach_res_ded_bfr_c::types_opts::to_string() const { - static const char* options[] = {"nr", "eutra"}; - return convert_enum_idx(options, 2, value, "redirected_carrier_info_c::types"); + static const char* options[] = {"ssb", "csi-RS"}; + return convert_enum_idx(options, 2, value, "prach_res_ded_bfr_c::types"); } -// SecurityConfigSMC ::= SEQUENCE -SRSASN_CODE security_cfg_smc_s::pack(bit_ref& bref) const +// PUCCH-FormatConfig ::= SEQUENCE +SRSASN_CODE pucch_format_cfg_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(security_algorithm_cfg.pack(bref)); + HANDLE_CODE(bref.pack(interslot_freq_hop_present, 1)); + HANDLE_CODE(bref.pack(add_dmrs_present, 1)); + HANDLE_CODE(bref.pack(max_code_rate_present, 1)); + HANDLE_CODE(bref.pack(nrof_slots_present, 1)); + HANDLE_CODE(bref.pack(pi2_bpsk_present, 1)); + HANDLE_CODE(bref.pack(simul_harq_ack_csi_present, 1)); + + if (max_code_rate_present) { + HANDLE_CODE(max_code_rate.pack(bref)); + } + if (nrof_slots_present) { + HANDLE_CODE(nrof_slots.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE security_cfg_smc_s::unpack(cbit_ref& bref) +SRSASN_CODE pucch_format_cfg_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(security_algorithm_cfg.unpack(bref)); + HANDLE_CODE(bref.unpack(interslot_freq_hop_present, 1)); + HANDLE_CODE(bref.unpack(add_dmrs_present, 1)); + HANDLE_CODE(bref.unpack(max_code_rate_present, 1)); + HANDLE_CODE(bref.unpack(nrof_slots_present, 1)); + HANDLE_CODE(bref.unpack(pi2_bpsk_present, 1)); + HANDLE_CODE(bref.unpack(simul_harq_ack_csi_present, 1)); + + if (max_code_rate_present) { + HANDLE_CODE(max_code_rate.unpack(bref)); + } + if (nrof_slots_present) { + HANDLE_CODE(nrof_slots.unpack(bref)); + } return SRSASN_SUCCESS; } -void security_cfg_smc_s::to_json(json_writer& j) const +void pucch_format_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("securityAlgorithmConfig"); - security_algorithm_cfg.to_json(j); - j.end_obj(); -} - -// SuspendConfig ::= SEQUENCE -SRSASN_CODE suspend_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ran_notif_area_info_present, 1)); - HANDLE_CODE(bref.pack(t380_present, 1)); - - HANDLE_CODE(full_i_rnti.pack(bref)); - HANDLE_CODE(short_i_rnti.pack(bref)); - HANDLE_CODE(ran_paging_cycle.pack(bref)); - if (ran_notif_area_info_present) { - HANDLE_CODE(ran_notif_area_info.pack(bref)); + if (interslot_freq_hop_present) { + j.write_str("interslotFrequencyHopping", "enabled"); } - if (t380_present) { - HANDLE_CODE(t380.pack(bref)); + if (add_dmrs_present) { + j.write_str("additionalDMRS", "true"); } - HANDLE_CODE(pack_integer(bref, next_hop_chaining_count, (uint8_t)0u, (uint8_t)7u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE suspend_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ran_notif_area_info_present, 1)); - HANDLE_CODE(bref.unpack(t380_present, 1)); - - HANDLE_CODE(full_i_rnti.unpack(bref)); - HANDLE_CODE(short_i_rnti.unpack(bref)); - HANDLE_CODE(ran_paging_cycle.unpack(bref)); - if (ran_notif_area_info_present) { - HANDLE_CODE(ran_notif_area_info.unpack(bref)); + if (max_code_rate_present) { + j.write_str("maxCodeRate", max_code_rate.to_string()); } - if (t380_present) { - HANDLE_CODE(t380.unpack(bref)); + if (nrof_slots_present) { + j.write_str("nrofSlots", nrof_slots.to_string()); } - HANDLE_CODE(unpack_integer(next_hop_chaining_count, bref, (uint8_t)0u, (uint8_t)7u)); - - return SRSASN_SUCCESS; -} -void suspend_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("fullI-RNTI", full_i_rnti.to_string()); - j.write_str("shortI-RNTI", short_i_rnti.to_string()); - j.write_str("ran-PagingCycle", ran_paging_cycle.to_string()); - if (ran_notif_area_info_present) { - j.write_fieldname("ran-NotificationAreaInfo"); - ran_notif_area_info.to_json(j); + if (pi2_bpsk_present) { + j.write_str("pi2BPSK", "enabled"); } - if (t380_present) { - j.write_str("t380", t380.to_string()); + if (simul_harq_ack_csi_present) { + j.write_str("simultaneousHARQ-ACK-CSI", "true"); } - j.write_int("nextHopChainingCount", next_hop_chaining_count); j.end_obj(); } -// CounterCheck-IEs ::= SEQUENCE -SRSASN_CODE counter_check_ies_s::pack(bit_ref& bref) const +std::string pucch_format_cfg_s::nrof_slots_opts::to_string() const { - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + 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 const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "pucch_format_cfg_s::nrof_slots_e_"); +} - HANDLE_CODE(pack_dyn_seq_of(bref, drb_count_msb_info_list, 1, 29)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); +// PUCCH-PowerControl ::= SEQUENCE +SRSASN_CODE pucch_pwr_ctrl_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(delta_f_pucch_f0_present, 1)); + HANDLE_CODE(bref.pack(delta_f_pucch_f1_present, 1)); + HANDLE_CODE(bref.pack(delta_f_pucch_f2_present, 1)); + HANDLE_CODE(bref.pack(delta_f_pucch_f3_present, 1)); + HANDLE_CODE(bref.pack(delta_f_pucch_f4_present, 1)); + HANDLE_CODE(bref.pack(p0_set_present, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rss_present, 1)); + HANDLE_CODE(bref.pack(two_pucch_pc_adjustment_states_present, 1)); + + if (delta_f_pucch_f0_present) { + HANDLE_CODE(pack_integer(bref, delta_f_pucch_f0, (int8_t)-16, (int8_t)15)); + } + if (delta_f_pucch_f1_present) { + HANDLE_CODE(pack_integer(bref, delta_f_pucch_f1, (int8_t)-16, (int8_t)15)); + } + if (delta_f_pucch_f2_present) { + HANDLE_CODE(pack_integer(bref, delta_f_pucch_f2, (int8_t)-16, (int8_t)15)); + } + if (delta_f_pucch_f3_present) { + HANDLE_CODE(pack_integer(bref, delta_f_pucch_f3, (int8_t)-16, (int8_t)15)); + } + if (delta_f_pucch_f4_present) { + HANDLE_CODE(pack_integer(bref, delta_f_pucch_f4, (int8_t)-16, (int8_t)15)); + } + if (p0_set_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, p0_set, 1, 8)); + } + if (pathloss_ref_rss_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rss, 1, 4)); } return SRSASN_SUCCESS; } -SRSASN_CODE counter_check_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE pucch_pwr_ctrl_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(delta_f_pucch_f0_present, 1)); + HANDLE_CODE(bref.unpack(delta_f_pucch_f1_present, 1)); + HANDLE_CODE(bref.unpack(delta_f_pucch_f2_present, 1)); + HANDLE_CODE(bref.unpack(delta_f_pucch_f3_present, 1)); + HANDLE_CODE(bref.unpack(delta_f_pucch_f4_present, 1)); + HANDLE_CODE(bref.unpack(p0_set_present, 1)); + HANDLE_CODE(bref.unpack(pathloss_ref_rss_present, 1)); + HANDLE_CODE(bref.unpack(two_pucch_pc_adjustment_states_present, 1)); - HANDLE_CODE(unpack_dyn_seq_of(drb_count_msb_info_list, bref, 1, 29)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + if (delta_f_pucch_f0_present) { + HANDLE_CODE(unpack_integer(delta_f_pucch_f0, bref, (int8_t)-16, (int8_t)15)); + } + if (delta_f_pucch_f1_present) { + HANDLE_CODE(unpack_integer(delta_f_pucch_f1, bref, (int8_t)-16, (int8_t)15)); + } + if (delta_f_pucch_f2_present) { + HANDLE_CODE(unpack_integer(delta_f_pucch_f2, bref, (int8_t)-16, (int8_t)15)); + } + if (delta_f_pucch_f3_present) { + HANDLE_CODE(unpack_integer(delta_f_pucch_f3, bref, (int8_t)-16, (int8_t)15)); + } + if (delta_f_pucch_f4_present) { + HANDLE_CODE(unpack_integer(delta_f_pucch_f4, bref, (int8_t)-16, (int8_t)15)); + } + if (p0_set_present) { + HANDLE_CODE(unpack_dyn_seq_of(p0_set, bref, 1, 8)); + } + if (pathloss_ref_rss_present) { + HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rss, bref, 1, 4)); } return SRSASN_SUCCESS; } -void counter_check_ies_s::to_json(json_writer& j) const +void pucch_pwr_ctrl_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("drb-CountMSB-InfoList"); - for (const auto& e1 : drb_count_msb_info_list) { - e1.to_json(j); + if (delta_f_pucch_f0_present) { + j.write_int("deltaF-PUCCH-f0", delta_f_pucch_f0); } - j.end_array(); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + if (delta_f_pucch_f1_present) { + j.write_int("deltaF-PUCCH-f1", delta_f_pucch_f1); } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + if (delta_f_pucch_f2_present) { + j.write_int("deltaF-PUCCH-f2", delta_f_pucch_f2); + } + if (delta_f_pucch_f3_present) { + j.write_int("deltaF-PUCCH-f3", delta_f_pucch_f3); + } + if (delta_f_pucch_f4_present) { + j.write_int("deltaF-PUCCH-f4", delta_f_pucch_f4); + } + if (p0_set_present) { + j.start_array("p0-Set"); + for (const auto& e1 : p0_set) { + e1.to_json(j); + } + j.end_array(); + } + if (pathloss_ref_rss_present) { + j.start_array("pathlossReferenceRSs"); + for (const auto& e1 : pathloss_ref_rss) { + e1.to_json(j); + } + j.end_array(); + } + if (two_pucch_pc_adjustment_states_present) { + j.write_str("twoPUCCH-PC-AdjustmentStates", "twoStates"); } j.end_obj(); } -// DLInformationTransfer-IEs ::= SEQUENCE -SRSASN_CODE dl_info_transfer_ies_s::pack(bit_ref& bref) const +// PUCCH-Resource ::= SEQUENCE +SRSASN_CODE pucch_res_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ded_nas_msg_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(intra_slot_freq_hop_present, 1)); + HANDLE_CODE(bref.pack(second_hop_prb_present, 1)); - if (ded_nas_msg_present) { - HANDLE_CODE(ded_nas_msg.pack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + HANDLE_CODE(pack_integer(bref, pucch_res_id, (uint8_t)0u, (uint8_t)127u)); + HANDLE_CODE(pack_integer(bref, start_prb, (uint16_t)0u, (uint16_t)274u)); + if (second_hop_prb_present) { + HANDLE_CODE(pack_integer(bref, second_hop_prb, (uint16_t)0u, (uint16_t)274u)); } + HANDLE_CODE(format.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE dl_info_transfer_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE pucch_res_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(intra_slot_freq_hop_present, 1)); + HANDLE_CODE(bref.unpack(second_hop_prb_present, 1)); - if (ded_nas_msg_present) { - HANDLE_CODE(ded_nas_msg.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + HANDLE_CODE(unpack_integer(pucch_res_id, bref, (uint8_t)0u, (uint8_t)127u)); + HANDLE_CODE(unpack_integer(start_prb, bref, (uint16_t)0u, (uint16_t)274u)); + if (second_hop_prb_present) { + HANDLE_CODE(unpack_integer(second_hop_prb, bref, (uint16_t)0u, (uint16_t)274u)); } + HANDLE_CODE(format.unpack(bref)); return SRSASN_SUCCESS; } -void dl_info_transfer_ies_s::to_json(json_writer& j) const +void pucch_res_s::to_json(json_writer& j) const { j.start_obj(); - if (ded_nas_msg_present) { - j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + j.write_int("pucch-ResourceId", pucch_res_id); + j.write_int("startingPRB", start_prb); + if (intra_slot_freq_hop_present) { + j.write_str("intraSlotFrequencyHopping", "enabled"); } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + if (second_hop_prb_present) { + j.write_int("secondHopPRB", second_hop_prb); } + j.write_fieldname("format"); + format.to_json(j); j.end_obj(); } -// MobilityFromNRCommand-IEs ::= SEQUENCE -SRSASN_CODE mob_from_nr_cmd_ies_s::pack(bit_ref& bref) const +void pucch_res_s::format_c_::destroy_() { - HANDLE_CODE(bref.pack(nas_security_param_from_nr_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(target_rat_type.pack(bref)); - HANDLE_CODE(target_rat_msg_container.pack(bref)); - if (nas_security_param_from_nr_present) { - HANDLE_CODE(nas_security_param_from_nr.pack(bref)); + switch (type_) { + case types::format0: + c.destroy(); + break; + case types::format1: + c.destroy(); + break; + case types::format2: + c.destroy(); + break; + case types::format3: + c.destroy(); + break; + case types::format4: + c.destroy(); + break; + default: + break; } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); +} +void pucch_res_s::format_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::format0: + c.init(); + break; + case types::format1: + c.init(); + break; + case types::format2: + c.init(); + break; + case types::format3: + c.init(); + break; + case types::format4: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_res_s::format_c_"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE mob_from_nr_cmd_ies_s::unpack(cbit_ref& bref) +pucch_res_s::format_c_::format_c_(const pucch_res_s::format_c_& other) { - HANDLE_CODE(bref.unpack(nas_security_param_from_nr_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(target_rat_type.unpack(bref)); - HANDLE_CODE(target_rat_msg_container.unpack(bref)); - if (nas_security_param_from_nr_present) { - HANDLE_CODE(nas_security_param_from_nr.unpack(bref)); + type_ = other.type(); + switch (type_) { + case types::format0: + c.init(other.c.get()); + break; + case types::format1: + c.init(other.c.get()); + break; + case types::format2: + c.init(other.c.get()); + break; + case types::format3: + c.init(other.c.get()); + break; + case types::format4: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_res_s::format_c_"); } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); +} +pucch_res_s::format_c_& pucch_res_s::format_c_::operator=(const pucch_res_s::format_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::format0: + c.set(other.c.get()); + break; + case types::format1: + c.set(other.c.get()); + break; + case types::format2: + c.set(other.c.get()); + break; + case types::format3: + c.set(other.c.get()); + break; + case types::format4: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_res_s::format_c_"); } - return SRSASN_SUCCESS; + return *this; } -void mob_from_nr_cmd_ies_s::to_json(json_writer& j) const +void pucch_res_s::format_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_str("targetRAT-Type", target_rat_type.to_string()); - j.write_str("targetRAT-MessageContainer", target_rat_msg_container.to_string()); - if (nas_security_param_from_nr_present) { - j.write_str("nas-SecurityParamFromNR", nas_security_param_from_nr.to_string()); + switch (type_) { + case types::format0: + j.write_fieldname("format0"); + c.get().to_json(j); + break; + case types::format1: + j.write_fieldname("format1"); + c.get().to_json(j); + break; + case types::format2: + j.write_fieldname("format2"); + c.get().to_json(j); + break; + case types::format3: + j.write_fieldname("format3"); + c.get().to_json(j); + break; + case types::format4: + j.write_fieldname("format4"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "pucch_res_s::format_c_"); } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + j.end_obj(); +} +SRSASN_CODE pucch_res_s::format_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::format0: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::format1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::format2: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::format3: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::format4: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_res_s::format_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_res_s::format_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::format0: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::format1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::format2: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::format3: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::format4: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_res_s::format_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - j.end_obj(); + return SRSASN_SUCCESS; } -std::string mob_from_nr_cmd_ies_s::target_rat_type_opts::to_string() const +std::string pucch_res_s::format_c_::types_opts::to_string() const { - 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_"); + 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 const uint8_t options[] = {0, 1, 2, 3, 4}; + return map_enum_number(options, 5, value, "pucch_res_s::format_c_::types"); } -// RRCReconfiguration-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_ies_s::pack(bit_ref& bref) const +// PUCCH-ResourceSet ::= SEQUENCE +SRSASN_CODE pucch_res_set_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(radio_bearer_cfg_present, 1)); - HANDLE_CODE(bref.pack(secondary_cell_group_present, 1)); - HANDLE_CODE(bref.pack(meas_cfg_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(max_payload_size_present, 1)); - if (radio_bearer_cfg_present) { - HANDLE_CODE(radio_bearer_cfg.pack(bref)); - } - if (secondary_cell_group_present) { - HANDLE_CODE(secondary_cell_group.pack(bref)); - } - if (meas_cfg_present) { - HANDLE_CODE(meas_cfg.pack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); + HANDLE_CODE(pack_integer(bref, pucch_res_set_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pack_dyn_seq_of(bref, res_list, 1, 32, integer_packer(0, 127))); + if (max_payload_size_present) { + HANDLE_CODE(pack_integer(bref, max_payload_size, (uint16_t)4u, (uint16_t)256u)); } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_recfg_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE pucch_res_set_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(radio_bearer_cfg_present, 1)); - HANDLE_CODE(bref.unpack(secondary_cell_group_present, 1)); - HANDLE_CODE(bref.unpack(meas_cfg_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(max_payload_size_present, 1)); - if (radio_bearer_cfg_present) { - HANDLE_CODE(radio_bearer_cfg.unpack(bref)); - } - if (secondary_cell_group_present) { - HANDLE_CODE(secondary_cell_group.unpack(bref)); - } - if (meas_cfg_present) { - HANDLE_CODE(meas_cfg.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); + HANDLE_CODE(unpack_integer(pucch_res_set_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(unpack_dyn_seq_of(res_list, bref, 1, 32, integer_packer(0, 127))); + if (max_payload_size_present) { + HANDLE_CODE(unpack_integer(max_payload_size, bref, (uint16_t)4u, (uint16_t)256u)); } return SRSASN_SUCCESS; } -void rrc_recfg_ies_s::to_json(json_writer& j) const +void pucch_res_set_s::to_json(json_writer& j) const { j.start_obj(); - if (radio_bearer_cfg_present) { - j.write_fieldname("radioBearerConfig"); - radio_bearer_cfg.to_json(j); + j.write_int("pucch-ResourceSetId", pucch_res_set_id); + j.start_array("resourceList"); + for (const auto& e1 : res_list) { + j.write_int(e1); } - if (secondary_cell_group_present) { - j.write_str("secondaryCellGroup", secondary_cell_group.to_string()); - } - if (meas_cfg_present) { - j.write_fieldname("measConfig"); - meas_cfg.to_json(j); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCReestablishment-IEs ::= SEQUENCE -SRSASN_CODE rrc_reest_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(pack_integer(bref, next_hop_chaining_count, (uint8_t)0u, (uint8_t)7u)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reest_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(unpack_integer(next_hop_chaining_count, bref, (uint8_t)0u, (uint8_t)7u)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_reest_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("nextHopChainingCount", next_hop_chaining_count); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// RRCRelease-IEs ::= SEQUENCE -SRSASN_CODE rrc_release_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(redirected_carrier_info_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_priorities_present, 1)); - HANDLE_CODE(bref.pack(suspend_cfg_present, 1)); - HANDLE_CODE(bref.pack(depriorit_req_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (redirected_carrier_info_present) { - HANDLE_CODE(redirected_carrier_info.pack(bref)); - } - if (cell_resel_priorities_present) { - HANDLE_CODE(cell_resel_priorities.pack(bref)); - } - if (suspend_cfg_present) { - HANDLE_CODE(suspend_cfg.pack(bref)); - } - if (depriorit_req_present) { - HANDLE_CODE(depriorit_req.depriorit_type.pack(bref)); - HANDLE_CODE(depriorit_req.depriorit_timer.pack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_release_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(redirected_carrier_info_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_priorities_present, 1)); - HANDLE_CODE(bref.unpack(suspend_cfg_present, 1)); - HANDLE_CODE(bref.unpack(depriorit_req_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (redirected_carrier_info_present) { - HANDLE_CODE(redirected_carrier_info.unpack(bref)); - } - if (cell_resel_priorities_present) { - HANDLE_CODE(cell_resel_priorities.unpack(bref)); - } - if (suspend_cfg_present) { - HANDLE_CODE(suspend_cfg.unpack(bref)); - } - if (depriorit_req_present) { - HANDLE_CODE(depriorit_req.depriorit_type.unpack(bref)); - HANDLE_CODE(depriorit_req.depriorit_timer.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_release_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (redirected_carrier_info_present) { - j.write_fieldname("redirectedCarrierInfo"); - redirected_carrier_info.to_json(j); - } - if (cell_resel_priorities_present) { - j.write_fieldname("cellReselectionPriorities"); - cell_resel_priorities.to_json(j); - } - if (suspend_cfg_present) { - j.write_fieldname("suspendConfig"); - suspend_cfg.to_json(j); - } - if (depriorit_req_present) { - j.write_fieldname("deprioritisationReq"); - j.start_obj(); - j.write_str("deprioritisationType", depriorit_req.depriorit_type.to_string()); - j.write_str("deprioritisationTimer", depriorit_req.depriorit_timer.to_string()); - j.end_obj(); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -std::string rrc_release_ies_s::depriorit_req_s_::depriorit_type_opts::to_string() const -{ - 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 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 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 -SRSASN_CODE rrc_resume_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(radio_bearer_cfg_present, 1)); - HANDLE_CODE(bref.pack(master_cell_group_present, 1)); - HANDLE_CODE(bref.pack(meas_cfg_present, 1)); - HANDLE_CODE(bref.pack(full_cfg_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (radio_bearer_cfg_present) { - HANDLE_CODE(radio_bearer_cfg.pack(bref)); - } - if (master_cell_group_present) { - HANDLE_CODE(master_cell_group.pack(bref)); - } - if (meas_cfg_present) { - HANDLE_CODE(meas_cfg.pack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(radio_bearer_cfg_present, 1)); - HANDLE_CODE(bref.unpack(master_cell_group_present, 1)); - HANDLE_CODE(bref.unpack(meas_cfg_present, 1)); - HANDLE_CODE(bref.unpack(full_cfg_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (radio_bearer_cfg_present) { - HANDLE_CODE(radio_bearer_cfg.unpack(bref)); - } - if (master_cell_group_present) { - HANDLE_CODE(master_cell_group.unpack(bref)); - } - if (meas_cfg_present) { - HANDLE_CODE(meas_cfg.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_resume_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (radio_bearer_cfg_present) { - j.write_fieldname("radioBearerConfig"); - radio_bearer_cfg.to_json(j); - } - if (master_cell_group_present) { - j.write_str("masterCellGroup", master_cell_group.to_string()); - } - if (meas_cfg_present) { - j.write_fieldname("measConfig"); - meas_cfg.to_json(j); - } - if (full_cfg_present) { - j.write_str("fullConfig", "true"); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// SecurityModeCommand-IEs ::= SEQUENCE -SRSASN_CODE security_mode_cmd_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(security_cfg_smc.pack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_mode_cmd_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(security_cfg_smc.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void security_mode_cmd_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("securityConfigSMC"); - security_cfg_smc.to_json(j); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + j.end_array(); + if (max_payload_size_present) { + j.write_int("maxPayloadSize", max_payload_size); } j.end_obj(); } -// UECapabilityEnquiry-IEs ::= SEQUENCE -SRSASN_CODE ue_cap_enquiry_ies_s::pack(bit_ref& bref) const +// PUCCH-SpatialRelationInfo ::= SEQUENCE +SRSASN_CODE pucch_spatial_relation_info_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(serving_cell_id_present, 1)); - HANDLE_CODE(pack_dyn_seq_of(bref, ue_cap_rat_request_list, 1, 8)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + HANDLE_CODE(pack_integer(bref, pucch_spatial_relation_info_id, (uint8_t)1u, (uint8_t)8u)); + if (serving_cell_id_present) { + HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); } + HANDLE_CODE(ref_sig.pack(bref)); + HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pack_integer(bref, p0_pucch_id, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(closed_loop_idx.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ue_cap_enquiry_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE pucch_spatial_relation_info_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(serving_cell_id_present, 1)); - HANDLE_CODE(unpack_dyn_seq_of(ue_cap_rat_request_list, bref, 1, 8)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + HANDLE_CODE(unpack_integer(pucch_spatial_relation_info_id, bref, (uint8_t)1u, (uint8_t)8u)); + if (serving_cell_id_present) { + HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); } + HANDLE_CODE(ref_sig.unpack(bref)); + HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(unpack_integer(p0_pucch_id, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(closed_loop_idx.unpack(bref)); return SRSASN_SUCCESS; } -void ue_cap_enquiry_ies_s::to_json(json_writer& j) const +void pucch_spatial_relation_info_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("ue-CapabilityRAT-RequestList"); - for (const auto& e1 : ue_cap_rat_request_list) { - e1.to_json(j); - } - j.end_array(); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + j.write_int("pucch-SpatialRelationInfoId", pucch_spatial_relation_info_id); + if (serving_cell_id_present) { + j.write_int("servingCellId", serving_cell_id); } + j.write_fieldname("referenceSignal"); + ref_sig.to_json(j); + j.write_int("pucch-PathlossReferenceRS-Id", pucch_pathloss_ref_rs_id); + j.write_int("p0-PUCCH-Id", p0_pucch_id); + j.write_str("closedLoopIndex", closed_loop_idx.to_string()); j.end_obj(); } -// CounterCheck ::= SEQUENCE -SRSASN_CODE counter_check_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE counter_check_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void counter_check_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void counter_check_s::crit_exts_c_::destroy_() +void pucch_spatial_relation_info_s::ref_sig_c_::destroy_() { switch (type_) { - case types::counter_check: - c.destroy(); + case types::srs: + c.destroy(); break; default: break; } } -void counter_check_s::crit_exts_c_::set(types::options e) +void pucch_spatial_relation_info_s::ref_sig_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::counter_check: - c.init(); + case types::ssb_idx: break; - case types::crit_exts_future: + case types::csi_rs_idx: + break; + case types::srs: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); } } -counter_check_s::crit_exts_c_::crit_exts_c_(const counter_check_s::crit_exts_c_& other) +pucch_spatial_relation_info_s::ref_sig_c_::ref_sig_c_(const pucch_spatial_relation_info_s::ref_sig_c_& other) { type_ = other.type(); switch (type_) { - case types::counter_check: - c.init(other.c.get()); + case types::ssb_idx: + c.init(other.c.get()); break; - case types::crit_exts_future: + case types::csi_rs_idx: + c.init(other.c.get()); + break; + case types::srs: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); } } -counter_check_s::crit_exts_c_& counter_check_s::crit_exts_c_::operator=(const counter_check_s::crit_exts_c_& other) +pucch_spatial_relation_info_s::ref_sig_c_& +pucch_spatial_relation_info_s::ref_sig_c_::operator=(const pucch_spatial_relation_info_s::ref_sig_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::counter_check: - c.set(other.c.get()); + case types::ssb_idx: + c.set(other.c.get()); break; - case types::crit_exts_future: + case types::csi_rs_idx: + c.set(other.c.get()); + break; + case types::srs: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); } return *this; } -void counter_check_s::crit_exts_c_::to_json(json_writer& j) const +void pucch_spatial_relation_info_s::ref_sig_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::counter_check: - j.write_fieldname("counterCheck"); - c.get().to_json(j); + case types::ssb_idx: + j.write_int("ssb-Index", c.get()); break; - case types::crit_exts_future: + case types::csi_rs_idx: + j.write_int("csi-RS-Index", c.get()); + break; + case types::srs: + j.write_fieldname("srs"); + j.start_obj(); + j.write_int("resource", c.get().res); + j.write_int("uplinkBWP", c.get().ul_bwp); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); } j.end_obj(); } -SRSASN_CODE counter_check_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE pucch_spatial_relation_info_s::ref_sig_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::counter_check: - HANDLE_CODE(c.get().pack(bref)); + case types::ssb_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); break; - case types::crit_exts_future: + case types::csi_rs_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + break; + case types::srs: + HANDLE_CODE(pack_integer(bref, c.get().res, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, c.get().ul_bwp, (uint8_t)0u, (uint8_t)4u)); break; default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE counter_check_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE pucch_spatial_relation_info_s::ref_sig_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::counter_check: - HANDLE_CODE(c.get().unpack(bref)); + case types::ssb_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); break; - case types::crit_exts_future: + case types::csi_rs_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + break; + case types::srs: + HANDLE_CODE(unpack_integer(c.get().res, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(c.get().ul_bwp, bref, (uint8_t)0u, (uint8_t)4u)); break; default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string counter_check_s::crit_exts_c_::types_opts::to_string() const +std::string pucch_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const { - static const char* options[] = {"counterCheck", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "counter_check_s::crit_exts_c_::types"); + 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"); } -// DLInformationTransfer ::= SEQUENCE -SRSASN_CODE dl_info_transfer_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_info_transfer_s::unpack(cbit_ref& bref) +std::string pucch_spatial_relation_info_s::closed_loop_idx_opts::to_string() const { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; + static const char* options[] = {"i0", "i1"}; + return convert_enum_idx(options, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); } -void dl_info_transfer_s::to_json(json_writer& j) const +uint8_t pucch_spatial_relation_info_s::closed_loop_idx_opts::to_number() const { - j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); } -void dl_info_transfer_s::crit_exts_c_::destroy_() +// PUSCH-PowerControl ::= SEQUENCE +SRSASN_CODE pusch_pwr_ctrl_s::pack(bit_ref& bref) const { - switch (type_) { - case types::dl_info_transfer: - c.destroy(); - break; - default: - break; + HANDLE_CODE(bref.pack(tpc_accumulation_present, 1)); + HANDLE_CODE(bref.pack(msg3_alpha_present, 1)); + HANDLE_CODE(bref.pack(p0_nominal_without_grant_present, 1)); + HANDLE_CODE(bref.pack(p0_alpha_sets_present, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(two_pusch_pc_adjustment_states_present, 1)); + HANDLE_CODE(bref.pack(delta_mcs_present, 1)); + HANDLE_CODE(bref.pack(sri_pusch_map_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(sri_pusch_map_to_release_list_present, 1)); + + if (msg3_alpha_present) { + HANDLE_CODE(msg3_alpha.pack(bref)); } -} -void dl_info_transfer_s::crit_exts_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::dl_info_transfer: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + if (p0_nominal_without_grant_present) { + HANDLE_CODE(pack_integer(bref, p0_nominal_without_grant, (int16_t)-202, (int16_t)24)); } -} -dl_info_transfer_s::crit_exts_c_::crit_exts_c_(const dl_info_transfer_s::crit_exts_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::dl_info_transfer: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + if (p0_alpha_sets_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, p0_alpha_sets, 1, 30)); + } + if (pathloss_ref_rs_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rs_to_add_mod_list, 1, 4)); + } + if (pathloss_ref_rs_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rs_to_release_list, 1, 4, integer_packer(0, 3))); } + if (sri_pusch_map_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sri_pusch_map_to_add_mod_list, 1, 16)); + } + if (sri_pusch_map_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sri_pusch_map_to_release_list, 1, 16, integer_packer(0, 15))); + } + + return SRSASN_SUCCESS; } -dl_info_transfer_s::crit_exts_c_& dl_info_transfer_s::crit_exts_c_:: - operator=(const dl_info_transfer_s::crit_exts_c_& other) +SRSASN_CODE pusch_pwr_ctrl_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + HANDLE_CODE(bref.unpack(tpc_accumulation_present, 1)); + HANDLE_CODE(bref.unpack(msg3_alpha_present, 1)); + HANDLE_CODE(bref.unpack(p0_nominal_without_grant_present, 1)); + HANDLE_CODE(bref.unpack(p0_alpha_sets_present, 1)); + HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(two_pusch_pc_adjustment_states_present, 1)); + HANDLE_CODE(bref.unpack(delta_mcs_present, 1)); + HANDLE_CODE(bref.unpack(sri_pusch_map_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(sri_pusch_map_to_release_list_present, 1)); + + if (msg3_alpha_present) { + HANDLE_CODE(msg3_alpha.unpack(bref)); } - set(other.type()); - switch (type_) { - case types::dl_info_transfer: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + if (p0_nominal_without_grant_present) { + HANDLE_CODE(unpack_integer(p0_nominal_without_grant, bref, (int16_t)-202, (int16_t)24)); + } + if (p0_alpha_sets_present) { + HANDLE_CODE(unpack_dyn_seq_of(p0_alpha_sets, bref, 1, 30)); + } + if (pathloss_ref_rs_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rs_to_add_mod_list, bref, 1, 4)); + } + if (pathloss_ref_rs_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rs_to_release_list, bref, 1, 4, integer_packer(0, 3))); + } + if (sri_pusch_map_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(sri_pusch_map_to_add_mod_list, bref, 1, 16)); + } + if (sri_pusch_map_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(sri_pusch_map_to_release_list, bref, 1, 16, integer_packer(0, 15))); } - return *this; + return SRSASN_SUCCESS; } -void dl_info_transfer_s::crit_exts_c_::to_json(json_writer& j) const +void pusch_pwr_ctrl_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::dl_info_transfer: - j.write_fieldname("dlInformationTransfer"); - c.get().to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + if (tpc_accumulation_present) { + j.write_str("tpc-Accumulation", "disabled"); + } + if (msg3_alpha_present) { + j.write_str("msg3-Alpha", msg3_alpha.to_string()); + } + if (p0_nominal_without_grant_present) { + j.write_int("p0-NominalWithoutGrant", p0_nominal_without_grant); + } + if (p0_alpha_sets_present) { + j.start_array("p0-AlphaSets"); + 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 (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 (const auto& e1 : pathloss_ref_rs_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (two_pusch_pc_adjustment_states_present) { + j.write_str("twoPUSCH-PC-AdjustmentStates", "twoStates"); + } + if (delta_mcs_present) { + j.write_str("deltaMCS", "enabled"); + } + if (sri_pusch_map_to_add_mod_list_present) { + j.start_array("sri-PUSCH-MappingToAddModList"); + 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 (const auto& e1 : sri_pusch_map_to_release_list) { + j.write_int(e1); + } + j.end_array(); } j.end_obj(); } -SRSASN_CODE dl_info_transfer_s::crit_exts_c_::pack(bit_ref& bref) const + +// RA-Prioritization ::= SEQUENCE +SRSASN_CODE ra_prioritization_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::dl_info_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(scaling_factor_bi_present, 1)); + + HANDLE_CODE(pwr_ramp_step_high_prio.pack(bref)); + if (scaling_factor_bi_present) { + HANDLE_CODE(scaling_factor_bi.pack(bref)); } + return SRSASN_SUCCESS; } -SRSASN_CODE dl_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE ra_prioritization_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dl_info_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(scaling_factor_bi_present, 1)); + + HANDLE_CODE(pwr_ramp_step_high_prio.unpack(bref)); + if (scaling_factor_bi_present) { + HANDLE_CODE(scaling_factor_bi.unpack(bref)); } + return SRSASN_SUCCESS; } +void ra_prioritization_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("powerRampingStepHighPriority", pwr_ramp_step_high_prio.to_string()); + if (scaling_factor_bi_present) { + j.write_str("scalingFactorBI", scaling_factor_bi.to_string()); + } + j.end_obj(); +} -std::string dl_info_transfer_s::crit_exts_c_::types_opts::to_string() const +std::string ra_prioritization_s::pwr_ramp_step_high_prio_opts::to_string() const { - static const char* options[] = {"dlInformationTransfer", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "dl_info_transfer_s::crit_exts_c_::types"); + 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 const uint8_t options[] = {0, 2, 4, 6}; + return map_enum_number(options, 4, value, "ra_prioritization_s::pwr_ramp_step_high_prio_e_"); } -// MobilityFromNRCommand ::= SEQUENCE -SRSASN_CODE mob_from_nr_cmd_s::pack(bit_ref& bref) const +std::string ra_prioritization_s::scaling_factor_bi_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + 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 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 +SRSASN_CODE srs_res_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ptrs_port_idx_present, 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_present, 1)); + + HANDLE_CODE(pack_integer(bref, srs_res_id, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(nrof_srs_ports.pack(bref)); + if (ptrs_port_idx_present) { + HANDLE_CODE(ptrs_port_idx.pack(bref)); + } + HANDLE_CODE(tx_comb.pack(bref)); + HANDLE_CODE(pack_integer(bref, res_map.start_position, (uint8_t)0u, (uint8_t)5u)); + HANDLE_CODE(res_map.nrof_symbols.pack(bref)); + HANDLE_CODE(res_map.repeat_factor.pack(bref)); + HANDLE_CODE(pack_integer(bref, freq_domain_position, (uint8_t)0u, (uint8_t)67u)); + HANDLE_CODE(pack_integer(bref, freq_domain_shift, (uint16_t)0u, (uint16_t)268u)); + HANDLE_CODE(pack_integer(bref, freq_hop.c_srs, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, freq_hop.b_srs, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pack_integer(bref, freq_hop.b_hop, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(group_or_seq_hop.pack(bref)); + HANDLE_CODE(res_type.pack(bref)); + HANDLE_CODE(pack_integer(bref, seq_id, (uint16_t)0u, (uint16_t)1023u)); + if (spatial_relation_info_present) { + HANDLE_CODE(spatial_relation_info.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE mob_from_nr_cmd_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_res_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ptrs_port_idx_present, 1)); + HANDLE_CODE(bref.unpack(spatial_relation_info_present, 1)); + + HANDLE_CODE(unpack_integer(srs_res_id, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(nrof_srs_ports.unpack(bref)); + if (ptrs_port_idx_present) { + HANDLE_CODE(ptrs_port_idx.unpack(bref)); + } + HANDLE_CODE(tx_comb.unpack(bref)); + HANDLE_CODE(unpack_integer(res_map.start_position, bref, (uint8_t)0u, (uint8_t)5u)); + HANDLE_CODE(res_map.nrof_symbols.unpack(bref)); + HANDLE_CODE(res_map.repeat_factor.unpack(bref)); + HANDLE_CODE(unpack_integer(freq_domain_position, bref, (uint8_t)0u, (uint8_t)67u)); + HANDLE_CODE(unpack_integer(freq_domain_shift, bref, (uint16_t)0u, (uint16_t)268u)); + HANDLE_CODE(unpack_integer(freq_hop.c_srs, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(freq_hop.b_srs, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(unpack_integer(freq_hop.b_hop, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(group_or_seq_hop.unpack(bref)); + HANDLE_CODE(res_type.unpack(bref)); + HANDLE_CODE(unpack_integer(seq_id, bref, (uint16_t)0u, (uint16_t)1023u)); + if (spatial_relation_info_present) { + HANDLE_CODE(spatial_relation_info.unpack(bref)); + } return SRSASN_SUCCESS; } -void mob_from_nr_cmd_s::to_json(json_writer& j) const +void srs_res_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_int("srs-ResourceId", srs_res_id); + j.write_str("nrofSRS-Ports", nrof_srs_ports.to_string()); + if (ptrs_port_idx_present) { + j.write_str("ptrs-PortIndex", ptrs_port_idx.to_string()); + } + j.write_fieldname("transmissionComb"); + tx_comb.to_json(j); + j.write_fieldname("resourceMapping"); + j.start_obj(); + j.write_int("startPosition", res_map.start_position); + j.write_str("nrofSymbols", res_map.nrof_symbols.to_string()); + j.write_str("repetitionFactor", res_map.repeat_factor.to_string()); + j.end_obj(); + j.write_int("freqDomainPosition", freq_domain_position); + j.write_int("freqDomainShift", freq_domain_shift); + j.write_fieldname("freqHopping"); + j.start_obj(); + j.write_int("c-SRS", freq_hop.c_srs); + j.write_int("b-SRS", freq_hop.b_srs); + j.write_int("b-hop", freq_hop.b_hop); + j.end_obj(); + j.write_str("groupOrSequenceHopping", group_or_seq_hop.to_string()); + j.write_fieldname("resourceType"); + res_type.to_json(j); + j.write_int("sequenceId", seq_id); + if (spatial_relation_info_present) { + j.write_fieldname("spatialRelationInfo"); + spatial_relation_info.to_json(j); + } j.end_obj(); } -void mob_from_nr_cmd_s::crit_exts_c_::destroy_() +std::string srs_res_s::nrof_srs_ports_opts::to_string() const +{ + 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 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 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 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_() { switch (type_) { - case types::mob_from_nr_cmd: - c.destroy(); + case types::n2: + c.destroy(); + break; + case types::n4: + c.destroy(); break; default: break; } } -void mob_from_nr_cmd_s::crit_exts_c_::set(types::options e) +void srs_res_s::tx_comb_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::mob_from_nr_cmd: - c.init(); + case types::n2: + c.init(); break; - case types::crit_exts_future: + case types::n4: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); } } -mob_from_nr_cmd_s::crit_exts_c_::crit_exts_c_(const mob_from_nr_cmd_s::crit_exts_c_& other) +srs_res_s::tx_comb_c_::tx_comb_c_(const srs_res_s::tx_comb_c_& other) { type_ = other.type(); switch (type_) { - case types::mob_from_nr_cmd: - c.init(other.c.get()); + case types::n2: + c.init(other.c.get()); break; - case types::crit_exts_future: + case types::n4: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); } } -mob_from_nr_cmd_s::crit_exts_c_& mob_from_nr_cmd_s::crit_exts_c_:: - operator=(const mob_from_nr_cmd_s::crit_exts_c_& other) +srs_res_s::tx_comb_c_& srs_res_s::tx_comb_c_::operator=(const srs_res_s::tx_comb_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::mob_from_nr_cmd: - c.set(other.c.get()); + case types::n2: + c.set(other.c.get()); break; - case types::crit_exts_future: + case types::n4: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); } return *this; } -void mob_from_nr_cmd_s::crit_exts_c_::to_json(json_writer& j) const +void srs_res_s::tx_comb_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::mob_from_nr_cmd: - j.write_fieldname("mobilityFromNRCommand"); - c.get().to_json(j); + case types::n2: + j.write_fieldname("n2"); + j.start_obj(); + j.write_int("combOffset-n2", c.get().comb_offset_n2); + j.write_int("cyclicShift-n2", c.get().cyclic_shift_n2); + j.end_obj(); break; - case types::crit_exts_future: + case types::n4: + j.write_fieldname("n4"); + j.start_obj(); + j.write_int("combOffset-n4", c.get().comb_offset_n4); + j.write_int("cyclicShift-n4", c.get().cyclic_shift_n4); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); } j.end_obj(); } -SRSASN_CODE mob_from_nr_cmd_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE srs_res_s::tx_comb_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::mob_from_nr_cmd: - HANDLE_CODE(c.get().pack(bref)); + case types::n2: + HANDLE_CODE(pack_integer(bref, c.get().comb_offset_n2, (uint8_t)0u, (uint8_t)1u)); + HANDLE_CODE(pack_integer(bref, c.get().cyclic_shift_n2, (uint8_t)0u, (uint8_t)7u)); break; - case types::crit_exts_future: + case types::n4: + HANDLE_CODE(pack_integer(bref, c.get().comb_offset_n4, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pack_integer(bref, c.get().cyclic_shift_n4, (uint8_t)0u, (uint8_t)11u)); break; default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE mob_from_nr_cmd_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE srs_res_s::tx_comb_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::mob_from_nr_cmd: - HANDLE_CODE(c.get().unpack(bref)); + case types::n2: + HANDLE_CODE(unpack_integer(c.get().comb_offset_n2, bref, (uint8_t)0u, (uint8_t)1u)); + HANDLE_CODE(unpack_integer(c.get().cyclic_shift_n2, bref, (uint8_t)0u, (uint8_t)7u)); break; - case types::crit_exts_future: + case types::n4: + HANDLE_CODE(unpack_integer(c.get().comb_offset_n4, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(unpack_integer(c.get().cyclic_shift_n4, bref, (uint8_t)0u, (uint8_t)11u)); break; default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::tx_comb_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string mob_from_nr_cmd_s::crit_exts_c_::types_opts::to_string() const +std::string srs_res_s::tx_comb_c_::types_opts::to_string() const { - static const char* options[] = {"mobilityFromNRCommand", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "mob_from_nr_cmd_s::crit_exts_c_::types"); + static const char* options[] = {"n2", "n4"}; + return convert_enum_idx(options, 2, value, "srs_res_s::tx_comb_c_::types"); } - -// RRCReconfiguration ::= SEQUENCE -SRSASN_CODE rrc_recfg_s::pack(bit_ref& bref) const +uint8_t srs_res_s::tx_comb_c_::types_opts::to_number() const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "srs_res_s::tx_comb_c_::types"); +} - return SRSASN_SUCCESS; +std::string srs_res_s::res_map_s_::nrof_symbols_opts::to_string() const +{ + static const char* options[] = {"n1", "n2", "n4"}; + return convert_enum_idx(options, 3, value, "srs_res_s::res_map_s_::nrof_symbols_e_"); } -SRSASN_CODE rrc_recfg_s::unpack(cbit_ref& bref) +uint8_t srs_res_s::res_map_s_::nrof_symbols_opts::to_number() const { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "srs_res_s::res_map_s_::nrof_symbols_e_"); +} - return SRSASN_SUCCESS; +std::string srs_res_s::res_map_s_::repeat_factor_opts::to_string() const +{ + static const char* options[] = {"n1", "n2", "n4"}; + return convert_enum_idx(options, 3, value, "srs_res_s::res_map_s_::repeat_factor_e_"); } -void rrc_recfg_s::to_json(json_writer& j) const +uint8_t srs_res_s::res_map_s_::repeat_factor_opts::to_number() const { - j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "srs_res_s::res_map_s_::repeat_factor_e_"); } -void rrc_recfg_s::crit_exts_c_::destroy_() +std::string srs_res_s::group_or_seq_hop_opts::to_string() const +{ + static const char* options[] = {"neither", "groupHopping", "sequenceHopping"}; + return convert_enum_idx(options, 3, value, "srs_res_s::group_or_seq_hop_e_"); +} + +void srs_res_s::res_type_c_::destroy_() { switch (type_) { - case types::rrc_recfg: - c.destroy(); + case types::aperiodic: + c.destroy(); + break; + case types::semi_persistent: + c.destroy(); + break; + case types::periodic: + c.destroy(); break; default: break; } } -void rrc_recfg_s::crit_exts_c_::set(types::options e) +void srs_res_s::res_type_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::rrc_recfg: - c.init(); + case types::aperiodic: + c.init(); break; - case types::crit_exts_future: + case types::semi_persistent: + c.init(); + break; + case types::periodic: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); } } -rrc_recfg_s::crit_exts_c_::crit_exts_c_(const rrc_recfg_s::crit_exts_c_& other) +srs_res_s::res_type_c_::res_type_c_(const srs_res_s::res_type_c_& other) { type_ = other.type(); switch (type_) { - case types::rrc_recfg: - c.init(other.c.get()); + case types::aperiodic: + c.init(other.c.get()); break; - case types::crit_exts_future: + case types::semi_persistent: + c.init(other.c.get()); + break; + case types::periodic: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); } } -rrc_recfg_s::crit_exts_c_& rrc_recfg_s::crit_exts_c_::operator=(const rrc_recfg_s::crit_exts_c_& other) +srs_res_s::res_type_c_& srs_res_s::res_type_c_::operator=(const srs_res_s::res_type_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_recfg: - c.set(other.c.get()); - break; - case types::crit_exts_future: + case types::aperiodic: + c.set(other.c.get()); + break; + case types::semi_persistent: + c.set(other.c.get()); + break; + case types::periodic: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); } return *this; } -void rrc_recfg_s::crit_exts_c_::to_json(json_writer& j) const +void srs_res_s::res_type_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_recfg: - j.write_fieldname("rrcReconfiguration"); - c.get().to_json(j); + case types::aperiodic: + j.write_fieldname("aperiodic"); + j.start_obj(); + j.end_obj(); break; - case types::crit_exts_future: + case types::semi_persistent: + j.write_fieldname("semi-persistent"); + j.start_obj(); + j.write_fieldname("periodicityAndOffset-sp"); + c.get().periodicity_and_offset_sp.to_json(j); + j.end_obj(); + break; + case types::periodic: + j.write_fieldname("periodic"); + j.start_obj(); + j.write_fieldname("periodicityAndOffset-p"); + c.get().periodicity_and_offset_p.to_json(j); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); } j.end_obj(); } -SRSASN_CODE rrc_recfg_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE srs_res_s::res_type_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rrc_recfg: - HANDLE_CODE(c.get().pack(bref)); + case types::aperiodic: + bref.pack(c.get().ext, 1); break; - case types::crit_exts_future: + case types::semi_persistent: + bref.pack(c.get().ext, 1); + HANDLE_CODE(c.get().periodicity_and_offset_sp.pack(bref)); + break; + case types::periodic: + bref.pack(c.get().ext, 1); + HANDLE_CODE(c.get().periodicity_and_offset_p.pack(bref)); break; default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_recfg_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE srs_res_s::res_type_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rrc_recfg: - HANDLE_CODE(c.get().unpack(bref)); + case types::aperiodic: + bref.unpack(c.get().ext, 1); break; - case types::crit_exts_future: + case types::semi_persistent: + bref.unpack(c.get().ext, 1); + HANDLE_CODE(c.get().periodicity_and_offset_sp.unpack(bref)); + break; + case types::periodic: + bref.unpack(c.get().ext, 1); + HANDLE_CODE(c.get().periodicity_and_offset_p.unpack(bref)); break; default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_s::res_type_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rrc_recfg_s::crit_exts_c_::types_opts::to_string() const +std::string srs_res_s::res_type_c_::types_opts::to_string() const { - static const char* options[] = {"rrcReconfiguration", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_recfg_s::crit_exts_c_::types"); + static const char* options[] = {"aperiodic", "semi-persistent", "periodic"}; + return convert_enum_idx(options, 3, value, "srs_res_s::res_type_c_::types"); } -// RRCReestablishment ::= SEQUENCE -SRSASN_CODE rrc_reest_s::pack(bit_ref& bref) const +// SRS-ResourceSet ::= SEQUENCE +SRSASN_CODE srs_res_set_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(srs_res_id_list_present, 1)); + HANDLE_CODE(bref.pack(alpha_present, 1)); + HANDLE_CODE(bref.pack(p0_present, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_present, 1)); + HANDLE_CODE(bref.pack(srs_pwr_ctrl_adjustment_states_present, 1)); + + HANDLE_CODE(pack_integer(bref, srs_res_set_id, (uint8_t)0u, (uint8_t)15u)); + if (srs_res_id_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_id_list, 1, 16, integer_packer(0, 63))); + } + HANDLE_CODE(res_type.pack(bref)); + HANDLE_CODE(usage.pack(bref)); + if (alpha_present) { + HANDLE_CODE(alpha.pack(bref)); + } + if (p0_present) { + HANDLE_CODE(pack_integer(bref, p0, (int16_t)-202, (int16_t)24)); + } + if (pathloss_ref_rs_present) { + HANDLE_CODE(pathloss_ref_rs.pack(bref)); + } + if (srs_pwr_ctrl_adjustment_states_present) { + HANDLE_CODE(srs_pwr_ctrl_adjustment_states.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_reest_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_res_set_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(srs_res_id_list_present, 1)); + HANDLE_CODE(bref.unpack(alpha_present, 1)); + HANDLE_CODE(bref.unpack(p0_present, 1)); + HANDLE_CODE(bref.unpack(pathloss_ref_rs_present, 1)); + HANDLE_CODE(bref.unpack(srs_pwr_ctrl_adjustment_states_present, 1)); + + HANDLE_CODE(unpack_integer(srs_res_set_id, bref, (uint8_t)0u, (uint8_t)15u)); + if (srs_res_id_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_res_id_list, bref, 1, 16, integer_packer(0, 63))); + } + HANDLE_CODE(res_type.unpack(bref)); + HANDLE_CODE(usage.unpack(bref)); + if (alpha_present) { + HANDLE_CODE(alpha.unpack(bref)); + } + if (p0_present) { + HANDLE_CODE(unpack_integer(p0, bref, (int16_t)-202, (int16_t)24)); + } + if (pathloss_ref_rs_present) { + HANDLE_CODE(pathloss_ref_rs.unpack(bref)); + } + if (srs_pwr_ctrl_adjustment_states_present) { + HANDLE_CODE(srs_pwr_ctrl_adjustment_states.unpack(bref)); + } return SRSASN_SUCCESS; } -void rrc_reest_s::to_json(json_writer& j) const +void srs_res_set_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_int("srs-ResourceSetId", srs_res_set_id); + if (srs_res_id_list_present) { + j.start_array("srs-ResourceIdList"); + for (const auto& e1 : srs_res_id_list) { + j.write_int(e1); + } + j.end_array(); + } + j.write_fieldname("resourceType"); + res_type.to_json(j); + j.write_str("usage", usage.to_string()); + if (alpha_present) { + j.write_str("alpha", alpha.to_string()); + } + if (p0_present) { + j.write_int("p0", p0); + } + if (pathloss_ref_rs_present) { + j.write_fieldname("pathlossReferenceRS"); + pathloss_ref_rs.to_json(j); + } + if (srs_pwr_ctrl_adjustment_states_present) { + j.write_str("srs-PowerControlAdjustmentStates", srs_pwr_ctrl_adjustment_states.to_string()); + } j.end_obj(); } -void rrc_reest_s::crit_exts_c_::destroy_() +void srs_res_set_s::res_type_c_::destroy_() { switch (type_) { - case types::rrc_reest: - c.destroy(); + case types::aperiodic: + c.destroy(); + break; + case types::semi_persistent: + c.destroy(); + break; + case types::periodic: + c.destroy(); break; default: break; } } -void rrc_reest_s::crit_exts_c_::set(types::options e) +void srs_res_set_s::res_type_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::rrc_reest: - c.init(); + case types::aperiodic: + c.init(); break; - case types::crit_exts_future: + case types::semi_persistent: + c.init(); + break; + case types::periodic: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); } } -rrc_reest_s::crit_exts_c_::crit_exts_c_(const rrc_reest_s::crit_exts_c_& other) +srs_res_set_s::res_type_c_::res_type_c_(const srs_res_set_s::res_type_c_& other) { type_ = other.type(); switch (type_) { - case types::rrc_reest: - c.init(other.c.get()); + case types::aperiodic: + c.init(other.c.get()); break; - case types::crit_exts_future: + case types::semi_persistent: + c.init(other.c.get()); + break; + case types::periodic: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); } } -rrc_reest_s::crit_exts_c_& rrc_reest_s::crit_exts_c_::operator=(const rrc_reest_s::crit_exts_c_& other) +srs_res_set_s::res_type_c_& srs_res_set_s::res_type_c_::operator=(const srs_res_set_s::res_type_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_reest: - c.set(other.c.get()); + case types::aperiodic: + c.set(other.c.get()); break; - case types::crit_exts_future: + case types::semi_persistent: + c.set(other.c.get()); + break; + case types::periodic: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); } return *this; } -void rrc_reest_s::crit_exts_c_::to_json(json_writer& j) const +void srs_res_set_s::res_type_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_reest: - j.write_fieldname("rrcReestablishment"); - c.get().to_json(j); + case types::aperiodic: + j.write_fieldname("aperiodic"); + c.get().to_json(j); break; - case types::crit_exts_future: + case types::semi_persistent: + j.write_fieldname("semi-persistent"); + j.start_obj(); + if (c.get().associated_csi_rs_present) { + j.write_int("associatedCSI-RS", c.get().associated_csi_rs); + } + j.end_obj(); + break; + case types::periodic: + j.write_fieldname("periodic"); + j.start_obj(); + if (c.get().associated_csi_rs_present) { + j.write_int("associatedCSI-RS", c.get().associated_csi_rs); + } + j.end_obj(); break; default: - log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); } j.end_obj(); } -SRSASN_CODE rrc_reest_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE srs_res_set_s::res_type_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rrc_reest: - HANDLE_CODE(c.get().pack(bref)); + case types::aperiodic: + HANDLE_CODE(c.get().pack(bref)); break; - case types::crit_exts_future: + case types::semi_persistent: + bref.pack(c.get().ext, 1); + HANDLE_CODE(bref.pack(c.get().associated_csi_rs_present, 1)); + if (c.get().associated_csi_rs_present) { + HANDLE_CODE(pack_integer(bref, c.get().associated_csi_rs, (uint8_t)0u, (uint8_t)191u)); + } + break; + case types::periodic: + bref.pack(c.get().ext, 1); + HANDLE_CODE(bref.pack(c.get().associated_csi_rs_present, 1)); + if (c.get().associated_csi_rs_present) { + HANDLE_CODE(pack_integer(bref, c.get().associated_csi_rs, (uint8_t)0u, (uint8_t)191u)); + } break; default: - log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_reest_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE srs_res_set_s::res_type_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rrc_reest: - HANDLE_CODE(c.get().unpack(bref)); + case types::aperiodic: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::crit_exts_future: + case types::semi_persistent: + bref.unpack(c.get().ext, 1); + HANDLE_CODE(bref.unpack(c.get().associated_csi_rs_present, 1)); + if (c.get().associated_csi_rs_present) { + HANDLE_CODE(unpack_integer(c.get().associated_csi_rs, bref, (uint8_t)0u, (uint8_t)191u)); + } + break; + case types::periodic: + bref.unpack(c.get().ext, 1); + HANDLE_CODE(bref.unpack(c.get().associated_csi_rs_present, 1)); + if (c.get().associated_csi_rs_present) { + HANDLE_CODE(unpack_integer(c.get().associated_csi_rs, bref, (uint8_t)0u, (uint8_t)191u)); + } break; default: - log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rrc_reest_s::crit_exts_c_::types_opts::to_string() const +SRSASN_CODE srs_res_set_s::res_type_c_::aperiodic_s_::pack(bit_ref& bref) const { - static const char* options[] = {"rrcReestablishment", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_reest_s::crit_exts_c_::types"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(csi_rs_present, 1)); + HANDLE_CODE(bref.pack(slot_offset_present, 1)); -// RRCRelease ::= SEQUENCE -SRSASN_CODE rrc_release_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + HANDLE_CODE(pack_integer(bref, aperiodic_srs_res_trigger, (uint8_t)1u, (uint8_t)3u)); + if (csi_rs_present) { + HANDLE_CODE(pack_integer(bref, csi_rs, (uint8_t)0u, (uint8_t)191u)); + } + if (slot_offset_present) { + HANDLE_CODE(pack_integer(bref, slot_offset, (uint8_t)1u, (uint8_t)32u)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= aperiodic_srs_res_trigger_list.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(bref.pack(aperiodic_srs_res_trigger_list.is_present(), 1)); + if (aperiodic_srs_res_trigger_list.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *aperiodic_srs_res_trigger_list, 1, 2, integer_packer(1, 3))); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_release_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_res_set_s::res_type_c_::aperiodic_s_::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(csi_rs_present, 1)); + HANDLE_CODE(bref.unpack(slot_offset_present, 1)); + + HANDLE_CODE(unpack_integer(aperiodic_srs_res_trigger, bref, (uint8_t)1u, (uint8_t)3u)); + if (csi_rs_present) { + HANDLE_CODE(unpack_integer(csi_rs, bref, (uint8_t)0u, (uint8_t)191u)); + } + if (slot_offset_present) { + HANDLE_CODE(unpack_integer(slot_offset, bref, (uint8_t)1u, (uint8_t)32u)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool aperiodic_srs_res_trigger_list_present; + HANDLE_CODE(bref.unpack(aperiodic_srs_res_trigger_list_present, 1)); + aperiodic_srs_res_trigger_list.set_present(aperiodic_srs_res_trigger_list_present); + if (aperiodic_srs_res_trigger_list.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*aperiodic_srs_res_trigger_list, bref, 1, 2, integer_packer(1, 3))); + } + } + } return SRSASN_SUCCESS; } -void rrc_release_s::to_json(json_writer& j) const +void srs_res_set_s::res_type_c_::aperiodic_s_::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_int("aperiodicSRS-ResourceTrigger", aperiodic_srs_res_trigger); + if (csi_rs_present) { + j.write_int("csi-RS", csi_rs); + } + if (slot_offset_present) { + j.write_int("slotOffset", slot_offset); + } + if (ext) { + if (aperiodic_srs_res_trigger_list.is_present()) { + j.start_array("aperiodicSRS-ResourceTriggerList"); + for (const auto& e1 : *aperiodic_srs_res_trigger_list) { + j.write_int(e1); + } + j.end_array(); + } + } j.end_obj(); } -void rrc_release_s::crit_exts_c_::destroy_() +std::string srs_res_set_s::res_type_c_::types_opts::to_string() const { - switch (type_) { - case types::rrc_release: - c.destroy(); - break; - default: - break; - } + static const char* options[] = {"aperiodic", "semi-persistent", "periodic"}; + return convert_enum_idx(options, 3, value, "srs_res_set_s::res_type_c_::types"); } -void rrc_release_s::crit_exts_c_::set(types::options e) + +std::string srs_res_set_s::usage_opts::to_string() const +{ + static const char* options[] = {"beamManagement", "codebook", "nonCodebook", "antennaSwitching"}; + return convert_enum_idx(options, 4, value, "srs_res_set_s::usage_e_"); +} + +void srs_res_set_s::pathloss_ref_rs_c_::destroy_() {} +void srs_res_set_s::pathloss_ref_rs_c_::set(types::options e) { destroy_(); type_ = e; - switch (type_) { - case types::rrc_release: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); - } } -rrc_release_s::crit_exts_c_::crit_exts_c_(const rrc_release_s::crit_exts_c_& other) +srs_res_set_s::pathloss_ref_rs_c_::pathloss_ref_rs_c_(const srs_res_set_s::pathloss_ref_rs_c_& other) { type_ = other.type(); switch (type_) { - case types::rrc_release: - c.init(other.c.get()); + case types::ssb_idx: + c.init(other.c.get()); break; - case types::crit_exts_future: + case types::csi_rs_idx: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); } } -rrc_release_s::crit_exts_c_& rrc_release_s::crit_exts_c_::operator=(const rrc_release_s::crit_exts_c_& other) +srs_res_set_s::pathloss_ref_rs_c_& +srs_res_set_s::pathloss_ref_rs_c_::operator=(const srs_res_set_s::pathloss_ref_rs_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_release: - c.set(other.c.get()); + case types::ssb_idx: + c.set(other.c.get()); break; - case types::crit_exts_future: + case types::csi_rs_idx: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); } return *this; } -void rrc_release_s::crit_exts_c_::to_json(json_writer& j) const +void srs_res_set_s::pathloss_ref_rs_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_release: - j.write_fieldname("rrcRelease"); - c.get().to_json(j); + case types::ssb_idx: + j.write_int("ssb-Index", c.get()); break; - case types::crit_exts_future: + case types::csi_rs_idx: + j.write_int("csi-RS-Index", c.get()); break; default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); } j.end_obj(); } -SRSASN_CODE rrc_release_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE srs_res_set_s::pathloss_ref_rs_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rrc_release: - HANDLE_CODE(c.get().pack(bref)); + case types::ssb_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); break; - case types::crit_exts_future: + case types::csi_rs_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); break; default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_release_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE srs_res_set_s::pathloss_ref_rs_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rrc_release: - HANDLE_CODE(c.get().unpack(bref)); + case types::ssb_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); break; - case types::crit_exts_future: + case types::csi_rs_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); break; default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_res_set_s::pathloss_ref_rs_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rrc_release_s::crit_exts_c_::types_opts::to_string() const +std::string srs_res_set_s::pathloss_ref_rs_c_::types_opts::to_string() const { - static const char* options[] = {"rrcRelease", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_release_s::crit_exts_c_::types"); + 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"); } -// RRCResume ::= SEQUENCE -SRSASN_CODE rrc_resume_s::pack(bit_ref& bref) const +std::string srs_res_set_s::srs_pwr_ctrl_adjustment_states_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + 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 const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "srs_res_set_s::srs_pwr_ctrl_adjustment_states_e_"); +} + +// SchedulingRequestResourceConfig ::= SEQUENCE +SRSASN_CODE sched_request_res_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(periodicity_and_offset_present, 1)); + HANDLE_CODE(bref.pack(res_present, 1)); + + HANDLE_CODE(pack_integer(bref, sched_request_res_id, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_integer(bref, sched_request_id, (uint8_t)0u, (uint8_t)7u)); + if (periodicity_and_offset_present) { + HANDLE_CODE(periodicity_and_offset.pack(bref)); + } + if (res_present) { + HANDLE_CODE(pack_integer(bref, res, (uint8_t)0u, (uint8_t)127u)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_resume_s::unpack(cbit_ref& bref) +SRSASN_CODE sched_request_res_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + HANDLE_CODE(bref.unpack(periodicity_and_offset_present, 1)); + HANDLE_CODE(bref.unpack(res_present, 1)); + + HANDLE_CODE(unpack_integer(sched_request_res_id, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_integer(sched_request_id, bref, (uint8_t)0u, (uint8_t)7u)); + if (periodicity_and_offset_present) { + HANDLE_CODE(periodicity_and_offset.unpack(bref)); + } + if (res_present) { + HANDLE_CODE(unpack_integer(res, bref, (uint8_t)0u, (uint8_t)127u)); + } return SRSASN_SUCCESS; } -void rrc_resume_s::to_json(json_writer& j) const +void sched_request_res_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_int("schedulingRequestResourceId", sched_request_res_id); + j.write_int("schedulingRequestID", sched_request_id); + if (periodicity_and_offset_present) { + j.write_fieldname("periodicityAndOffset"); + periodicity_and_offset.to_json(j); + } + if (res_present) { + j.write_int("resource", res); + } j.end_obj(); } -void rrc_resume_s::crit_exts_c_::destroy_() -{ - switch (type_) { - case types::rrc_resume: - c.destroy(); - break; - default: - break; - } -} -void rrc_resume_s::crit_exts_c_::set(types::options e) +void sched_request_res_cfg_s::periodicity_and_offset_c_::destroy_() {} +void sched_request_res_cfg_s::periodicity_and_offset_c_::set(types::options e) { destroy_(); type_ = e; - switch (type_) { - case types::rrc_resume: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); - } } -rrc_resume_s::crit_exts_c_::crit_exts_c_(const rrc_resume_s::crit_exts_c_& other) +sched_request_res_cfg_s::periodicity_and_offset_c_::periodicity_and_offset_c_( + const sched_request_res_cfg_s::periodicity_and_offset_c_& other) { type_ = other.type(); switch (type_) { - case types::rrc_resume: - c.init(other.c.get()); + case types::sym2: break; - case types::crit_exts_future: + case types::sym6or7: + break; + case types::sl1: + break; + case types::sl2: + c.init(other.c.get()); + break; + case types::sl4: + c.init(other.c.get()); + break; + case types::sl5: + c.init(other.c.get()); + break; + case types::sl8: + c.init(other.c.get()); + break; + case types::sl10: + c.init(other.c.get()); + break; + case types::sl16: + c.init(other.c.get()); + break; + case types::sl20: + c.init(other.c.get()); + break; + case types::sl40: + c.init(other.c.get()); + break; + case types::sl80: + c.init(other.c.get()); + break; + case types::sl160: + c.init(other.c.get()); + break; + case types::sl320: + c.init(other.c.get()); + break; + case types::sl640: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); + log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); } } -rrc_resume_s::crit_exts_c_& rrc_resume_s::crit_exts_c_::operator=(const rrc_resume_s::crit_exts_c_& other) +sched_request_res_cfg_s::periodicity_and_offset_c_& sched_request_res_cfg_s::periodicity_and_offset_c_::operator=( + const sched_request_res_cfg_s::periodicity_and_offset_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_resume: - c.set(other.c.get()); + case types::sym2: break; - case types::crit_exts_future: + case types::sym6or7: + break; + case types::sl1: + break; + case types::sl2: + c.set(other.c.get()); + break; + case types::sl4: + c.set(other.c.get()); + break; + case types::sl5: + c.set(other.c.get()); + break; + case types::sl8: + c.set(other.c.get()); + break; + case types::sl10: + c.set(other.c.get()); + break; + case types::sl16: + c.set(other.c.get()); + break; + case types::sl20: + c.set(other.c.get()); + break; + case types::sl40: + c.set(other.c.get()); + break; + case types::sl80: + c.set(other.c.get()); + break; + case types::sl160: + c.set(other.c.get()); + break; + case types::sl320: + c.set(other.c.get()); + break; + case types::sl640: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); + log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); } return *this; } -void rrc_resume_s::crit_exts_c_::to_json(json_writer& j) const +void sched_request_res_cfg_s::periodicity_and_offset_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_resume: - j.write_fieldname("rrcResume"); - c.get().to_json(j); + case types::sym2: break; - case types::crit_exts_future: + case types::sym6or7: break; - default: - log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_resume_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_resume: - HANDLE_CODE(c.get().pack(bref)); + case types::sl1: break; - case types::crit_exts_future: + case types::sl2: + j.write_int("sl2", c.get()); break; - default: - log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_resume: - HANDLE_CODE(c.get().unpack(bref)); + case types::sl4: + j.write_int("sl4", c.get()); break; - case types::crit_exts_future: + case types::sl5: + j.write_int("sl5", c.get()); + break; + case types::sl8: + j.write_int("sl8", c.get()); + break; + case types::sl10: + j.write_int("sl10", c.get()); + break; + case types::sl16: + j.write_int("sl16", c.get()); + break; + case types::sl20: + j.write_int("sl20", c.get()); + break; + case types::sl40: + j.write_int("sl40", c.get()); + break; + case types::sl80: + j.write_int("sl80", c.get()); + break; + case types::sl160: + j.write_int("sl160", c.get()); + break; + case types::sl320: + j.write_int("sl320", c.get()); + break; + case types::sl640: + j.write_int("sl640", c.get()); break; default: - log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; + log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); } - return SRSASN_SUCCESS; -} - -std::string rrc_resume_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* options[] = {"rrcResume", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_resume_s::crit_exts_c_::types"); -} - -// SecurityModeCommand ::= SEQUENCE -SRSASN_CODE security_mode_cmd_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_mode_cmd_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void security_mode_cmd_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); j.end_obj(); } - -void security_mode_cmd_s::crit_exts_c_::destroy_() +SRSASN_CODE sched_request_res_cfg_s::periodicity_and_offset_c_::pack(bit_ref& bref) const { + type_.pack(bref); switch (type_) { - case types::security_mode_cmd: - c.destroy(); + case types::sym2: break; - default: + case types::sym6or7: break; - } -} -void security_mode_cmd_s::crit_exts_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::security_mode_cmd: - c.init(); + case types::sl1: break; - case types::crit_exts_future: + case types::sl2: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)1u)); break; - case types::nulltype: + case types::sl4: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); break; - default: - log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); - } -} -security_mode_cmd_s::crit_exts_c_::crit_exts_c_(const security_mode_cmd_s::crit_exts_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::security_mode_cmd: - c.init(other.c.get()); + case types::sl5: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); break; - case types::crit_exts_future: + case types::sl8: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); break; - case types::nulltype: + case types::sl10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); break; - default: - log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); - } -} -security_mode_cmd_s::crit_exts_c_& security_mode_cmd_s::crit_exts_c_:: - operator=(const security_mode_cmd_s::crit_exts_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::security_mode_cmd: - c.set(other.c.get()); + case types::sl16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); break; - case types::crit_exts_future: + case types::sl20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); break; - case types::nulltype: + case types::sl40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); break; - default: - log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); - } - - return *this; -} -void security_mode_cmd_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::security_mode_cmd: - j.write_fieldname("securityModeCommand"); - c.get().to_json(j); + case types::sl80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); break; - case types::crit_exts_future: + case types::sl160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); break; - default: - log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE security_mode_cmd_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::security_mode_cmd: - HANDLE_CODE(c.get().pack(bref)); + case types::sl320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); break; - case types::crit_exts_future: + case types::sl640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); break; default: - log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE security_mode_cmd_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE sched_request_res_cfg_s::periodicity_and_offset_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::security_mode_cmd: - HANDLE_CODE(c.get().unpack(bref)); + case types::sym2: break; - case types::crit_exts_future: + case types::sym6or7: + break; + case types::sl1: + break; + case types::sl2: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)1u)); + break; + case types::sl4: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); + break; + case types::sl5: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); + break; + case types::sl8: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); + break; + case types::sl10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::sl16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::sl20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::sl40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::sl80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::sl160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::sl320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::sl640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); break; default: - log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string security_mode_cmd_s::crit_exts_c_::types_opts::to_string() const +std::string sched_request_res_cfg_s::periodicity_and_offset_c_::types_opts::to_string() const { - static const char* options[] = {"securityModeCommand", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "security_mode_cmd_s::crit_exts_c_::types"); + 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"); } -// UECapabilityEnquiry ::= SEQUENCE -SRSASN_CODE ue_cap_enquiry_s::pack(bit_ref& bref) const +// UCI-OnPUSCH ::= SEQUENCE +SRSASN_CODE uci_on_pusch_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + HANDLE_CODE(bref.pack(beta_offsets_present, 1)); + + if (beta_offsets_present) { + HANDLE_CODE(beta_offsets.pack(bref)); + } + HANDLE_CODE(scaling.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ue_cap_enquiry_s::unpack(cbit_ref& bref) +SRSASN_CODE uci_on_pusch_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + HANDLE_CODE(bref.unpack(beta_offsets_present, 1)); + + if (beta_offsets_present) { + HANDLE_CODE(beta_offsets.unpack(bref)); + } + HANDLE_CODE(scaling.unpack(bref)); return SRSASN_SUCCESS; } -void ue_cap_enquiry_s::to_json(json_writer& j) const +void uci_on_pusch_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + if (beta_offsets_present) { + j.write_fieldname("betaOffsets"); + beta_offsets.to_json(j); + } + j.write_str("scaling", scaling.to_string()); j.end_obj(); } -void ue_cap_enquiry_s::crit_exts_c_::destroy_() +void uci_on_pusch_s::beta_offsets_c_::destroy_() { switch (type_) { - case types::ue_cap_enquiry: - c.destroy(); + case types::dynamic_type: + c.destroy(); + break; + case types::semi_static: + c.destroy(); break; default: break; } } -void ue_cap_enquiry_s::crit_exts_c_::set(types::options e) +void uci_on_pusch_s::beta_offsets_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ue_cap_enquiry: - c.init(); + case types::dynamic_type: + c.init(); break; - case types::crit_exts_future: + case types::semi_static: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); } } -ue_cap_enquiry_s::crit_exts_c_::crit_exts_c_(const ue_cap_enquiry_s::crit_exts_c_& other) +uci_on_pusch_s::beta_offsets_c_::beta_offsets_c_(const uci_on_pusch_s::beta_offsets_c_& other) { type_ = other.type(); switch (type_) { - case types::ue_cap_enquiry: - c.init(other.c.get()); + case types::dynamic_type: + c.init(other.c.get()); break; - case types::crit_exts_future: + case types::semi_static: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); } } -ue_cap_enquiry_s::crit_exts_c_& ue_cap_enquiry_s::crit_exts_c_::operator=(const ue_cap_enquiry_s::crit_exts_c_& other) +uci_on_pusch_s::beta_offsets_c_& +uci_on_pusch_s::beta_offsets_c_::operator=(const uci_on_pusch_s::beta_offsets_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ue_cap_enquiry: - c.set(other.c.get()); + case types::dynamic_type: + c.set(other.c.get()); break; - case types::crit_exts_future: + case types::semi_static: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); } return *this; } -void ue_cap_enquiry_s::crit_exts_c_::to_json(json_writer& j) const +void uci_on_pusch_s::beta_offsets_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ue_cap_enquiry: - j.write_fieldname("ueCapabilityEnquiry"); - c.get().to_json(j); + case types::dynamic_type: + j.start_array("dynamic"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); break; - case types::crit_exts_future: + case types::semi_static: + j.write_fieldname("semiStatic"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); } j.end_obj(); } -SRSASN_CODE ue_cap_enquiry_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ue_cap_enquiry: - HANDLE_CODE(c.get().pack(bref)); + case types::dynamic_type: + HANDLE_CODE(pack_fixed_seq_of(bref, &(c.get())[0], c.get().size())); break; - case types::crit_exts_future: + case types::semi_static: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE ue_cap_enquiry_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ue_cap_enquiry: - HANDLE_CODE(c.get().unpack(bref)); + case types::dynamic_type: + HANDLE_CODE(unpack_fixed_seq_of(&(c.get())[0], bref, c.get().size())); break; - case types::crit_exts_future: + case types::semi_static: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string ue_cap_enquiry_s::crit_exts_c_::types_opts::to_string() const +std::string uci_on_pusch_s::beta_offsets_c_::types_opts::to_string() const { - static const char* options[] = {"ueCapabilityEnquiry", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "ue_cap_enquiry_s::crit_exts_c_::types"); + static const char* options[] = {"dynamic", "semiStatic"}; + return convert_enum_idx(options, 2, value, "uci_on_pusch_s::beta_offsets_c_::types"); } -// DL-DCCH-MessageType ::= CHOICE -void dl_dcch_msg_type_c::destroy_() +std::string uci_on_pusch_s::scaling_opts::to_string() const { - switch (type_) { - case types::c1: - c.destroy(); - break; - default: - break; - } + static const char* options[] = {"f0p5", "f0p65", "f0p8", "f1"}; + return convert_enum_idx(options, 4, value, "uci_on_pusch_s::scaling_e_"); } -void dl_dcch_msg_type_c::set(types::options e) + +// BeamFailureRecoveryConfig ::= SEQUENCE +SRSASN_CODE beam_fail_recovery_cfg_s::pack(bit_ref& bref) const { - destroy_(); - type_ = e; - switch (type_) { - case types::c1: - c.init(); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(root_seq_idx_bfr_present, 1)); + HANDLE_CODE(bref.pack(rach_cfg_bfr_present, 1)); + HANDLE_CODE(bref.pack(rsrp_thres_ssb_present, 1)); + HANDLE_CODE(bref.pack(candidate_beam_rs_list_present, 1)); + HANDLE_CODE(bref.pack(ssb_per_rach_occasion_present, 1)); + HANDLE_CODE(bref.pack(ra_ssb_occasion_mask_idx_present, 1)); + HANDLE_CODE(bref.pack(recovery_search_space_id_present, 1)); + HANDLE_CODE(bref.pack(ra_prioritization_present, 1)); + HANDLE_CODE(bref.pack(beam_fail_recovery_timer_present, 1)); + + if (root_seq_idx_bfr_present) { + HANDLE_CODE(pack_integer(bref, root_seq_idx_bfr, (uint8_t)0u, (uint8_t)137u)); } -} -dl_dcch_msg_type_c::dl_dcch_msg_type_c(const dl_dcch_msg_type_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::c1: - c.init(other.c.get()); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + if (rach_cfg_bfr_present) { + HANDLE_CODE(rach_cfg_bfr.pack(bref)); + } + if (rsrp_thres_ssb_present) { + HANDLE_CODE(pack_integer(bref, rsrp_thres_ssb, (uint8_t)0u, (uint8_t)127u)); + } + if (candidate_beam_rs_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_beam_rs_list, 1, 16)); + } + if (ssb_per_rach_occasion_present) { + HANDLE_CODE(ssb_per_rach_occasion.pack(bref)); + } + if (ra_ssb_occasion_mask_idx_present) { + HANDLE_CODE(pack_integer(bref, ra_ssb_occasion_mask_idx, (uint8_t)0u, (uint8_t)15u)); + } + if (recovery_search_space_id_present) { + HANDLE_CODE(pack_integer(bref, recovery_search_space_id, (uint8_t)0u, (uint8_t)39u)); + } + if (ra_prioritization_present) { + HANDLE_CODE(ra_prioritization.pack(bref)); + } + if (beam_fail_recovery_timer_present) { + HANDLE_CODE(beam_fail_recovery_timer.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= msg1_subcarrier_spacing_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(msg1_subcarrier_spacing_present, 1)); + if (msg1_subcarrier_spacing_present) { + HANDLE_CODE(msg1_subcarrier_spacing.pack(bref)); + } + } } + return SRSASN_SUCCESS; } -dl_dcch_msg_type_c& dl_dcch_msg_type_c::operator=(const dl_dcch_msg_type_c& other) +SRSASN_CODE beam_fail_recovery_cfg_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(root_seq_idx_bfr_present, 1)); + HANDLE_CODE(bref.unpack(rach_cfg_bfr_present, 1)); + HANDLE_CODE(bref.unpack(rsrp_thres_ssb_present, 1)); + HANDLE_CODE(bref.unpack(candidate_beam_rs_list_present, 1)); + HANDLE_CODE(bref.unpack(ssb_per_rach_occasion_present, 1)); + HANDLE_CODE(bref.unpack(ra_ssb_occasion_mask_idx_present, 1)); + HANDLE_CODE(bref.unpack(recovery_search_space_id_present, 1)); + HANDLE_CODE(bref.unpack(ra_prioritization_present, 1)); + HANDLE_CODE(bref.unpack(beam_fail_recovery_timer_present, 1)); + + if (root_seq_idx_bfr_present) { + HANDLE_CODE(unpack_integer(root_seq_idx_bfr, bref, (uint8_t)0u, (uint8_t)137u)); } - set(other.type()); - switch (type_) { - case types::c1: - c.set(other.c.get()); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + if (rach_cfg_bfr_present) { + HANDLE_CODE(rach_cfg_bfr.unpack(bref)); + } + if (rsrp_thres_ssb_present) { + HANDLE_CODE(unpack_integer(rsrp_thres_ssb, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (candidate_beam_rs_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(candidate_beam_rs_list, bref, 1, 16)); + } + if (ssb_per_rach_occasion_present) { + HANDLE_CODE(ssb_per_rach_occasion.unpack(bref)); + } + if (ra_ssb_occasion_mask_idx_present) { + HANDLE_CODE(unpack_integer(ra_ssb_occasion_mask_idx, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (recovery_search_space_id_present) { + HANDLE_CODE(unpack_integer(recovery_search_space_id, bref, (uint8_t)0u, (uint8_t)39u)); + } + if (ra_prioritization_present) { + HANDLE_CODE(ra_prioritization.unpack(bref)); + } + if (beam_fail_recovery_timer_present) { + HANDLE_CODE(beam_fail_recovery_timer.unpack(bref)); } - return *this; + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(msg1_subcarrier_spacing_present, 1)); + if (msg1_subcarrier_spacing_present) { + HANDLE_CODE(msg1_subcarrier_spacing.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; } -void dl_dcch_msg_type_c::to_json(json_writer& j) const +void beam_fail_recovery_cfg_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.get().to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + if (root_seq_idx_bfr_present) { + j.write_int("rootSequenceIndex-BFR", root_seq_idx_bfr); + } + if (rach_cfg_bfr_present) { + j.write_fieldname("rach-ConfigBFR"); + rach_cfg_bfr.to_json(j); + } + if (rsrp_thres_ssb_present) { + j.write_int("rsrp-ThresholdSSB", rsrp_thres_ssb); + } + if (candidate_beam_rs_list_present) { + j.start_array("candidateBeamRSList"); + for (const auto& e1 : candidate_beam_rs_list) { + e1.to_json(j); + } + j.end_array(); + } + if (ssb_per_rach_occasion_present) { + j.write_str("ssb-perRACH-Occasion", ssb_per_rach_occasion.to_string()); + } + if (ra_ssb_occasion_mask_idx_present) { + j.write_int("ra-ssb-OccasionMaskIndex", ra_ssb_occasion_mask_idx); + } + if (recovery_search_space_id_present) { + j.write_int("recoverySearchSpaceId", recovery_search_space_id); + } + if (ra_prioritization_present) { + j.write_fieldname("ra-Prioritization"); + ra_prioritization.to_json(j); + } + if (beam_fail_recovery_timer_present) { + j.write_str("beamFailureRecoveryTimer", beam_fail_recovery_timer.to_string()); + } + if (ext) { + if (msg1_subcarrier_spacing_present) { + j.write_str("msg1-SubcarrierSpacing", msg1_subcarrier_spacing.to_string()); + } } j.end_obj(); } -SRSASN_CODE dl_dcch_msg_type_c::pack(bit_ref& bref) const + +std::string beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_string() const { - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE dl_dcch_msg_type_c::unpack(cbit_ref& bref) +float beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + 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_"); } - -void dl_dcch_msg_type_c::c1_c_::destroy_() +std::string beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number_string() const { - switch (type_) { - case types::rrc_recfg: - c.destroy(); - break; - case types::rrc_resume: - c.destroy(); - break; - case types::rrc_release: - c.destroy(); - break; - case types::rrc_reest: - c.destroy(); - break; - case types::security_mode_cmd: - c.destroy(); - break; - case types::dl_info_transfer: - c.destroy(); - break; - case types::ue_cap_enquiry: - c.destroy(); - break; - case types::counter_check: - c.destroy(); - break; - case types::mob_from_nr_cmd: - c.destroy(); - break; - default: - break; - } + 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_"); } -void dl_dcch_msg_type_c::c1_c_::set(types::options e) + +std::string beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_string() const { - destroy_(); - type_ = e; - switch (type_) { - case types::rrc_recfg: - c.init(); - break; - case types::rrc_resume: - c.init(); - break; - case types::rrc_release: - c.init(); - break; - case types::rrc_reest: - c.init(); - break; - case types::security_mode_cmd: - c.init(); - break; - case types::dl_info_transfer: - c.init(); - break; - case types::ue_cap_enquiry: - c.init(); - break; - case types::counter_check: - c.init(); - break; - case types::mob_from_nr_cmd: - c.init(); - break; - case types::spare7: - break; - case types::spare6: - break; - case types::spare5: - break; - case types::spare4: - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); - } + 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_"); } -dl_dcch_msg_type_c::c1_c_::c1_c_(const dl_dcch_msg_type_c::c1_c_& other) +uint8_t beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_number() const { - type_ = other.type(); - switch (type_) { - case types::rrc_recfg: - c.init(other.c.get()); - break; - case types::rrc_resume: - c.init(other.c.get()); - break; - case types::rrc_release: - c.init(other.c.get()); - break; - case types::rrc_reest: - c.init(other.c.get()); - break; - case types::security_mode_cmd: - c.init(other.c.get()); - break; - case types::dl_info_transfer: - c.init(other.c.get()); - break; - case types::ue_cap_enquiry: - c.init(other.c.get()); - break; - case types::counter_check: - c.init(other.c.get()); - break; - case types::mob_from_nr_cmd: - c.init(other.c.get()); - break; - case types::spare7: - break; - case types::spare6: - break; - case types::spare5: - break; - case types::spare4: - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); - } + 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_"); } -dl_dcch_msg_type_c::c1_c_& dl_dcch_msg_type_c::c1_c_::operator=(const dl_dcch_msg_type_c::c1_c_& other) + +// ConfiguredGrantConfig ::= SEQUENCE +SRSASN_CODE cfgured_grant_cfg_s::pack(bit_ref& bref) const { - if (this == &other) { - return *this; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(freq_hop_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_transform_precoder_present, 1)); + HANDLE_CODE(bref.pack(uci_on_pusch_present, 1)); + HANDLE_CODE(bref.pack(rbg_size_present, 1)); + HANDLE_CODE(bref.pack(transform_precoder_present, 1)); + HANDLE_CODE(bref.pack(rep_k_rv_present, 1)); + HANDLE_CODE(bref.pack(cfgured_grant_timer_present, 1)); + HANDLE_CODE(bref.pack(rrc_cfgured_ul_grant_present, 1)); + + if (freq_hop_present) { + HANDLE_CODE(freq_hop.pack(bref)); } - set(other.type()); - switch (type_) { - case types::rrc_recfg: - c.set(other.c.get()); - break; - case types::rrc_resume: - c.set(other.c.get()); - break; - case types::rrc_release: - c.set(other.c.get()); - break; - case types::rrc_reest: - c.set(other.c.get()); - break; - case types::security_mode_cmd: - c.set(other.c.get()); - break; - case types::dl_info_transfer: - c.set(other.c.get()); - break; - case types::ue_cap_enquiry: - c.set(other.c.get()); - break; - case types::counter_check: - c.set(other.c.get()); - break; - case types::mob_from_nr_cmd: - c.set(other.c.get()); - break; - case types::spare7: - break; - case types::spare6: - break; - case types::spare5: - break; - case types::spare4: - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + HANDLE_CODE(cg_dmrs_cfg.pack(bref)); + if (mcs_table_present) { + HANDLE_CODE(mcs_table.pack(bref)); + } + if (mcs_table_transform_precoder_present) { + HANDLE_CODE(mcs_table_transform_precoder.pack(bref)); + } + if (uci_on_pusch_present) { + HANDLE_CODE(uci_on_pusch.pack(bref)); + } + HANDLE_CODE(res_alloc.pack(bref)); + HANDLE_CODE(pwr_ctrl_loop_to_use.pack(bref)); + HANDLE_CODE(pack_integer(bref, p0_pusch_alpha, (uint8_t)0u, (uint8_t)29u)); + if (transform_precoder_present) { + HANDLE_CODE(transform_precoder.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, nrof_harq_processes, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(rep_k.pack(bref)); + if (rep_k_rv_present) { + HANDLE_CODE(rep_k_rv.pack(bref)); + } + HANDLE_CODE(periodicity.pack(bref)); + if (cfgured_grant_timer_present) { + HANDLE_CODE(pack_integer(bref, cfgured_grant_timer, (uint8_t)1u, (uint8_t)64u)); + } + if (rrc_cfgured_ul_grant_present) { + bref.pack(rrc_cfgured_ul_grant.ext, 1); + HANDLE_CODE(bref.pack(rrc_cfgured_ul_grant.dmrs_seq_initization_present, 1)); + HANDLE_CODE(bref.pack(rrc_cfgured_ul_grant.srs_res_ind_present, 1)); + HANDLE_CODE(bref.pack(rrc_cfgured_ul_grant.freq_hop_offset_present, 1)); + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.time_domain_offset, (uint16_t)0u, (uint16_t)5119u)); + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.time_domain_alloc, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(rrc_cfgured_ul_grant.freq_domain_alloc.pack(bref)); + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.ant_port, (uint8_t)0u, (uint8_t)31u)); + if (rrc_cfgured_ul_grant.dmrs_seq_initization_present) { + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.dmrs_seq_initization, (uint8_t)0u, (uint8_t)1u)); + } + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.precoding_and_nof_layers, (uint8_t)0u, (uint8_t)63u)); + if (rrc_cfgured_ul_grant.srs_res_ind_present) { + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.srs_res_ind, (uint8_t)0u, (uint8_t)15u)); + } + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.mcs_and_tbs, (uint8_t)0u, (uint8_t)31u)); + if (rrc_cfgured_ul_grant.freq_hop_offset_present) { + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.freq_hop_offset, (uint16_t)1u, (uint16_t)274u)); + } + HANDLE_CODE(pack_integer(bref, rrc_cfgured_ul_grant.pathloss_ref_idx, (uint8_t)0u, (uint8_t)3u)); } - return *this; + return SRSASN_SUCCESS; } -void dl_dcch_msg_type_c::c1_c_::to_json(json_writer& j) const +SRSASN_CODE cfgured_grant_cfg_s::unpack(cbit_ref& bref) { - j.start_obj(); - switch (type_) { - case types::rrc_recfg: - j.write_fieldname("rrcReconfiguration"); - c.get().to_json(j); - break; - case types::rrc_resume: - j.write_fieldname("rrcResume"); - c.get().to_json(j); - break; - case types::rrc_release: - j.write_fieldname("rrcRelease"); - c.get().to_json(j); - break; - case types::rrc_reest: - j.write_fieldname("rrcReestablishment"); - c.get().to_json(j); - break; - case types::security_mode_cmd: - j.write_fieldname("securityModeCommand"); - c.get().to_json(j); - break; - case types::dl_info_transfer: - j.write_fieldname("dlInformationTransfer"); - c.get().to_json(j); - break; - case types::ue_cap_enquiry: - j.write_fieldname("ueCapabilityEnquiry"); - c.get().to_json(j); - break; - case types::counter_check: - j.write_fieldname("counterCheck"); - c.get().to_json(j); - break; - case types::mob_from_nr_cmd: - j.write_fieldname("mobilityFromNRCommand"); - c.get().to_json(j); - break; - case types::spare7: - break; - case types::spare6: - break; - case types::spare5: - break; - case types::spare4: - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(freq_hop_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_transform_precoder_present, 1)); + HANDLE_CODE(bref.unpack(uci_on_pusch_present, 1)); + HANDLE_CODE(bref.unpack(rbg_size_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoder_present, 1)); + HANDLE_CODE(bref.unpack(rep_k_rv_present, 1)); + HANDLE_CODE(bref.unpack(cfgured_grant_timer_present, 1)); + HANDLE_CODE(bref.unpack(rrc_cfgured_ul_grant_present, 1)); + + if (freq_hop_present) { + HANDLE_CODE(freq_hop.unpack(bref)); } - j.end_obj(); -} -SRSASN_CODE dl_dcch_msg_type_c::c1_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_recfg: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_resume: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_release: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_reest: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::security_mode_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_info_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_cap_enquiry: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::counter_check: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::mob_from_nr_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::spare7: - break; - case types::spare6: - break; - case types::spare5: - break; - case types::spare4: - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + HANDLE_CODE(cg_dmrs_cfg.unpack(bref)); + if (mcs_table_present) { + HANDLE_CODE(mcs_table.unpack(bref)); + } + if (mcs_table_transform_precoder_present) { + HANDLE_CODE(mcs_table_transform_precoder.unpack(bref)); + } + if (uci_on_pusch_present) { + HANDLE_CODE(uci_on_pusch.unpack(bref)); + } + HANDLE_CODE(res_alloc.unpack(bref)); + HANDLE_CODE(pwr_ctrl_loop_to_use.unpack(bref)); + HANDLE_CODE(unpack_integer(p0_pusch_alpha, bref, (uint8_t)0u, (uint8_t)29u)); + if (transform_precoder_present) { + HANDLE_CODE(transform_precoder.unpack(bref)); + } + HANDLE_CODE(unpack_integer(nrof_harq_processes, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(rep_k.unpack(bref)); + if (rep_k_rv_present) { + HANDLE_CODE(rep_k_rv.unpack(bref)); + } + HANDLE_CODE(periodicity.unpack(bref)); + if (cfgured_grant_timer_present) { + HANDLE_CODE(unpack_integer(cfgured_grant_timer, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (rrc_cfgured_ul_grant_present) { + bref.unpack(rrc_cfgured_ul_grant.ext, 1); + HANDLE_CODE(bref.unpack(rrc_cfgured_ul_grant.dmrs_seq_initization_present, 1)); + HANDLE_CODE(bref.unpack(rrc_cfgured_ul_grant.srs_res_ind_present, 1)); + HANDLE_CODE(bref.unpack(rrc_cfgured_ul_grant.freq_hop_offset_present, 1)); + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.time_domain_offset, bref, (uint16_t)0u, (uint16_t)5119u)); + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.time_domain_alloc, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(rrc_cfgured_ul_grant.freq_domain_alloc.unpack(bref)); + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.ant_port, bref, (uint8_t)0u, (uint8_t)31u)); + if (rrc_cfgured_ul_grant.dmrs_seq_initization_present) { + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.dmrs_seq_initization, bref, (uint8_t)0u, (uint8_t)1u)); + } + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.precoding_and_nof_layers, bref, (uint8_t)0u, (uint8_t)63u)); + if (rrc_cfgured_ul_grant.srs_res_ind_present) { + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.srs_res_ind, bref, (uint8_t)0u, (uint8_t)15u)); + } + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.mcs_and_tbs, bref, (uint8_t)0u, (uint8_t)31u)); + if (rrc_cfgured_ul_grant.freq_hop_offset_present) { + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.freq_hop_offset, bref, (uint16_t)1u, (uint16_t)274u)); + } + HANDLE_CODE(unpack_integer(rrc_cfgured_ul_grant.pathloss_ref_idx, bref, (uint8_t)0u, (uint8_t)3u)); } + return SRSASN_SUCCESS; } -SRSASN_CODE dl_dcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) +void cfgured_grant_cfg_s::to_json(json_writer& j) const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_recfg: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_resume: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_release: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_reest: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::security_mode_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_info_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_cap_enquiry: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::counter_check: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::mob_from_nr_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::spare7: - break; - case types::spare6: - break; - case types::spare5: - break; - case types::spare4: - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; + j.start_obj(); + if (freq_hop_present) { + j.write_str("frequencyHopping", freq_hop.to_string()); } - return SRSASN_SUCCESS; + j.write_fieldname("cg-DMRS-Configuration"); + cg_dmrs_cfg.to_json(j); + if (mcs_table_present) { + j.write_str("mcs-Table", mcs_table.to_string()); + } + if (mcs_table_transform_precoder_present) { + j.write_str("mcs-TableTransformPrecoder", mcs_table_transform_precoder.to_string()); + } + if (uci_on_pusch_present) { + j.write_fieldname("uci-OnPUSCH"); + uci_on_pusch.to_json(j); + } + j.write_str("resourceAllocation", res_alloc.to_string()); + if (rbg_size_present) { + j.write_str("rbg-Size", "config2"); + } + j.write_str("powerControlLoopToUse", pwr_ctrl_loop_to_use.to_string()); + j.write_int("p0-PUSCH-Alpha", p0_pusch_alpha); + if (transform_precoder_present) { + j.write_str("transformPrecoder", transform_precoder.to_string()); + } + j.write_int("nrofHARQ-Processes", nrof_harq_processes); + j.write_str("repK", rep_k.to_string()); + if (rep_k_rv_present) { + j.write_str("repK-RV", rep_k_rv.to_string()); + } + j.write_str("periodicity", periodicity.to_string()); + if (cfgured_grant_timer_present) { + j.write_int("configuredGrantTimer", cfgured_grant_timer); + } + if (rrc_cfgured_ul_grant_present) { + j.write_fieldname("rrc-ConfiguredUplinkGrant"); + j.start_obj(); + j.write_int("timeDomainOffset", rrc_cfgured_ul_grant.time_domain_offset); + j.write_int("timeDomainAllocation", rrc_cfgured_ul_grant.time_domain_alloc); + j.write_str("frequencyDomainAllocation", rrc_cfgured_ul_grant.freq_domain_alloc.to_string()); + j.write_int("antennaPort", rrc_cfgured_ul_grant.ant_port); + if (rrc_cfgured_ul_grant.dmrs_seq_initization_present) { + j.write_int("dmrs-SeqInitialization", rrc_cfgured_ul_grant.dmrs_seq_initization); + } + j.write_int("precodingAndNumberOfLayers", rrc_cfgured_ul_grant.precoding_and_nof_layers); + if (rrc_cfgured_ul_grant.srs_res_ind_present) { + j.write_int("srs-ResourceIndicator", rrc_cfgured_ul_grant.srs_res_ind); + } + j.write_int("mcsAndTBS", rrc_cfgured_ul_grant.mcs_and_tbs); + if (rrc_cfgured_ul_grant.freq_hop_offset_present) { + j.write_int("frequencyHoppingOffset", rrc_cfgured_ul_grant.freq_hop_offset); + } + j.write_int("pathlossReferenceIndex", rrc_cfgured_ul_grant.pathloss_ref_idx); + j.end_obj(); + } + j.end_obj(); } -std::string dl_dcch_msg_type_c::c1_c_::types_opts::to_string() const +std::string cfgured_grant_cfg_s::freq_hop_opts::to_string() const { - 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"); + static const char* options[] = {"intraSlot", "interSlot"}; + return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::freq_hop_e_"); } -std::string dl_dcch_msg_type_c::types_opts::to_string() const +std::string cfgured_grant_cfg_s::mcs_table_opts::to_string() const { - static const char* options[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(options, 2, value, "dl_dcch_msg_type_c::types"); + static const char* options[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::mcs_table_e_"); } -uint8_t dl_dcch_msg_type_c::types_opts::to_number() const +uint16_t cfgured_grant_cfg_s::mcs_table_opts::to_number() const { - static const uint8_t options[] = {1}; - return map_enum_number(options, 1, value, "dl_dcch_msg_type_c::types"); + static const uint16_t options[] = {256, 64}; + return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::mcs_table_e_"); } -// DL-DCCH-Message ::= SEQUENCE -SRSASN_CODE dl_dcch_msg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_dcch_msg_s::unpack(cbit_ref& bref) +std::string cfgured_grant_cfg_s::mcs_table_transform_precoder_opts::to_string() const { - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); - - return SRSASN_SUCCESS; + static const char* options[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::mcs_table_transform_precoder_e_"); } -void dl_dcch_msg_s::to_json(json_writer& j) const +uint16_t cfgured_grant_cfg_s::mcs_table_transform_precoder_opts::to_number() const { - j.start_array(); - j.start_obj(); - j.start_obj("DL-DCCH-Message"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); - j.end_obj(); - j.end_array(); + static const uint16_t options[] = {256, 64}; + return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::mcs_table_transform_precoder_e_"); } -// PagingUE-Identity ::= CHOICE -void paging_ue_id_c::destroy_() -{ - switch (type_) { - case types::ng_minus5_g_s_tmsi: - c.destroy >(); - break; - case types::full_i_rnti: - c.destroy >(); - break; - default: - break; - } -} -void paging_ue_id_c::set(types::options e) +std::string cfgured_grant_cfg_s::res_alloc_opts::to_string() const { - destroy_(); - type_ = e; - switch (type_) { - case types::ng_minus5_g_s_tmsi: - c.init >(); - break; - case types::full_i_rnti: - c.init >(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "paging_ue_id_c"); - } + static const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + return convert_enum_idx(options, 3, value, "cfgured_grant_cfg_s::res_alloc_e_"); } -paging_ue_id_c::paging_ue_id_c(const paging_ue_id_c& other) +uint8_t cfgured_grant_cfg_s::res_alloc_opts::to_number() const { - type_ = other.type(); - switch (type_) { - case types::ng_minus5_g_s_tmsi: - c.init(other.c.get >()); - break; - case types::full_i_rnti: - c.init(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "paging_ue_id_c"); - } + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::res_alloc_e_"); } -paging_ue_id_c& paging_ue_id_c::operator=(const paging_ue_id_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ng_minus5_g_s_tmsi: - c.set(other.c.get >()); - break; - case types::full_i_rnti: - c.set(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "paging_ue_id_c"); - } - return *this; -} -void paging_ue_id_c::to_json(json_writer& j) const +std::string cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_string() const { - j.start_obj(); - switch (type_) { - case types::ng_minus5_g_s_tmsi: - j.write_str("ng-5G-S-TMSI", c.get >().to_string()); - break; - case types::full_i_rnti: - j.write_str("fullI-RNTI", c.get >().to_string()); - break; - default: - log_invalid_choice_id(type_, "paging_ue_id_c"); - } - j.end_obj(); + static const char* options[] = {"n0", "n1"}; + return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); } -SRSASN_CODE paging_ue_id_c::pack(bit_ref& bref) const +uint8_t cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_number() const { - type_.pack(bref); - switch (type_) { - case types::ng_minus5_g_s_tmsi: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::full_i_rnti: - HANDLE_CODE(c.get >().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "paging_ue_id_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); } -SRSASN_CODE paging_ue_id_c::unpack(cbit_ref& bref) + +std::string cfgured_grant_cfg_s::transform_precoder_opts::to_string() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ng_minus5_g_s_tmsi: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::full_i_rnti: - HANDLE_CODE(c.get >().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "paging_ue_id_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + static const char* options[] = {"enabled", "disabled"}; + return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::transform_precoder_e_"); } -std::string paging_ue_id_c::types_opts::to_string() const +std::string cfgured_grant_cfg_s::rep_k_opts::to_string() const { - static const char* options[] = {"ng-5G-S-TMSI", "fullI-RNTI"}; - return convert_enum_idx(options, 2, value, "paging_ue_id_c::types"); + static const char* options[] = {"n1", "n2", "n4", "n8"}; + return convert_enum_idx(options, 4, value, "cfgured_grant_cfg_s::rep_k_e_"); } -int8_t paging_ue_id_c::types_opts::to_number() const +uint8_t cfgured_grant_cfg_s::rep_k_opts::to_number() const { - static const int8_t options[] = {-5}; - return map_enum_number(options, 1, value, "paging_ue_id_c::types"); + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number(options, 4, value, "cfgured_grant_cfg_s::rep_k_e_"); } -// PagingRecord ::= SEQUENCE -SRSASN_CODE paging_record_s::pack(bit_ref& bref) const +std::string cfgured_grant_cfg_s::rep_k_rv_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(access_type_present, 1)); - - HANDLE_CODE(ue_id.pack(bref)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE paging_record_s::unpack(cbit_ref& bref) +uint8_t cfgured_grant_cfg_s::rep_k_rv_opts::to_number() const { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(access_type_present, 1)); - - HANDLE_CODE(ue_id.unpack(bref)); - - return SRSASN_SUCCESS; + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "cfgured_grant_cfg_s::rep_k_rv_e_"); } -void paging_record_s::to_json(json_writer& j) const + +std::string cfgured_grant_cfg_s::periodicity_opts::to_string() const { - j.start_obj(); - j.write_fieldname("ue-Identity"); - ue_id.to_json(j); - if (access_type_present) { - j.write_str("accessType", "non3GPP"); - } - j.end_obj(); + 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", + "sym6", "sym1x12", "sym2x12", "sym4x12", "sym5x12", "sym8x12", "sym10x12", "sym16x12", + "sym20x12", "sym32x12", "sym40x12", "sym64x12", "sym80x12", "sym128x12", "sym160x12", "sym256x12", + "sym320x12", "sym512x12", "sym640x12", "sym1280x12", "sym2560x12"}; + return convert_enum_idx(options, 45, value, "cfgured_grant_cfg_s::periodicity_e_"); } -// Paging ::= SEQUENCE -SRSASN_CODE paging_s::pack(bit_ref& bref) const +// PUCCH-Config ::= SEQUENCE +SRSASN_CODE pucch_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(paging_record_list_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(res_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(format1_present, 1)); + HANDLE_CODE(bref.pack(format2_present, 1)); + HANDLE_CODE(bref.pack(format3_present, 1)); + HANDLE_CODE(bref.pack(format4_present, 1)); + HANDLE_CODE(bref.pack(sched_request_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(sched_request_res_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(multi_csi_pucch_res_list_present, 1)); + HANDLE_CODE(bref.pack(dl_data_to_ul_ack_present, 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(pucch_pwr_ctrl_present, 1)); - if (paging_record_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, paging_record_list, 1, 32)); + if (res_set_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_set_to_add_mod_list, 1, 4)); } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + if (res_set_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_set_to_release_list, 1, 4, integer_packer(0, 3))); } - - return SRSASN_SUCCESS; -} -SRSASN_CODE paging_s::unpack(cbit_ref& bref) + if (res_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_to_add_mod_list, 1, 128)); + } + if (res_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_to_release_list, 1, 128, integer_packer(0, 127))); + } + if (format1_present) { + HANDLE_CODE(format1.pack(bref)); + } + if (format2_present) { + HANDLE_CODE(format2.pack(bref)); + } + if (format3_present) { + HANDLE_CODE(format3.pack(bref)); + } + if (format4_present) { + HANDLE_CODE(format4.pack(bref)); + } + if (sched_request_res_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_res_to_add_mod_list, 1, 8)); + } + if (sched_request_res_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_res_to_release_list, 1, 8, integer_packer(1, 8))); + } + if (multi_csi_pucch_res_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_csi_pucch_res_list, 1, 2, integer_packer(0, 127))); + } + if (dl_data_to_ul_ack_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, dl_data_to_ul_ack, 1, 8, integer_packer(0, 15))); + } + if (spatial_relation_info_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, spatial_relation_info_to_add_mod_list, 1, 8)); + } + if (spatial_relation_info_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, spatial_relation_info_to_release_list, 1, 8, integer_packer(1, 8))); + } + if (pucch_pwr_ctrl_present) { + HANDLE_CODE(pucch_pwr_ctrl.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(paging_record_list_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(res_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(format1_present, 1)); + HANDLE_CODE(bref.unpack(format2_present, 1)); + HANDLE_CODE(bref.unpack(format3_present, 1)); + HANDLE_CODE(bref.unpack(format4_present, 1)); + HANDLE_CODE(bref.unpack(sched_request_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(sched_request_res_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(multi_csi_pucch_res_list_present, 1)); + HANDLE_CODE(bref.unpack(dl_data_to_ul_ack_present, 1)); + HANDLE_CODE(bref.unpack(spatial_relation_info_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(spatial_relation_info_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(pucch_pwr_ctrl_present, 1)); - if (paging_record_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(paging_record_list, bref, 1, 32)); + if (res_set_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(res_set_to_add_mod_list, bref, 1, 4)); } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + if (res_set_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(res_set_to_release_list, bref, 1, 4, integer_packer(0, 3))); + } + if (res_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(res_to_add_mod_list, bref, 1, 128)); + } + if (res_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(res_to_release_list, bref, 1, 128, integer_packer(0, 127))); + } + if (format1_present) { + HANDLE_CODE(format1.unpack(bref)); + } + if (format2_present) { + HANDLE_CODE(format2.unpack(bref)); + } + if (format3_present) { + HANDLE_CODE(format3.unpack(bref)); + } + if (format4_present) { + HANDLE_CODE(format4.unpack(bref)); + } + if (sched_request_res_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(sched_request_res_to_add_mod_list, bref, 1, 8)); + } + if (sched_request_res_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(sched_request_res_to_release_list, bref, 1, 8, integer_packer(1, 8))); + } + if (multi_csi_pucch_res_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_csi_pucch_res_list, bref, 1, 2, integer_packer(0, 127))); + } + if (dl_data_to_ul_ack_present) { + HANDLE_CODE(unpack_dyn_seq_of(dl_data_to_ul_ack, bref, 1, 8, integer_packer(0, 15))); + } + if (spatial_relation_info_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(spatial_relation_info_to_add_mod_list, bref, 1, 8)); + } + if (spatial_relation_info_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(spatial_relation_info_to_release_list, bref, 1, 8, integer_packer(1, 8))); + } + if (pucch_pwr_ctrl_present) { + HANDLE_CODE(pucch_pwr_ctrl.unpack(bref)); } return SRSASN_SUCCESS; } -void paging_s::to_json(json_writer& j) const +void pucch_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (paging_record_list_present) { - j.start_array("pagingRecordList"); - for (const auto& e1 : paging_record_list) { + if (res_set_to_add_mod_list_present) { + j.start_array("resourceSetToAddModList"); + for (const auto& e1 : res_set_to_add_mod_list) { e1.to_json(j); } j.end_array(); } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + if (res_set_to_release_list_present) { + j.start_array("resourceSetToReleaseList"); + for (const auto& e1 : res_set_to_release_list) { + j.write_int(e1); + } + j.end_array(); } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + if (res_to_add_mod_list_present) { + j.start_array("resourceToAddModList"); + 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 (const auto& e1 : res_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (format1_present) { + j.write_fieldname("format1"); + format1.to_json(j); + } + if (format2_present) { + j.write_fieldname("format2"); + format2.to_json(j); + } + if (format3_present) { + j.write_fieldname("format3"); + format3.to_json(j); + } + if (format4_present) { + j.write_fieldname("format4"); + format4.to_json(j); + } + if (sched_request_res_to_add_mod_list_present) { + j.start_array("schedulingRequestResourceToAddModList"); + 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 (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 (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 (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 (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 (const auto& e1 : spatial_relation_info_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (pucch_pwr_ctrl_present) { + j.write_fieldname("pucch-PowerControl"); + pucch_pwr_ctrl.to_json(j); } j.end_obj(); } -// PCCH-MessageType ::= CHOICE -void pcch_msg_type_c::destroy_() +// PUSCH-Config ::= SEQUENCE +SRSASN_CODE pusch_cfg_s::pack(bit_ref& bref) const { - switch (type_) { - case types::c1: - c.destroy(); - break; - default: - break; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(data_scrambling_id_pusch_present, 1)); + HANDLE_CODE(bref.pack(tx_cfg_present, 1)); + HANDLE_CODE(bref.pack(dmrs_ul_for_pusch_map_type_a_present, 1)); + HANDLE_CODE(bref.pack(dmrs_ul_for_pusch_map_type_b_present, 1)); + HANDLE_CODE(bref.pack(pusch_pwr_ctrl_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_offset_lists_present, 1)); + HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list_present, 1)); + HANDLE_CODE(bref.pack(pusch_aggregation_factor_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_transform_precoder_present, 1)); + HANDLE_CODE(bref.pack(transform_precoder_present, 1)); + HANDLE_CODE(bref.pack(codebook_subset_present, 1)); + HANDLE_CODE(bref.pack(max_rank_present, 1)); + HANDLE_CODE(bref.pack(rbg_size_present, 1)); + HANDLE_CODE(bref.pack(uci_on_pusch_present, 1)); + HANDLE_CODE(bref.pack(tp_pi2_bpsk_present, 1)); + + if (data_scrambling_id_pusch_present) { + HANDLE_CODE(pack_integer(bref, data_scrambling_id_pusch, (uint16_t)0u, (uint16_t)1023u)); } -} -void pcch_msg_type_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::c1: - c.init(); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c"); + if (tx_cfg_present) { + HANDLE_CODE(tx_cfg.pack(bref)); } -} -pcch_msg_type_c::pcch_msg_type_c(const pcch_msg_type_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::c1: - c.init(other.c.get()); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c"); + if (dmrs_ul_for_pusch_map_type_a_present) { + HANDLE_CODE(dmrs_ul_for_pusch_map_type_a.pack(bref)); + } + if (dmrs_ul_for_pusch_map_type_b_present) { + HANDLE_CODE(dmrs_ul_for_pusch_map_type_b.pack(bref)); + } + if (pusch_pwr_ctrl_present) { + HANDLE_CODE(pusch_pwr_ctrl.pack(bref)); + } + if (freq_hop_present) { + HANDLE_CODE(freq_hop.pack(bref)); + } + if (freq_hop_offset_lists_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_hop_offset_lists, 1, 4, integer_packer(1, 274))); + } + HANDLE_CODE(res_alloc.pack(bref)); + if (pusch_time_domain_alloc_list_present) { + HANDLE_CODE(pusch_time_domain_alloc_list.pack(bref)); + } + if (pusch_aggregation_factor_present) { + HANDLE_CODE(pusch_aggregation_factor.pack(bref)); + } + if (mcs_table_present) { + HANDLE_CODE(mcs_table.pack(bref)); + } + if (mcs_table_transform_precoder_present) { + HANDLE_CODE(mcs_table_transform_precoder.pack(bref)); + } + if (transform_precoder_present) { + HANDLE_CODE(transform_precoder.pack(bref)); + } + if (codebook_subset_present) { + HANDLE_CODE(codebook_subset.pack(bref)); + } + if (max_rank_present) { + HANDLE_CODE(pack_integer(bref, max_rank, (uint8_t)1u, (uint8_t)4u)); + } + if (uci_on_pusch_present) { + HANDLE_CODE(uci_on_pusch.pack(bref)); } + + return SRSASN_SUCCESS; } -pcch_msg_type_c& pcch_msg_type_c::operator=(const pcch_msg_type_c& other) +SRSASN_CODE pusch_cfg_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(data_scrambling_id_pusch_present, 1)); + HANDLE_CODE(bref.unpack(tx_cfg_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_ul_for_pusch_map_type_a_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_ul_for_pusch_map_type_b_present, 1)); + HANDLE_CODE(bref.unpack(pusch_pwr_ctrl_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_offset_lists_present, 1)); + HANDLE_CODE(bref.unpack(pusch_time_domain_alloc_list_present, 1)); + HANDLE_CODE(bref.unpack(pusch_aggregation_factor_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_transform_precoder_present, 1)); + HANDLE_CODE(bref.unpack(transform_precoder_present, 1)); + HANDLE_CODE(bref.unpack(codebook_subset_present, 1)); + HANDLE_CODE(bref.unpack(max_rank_present, 1)); + HANDLE_CODE(bref.unpack(rbg_size_present, 1)); + HANDLE_CODE(bref.unpack(uci_on_pusch_present, 1)); + HANDLE_CODE(bref.unpack(tp_pi2_bpsk_present, 1)); + + if (data_scrambling_id_pusch_present) { + HANDLE_CODE(unpack_integer(data_scrambling_id_pusch, bref, (uint16_t)0u, (uint16_t)1023u)); } - set(other.type()); - switch (type_) { - case types::c1: - c.set(other.c.get()); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c"); + if (tx_cfg_present) { + HANDLE_CODE(tx_cfg.unpack(bref)); + } + if (dmrs_ul_for_pusch_map_type_a_present) { + HANDLE_CODE(dmrs_ul_for_pusch_map_type_a.unpack(bref)); + } + if (dmrs_ul_for_pusch_map_type_b_present) { + HANDLE_CODE(dmrs_ul_for_pusch_map_type_b.unpack(bref)); + } + if (pusch_pwr_ctrl_present) { + HANDLE_CODE(pusch_pwr_ctrl.unpack(bref)); + } + if (freq_hop_present) { + HANDLE_CODE(freq_hop.unpack(bref)); + } + if (freq_hop_offset_lists_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_hop_offset_lists, bref, 1, 4, integer_packer(1, 274))); + } + HANDLE_CODE(res_alloc.unpack(bref)); + if (pusch_time_domain_alloc_list_present) { + HANDLE_CODE(pusch_time_domain_alloc_list.unpack(bref)); + } + if (pusch_aggregation_factor_present) { + HANDLE_CODE(pusch_aggregation_factor.unpack(bref)); + } + if (mcs_table_present) { + HANDLE_CODE(mcs_table.unpack(bref)); + } + if (mcs_table_transform_precoder_present) { + HANDLE_CODE(mcs_table_transform_precoder.unpack(bref)); + } + if (transform_precoder_present) { + HANDLE_CODE(transform_precoder.unpack(bref)); + } + if (codebook_subset_present) { + HANDLE_CODE(codebook_subset.unpack(bref)); + } + if (max_rank_present) { + HANDLE_CODE(unpack_integer(max_rank, bref, (uint8_t)1u, (uint8_t)4u)); + } + if (uci_on_pusch_present) { + HANDLE_CODE(uci_on_pusch.unpack(bref)); } - return *this; + return SRSASN_SUCCESS; } -void pcch_msg_type_c::to_json(json_writer& j) const +void pusch_cfg_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.get().to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c"); + if (data_scrambling_id_pusch_present) { + j.write_int("dataScramblingIdentityPUSCH", data_scrambling_id_pusch); + } + if (tx_cfg_present) { + j.write_str("txConfig", tx_cfg.to_string()); + } + if (dmrs_ul_for_pusch_map_type_a_present) { + j.write_fieldname("dmrs-UplinkForPUSCH-MappingTypeA"); + dmrs_ul_for_pusch_map_type_a.to_json(j); + } + if (dmrs_ul_for_pusch_map_type_b_present) { + j.write_fieldname("dmrs-UplinkForPUSCH-MappingTypeB"); + dmrs_ul_for_pusch_map_type_b.to_json(j); + } + if (pusch_pwr_ctrl_present) { + j.write_fieldname("pusch-PowerControl"); + pusch_pwr_ctrl.to_json(j); + } + if (freq_hop_present) { + j.write_str("frequencyHopping", freq_hop.to_string()); + } + if (freq_hop_offset_lists_present) { + j.start_array("frequencyHoppingOffsetLists"); + for (const auto& e1 : freq_hop_offset_lists) { + j.write_int(e1); + } + j.end_array(); + } + j.write_str("resourceAllocation", res_alloc.to_string()); + if (pusch_time_domain_alloc_list_present) { + j.write_fieldname("pusch-TimeDomainAllocationList"); + pusch_time_domain_alloc_list.to_json(j); + } + if (pusch_aggregation_factor_present) { + j.write_str("pusch-AggregationFactor", pusch_aggregation_factor.to_string()); + } + if (mcs_table_present) { + j.write_str("mcs-Table", mcs_table.to_string()); + } + if (mcs_table_transform_precoder_present) { + j.write_str("mcs-TableTransformPrecoder", mcs_table_transform_precoder.to_string()); + } + if (transform_precoder_present) { + j.write_str("transformPrecoder", transform_precoder.to_string()); + } + if (codebook_subset_present) { + j.write_str("codebookSubset", codebook_subset.to_string()); + } + if (max_rank_present) { + j.write_int("maxRank", max_rank); + } + if (rbg_size_present) { + j.write_str("rbg-Size", "config2"); + } + if (uci_on_pusch_present) { + j.write_fieldname("uci-OnPUSCH"); + uci_on_pusch.to_json(j); + } + if (tp_pi2_bpsk_present) { + j.write_str("tp-pi2BPSK", "enabled"); } j.end_obj(); } -SRSASN_CODE pcch_msg_type_c::pack(bit_ref& bref) const + +std::string pusch_cfg_s::tx_cfg_opts::to_string() const { - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + static const char* options[] = {"codebook", "nonCodebook"}; + return convert_enum_idx(options, 2, value, "pusch_cfg_s::tx_cfg_e_"); } -SRSASN_CODE pcch_msg_type_c::unpack(cbit_ref& bref) + +std::string pusch_cfg_s::freq_hop_opts::to_string() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + static const char* options[] = {"intraSlot", "interSlot"}; + return convert_enum_idx(options, 2, value, "pusch_cfg_s::freq_hop_e_"); } -void pcch_msg_type_c::c1_c_::set(types::options e) +std::string pusch_cfg_s::res_alloc_opts::to_string() const { - type_ = e; + static const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + return convert_enum_idx(options, 3, value, "pusch_cfg_s::res_alloc_e_"); } -void pcch_msg_type_c::c1_c_::to_json(json_writer& j) const +uint8_t pusch_cfg_s::res_alloc_opts::to_number() const { - j.start_obj(); - switch (type_) { - case types::paging: - j.write_fieldname("paging"); - c.to_json(j); - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c::c1_c_"); - } - j.end_obj(); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "pusch_cfg_s::res_alloc_e_"); } -SRSASN_CODE pcch_msg_type_c::c1_c_::pack(bit_ref& bref) const + +std::string pusch_cfg_s::pusch_aggregation_factor_opts::to_string() const { - type_.pack(bref); - switch (type_) { - case types::paging: - HANDLE_CODE(c.pack(bref)); - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + 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 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 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 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 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 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 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 const char* options[] = {"fullyAndPartialAndNonCoherent", "partialAndNonCoherent", "nonCoherent"}; + return convert_enum_idx(options, 3, value, "pusch_cfg_s::codebook_subset_e_"); +} + +// SRS-Config ::= SEQUENCE +SRSASN_CODE srs_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(srs_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(srs_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(srs_res_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(srs_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(tpc_accumulation_present, 1)); + + if (srs_res_set_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_set_to_release_list, 1, 16, integer_packer(0, 15))); + } + if (srs_res_set_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_set_to_add_mod_list, 1, 16)); + } + if (srs_res_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_to_release_list, 1, 64, integer_packer(0, 63))); + } + if (srs_res_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_to_add_mod_list, 1, 64)); } + return SRSASN_SUCCESS; } -SRSASN_CODE pcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) +SRSASN_CODE srs_cfg_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::paging: - HANDLE_CODE(c.unpack(bref)); - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(srs_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(srs_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(srs_res_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(srs_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(tpc_accumulation_present, 1)); + + if (srs_res_set_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_res_set_to_release_list, bref, 1, 16, integer_packer(0, 15))); + } + if (srs_res_set_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_res_set_to_add_mod_list, bref, 1, 16)); + } + if (srs_res_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_res_to_release_list, bref, 1, 64, integer_packer(0, 63))); + } + if (srs_res_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_res_to_add_mod_list, bref, 1, 64)); } + return SRSASN_SUCCESS; } - -std::string pcch_msg_type_c::c1_c_::types_opts::to_string() const +void srs_cfg_s::to_json(json_writer& j) const { - static const char* options[] = {"paging", "spare1"}; - return convert_enum_idx(options, 2, value, "pcch_msg_type_c::c1_c_::types"); + j.start_obj(); + if (srs_res_set_to_release_list_present) { + j.start_array("srs-ResourceSetToReleaseList"); + 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 (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 (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 (const auto& e1 : srs_res_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); + } + if (tpc_accumulation_present) { + j.write_str("tpc-Accumulation", "disabled"); + } + j.end_obj(); } -std::string pcch_msg_type_c::types_opts::to_string() const +// BWP-UplinkDedicated ::= SEQUENCE +SRSASN_CODE bwp_ul_ded_s::pack(bit_ref& bref) const { - static const char* options[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(options, 2, value, "pcch_msg_type_c::types"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pucch_cfg_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_present, 1)); + HANDLE_CODE(bref.pack(cfgured_grant_cfg_present, 1)); + HANDLE_CODE(bref.pack(srs_cfg_present, 1)); + HANDLE_CODE(bref.pack(beam_fail_recovery_cfg_present, 1)); + + if (pucch_cfg_present) { + HANDLE_CODE(pucch_cfg.pack(bref)); + } + if (pusch_cfg_present) { + HANDLE_CODE(pusch_cfg.pack(bref)); + } + if (cfgured_grant_cfg_present) { + HANDLE_CODE(cfgured_grant_cfg.pack(bref)); + } + if (srs_cfg_present) { + HANDLE_CODE(srs_cfg.pack(bref)); + } + if (beam_fail_recovery_cfg_present) { + HANDLE_CODE(beam_fail_recovery_cfg.pack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t pcch_msg_type_c::types_opts::to_number() const +SRSASN_CODE bwp_ul_ded_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {1}; - return map_enum_number(options, 1, value, "pcch_msg_type_c::types"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pucch_cfg_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_present, 1)); + HANDLE_CODE(bref.unpack(cfgured_grant_cfg_present, 1)); + HANDLE_CODE(bref.unpack(srs_cfg_present, 1)); + HANDLE_CODE(bref.unpack(beam_fail_recovery_cfg_present, 1)); + + if (pucch_cfg_present) { + HANDLE_CODE(pucch_cfg.unpack(bref)); + } + if (pusch_cfg_present) { + HANDLE_CODE(pusch_cfg.unpack(bref)); + } + if (cfgured_grant_cfg_present) { + HANDLE_CODE(cfgured_grant_cfg.unpack(bref)); + } + if (srs_cfg_present) { + HANDLE_CODE(srs_cfg.unpack(bref)); + } + if (beam_fail_recovery_cfg_present) { + HANDLE_CODE(beam_fail_recovery_cfg.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void bwp_ul_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pucch_cfg_present) { + j.write_fieldname("pucch-Config"); + pucch_cfg.to_json(j); + } + if (pusch_cfg_present) { + j.write_fieldname("pusch-Config"); + pusch_cfg.to_json(j); + } + if (cfgured_grant_cfg_present) { + j.write_fieldname("configuredGrantConfig"); + cfgured_grant_cfg.to_json(j); + } + if (srs_cfg_present) { + j.write_fieldname("srs-Config"); + srs_cfg.to_json(j); + } + if (beam_fail_recovery_cfg_present) { + j.write_fieldname("beamFailureRecoveryConfig"); + beam_fail_recovery_cfg.to_json(j); + } + j.end_obj(); } -// PCCH-Message ::= SEQUENCE -SRSASN_CODE pcch_msg_s::pack(bit_ref& bref) const +// BWP-Uplink ::= SEQUENCE +SRSASN_CODE bwp_ul_s::pack(bit_ref& bref) const { - HANDLE_CODE(msg.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(bwp_common_present, 1)); + HANDLE_CODE(bref.pack(bwp_ded_present, 1)); - bref.align_bytes_zero(); + HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); + if (bwp_common_present) { + HANDLE_CODE(bwp_common.pack(bref)); + } + if (bwp_ded_present) { + HANDLE_CODE(bwp_ded.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE pcch_msg_s::unpack(cbit_ref& bref) +SRSASN_CODE bwp_ul_s::unpack(cbit_ref& bref) { - HANDLE_CODE(msg.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(bwp_common_present, 1)); + HANDLE_CODE(bref.unpack(bwp_ded_present, 1)); - bref.align_bytes(); + HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); + if (bwp_common_present) { + HANDLE_CODE(bwp_common.unpack(bref)); + } + if (bwp_ded_present) { + HANDLE_CODE(bwp_ded.unpack(bref)); + } return SRSASN_SUCCESS; } -void pcch_msg_s::to_json(json_writer& j) const +void bwp_ul_s::to_json(json_writer& j) const { - j.start_array(); j.start_obj(); - j.start_obj("PCCH-Message"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); + j.write_int("bwp-Id", bwp_id); + if (bwp_common_present) { + j.write_fieldname("bwp-Common"); + bwp_common.to_json(j); + } + if (bwp_ded_present) { + j.write_fieldname("bwp-Dedicated"); + bwp_ded.to_json(j); + } j.end_obj(); - j.end_array(); } -// EstablishmentCause ::= ENUMERATED -std::string establishment_cause_opts::to_string() const +// CA-BandwidthClassEUTRA ::= ENUMERATED +std::string ca_bw_class_eutra_opts::to_string() const { - 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"); + static const char* options[] = {"a", "b", "c", "d", "e", "f"}; + return convert_enum_idx(options, 6, value, "ca_bw_class_eutra_e"); } -// InitialUE-Identity ::= CHOICE -void init_ue_id_c::destroy_() +// CA-BandwidthClassNR ::= ENUMERATED +std::string ca_bw_class_nr_opts::to_string() const +{ + 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"); +} + +// BandParameters ::= CHOICE +void band_params_c::destroy_() { switch (type_) { - case types::ng_minus5_g_s_tmsi_part1: - c.destroy >(); + case types::eutra: + c.destroy(); break; - case types::random_value: - c.destroy >(); + case types::nr: + c.destroy(); break; default: break; } } -void init_ue_id_c::set(types::options e) +void band_params_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ng_minus5_g_s_tmsi_part1: - c.init >(); + case types::eutra: + c.init(); break; - case types::random_value: - c.init >(); + case types::nr: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "init_ue_id_c"); + log_invalid_choice_id(type_, "band_params_c"); } } -init_ue_id_c::init_ue_id_c(const init_ue_id_c& other) +band_params_c::band_params_c(const band_params_c& other) { type_ = other.type(); switch (type_) { - case types::ng_minus5_g_s_tmsi_part1: - c.init(other.c.get >()); + case types::eutra: + c.init(other.c.get()); break; - case types::random_value: - c.init(other.c.get >()); + case types::nr: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "init_ue_id_c"); + log_invalid_choice_id(type_, "band_params_c"); } } -init_ue_id_c& init_ue_id_c::operator=(const init_ue_id_c& other) +band_params_c& band_params_c::operator=(const band_params_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ng_minus5_g_s_tmsi_part1: - c.set(other.c.get >()); + case types::eutra: + c.set(other.c.get()); break; - case types::random_value: - c.set(other.c.get >()); + case types::nr: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "init_ue_id_c"); + log_invalid_choice_id(type_, "band_params_c"); } return *this; } -void init_ue_id_c::to_json(json_writer& j) const +void band_params_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ng_minus5_g_s_tmsi_part1: - j.write_str("ng-5G-S-TMSI-Part1", c.get >().to_string()); + case types::eutra: + j.write_fieldname("eutra"); + j.start_obj(); + j.write_int("bandEUTRA", c.get().band_eutra); + if (c.get().ca_bw_class_dl_eutra_present) { + j.write_str("ca-BandwidthClassDL-EUTRA", c.get().ca_bw_class_dl_eutra.to_string()); + } + if (c.get().ca_bw_class_ul_eutra_present) { + j.write_str("ca-BandwidthClassUL-EUTRA", c.get().ca_bw_class_ul_eutra.to_string()); + } + j.end_obj(); break; - case types::random_value: - j.write_str("randomValue", c.get >().to_string()); + case types::nr: + j.write_fieldname("nr"); + j.start_obj(); + j.write_int("bandNR", c.get().band_nr); + if (c.get().ca_bw_class_dl_nr_present) { + j.write_str("ca-BandwidthClassDL-NR", c.get().ca_bw_class_dl_nr.to_string()); + } + if (c.get().ca_bw_class_ul_nr_present) { + j.write_str("ca-BandwidthClassUL-NR", c.get().ca_bw_class_ul_nr.to_string()); + } + j.end_obj(); break; default: - log_invalid_choice_id(type_, "init_ue_id_c"); + log_invalid_choice_id(type_, "band_params_c"); } j.end_obj(); } -SRSASN_CODE init_ue_id_c::pack(bit_ref& bref) const +SRSASN_CODE band_params_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ng_minus5_g_s_tmsi_part1: - HANDLE_CODE(c.get >().pack(bref)); + case types::eutra: + HANDLE_CODE(bref.pack(c.get().ca_bw_class_dl_eutra_present, 1)); + HANDLE_CODE(bref.pack(c.get().ca_bw_class_ul_eutra_present, 1)); + HANDLE_CODE(pack_integer(bref, c.get().band_eutra, (uint16_t)1u, (uint16_t)256u)); + if (c.get().ca_bw_class_dl_eutra_present) { + HANDLE_CODE(c.get().ca_bw_class_dl_eutra.pack(bref)); + } + if (c.get().ca_bw_class_ul_eutra_present) { + HANDLE_CODE(c.get().ca_bw_class_ul_eutra.pack(bref)); + } break; - case types::random_value: - HANDLE_CODE(c.get >().pack(bref)); + case types::nr: + HANDLE_CODE(bref.pack(c.get().ca_bw_class_dl_nr_present, 1)); + HANDLE_CODE(bref.pack(c.get().ca_bw_class_ul_nr_present, 1)); + HANDLE_CODE(pack_integer(bref, c.get().band_nr, (uint16_t)1u, (uint16_t)1024u)); + if (c.get().ca_bw_class_dl_nr_present) { + HANDLE_CODE(c.get().ca_bw_class_dl_nr.pack(bref)); + } + if (c.get().ca_bw_class_ul_nr_present) { + HANDLE_CODE(c.get().ca_bw_class_ul_nr.pack(bref)); + } break; default: - log_invalid_choice_id(type_, "init_ue_id_c"); + log_invalid_choice_id(type_, "band_params_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE init_ue_id_c::unpack(cbit_ref& bref) +SRSASN_CODE band_params_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ng_minus5_g_s_tmsi_part1: - HANDLE_CODE(c.get >().unpack(bref)); + case types::eutra: + HANDLE_CODE(bref.unpack(c.get().ca_bw_class_dl_eutra_present, 1)); + HANDLE_CODE(bref.unpack(c.get().ca_bw_class_ul_eutra_present, 1)); + HANDLE_CODE(unpack_integer(c.get().band_eutra, bref, (uint16_t)1u, (uint16_t)256u)); + if (c.get().ca_bw_class_dl_eutra_present) { + HANDLE_CODE(c.get().ca_bw_class_dl_eutra.unpack(bref)); + } + if (c.get().ca_bw_class_ul_eutra_present) { + HANDLE_CODE(c.get().ca_bw_class_ul_eutra.unpack(bref)); + } break; - case types::random_value: - HANDLE_CODE(c.get >().unpack(bref)); + case types::nr: + HANDLE_CODE(bref.unpack(c.get().ca_bw_class_dl_nr_present, 1)); + HANDLE_CODE(bref.unpack(c.get().ca_bw_class_ul_nr_present, 1)); + HANDLE_CODE(unpack_integer(c.get().band_nr, bref, (uint16_t)1u, (uint16_t)1024u)); + if (c.get().ca_bw_class_dl_nr_present) { + HANDLE_CODE(c.get().ca_bw_class_dl_nr.unpack(bref)); + } + if (c.get().ca_bw_class_ul_nr_present) { + HANDLE_CODE(c.get().ca_bw_class_ul_nr.unpack(bref)); + } break; default: - log_invalid_choice_id(type_, "init_ue_id_c"); + log_invalid_choice_id(type_, "band_params_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string init_ue_id_c::types_opts::to_string() const -{ - 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 +std::string band_params_c::types_opts::to_string() const { - static const int8_t options[] = {-5}; - return map_enum_number(options, 1, value, "init_ue_id_c::types"); + static const char* options[] = {"eutra", "nr"}; + return convert_enum_idx(options, 2, value, "band_params_c::types"); } -// ReestabUE-Identity ::= SEQUENCE -SRSASN_CODE reestab_ue_id_s::pack(bit_ref& bref) const +// CA-ParametersEUTRA ::= SEQUENCE +SRSASN_CODE ca_params_eutra_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, c_rnti, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(short_mac_i.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(multiple_timing_advance_present, 1)); + HANDLE_CODE(bref.pack(simul_rx_tx_present, 1)); + HANDLE_CODE(bref.pack(supported_naics_minus2_crs_ap_present, 1)); + HANDLE_CODE(bref.pack(add_rx_tx_performance_req_present, 1)); + HANDLE_CODE(bref.pack(ue_ca_pwr_class_n_present, 1)); + HANDLE_CODE(bref.pack(supported_bw_combination_set_eutra_v1530_present, 1)); + + if (supported_naics_minus2_crs_ap_present) { + HANDLE_CODE(supported_naics_minus2_crs_ap.pack(bref)); + } + if (supported_bw_combination_set_eutra_v1530_present) { + HANDLE_CODE(supported_bw_combination_set_eutra_v1530.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE reestab_ue_id_s::unpack(cbit_ref& bref) +SRSASN_CODE ca_params_eutra_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(c_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(short_mac_i.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(multiple_timing_advance_present, 1)); + HANDLE_CODE(bref.unpack(simul_rx_tx_present, 1)); + HANDLE_CODE(bref.unpack(supported_naics_minus2_crs_ap_present, 1)); + HANDLE_CODE(bref.unpack(add_rx_tx_performance_req_present, 1)); + HANDLE_CODE(bref.unpack(ue_ca_pwr_class_n_present, 1)); + HANDLE_CODE(bref.unpack(supported_bw_combination_set_eutra_v1530_present, 1)); + + if (supported_naics_minus2_crs_ap_present) { + HANDLE_CODE(supported_naics_minus2_crs_ap.unpack(bref)); + } + if (supported_bw_combination_set_eutra_v1530_present) { + HANDLE_CODE(supported_bw_combination_set_eutra_v1530.unpack(bref)); + } return SRSASN_SUCCESS; } -void reestab_ue_id_s::to_json(json_writer& j) const +void ca_params_eutra_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("c-RNTI", c_rnti); - j.write_int("physCellId", pci); - j.write_str("shortMAC-I", short_mac_i.to_string()); - j.end_obj(); -} - -// ReestablishmentCause ::= ENUMERATED -std::string reest_cause_opts::to_string() const -{ - 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 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"); + if (multiple_timing_advance_present) { + j.write_str("multipleTimingAdvance", "supported"); + } + if (simul_rx_tx_present) { + j.write_str("simultaneousRx-Tx", "supported"); + } + if (supported_naics_minus2_crs_ap_present) { + j.write_str("supportedNAICS-2CRS-AP", supported_naics_minus2_crs_ap.to_string()); + } + if (add_rx_tx_performance_req_present) { + j.write_str("additionalRx-Tx-PerformanceReq", "supported"); + } + if (ue_ca_pwr_class_n_present) { + j.write_str("ue-CA-PowerClass-N", "class2"); + } + if (supported_bw_combination_set_eutra_v1530_present) { + j.write_str("supportedBandwidthCombinationSetEUTRA-v1530", supported_bw_combination_set_eutra_v1530.to_string()); + } + j.end_obj(); } -// RRCReestablishmentRequest-IEs ::= SEQUENCE -SRSASN_CODE rrc_reest_request_ies_s::pack(bit_ref& bref) const +// CA-ParametersNR ::= SEQUENCE +SRSASN_CODE ca_params_nr_s::pack(bit_ref& bref) const { - HANDLE_CODE(ue_id.pack(bref)); - HANDLE_CODE(reest_cause.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dummy_present, 1)); + HANDLE_CODE(bref.pack(parallel_tx_srs_pucch_pusch_present, 1)); + HANDLE_CODE(bref.pack(parallel_tx_prach_srs_pucch_pusch_present, 1)); + HANDLE_CODE(bref.pack(simul_rx_tx_inter_band_ca_present, 1)); + HANDLE_CODE(bref.pack(simul_rx_tx_sul_present, 1)); + HANDLE_CODE(bref.pack(diff_numerology_across_pucch_group_present, 1)); + HANDLE_CODE(bref.pack(diff_numerology_within_pucch_group_smaller_scs_present, 1)); + HANDLE_CODE(bref.pack(supported_num_tag_present, 1)); + + if (supported_num_tag_present) { + HANDLE_CODE(supported_num_tag.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_reest_request_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE ca_params_nr_s::unpack(cbit_ref& bref) { - HANDLE_CODE(ue_id.unpack(bref)); - HANDLE_CODE(reest_cause.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dummy_present, 1)); + HANDLE_CODE(bref.unpack(parallel_tx_srs_pucch_pusch_present, 1)); + HANDLE_CODE(bref.unpack(parallel_tx_prach_srs_pucch_pusch_present, 1)); + HANDLE_CODE(bref.unpack(simul_rx_tx_inter_band_ca_present, 1)); + HANDLE_CODE(bref.unpack(simul_rx_tx_sul_present, 1)); + HANDLE_CODE(bref.unpack(diff_numerology_across_pucch_group_present, 1)); + HANDLE_CODE(bref.unpack(diff_numerology_within_pucch_group_smaller_scs_present, 1)); + HANDLE_CODE(bref.unpack(supported_num_tag_present, 1)); + + if (supported_num_tag_present) { + HANDLE_CODE(supported_num_tag.unpack(bref)); + } return SRSASN_SUCCESS; } -void rrc_reest_request_ies_s::to_json(json_writer& j) const +void ca_params_nr_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("ue-Identity"); - ue_id.to_json(j); - j.write_str("reestablishmentCause", reest_cause.to_string()); - j.write_str("spare", spare.to_string()); + if (dummy_present) { + j.write_str("dummy", "supported"); + } + if (parallel_tx_srs_pucch_pusch_present) { + j.write_str("parallelTxSRS-PUCCH-PUSCH", "supported"); + } + if (parallel_tx_prach_srs_pucch_pusch_present) { + j.write_str("parallelTxPRACH-SRS-PUCCH-PUSCH", "supported"); + } + if (simul_rx_tx_inter_band_ca_present) { + j.write_str("simultaneousRxTxInterBandCA", "supported"); + } + if (simul_rx_tx_sul_present) { + j.write_str("simultaneousRxTxSUL", "supported"); + } + if (diff_numerology_across_pucch_group_present) { + j.write_str("diffNumerologyAcrossPUCCH-Group", "supported"); + } + if (diff_numerology_within_pucch_group_smaller_scs_present) { + j.write_str("diffNumerologyWithinPUCCH-GroupSmallerSCS", "supported"); + } + if (supported_num_tag_present) { + j.write_str("supportedNumberTAG", supported_num_tag.to_string()); + } j.end_obj(); } -// RRCResumeRequest-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_request_ies_s::pack(bit_ref& bref) const +std::string ca_params_nr_s::supported_num_tag_opts::to_string() const { - HANDLE_CODE(resume_id.pack(bref)); - HANDLE_CODE(resume_mac_i.pack(bref)); - HANDLE_CODE(resume_cause.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + 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 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 +SRSASN_CODE mrdc_params_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(single_ul_tx_present, 1)); + HANDLE_CODE(bref.pack(dynamic_pwr_sharing_endc_present, 1)); + HANDLE_CODE(bref.pack(tdm_pattern_present, 1)); + HANDLE_CODE(bref.pack(ul_sharing_eutra_nr_present, 1)); + HANDLE_CODE(bref.pack(ul_switching_time_eutra_nr_present, 1)); + HANDLE_CODE(bref.pack(simul_rx_tx_inter_band_endc_present, 1)); + HANDLE_CODE(bref.pack(async_intra_band_endc_present, 1)); + if (ul_sharing_eutra_nr_present) { + HANDLE_CODE(ul_sharing_eutra_nr.pack(bref)); + } + if (ul_switching_time_eutra_nr_present) { + HANDLE_CODE(ul_switching_time_eutra_nr.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= dual_pa_architecture_present; + group_flags[0] |= intra_band_endc_support_present; + group_flags[0] |= ul_timing_align_eutra_nr_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dual_pa_architecture_present, 1)); + HANDLE_CODE(bref.pack(intra_band_endc_support_present, 1)); + HANDLE_CODE(bref.pack(ul_timing_align_eutra_nr_present, 1)); + if (intra_band_endc_support_present) { + HANDLE_CODE(intra_band_endc_support.pack(bref)); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_resume_request_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE mrdc_params_s::unpack(cbit_ref& bref) { - HANDLE_CODE(resume_id.unpack(bref)); - HANDLE_CODE(resume_mac_i.unpack(bref)); - HANDLE_CODE(resume_cause.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(single_ul_tx_present, 1)); + HANDLE_CODE(bref.unpack(dynamic_pwr_sharing_endc_present, 1)); + HANDLE_CODE(bref.unpack(tdm_pattern_present, 1)); + HANDLE_CODE(bref.unpack(ul_sharing_eutra_nr_present, 1)); + HANDLE_CODE(bref.unpack(ul_switching_time_eutra_nr_present, 1)); + HANDLE_CODE(bref.unpack(simul_rx_tx_inter_band_endc_present, 1)); + HANDLE_CODE(bref.unpack(async_intra_band_endc_present, 1)); + + if (ul_sharing_eutra_nr_present) { + HANDLE_CODE(ul_sharing_eutra_nr.unpack(bref)); + } + if (ul_switching_time_eutra_nr_present) { + HANDLE_CODE(ul_switching_time_eutra_nr.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(bref.unpack(dual_pa_architecture_present, 1)); + HANDLE_CODE(bref.unpack(intra_band_endc_support_present, 1)); + HANDLE_CODE(bref.unpack(ul_timing_align_eutra_nr_present, 1)); + if (intra_band_endc_support_present) { + HANDLE_CODE(intra_band_endc_support.unpack(bref)); + } + } + } return SRSASN_SUCCESS; } -void rrc_resume_request_ies_s::to_json(json_writer& j) const +void mrdc_params_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("resumeIdentity", resume_id.to_string()); - j.write_str("resumeMAC-I", resume_mac_i.to_string()); - j.write_str("resumeCause", resume_cause.to_string()); - j.write_str("spare", spare.to_string()); + if (single_ul_tx_present) { + j.write_str("singleUL-Transmission", "supported"); + } + if (dynamic_pwr_sharing_endc_present) { + j.write_str("dynamicPowerSharingENDC", "supported"); + } + if (tdm_pattern_present) { + j.write_str("tdm-Pattern", "supported"); + } + if (ul_sharing_eutra_nr_present) { + j.write_str("ul-SharingEUTRA-NR", ul_sharing_eutra_nr.to_string()); + } + if (ul_switching_time_eutra_nr_present) { + j.write_str("ul-SwitchingTimeEUTRA-NR", ul_switching_time_eutra_nr.to_string()); + } + if (simul_rx_tx_inter_band_endc_present) { + j.write_str("simultaneousRxTxInterBandENDC", "supported"); + } + if (async_intra_band_endc_present) { + j.write_str("asyncIntraBandENDC", "supported"); + } + if (ext) { + if (dual_pa_architecture_present) { + j.write_str("dualPA-Architecture", "supported"); + } + if (intra_band_endc_support_present) { + j.write_str("intraBandENDC-Support", intra_band_endc_support.to_string()); + } + if (ul_timing_align_eutra_nr_present) { + j.write_str("ul-TimingAlignmentEUTRA-NR", "required"); + } + } j.end_obj(); } -// RRCSetupRequest-IEs ::= SEQUENCE -SRSASN_CODE rrc_setup_request_ies_s::pack(bit_ref& bref) const +std::string mrdc_params_s::ul_sharing_eutra_nr_opts::to_string() const { - HANDLE_CODE(ue_id.pack(bref)); - HANDLE_CODE(establishment_cause.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + static const char* options[] = {"tdm", "fdm", "both"}; + return convert_enum_idx(options, 3, value, "mrdc_params_s::ul_sharing_eutra_nr_e_"); +} - return SRSASN_SUCCESS; +std::string mrdc_params_s::ul_switching_time_eutra_nr_opts::to_string() const +{ + static const char* options[] = {"type1", "type2"}; + return convert_enum_idx(options, 2, value, "mrdc_params_s::ul_switching_time_eutra_nr_e_"); } -SRSASN_CODE rrc_setup_request_ies_s::unpack(cbit_ref& bref) +uint8_t mrdc_params_s::ul_switching_time_eutra_nr_opts::to_number() const { - HANDLE_CODE(ue_id.unpack(bref)); - HANDLE_CODE(establishment_cause.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); - - return SRSASN_SUCCESS; + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "mrdc_params_s::ul_switching_time_eutra_nr_e_"); } -void rrc_setup_request_ies_s::to_json(json_writer& j) const + +std::string mrdc_params_s::intra_band_endc_support_opts::to_string() const { - j.start_obj(); - j.write_fieldname("ue-Identity"); - ue_id.to_json(j); - j.write_str("establishmentCause", establishment_cause.to_string()); - j.write_str("spare", spare.to_string()); - j.end_obj(); + static const char* options[] = {"non-contiguous", "both"}; + return convert_enum_idx(options, 2, value, "mrdc_params_s::intra_band_endc_support_e_"); } -// RRCSystemInfoRequest-r15-IEs ::= SEQUENCE -SRSASN_CODE rrc_sys_info_request_r15_ies_s::pack(bit_ref& bref) const +// BandCombination ::= SEQUENCE +SRSASN_CODE band_combination_s::pack(bit_ref& bref) const { - HANDLE_CODE(requested_si_list.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + HANDLE_CODE(bref.pack(ca_params_eutra_present, 1)); + HANDLE_CODE(bref.pack(ca_params_nr_present, 1)); + HANDLE_CODE(bref.pack(mrdc_params_present, 1)); + HANDLE_CODE(bref.pack(supported_bw_combination_set_present, 1)); + HANDLE_CODE(bref.pack(pwr_class_v1530_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, band_list, 1, 32)); + HANDLE_CODE(pack_integer(bref, feature_set_combination, (uint16_t)0u, (uint16_t)1024u)); + if (ca_params_eutra_present) { + HANDLE_CODE(ca_params_eutra.pack(bref)); + } + if (ca_params_nr_present) { + HANDLE_CODE(ca_params_nr.pack(bref)); + } + if (mrdc_params_present) { + HANDLE_CODE(mrdc_params.pack(bref)); + } + if (supported_bw_combination_set_present) { + HANDLE_CODE(supported_bw_combination_set.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_sys_info_request_r15_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_s::unpack(cbit_ref& bref) { - HANDLE_CODE(requested_si_list.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + HANDLE_CODE(bref.unpack(ca_params_eutra_present, 1)); + HANDLE_CODE(bref.unpack(ca_params_nr_present, 1)); + HANDLE_CODE(bref.unpack(mrdc_params_present, 1)); + HANDLE_CODE(bref.unpack(supported_bw_combination_set_present, 1)); + HANDLE_CODE(bref.unpack(pwr_class_v1530_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(band_list, bref, 1, 32)); + HANDLE_CODE(unpack_integer(feature_set_combination, bref, (uint16_t)0u, (uint16_t)1024u)); + if (ca_params_eutra_present) { + HANDLE_CODE(ca_params_eutra.unpack(bref)); + } + if (ca_params_nr_present) { + HANDLE_CODE(ca_params_nr.unpack(bref)); + } + if (mrdc_params_present) { + HANDLE_CODE(mrdc_params.unpack(bref)); + } + if (supported_bw_combination_set_present) { + HANDLE_CODE(supported_bw_combination_set.unpack(bref)); + } return SRSASN_SUCCESS; } -void rrc_sys_info_request_r15_ies_s::to_json(json_writer& j) const +void band_combination_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("requested-SI-List", requested_si_list.to_string()); - j.write_str("spare", spare.to_string()); + j.start_array("bandList"); + for (const auto& e1 : band_list) { + e1.to_json(j); + } + j.end_array(); + j.write_int("featureSetCombination", feature_set_combination); + if (ca_params_eutra_present) { + j.write_fieldname("ca-ParametersEUTRA"); + ca_params_eutra.to_json(j); + } + if (ca_params_nr_present) { + j.write_fieldname("ca-ParametersNR"); + ca_params_nr.to_json(j); + } + if (mrdc_params_present) { + j.write_fieldname("mrdc-Parameters"); + mrdc_params.to_json(j); + } + if (supported_bw_combination_set_present) { + j.write_str("supportedBandwidthCombinationSet", supported_bw_combination_set.to_string()); + } + if (pwr_class_v1530_present) { + j.write_str("powerClass-v1530", "pc2"); + } j.end_obj(); } -// RRCReestablishmentRequest ::= SEQUENCE -SRSASN_CODE rrc_reest_request_s::pack(bit_ref& bref) const +// SRS-SwitchingTimeEUTRA ::= SEQUENCE +SRSASN_CODE srs_switching_time_eutra_s::pack(bit_ref& bref) const { - HANDLE_CODE(rrc_reest_request.pack(bref)); + HANDLE_CODE(bref.pack(switching_time_dl_present, 1)); + HANDLE_CODE(bref.pack(switching_time_ul_present, 1)); + + if (switching_time_dl_present) { + HANDLE_CODE(switching_time_dl.pack(bref)); + } + if (switching_time_ul_present) { + HANDLE_CODE(switching_time_ul.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_reest_request_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_switching_time_eutra_s::unpack(cbit_ref& bref) { - HANDLE_CODE(rrc_reest_request.unpack(bref)); + HANDLE_CODE(bref.unpack(switching_time_dl_present, 1)); + HANDLE_CODE(bref.unpack(switching_time_ul_present, 1)); + + if (switching_time_dl_present) { + HANDLE_CODE(switching_time_dl.unpack(bref)); + } + if (switching_time_ul_present) { + HANDLE_CODE(switching_time_ul.unpack(bref)); + } return SRSASN_SUCCESS; } -void rrc_reest_request_s::to_json(json_writer& j) const +void srs_switching_time_eutra_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("rrcReestablishmentRequest"); - rrc_reest_request.to_json(j); + if (switching_time_dl_present) { + j.write_str("switchingTimeDL", switching_time_dl.to_string()); + } + if (switching_time_ul_present) { + j.write_str("switchingTimeUL", switching_time_ul.to_string()); + } j.end_obj(); } -// RRCResumeRequest ::= SEQUENCE -SRSASN_CODE rrc_resume_request_s::pack(bit_ref& bref) const +std::string srs_switching_time_eutra_s::switching_time_dl_opts::to_string() const { - HANDLE_CODE(rrc_resume_request.pack(bref)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE rrc_resume_request_s::unpack(cbit_ref& bref) +float srs_switching_time_eutra_s::switching_time_dl_opts::to_number() const { - HANDLE_CODE(rrc_resume_request.unpack(bref)); - - return SRSASN_SUCCESS; + 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_"); } -void rrc_resume_request_s::to_json(json_writer& j) const +std::string srs_switching_time_eutra_s::switching_time_dl_opts::to_number_string() const { - j.start_obj(); - j.write_fieldname("rrcResumeRequest"); - rrc_resume_request.to_json(j); - j.end_obj(); + 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_"); } -// RRCSetupRequest ::= SEQUENCE -SRSASN_CODE rrc_setup_request_s::pack(bit_ref& bref) const +std::string srs_switching_time_eutra_s::switching_time_ul_opts::to_string() const { - HANDLE_CODE(rrc_setup_request.pack(bref)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE rrc_setup_request_s::unpack(cbit_ref& bref) +float srs_switching_time_eutra_s::switching_time_ul_opts::to_number() const { - HANDLE_CODE(rrc_setup_request.unpack(bref)); - - return SRSASN_SUCCESS; + 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_"); } -void rrc_setup_request_s::to_json(json_writer& j) const +std::string srs_switching_time_eutra_s::switching_time_ul_opts::to_number_string() const { - j.start_obj(); - j.write_fieldname("rrcSetupRequest"); - rrc_setup_request.to_json(j); - j.end_obj(); + 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_"); } -// RRCSystemInfoRequest ::= SEQUENCE -SRSASN_CODE rrc_sys_info_request_s::pack(bit_ref& bref) const +// SRS-SwitchingTimeNR ::= SEQUENCE +SRSASN_CODE srs_switching_time_nr_s::pack(bit_ref& bref) const { - HANDLE_CODE(crit_exts.pack(bref)); + HANDLE_CODE(bref.pack(switching_time_dl_present, 1)); + HANDLE_CODE(bref.pack(switching_time_ul_present, 1)); + + if (switching_time_dl_present) { + HANDLE_CODE(switching_time_dl.pack(bref)); + } + if (switching_time_ul_present) { + HANDLE_CODE(switching_time_ul.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_sys_info_request_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_switching_time_nr_s::unpack(cbit_ref& bref) { - HANDLE_CODE(crit_exts.unpack(bref)); + HANDLE_CODE(bref.unpack(switching_time_dl_present, 1)); + HANDLE_CODE(bref.unpack(switching_time_ul_present, 1)); + + if (switching_time_dl_present) { + HANDLE_CODE(switching_time_dl.unpack(bref)); + } + if (switching_time_ul_present) { + HANDLE_CODE(switching_time_ul.unpack(bref)); + } return SRSASN_SUCCESS; } -void rrc_sys_info_request_s::to_json(json_writer& j) const +void srs_switching_time_nr_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + if (switching_time_dl_present) { + j.write_str("switchingTimeDL", switching_time_dl.to_string()); + } + if (switching_time_ul_present) { + j.write_str("switchingTimeUL", switching_time_ul.to_string()); + } j.end_obj(); } -void rrc_sys_info_request_s::crit_exts_c_::destroy_() +std::string srs_switching_time_nr_s::switching_time_dl_opts::to_string() const { - switch (type_) { - case types::rrc_sys_info_request_r15: - c.destroy(); - break; - default: - break; - } + 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_"); } -void rrc_sys_info_request_s::crit_exts_c_::set(types::options e) +uint16_t srs_switching_time_nr_s::switching_time_dl_opts::to_number() const { - destroy_(); - type_ = e; - switch (type_) { - case types::rrc_sys_info_request_r15: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - } + 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_"); } -rrc_sys_info_request_s::crit_exts_c_::crit_exts_c_(const rrc_sys_info_request_s::crit_exts_c_& other) + +std::string srs_switching_time_nr_s::switching_time_ul_opts::to_string() const { - type_ = other.type(); - switch (type_) { - case types::rrc_sys_info_request_r15: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - } + 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_"); } -rrc_sys_info_request_s::crit_exts_c_& rrc_sys_info_request_s::crit_exts_c_:: - operator=(const rrc_sys_info_request_s::crit_exts_c_& other) +uint16_t srs_switching_time_nr_s::switching_time_ul_opts::to_number() const { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::rrc_sys_info_request_r15: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - } - - return *this; + 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_"); } -void rrc_sys_info_request_s::crit_exts_c_::to_json(json_writer& j) const + +// BandParameters-v1540 ::= SEQUENCE +SRSASN_CODE band_params_v1540_s::pack(bit_ref& bref) const { - j.start_obj(); - switch (type_) { - case types::rrc_sys_info_request_r15: - j.write_fieldname("rrcSystemInfoRequest-r15"); - c.get().to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); + HANDLE_CODE(bref.pack(srs_carrier_switch_present, 1)); + HANDLE_CODE(bref.pack(srs_tx_switch_present, 1)); + + if (srs_carrier_switch_present) { + HANDLE_CODE(srs_carrier_switch.pack(bref)); } - j.end_obj(); -} -SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_sys_info_request_r15: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (srs_tx_switch_present) { + HANDLE_CODE(bref.pack(srs_tx_switch.tx_switch_impact_to_rx_present, 1)); + HANDLE_CODE(bref.pack(srs_tx_switch.tx_switch_with_another_band_present, 1)); + HANDLE_CODE(srs_tx_switch.supported_srs_tx_port_switch.pack(bref)); + if (srs_tx_switch.tx_switch_impact_to_rx_present) { + HANDLE_CODE(pack_integer(bref, srs_tx_switch.tx_switch_impact_to_rx, (uint8_t)1u, (uint8_t)32u)); + } + if (srs_tx_switch.tx_switch_with_another_band_present) { + HANDLE_CODE(pack_integer(bref, srs_tx_switch.tx_switch_with_another_band, (uint8_t)1u, (uint8_t)32u)); + } } + return SRSASN_SUCCESS; } -SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE band_params_v1540_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_sys_info_request_r15: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; + HANDLE_CODE(bref.unpack(srs_carrier_switch_present, 1)); + HANDLE_CODE(bref.unpack(srs_tx_switch_present, 1)); + + if (srs_carrier_switch_present) { + HANDLE_CODE(srs_carrier_switch.unpack(bref)); } + if (srs_tx_switch_present) { + HANDLE_CODE(bref.unpack(srs_tx_switch.tx_switch_impact_to_rx_present, 1)); + HANDLE_CODE(bref.unpack(srs_tx_switch.tx_switch_with_another_band_present, 1)); + HANDLE_CODE(srs_tx_switch.supported_srs_tx_port_switch.unpack(bref)); + if (srs_tx_switch.tx_switch_impact_to_rx_present) { + HANDLE_CODE(unpack_integer(srs_tx_switch.tx_switch_impact_to_rx, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (srs_tx_switch.tx_switch_with_another_band_present) { + HANDLE_CODE(unpack_integer(srs_tx_switch.tx_switch_with_another_band, bref, (uint8_t)1u, (uint8_t)32u)); + } + } + return SRSASN_SUCCESS; } - -std::string rrc_sys_info_request_s::crit_exts_c_::types_opts::to_string() const +void band_params_v1540_s::to_json(json_writer& j) const { - static const char* options[] = {"rrcSystemInfoRequest-r15", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_sys_info_request_s::crit_exts_c_::types"); + j.start_obj(); + if (srs_carrier_switch_present) { + j.write_fieldname("srs-CarrierSwitch"); + srs_carrier_switch.to_json(j); + } + if (srs_tx_switch_present) { + j.write_fieldname("srs-TxSwitch"); + j.start_obj(); + j.write_str("supportedSRS-TxPortSwitch", srs_tx_switch.supported_srs_tx_port_switch.to_string()); + if (srs_tx_switch.tx_switch_impact_to_rx_present) { + j.write_int("txSwitchImpactToRx", srs_tx_switch.tx_switch_impact_to_rx); + } + if (srs_tx_switch.tx_switch_with_another_band_present) { + j.write_int("txSwitchWithAnotherBand", srs_tx_switch.tx_switch_with_another_band); + } + j.end_obj(); + } + j.end_obj(); } -// UL-CCCH-MessageType ::= CHOICE -void ul_ccch_msg_type_c::destroy_() +void band_params_v1540_s::srs_carrier_switch_c_::destroy_() { switch (type_) { - case types::c1: - c.destroy(); + case types::nr: + c.destroy(); + break; + case types::eutra: + c.destroy(); break; default: break; } } -void ul_ccch_msg_type_c::set(types::options e) +void band_params_v1540_s::srs_carrier_switch_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::c1: - c.init(); + case types::nr: + c.init(); break; - case types::msg_class_ext: + case types::eutra: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); } } -ul_ccch_msg_type_c::ul_ccch_msg_type_c(const ul_ccch_msg_type_c& other) +band_params_v1540_s::srs_carrier_switch_c_::srs_carrier_switch_c_( + const band_params_v1540_s::srs_carrier_switch_c_& other) { type_ = other.type(); switch (type_) { - case types::c1: - c.init(other.c.get()); + case types::nr: + c.init(other.c.get()); break; - case types::msg_class_ext: + case types::eutra: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); } } -ul_ccch_msg_type_c& ul_ccch_msg_type_c::operator=(const ul_ccch_msg_type_c& other) +band_params_v1540_s::srs_carrier_switch_c_& +band_params_v1540_s::srs_carrier_switch_c_::operator=(const band_params_v1540_s::srs_carrier_switch_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::c1: - c.set(other.c.get()); + case types::nr: + c.set(other.c.get()); break; - case types::msg_class_ext: + case types::eutra: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); } return *this; } -void ul_ccch_msg_type_c::to_json(json_writer& j) const +void band_params_v1540_s::srs_carrier_switch_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.get().to_json(j); + case types::nr: + j.write_fieldname("nr"); + j.start_obj(); + j.start_array("srs-SwitchingTimesListNR"); + for (const auto& e1 : c.get().srs_switching_times_list_nr) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); break; - case types::msg_class_ext: + case types::eutra: + j.write_fieldname("eutra"); + j.start_obj(); + j.start_array("srs-SwitchingTimesListEUTRA"); + for (const auto& e1 : c.get().srs_switching_times_list_eutra) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); } j.end_obj(); } -SRSASN_CODE ul_ccch_msg_type_c::pack(bit_ref& bref) const +SRSASN_CODE band_params_v1540_s::srs_carrier_switch_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::c1: - HANDLE_CODE(c.get().pack(bref)); + case types::nr: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().srs_switching_times_list_nr, 1, 32)); break; - case types::msg_class_ext: + case types::eutra: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().srs_switching_times_list_eutra, 1, 32)); break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE ul_ccch_msg_type_c::unpack(cbit_ref& bref) +SRSASN_CODE band_params_v1540_s::srs_carrier_switch_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::c1: - HANDLE_CODE(c.get().unpack(bref)); + case types::nr: + HANDLE_CODE(unpack_dyn_seq_of(c.get().srs_switching_times_list_nr, bref, 1, 32)); break; - case types::msg_class_ext: + case types::eutra: + HANDLE_CODE(unpack_dyn_seq_of(c.get().srs_switching_times_list_eutra, bref, 1, 32)); break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void ul_ccch_msg_type_c::c1_c_::destroy_() +std::string band_params_v1540_s::srs_carrier_switch_c_::types_opts::to_string() const { - switch (type_) { - case types::rrc_setup_request: - c.destroy(); - break; - case types::rrc_resume_request: - c.destroy(); - break; - case types::rrc_reest_request: - c.destroy(); - break; - case types::rrc_sys_info_request: - c.destroy(); - break; - default: - break; - } + static const char* options[] = {"nr", "eutra"}; + return convert_enum_idx(options, 2, value, "band_params_v1540_s::srs_carrier_switch_c_::types"); } -void ul_ccch_msg_type_c::c1_c_::set(types::options e) + +std::string band_params_v1540_s::srs_tx_switch_s_::supported_srs_tx_port_switch_opts::to_string() const { - destroy_(); - type_ = e; - switch (type_) { - case types::rrc_setup_request: - c.init(); - break; - case types::rrc_resume_request: - c.init(); - break; - case types::rrc_reest_request: - c.init(); - break; - case types::rrc_sys_info_request: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); - } + 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_s_::supported_srs_tx_port_switch_e_"); } -ul_ccch_msg_type_c::c1_c_::c1_c_(const ul_ccch_msg_type_c::c1_c_& other) + +// CA-ParametersNR-v1540 ::= SEQUENCE +SRSASN_CODE ca_params_nr_v1540_s::pack(bit_ref& bref) const { - type_ = other.type(); - switch (type_) { - case types::rrc_setup_request: - c.init(other.c.get()); - break; - case types::rrc_resume_request: - c.init(other.c.get()); - break; - case types::rrc_reest_request: - c.init(other.c.get()); - break; - case types::rrc_sys_info_request: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); + HANDLE_CODE(bref.pack(simul_srs_assoc_csi_rs_all_cc_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_im_reception_for_feedback_per_band_comb_present, 1)); + HANDLE_CODE(bref.pack(simul_csi_reports_all_cc_present, 1)); + HANDLE_CODE(bref.pack(dual_pa_architecture_present, 1)); + + if (simul_srs_assoc_csi_rs_all_cc_present) { + HANDLE_CODE(pack_integer(bref, simul_srs_assoc_csi_rs_all_cc, (uint8_t)5u, (uint8_t)32u)); + } + if (csi_rs_im_reception_for_feedback_per_band_comb_present) { + HANDLE_CODE( + bref.pack(csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present, 1)); + HANDLE_CODE(bref.pack( + csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present, 1)); + if (csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present) { + HANDLE_CODE(pack_integer(bref, + csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc, + (uint8_t)1u, + (uint8_t)64u)); + } + if (csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present) { + HANDLE_CODE( + pack_integer(bref, + csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc, + (uint16_t)2u, + (uint16_t)256u)); + } + } + if (simul_csi_reports_all_cc_present) { + HANDLE_CODE(pack_integer(bref, simul_csi_reports_all_cc, (uint8_t)5u, (uint8_t)32u)); } + + return SRSASN_SUCCESS; } -ul_ccch_msg_type_c::c1_c_& ul_ccch_msg_type_c::c1_c_::operator=(const ul_ccch_msg_type_c::c1_c_& other) +SRSASN_CODE ca_params_nr_v1540_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + HANDLE_CODE(bref.unpack(simul_srs_assoc_csi_rs_all_cc_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_im_reception_for_feedback_per_band_comb_present, 1)); + HANDLE_CODE(bref.unpack(simul_csi_reports_all_cc_present, 1)); + HANDLE_CODE(bref.unpack(dual_pa_architecture_present, 1)); + + if (simul_srs_assoc_csi_rs_all_cc_present) { + HANDLE_CODE(unpack_integer(simul_srs_assoc_csi_rs_all_cc, bref, (uint8_t)5u, (uint8_t)32u)); } - set(other.type()); - switch (type_) { - case types::rrc_setup_request: - c.set(other.c.get()); - break; - case types::rrc_resume_request: - c.set(other.c.get()); - break; - case types::rrc_reest_request: - c.set(other.c.get()); - break; - case types::rrc_sys_info_request: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); + if (csi_rs_im_reception_for_feedback_per_band_comb_present) { + HANDLE_CODE( + bref.unpack(csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present, 1)); + HANDLE_CODE(bref.unpack( + csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present, 1)); + if (csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present) { + HANDLE_CODE(unpack_integer(csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc, + bref, + (uint8_t)1u, + (uint8_t)64u)); + } + if (csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present) { + HANDLE_CODE( + unpack_integer(csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc, + bref, + (uint16_t)2u, + (uint16_t)256u)); + } + } + if (simul_csi_reports_all_cc_present) { + HANDLE_CODE(unpack_integer(simul_csi_reports_all_cc, bref, (uint8_t)5u, (uint8_t)32u)); } - return *this; + return SRSASN_SUCCESS; } -void ul_ccch_msg_type_c::c1_c_::to_json(json_writer& j) const +void ca_params_nr_v1540_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::rrc_setup_request: - j.write_fieldname("rrcSetupRequest"); - c.get().to_json(j); - break; - case types::rrc_resume_request: - j.write_fieldname("rrcResumeRequest"); - c.get().to_json(j); - break; - case types::rrc_reest_request: - j.write_fieldname("rrcReestablishmentRequest"); - c.get().to_json(j); - break; - case types::rrc_sys_info_request: - j.write_fieldname("rrcSystemInfoRequest"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); + if (simul_srs_assoc_csi_rs_all_cc_present) { + j.write_int("simultaneousSRS-AssocCSI-RS-AllCC", simul_srs_assoc_csi_rs_all_cc); + } + if (csi_rs_im_reception_for_feedback_per_band_comb_present) { + j.write_fieldname("csi-RS-IM-ReceptionForFeedbackPerBandComb"); + j.start_obj(); + if (csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present) { + j.write_int("maxNumberSimultaneousNZP-CSI-RS-ActBWP-AllCC", + csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc); + } + if (csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present) { + j.write_int("totalNumberPortsSimultaneousNZP-CSI-RS-ActBWP-AllCC", + csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc); + } + j.end_obj(); + } + if (simul_csi_reports_all_cc_present) { + j.write_int("simultaneousCSI-ReportsAllCC", simul_csi_reports_all_cc); + } + if (dual_pa_architecture_present) { + j.write_str("dualPA-Architecture", "supported"); } j.end_obj(); } -SRSASN_CODE ul_ccch_msg_type_c::c1_c_::pack(bit_ref& bref) const + +// BandCombination-v1540 ::= SEQUENCE +SRSASN_CODE band_combination_v1540_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::rrc_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_resume_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_reest_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_sys_info_request: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + HANDLE_CODE(bref.pack(ca_params_nr_v1540_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, band_list_v1540, 1, 32)); + if (ca_params_nr_v1540_present) { + HANDLE_CODE(ca_params_nr_v1540.pack(bref)); } + return SRSASN_SUCCESS; } -SRSASN_CODE ul_ccch_msg_type_c::c1_c_::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_v1540_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_resume_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_reest_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_sys_info_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; + HANDLE_CODE(bref.unpack(ca_params_nr_v1540_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(band_list_v1540, bref, 1, 32)); + if (ca_params_nr_v1540_present) { + HANDLE_CODE(ca_params_nr_v1540.unpack(bref)); } + return SRSASN_SUCCESS; } - -std::string ul_ccch_msg_type_c::c1_c_::types_opts::to_string() const +void band_combination_v1540_s::to_json(json_writer& j) const { - static const char* options[] = { - "rrcSetupRequest", "rrcResumeRequest", "rrcReestablishmentRequest", "rrcSystemInfoRequest"}; - return convert_enum_idx(options, 4, value, "ul_ccch_msg_type_c::c1_c_::types"); + j.start_obj(); + j.start_array("bandList-v1540"); + for (const auto& e1 : band_list_v1540) { + e1.to_json(j); + } + j.end_array(); + if (ca_params_nr_v1540_present) { + j.write_fieldname("ca-ParametersNR-v1540"); + ca_params_nr_v1540.to_json(j); + } + j.end_obj(); } -std::string ul_ccch_msg_type_c::types_opts::to_string() const +// CA-ParametersNR-v1550 ::= SEQUENCE +SRSASN_CODE ca_params_nr_v1550_s::pack(bit_ref& bref) const { - static const char* options[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(options, 2, value, "ul_ccch_msg_type_c::types"); + HANDLE_CODE(bref.pack(dummy_present, 1)); + + return SRSASN_SUCCESS; } -uint8_t ul_ccch_msg_type_c::types_opts::to_number() const +SRSASN_CODE ca_params_nr_v1550_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {1}; - return map_enum_number(options, 1, value, "ul_ccch_msg_type_c::types"); -} + HANDLE_CODE(bref.unpack(dummy_present, 1)); -// UL-CCCH-Message ::= SEQUENCE -SRSASN_CODE ul_ccch_msg_s::pack(bit_ref& bref) const + return SRSASN_SUCCESS; +} +void ca_params_nr_v1550_s::to_json(json_writer& j) const { - HANDLE_CODE(msg.pack(bref)); + j.start_obj(); + if (dummy_present) { + j.write_str("dummy", "supported"); + } + j.end_obj(); +} - bref.align_bytes_zero(); +// BandCombination-v1550 ::= SEQUENCE +SRSASN_CODE band_combination_v1550_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(ca_params_nr_v1550.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ul_ccch_msg_s::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_v1550_s::unpack(cbit_ref& bref) { - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); + HANDLE_CODE(ca_params_nr_v1550.unpack(bref)); return SRSASN_SUCCESS; } -void ul_ccch_msg_s::to_json(json_writer& j) const +void band_combination_v1550_s::to_json(json_writer& j) const { - j.start_array(); j.start_obj(); - j.start_obj("UL-CCCH-Message"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); + j.write_fieldname("ca-ParametersNR-v1550"); + ca_params_nr_v1550.to_json(j); j.end_obj(); - j.end_array(); } -// RRCResumeRequest1-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_request1_ies_s::pack(bit_ref& bref) const +// CA-ParametersNR-v1560 ::= SEQUENCE +SRSASN_CODE ca_params_nr_v1560_s::pack(bit_ref& bref) const { - HANDLE_CODE(resume_id.pack(bref)); - HANDLE_CODE(resume_mac_i.pack(bref)); - HANDLE_CODE(resume_cause.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + HANDLE_CODE(bref.pack(diff_numerology_within_pucch_group_larger_scs_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE rrc_resume_request1_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE ca_params_nr_v1560_s::unpack(cbit_ref& bref) { - HANDLE_CODE(resume_id.unpack(bref)); - HANDLE_CODE(resume_mac_i.unpack(bref)); - HANDLE_CODE(resume_cause.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + HANDLE_CODE(bref.unpack(diff_numerology_within_pucch_group_larger_scs_present, 1)); return SRSASN_SUCCESS; } -void rrc_resume_request1_ies_s::to_json(json_writer& j) const +void ca_params_nr_v1560_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("resumeIdentity", resume_id.to_string()); - j.write_str("resumeMAC-I", resume_mac_i.to_string()); - j.write_str("resumeCause", resume_cause.to_string()); - j.write_str("spare", spare.to_string()); + if (diff_numerology_within_pucch_group_larger_scs_present) { + j.write_str("diffNumerologyWithinPUCCH-GroupLargerSCS", "supported"); + } j.end_obj(); } -// RRCResumeRequest1 ::= SEQUENCE -SRSASN_CODE rrc_resume_request1_s::pack(bit_ref& bref) const +// CA-ParametersEUTRA-v1560 ::= SEQUENCE +SRSASN_CODE ca_params_eutra_v1560_s::pack(bit_ref& bref) const { - HANDLE_CODE(rrc_resume_request1.pack(bref)); + HANDLE_CODE(bref.pack(fd_mimo_total_weighted_layers_present, 1)); + + if (fd_mimo_total_weighted_layers_present) { + HANDLE_CODE(pack_integer(bref, fd_mimo_total_weighted_layers, (uint8_t)2u, (uint8_t)128u)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_resume_request1_s::unpack(cbit_ref& bref) +SRSASN_CODE ca_params_eutra_v1560_s::unpack(cbit_ref& bref) { - HANDLE_CODE(rrc_resume_request1.unpack(bref)); + HANDLE_CODE(bref.unpack(fd_mimo_total_weighted_layers_present, 1)); + + if (fd_mimo_total_weighted_layers_present) { + HANDLE_CODE(unpack_integer(fd_mimo_total_weighted_layers, bref, (uint8_t)2u, (uint8_t)128u)); + } return SRSASN_SUCCESS; } -void rrc_resume_request1_s::to_json(json_writer& j) const +void ca_params_eutra_v1560_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("rrcResumeRequest1"); - rrc_resume_request1.to_json(j); + if (fd_mimo_total_weighted_layers_present) { + j.write_int("fd-MIMO-TotalWeightedLayers", fd_mimo_total_weighted_layers); + } j.end_obj(); } -// UL-CCCH1-MessageType ::= CHOICE -void ul_ccch1_msg_type_c::destroy_() +// CA-ParametersNRDC ::= SEQUENCE +SRSASN_CODE ca_params_nrdc_s::pack(bit_ref& bref) const { - switch (type_) { - case types::c1: - c.destroy(); - break; - default: - break; + HANDLE_CODE(bref.pack(ca_params_nr_for_dc_present, 1)); + HANDLE_CODE(bref.pack(ca_params_nr_for_dc_v1540_present, 1)); + HANDLE_CODE(bref.pack(ca_params_nr_for_dc_v1550_present, 1)); + HANDLE_CODE(bref.pack(ca_params_nr_for_dc_v1560_present, 1)); + HANDLE_CODE(bref.pack(feature_set_combination_dc_present, 1)); + + if (ca_params_nr_for_dc_present) { + HANDLE_CODE(ca_params_nr_for_dc.pack(bref)); } -} -void ul_ccch1_msg_type_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::c1: - c.init(); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); + if (ca_params_nr_for_dc_v1540_present) { + HANDLE_CODE(ca_params_nr_for_dc_v1540.pack(bref)); } -} -ul_ccch1_msg_type_c::ul_ccch1_msg_type_c(const ul_ccch1_msg_type_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::c1: - c.init(other.c.get()); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); + if (ca_params_nr_for_dc_v1550_present) { + HANDLE_CODE(ca_params_nr_for_dc_v1550.pack(bref)); + } + if (ca_params_nr_for_dc_v1560_present) { + HANDLE_CODE(ca_params_nr_for_dc_v1560.pack(bref)); + } + if (feature_set_combination_dc_present) { + HANDLE_CODE(pack_integer(bref, feature_set_combination_dc, (uint16_t)0u, (uint16_t)1024u)); } + + return SRSASN_SUCCESS; } -ul_ccch1_msg_type_c& ul_ccch1_msg_type_c::operator=(const ul_ccch1_msg_type_c& other) +SRSASN_CODE ca_params_nrdc_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + HANDLE_CODE(bref.unpack(ca_params_nr_for_dc_present, 1)); + HANDLE_CODE(bref.unpack(ca_params_nr_for_dc_v1540_present, 1)); + HANDLE_CODE(bref.unpack(ca_params_nr_for_dc_v1550_present, 1)); + HANDLE_CODE(bref.unpack(ca_params_nr_for_dc_v1560_present, 1)); + HANDLE_CODE(bref.unpack(feature_set_combination_dc_present, 1)); + + if (ca_params_nr_for_dc_present) { + HANDLE_CODE(ca_params_nr_for_dc.unpack(bref)); } - set(other.type()); - switch (type_) { - case types::c1: - c.set(other.c.get()); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); + if (ca_params_nr_for_dc_v1540_present) { + HANDLE_CODE(ca_params_nr_for_dc_v1540.unpack(bref)); + } + if (ca_params_nr_for_dc_v1550_present) { + HANDLE_CODE(ca_params_nr_for_dc_v1550.unpack(bref)); + } + if (ca_params_nr_for_dc_v1560_present) { + HANDLE_CODE(ca_params_nr_for_dc_v1560.unpack(bref)); + } + if (feature_set_combination_dc_present) { + HANDLE_CODE(unpack_integer(feature_set_combination_dc, bref, (uint16_t)0u, (uint16_t)1024u)); } - return *this; + return SRSASN_SUCCESS; } -void ul_ccch1_msg_type_c::to_json(json_writer& j) const +void ca_params_nrdc_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.get().to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); + if (ca_params_nr_for_dc_present) { + j.write_fieldname("ca-ParametersNR-ForDC"); + ca_params_nr_for_dc.to_json(j); + } + if (ca_params_nr_for_dc_v1540_present) { + j.write_fieldname("ca-ParametersNR-ForDC-v1540"); + ca_params_nr_for_dc_v1540.to_json(j); + } + if (ca_params_nr_for_dc_v1550_present) { + j.write_fieldname("ca-ParametersNR-ForDC-v1550"); + ca_params_nr_for_dc_v1550.to_json(j); + } + if (ca_params_nr_for_dc_v1560_present) { + j.write_fieldname("ca-ParametersNR-ForDC-v1560"); + ca_params_nr_for_dc_v1560.to_json(j); + } + if (feature_set_combination_dc_present) { + j.write_int("featureSetCombinationDC", feature_set_combination_dc); } j.end_obj(); } -SRSASN_CODE ul_ccch1_msg_type_c::pack(bit_ref& bref) const + +// BandCombination-v1560 ::= SEQUENCE +SRSASN_CODE band_combination_v1560_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); - return SRSASN_ERROR_ENCODE_FAIL; + HANDLE_CODE(bref.pack(ne_dc_bc_present, 1)); + HANDLE_CODE(bref.pack(ca_params_nrdc_present, 1)); + HANDLE_CODE(bref.pack(ca_params_eutra_v1560_present, 1)); + HANDLE_CODE(bref.pack(ca_params_nr_v1560_present, 1)); + + if (ca_params_nrdc_present) { + HANDLE_CODE(ca_params_nrdc.pack(bref)); + } + if (ca_params_eutra_v1560_present) { + HANDLE_CODE(ca_params_eutra_v1560.pack(bref)); } + if (ca_params_nr_v1560_present) { + HANDLE_CODE(ca_params_nr_v1560.pack(bref)); + } + return SRSASN_SUCCESS; } -SRSASN_CODE ul_ccch1_msg_type_c::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_v1560_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); - return SRSASN_ERROR_DECODE_FAIL; + HANDLE_CODE(bref.unpack(ne_dc_bc_present, 1)); + HANDLE_CODE(bref.unpack(ca_params_nrdc_present, 1)); + HANDLE_CODE(bref.unpack(ca_params_eutra_v1560_present, 1)); + HANDLE_CODE(bref.unpack(ca_params_nr_v1560_present, 1)); + + if (ca_params_nrdc_present) { + HANDLE_CODE(ca_params_nrdc.unpack(bref)); + } + if (ca_params_eutra_v1560_present) { + HANDLE_CODE(ca_params_eutra_v1560.unpack(bref)); + } + if (ca_params_nr_v1560_present) { + HANDLE_CODE(ca_params_nr_v1560.unpack(bref)); } - return SRSASN_SUCCESS; -} -void ul_ccch1_msg_type_c::c1_c_::set(types::options e) -{ - type_ = e; + return SRSASN_SUCCESS; } -void ul_ccch1_msg_type_c::c1_c_::to_json(json_writer& j) const +void band_combination_v1560_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::rrc_resume_request1: - j.write_fieldname("rrcResumeRequest1"); - c.to_json(j); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c::c1_c_"); + if (ne_dc_bc_present) { + j.write_str("ne-DC-BC", "supported"); + } + if (ca_params_nrdc_present) { + j.write_fieldname("ca-ParametersNRDC"); + ca_params_nrdc.to_json(j); + } + if (ca_params_eutra_v1560_present) { + j.write_fieldname("ca-ParametersEUTRA-v1560"); + ca_params_eutra_v1560.to_json(j); + } + if (ca_params_nr_v1560_present) { + j.write_fieldname("ca-ParametersNR-v1560"); + ca_params_nr_v1560.to_json(j); } j.end_obj(); } -SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::pack(bit_ref& bref) const + +// CA-ParametersEUTRA-v1570 ::= SEQUENCE +SRSASN_CODE ca_params_eutra_v1570_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::rrc_resume_request1: - HANDLE_CODE(c.pack(bref)); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + HANDLE_CODE(bref.pack(dl_minus1024_qam_total_weighted_layers_present, 1)); + + if (dl_minus1024_qam_total_weighted_layers_present) { + HANDLE_CODE(pack_integer(bref, dl_minus1024_qam_total_weighted_layers, (uint8_t)0u, (uint8_t)10u)); } + return SRSASN_SUCCESS; } -SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::unpack(cbit_ref& bref) +SRSASN_CODE ca_params_eutra_v1570_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_resume_request1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} + HANDLE_CODE(bref.unpack(dl_minus1024_qam_total_weighted_layers_present, 1)); -std::string ul_ccch1_msg_type_c::c1_c_::types_opts::to_string() const -{ - 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 const uint8_t options[] = {1}; - return map_enum_number(options, 1, value, "ul_ccch1_msg_type_c::c1_c_::types"); -} + if (dl_minus1024_qam_total_weighted_layers_present) { + HANDLE_CODE(unpack_integer(dl_minus1024_qam_total_weighted_layers, bref, (uint8_t)0u, (uint8_t)10u)); + } -std::string ul_ccch1_msg_type_c::types_opts::to_string() const -{ - static const char* options[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(options, 2, value, "ul_ccch1_msg_type_c::types"); + return SRSASN_SUCCESS; } -uint8_t ul_ccch1_msg_type_c::types_opts::to_number() const +void ca_params_eutra_v1570_s::to_json(json_writer& j) const { - static const uint8_t options[] = {1}; - return map_enum_number(options, 1, value, "ul_ccch1_msg_type_c::types"); + j.start_obj(); + if (dl_minus1024_qam_total_weighted_layers_present) { + j.write_int("dl-1024QAM-TotalWeightedLayers", dl_minus1024_qam_total_weighted_layers); + } + j.end_obj(); } -// UL-CCCH1-Message ::= SEQUENCE -SRSASN_CODE ul_ccch1_msg_s::pack(bit_ref& bref) const +// BandCombination-v1570 ::= SEQUENCE +SRSASN_CODE band_combination_v1570_s::pack(bit_ref& bref) const { - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); + HANDLE_CODE(ca_params_eutra_v1570.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ul_ccch1_msg_s::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_v1570_s::unpack(cbit_ref& bref) { - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); + HANDLE_CODE(ca_params_eutra_v1570.unpack(bref)); return SRSASN_SUCCESS; } -void ul_ccch1_msg_s::to_json(json_writer& j) const +void band_combination_v1570_s::to_json(json_writer& j) const { - j.start_array(); j.start_obj(); - j.start_obj("UL-CCCH1-Message"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); + j.write_fieldname("ca-ParametersEUTRA-v1570"); + ca_params_eutra_v1570.to_json(j); j.end_obj(); - j.end_array(); } -// MeasQuantityResults ::= SEQUENCE -SRSASN_CODE meas_quant_results_s::pack(bit_ref& bref) const +// MRDC-Parameters-v1580 ::= SEQUENCE +SRSASN_CODE mrdc_params_v1580_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(rsrp_present, 1)); - HANDLE_CODE(bref.pack(rsrq_present, 1)); - HANDLE_CODE(bref.pack(sinr_present, 1)); - - if (rsrp_present) { - HANDLE_CODE(pack_integer(bref, rsrp, (uint8_t)0u, (uint8_t)127u)); - } - if (rsrq_present) { - HANDLE_CODE(pack_integer(bref, rsrq, (uint8_t)0u, (uint8_t)127u)); - } - if (sinr_present) { - HANDLE_CODE(pack_integer(bref, sinr, (uint8_t)0u, (uint8_t)127u)); - } + HANDLE_CODE(bref.pack(dynamic_pwr_sharing_nedc_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_quant_results_s::unpack(cbit_ref& bref) +SRSASN_CODE mrdc_params_v1580_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(rsrp_present, 1)); - HANDLE_CODE(bref.unpack(rsrq_present, 1)); - HANDLE_CODE(bref.unpack(sinr_present, 1)); - - if (rsrp_present) { - HANDLE_CODE(unpack_integer(rsrp, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (rsrq_present) { - HANDLE_CODE(unpack_integer(rsrq, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (sinr_present) { - HANDLE_CODE(unpack_integer(sinr, bref, (uint8_t)0u, (uint8_t)127u)); - } + HANDLE_CODE(bref.unpack(dynamic_pwr_sharing_nedc_present, 1)); return SRSASN_SUCCESS; } -void meas_quant_results_s::to_json(json_writer& j) const +void mrdc_params_v1580_s::to_json(json_writer& j) const { j.start_obj(); - if (rsrp_present) { - j.write_int("rsrp", rsrp); - } - if (rsrq_present) { - j.write_int("rsrq", rsrq); - } - if (sinr_present) { - j.write_int("sinr", sinr); + if (dynamic_pwr_sharing_nedc_present) { + j.write_str("dynamicPowerSharingNEDC", "supported"); } j.end_obj(); } -// PLMN-Identity-EUTRA-5GC ::= CHOICE -void plmn_id_eutra_minus5_gc_c::destroy_() -{ - switch (type_) { - case types::plmn_id_eutra_minus5_gc: - c.destroy(); - break; - default: - break; - } -} -void plmn_id_eutra_minus5_gc_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::plmn_id_eutra_minus5_gc: - c.init(); - break; - case types::plmn_idx: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); - } -} -plmn_id_eutra_minus5_gc_c::plmn_id_eutra_minus5_gc_c(const plmn_id_eutra_minus5_gc_c& other) +// BandCombination-v1580 ::= SEQUENCE +SRSASN_CODE band_combination_v1580_s::pack(bit_ref& bref) const { - type_ = other.type(); - switch (type_) { - case types::plmn_id_eutra_minus5_gc: - c.init(other.c.get()); - break; - case types::plmn_idx: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); - } + HANDLE_CODE(mrdc_params_v1580.pack(bref)); + + return SRSASN_SUCCESS; } -plmn_id_eutra_minus5_gc_c& plmn_id_eutra_minus5_gc_c::operator=(const plmn_id_eutra_minus5_gc_c& other) +SRSASN_CODE band_combination_v1580_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::plmn_id_eutra_minus5_gc: - c.set(other.c.get()); - break; - case types::plmn_idx: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); - } + HANDLE_CODE(mrdc_params_v1580.unpack(bref)); - return *this; + return SRSASN_SUCCESS; } -void plmn_id_eutra_minus5_gc_c::to_json(json_writer& j) const +void band_combination_v1580_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::plmn_id_eutra_minus5_gc: - j.write_fieldname("plmn-Identity-EUTRA-5GC"); - c.get().to_json(j); - break; - case types::plmn_idx: - j.write_int("plmn-index", c.get()); - break; - default: - log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); - } + j.write_fieldname("mrdc-Parameters-v1580"); + mrdc_params_v1580.to_json(j); j.end_obj(); } -SRSASN_CODE plmn_id_eutra_minus5_gc_c::pack(bit_ref& bref) const + +// MRDC-Parameters-v1590 ::= SEQUENCE +SRSASN_CODE mrdc_params_v1590_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::plmn_id_eutra_minus5_gc: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::plmn_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)12u)); - break; - default: - log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } + HANDLE_CODE(bref.pack(inter_band_contiguous_mrdc_present, 1)); + return SRSASN_SUCCESS; } -SRSASN_CODE plmn_id_eutra_minus5_gc_c::unpack(cbit_ref& bref) +SRSASN_CODE mrdc_params_v1590_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::plmn_id_eutra_minus5_gc: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::plmn_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)12u)); - break; - default: - log_invalid_choice_id(type_, "plmn_id_eutra_minus5_gc_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} + HANDLE_CODE(bref.unpack(inter_band_contiguous_mrdc_present, 1)); -std::string plmn_id_eutra_minus5_gc_c::types_opts::to_string() const -{ - static const char* options[] = {"plmn-Identity-EUTRA-5GC", "plmn-index"}; - return convert_enum_idx(options, 2, value, "plmn_id_eutra_minus5_gc_c::types"); + return SRSASN_SUCCESS; } -int8_t plmn_id_eutra_minus5_gc_c::types_opts::to_number() const +void mrdc_params_v1590_s::to_json(json_writer& j) const { - static const int8_t options[] = {-5}; - return map_enum_number(options, 1, value, "plmn_id_eutra_minus5_gc_c::types"); + j.start_obj(); + if (inter_band_contiguous_mrdc_present) { + j.write_str("interBandContiguousMRDC", "supported"); + } + j.end_obj(); } -// ResultsPerCSI-RS-Index ::= SEQUENCE -SRSASN_CODE results_per_csi_rs_idx_s::pack(bit_ref& bref) const +// BandCombination-v1590 ::= SEQUENCE +SRSASN_CODE band_combination_v1590_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(csi_rs_results_present, 1)); + HANDLE_CODE(bref.pack(supported_bw_combination_set_intra_endc_present, 1)); - HANDLE_CODE(pack_integer(bref, csi_rs_idx, (uint8_t)0u, (uint8_t)95u)); - if (csi_rs_results_present) { - HANDLE_CODE(csi_rs_results.pack(bref)); + if (supported_bw_combination_set_intra_endc_present) { + HANDLE_CODE(supported_bw_combination_set_intra_endc.pack(bref)); } + HANDLE_CODE(mrdc_params_v1590.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE results_per_csi_rs_idx_s::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_v1590_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(csi_rs_results_present, 1)); + HANDLE_CODE(bref.unpack(supported_bw_combination_set_intra_endc_present, 1)); - HANDLE_CODE(unpack_integer(csi_rs_idx, bref, (uint8_t)0u, (uint8_t)95u)); - if (csi_rs_results_present) { - HANDLE_CODE(csi_rs_results.unpack(bref)); + if (supported_bw_combination_set_intra_endc_present) { + HANDLE_CODE(supported_bw_combination_set_intra_endc.unpack(bref)); } + HANDLE_CODE(mrdc_params_v1590.unpack(bref)); return SRSASN_SUCCESS; } -void results_per_csi_rs_idx_s::to_json(json_writer& j) const +void band_combination_v1590_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("csi-RS-Index", csi_rs_idx); - if (csi_rs_results_present) { - j.write_fieldname("csi-RS-Results"); - csi_rs_results.to_json(j); + if (supported_bw_combination_set_intra_endc_present) { + j.write_str("supportedBandwidthCombinationSetIntraENDC", supported_bw_combination_set_intra_endc.to_string()); } + j.write_fieldname("mrdc-Parameters-v1590"); + mrdc_params_v1590.to_json(j); j.end_obj(); } -// ResultsPerSSB-Index ::= SEQUENCE -SRSASN_CODE results_per_ssb_idx_s::pack(bit_ref& bref) const +// SupportedCSI-RS-Resource ::= SEQUENCE +SRSASN_CODE supported_csi_rs_res_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ssb_results_present, 1)); - - HANDLE_CODE(pack_integer(bref, ssb_idx, (uint8_t)0u, (uint8_t)63u)); - if (ssb_results_present) { - HANDLE_CODE(ssb_results.pack(bref)); - } + HANDLE_CODE(max_num_tx_ports_per_res.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_num_res_per_band, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_integer(bref, total_num_tx_ports_per_band, (uint16_t)2u, (uint16_t)256u)); return SRSASN_SUCCESS; } -SRSASN_CODE results_per_ssb_idx_s::unpack(cbit_ref& bref) +SRSASN_CODE supported_csi_rs_res_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ssb_results_present, 1)); - - HANDLE_CODE(unpack_integer(ssb_idx, bref, (uint8_t)0u, (uint8_t)63u)); - if (ssb_results_present) { - HANDLE_CODE(ssb_results.unpack(bref)); - } + HANDLE_CODE(max_num_tx_ports_per_res.unpack(bref)); + HANDLE_CODE(unpack_integer(max_num_res_per_band, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_integer(total_num_tx_ports_per_band, bref, (uint16_t)2u, (uint16_t)256u)); return SRSASN_SUCCESS; } -void results_per_ssb_idx_s::to_json(json_writer& j) const +void supported_csi_rs_res_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("ssb-Index", ssb_idx); - if (ssb_results_present) { - j.write_fieldname("ssb-Results"); - ssb_results.to_json(j); - } + j.write_str("maxNumberTxPortsPerResource", max_num_tx_ports_per_res.to_string()); + j.write_int("maxNumberResourcesPerBand", max_num_res_per_band); + j.write_int("totalNumberTxPortsPerBand", total_num_tx_ports_per_band); j.end_obj(); } -// CGI-Info ::= SEQUENCE -SRSASN_CODE cgi_info_s::pack(bit_ref& bref) const +std::string supported_csi_rs_res_s::max_num_tx_ports_per_res_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(plmn_id_info_list_present, 1)); - HANDLE_CODE(bref.pack(freq_band_list_present, 1)); - HANDLE_CODE(bref.pack(no_sib1_present, 1)); + 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 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_"); +} - if (plmn_id_info_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_info_list, 1, 12)); - } - if (freq_band_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8, integer_packer(1, 1024))); - } - if (no_sib1_present) { - HANDLE_CODE(pack_integer(bref, no_sib1.ssb_subcarrier_offset, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(no_sib1.pdcch_cfg_sib1.pack(bref)); +// BeamManagementSSB-CSI-RS ::= SEQUENCE +SRSASN_CODE beam_management_ssb_csi_rs_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_csi_rs_density_present, 1)); + + HANDLE_CODE(max_num_ssb_csi_rs_res_one_tx.pack(bref)); + HANDLE_CODE(max_num_csi_rs_res.pack(bref)); + HANDLE_CODE(max_num_csi_rs_res_two_tx.pack(bref)); + if (supported_csi_rs_density_present) { + HANDLE_CODE(supported_csi_rs_density.pack(bref)); } + HANDLE_CODE(max_num_aperiodic_csi_rs_res.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE cgi_info_s::unpack(cbit_ref& bref) +SRSASN_CODE beam_management_ssb_csi_rs_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(plmn_id_info_list_present, 1)); - HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); - HANDLE_CODE(bref.unpack(no_sib1_present, 1)); + HANDLE_CODE(bref.unpack(supported_csi_rs_density_present, 1)); - if (plmn_id_info_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(plmn_id_info_list, bref, 1, 12)); - } - if (freq_band_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8, integer_packer(1, 1024))); - } - if (no_sib1_present) { - HANDLE_CODE(unpack_integer(no_sib1.ssb_subcarrier_offset, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(no_sib1.pdcch_cfg_sib1.unpack(bref)); + HANDLE_CODE(max_num_ssb_csi_rs_res_one_tx.unpack(bref)); + HANDLE_CODE(max_num_csi_rs_res.unpack(bref)); + HANDLE_CODE(max_num_csi_rs_res_two_tx.unpack(bref)); + if (supported_csi_rs_density_present) { + HANDLE_CODE(supported_csi_rs_density.unpack(bref)); } + HANDLE_CODE(max_num_aperiodic_csi_rs_res.unpack(bref)); return SRSASN_SUCCESS; } -void cgi_info_s::to_json(json_writer& j) const +void beam_management_ssb_csi_rs_s::to_json(json_writer& j) const { j.start_obj(); - if (plmn_id_info_list_present) { - j.start_array("plmn-IdentityInfoList"); - 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 (const auto& e1 : freq_band_list) { - j.write_int(e1); - } - j.end_array(); - } - if (no_sib1_present) { - j.write_fieldname("noSIB1"); - j.start_obj(); - j.write_int("ssb-SubcarrierOffset", no_sib1.ssb_subcarrier_offset); - j.write_fieldname("pdcch-ConfigSIB1"); - no_sib1.pdcch_cfg_sib1.to_json(j); - j.end_obj(); + j.write_str("maxNumberSSB-CSI-RS-ResourceOneTx", max_num_ssb_csi_rs_res_one_tx.to_string()); + j.write_str("maxNumberCSI-RS-Resource", max_num_csi_rs_res.to_string()); + j.write_str("maxNumberCSI-RS-ResourceTwoTx", max_num_csi_rs_res_two_tx.to_string()); + if (supported_csi_rs_density_present) { + j.write_str("supportedCSI-RS-Density", supported_csi_rs_density.to_string()); } + j.write_str("maxNumberAperiodicCSI-RS-Resource", max_num_aperiodic_csi_rs_res.to_string()); j.end_obj(); } -// CellIdentity-EUTRA-5GC ::= CHOICE -void cell_id_eutra_minus5_gc_c::destroy_() +std::string beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_opts::to_string() const { - switch (type_) { - case types::cell_id_eutra: - c.destroy >(); - break; - default: - break; - } + 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_"); } -void cell_id_eutra_minus5_gc_c::set(types::options e) +uint8_t beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_opts::to_number() const { - destroy_(); - type_ = e; - switch (type_) { - case types::cell_id_eutra: - c.init >(); - break; - case types::cell_id_idx: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); - } + 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_"); } -cell_id_eutra_minus5_gc_c::cell_id_eutra_minus5_gc_c(const cell_id_eutra_minus5_gc_c& other) + +std::string beam_management_ssb_csi_rs_s::max_num_csi_rs_res_opts::to_string() const { - type_ = other.type(); - switch (type_) { - case types::cell_id_eutra: - c.init(other.c.get >()); - break; - case types::cell_id_idx: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); - } + 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_"); } -cell_id_eutra_minus5_gc_c& cell_id_eutra_minus5_gc_c::operator=(const cell_id_eutra_minus5_gc_c& other) +uint8_t beam_management_ssb_csi_rs_s::max_num_csi_rs_res_opts::to_number() const { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_id_eutra: - c.set(other.c.get >()); - break; - case types::cell_id_idx: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); - } - - return *this; + 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_"); } -void cell_id_eutra_minus5_gc_c::to_json(json_writer& j) const + +std::string beam_management_ssb_csi_rs_s::max_num_csi_rs_res_two_tx_opts::to_string() const { - j.start_obj(); - switch (type_) { - case types::cell_id_eutra: - j.write_str("cellIdentity-EUTRA", c.get >().to_string()); - break; - case types::cell_id_idx: - j.write_int("cellId-index", c.get()); - break; - default: - log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); - } - j.end_obj(); + 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_"); } -SRSASN_CODE cell_id_eutra_minus5_gc_c::pack(bit_ref& bref) const +uint8_t beam_management_ssb_csi_rs_s::max_num_csi_rs_res_two_tx_opts::to_number() const { - type_.pack(bref); - switch (type_) { - case types::cell_id_eutra: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::cell_id_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)12u)); - break; - default: - log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE cell_id_eutra_minus5_gc_c::unpack(cbit_ref& bref) + +std::string beam_management_ssb_csi_rs_s::supported_csi_rs_density_opts::to_string() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_id_eutra: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::cell_id_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)12u)); - break; - default: - log_invalid_choice_id(type_, "cell_id_eutra_minus5_gc_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + 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 cell_id_eutra_minus5_gc_c::types_opts::to_string() const +std::string beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_opts::to_string() const { - static const char* options[] = {"cellIdentity-EUTRA", "cellId-index"}; - return convert_enum_idx(options, 2, value, "cell_id_eutra_minus5_gc_c::types"); + 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_"); } - -// CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE -SRSASN_CODE cell_access_related_info_eutra_minus5_gc_s::pack(bit_ref& bref) const +uint8_t beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_opts::to_number() const { - HANDLE_CODE(bref.pack(ranac_minus5gc_present, 1)); + 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_"); +} - HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_eutra_minus5gc, 1, 12)); - HANDLE_CODE(tac_eutra_minus5gc.pack(bref)); - if (ranac_minus5gc_present) { - HANDLE_CODE(pack_integer(bref, ranac_minus5gc, (uint16_t)0u, (uint16_t)255u)); - } - HANDLE_CODE(cell_id_eutra_minus5gc.pack(bref)); +// CSI-RS-ForTracking ::= SEQUENCE +SRSASN_CODE csi_rs_for_tracking_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, max_burst_len, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(pack_integer(bref, max_simul_res_sets_per_cc, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_integer(bref, max_cfgured_res_sets_per_cc, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_integer(bref, max_cfgured_res_sets_all_cc, (uint16_t)1u, (uint16_t)256u)); return SRSASN_SUCCESS; } -SRSASN_CODE cell_access_related_info_eutra_minus5_gc_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_rs_for_tracking_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ranac_minus5gc_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_eutra_minus5gc, bref, 1, 12)); - HANDLE_CODE(tac_eutra_minus5gc.unpack(bref)); - if (ranac_minus5gc_present) { - HANDLE_CODE(unpack_integer(ranac_minus5gc, bref, (uint16_t)0u, (uint16_t)255u)); - } - HANDLE_CODE(cell_id_eutra_minus5gc.unpack(bref)); + HANDLE_CODE(unpack_integer(max_burst_len, bref, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(unpack_integer(max_simul_res_sets_per_cc, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_integer(max_cfgured_res_sets_per_cc, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_integer(max_cfgured_res_sets_all_cc, bref, (uint16_t)1u, (uint16_t)256u)); return SRSASN_SUCCESS; } -void cell_access_related_info_eutra_minus5_gc_s::to_json(json_writer& j) const +void csi_rs_for_tracking_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("plmn-IdentityList-eutra-5gc"); - 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()); - if (ranac_minus5gc_present) { - j.write_int("ranac-5gc", ranac_minus5gc); - } - j.write_fieldname("cellIdentity-eutra-5gc"); - cell_id_eutra_minus5gc.to_json(j); + j.write_int("maxBurstLength", max_burst_len); + j.write_int("maxSimultaneousResourceSetsPerCC", max_simul_res_sets_per_cc); + j.write_int("maxConfiguredResourceSetsPerCC", max_cfgured_res_sets_per_cc); + j.write_int("maxConfiguredResourceSetsAllCC", max_cfgured_res_sets_all_cc); j.end_obj(); } -// CellAccessRelatedInfo-EUTRA-EPC ::= SEQUENCE -SRSASN_CODE cell_access_related_info_eutra_epc_s::pack(bit_ref& bref) const +// CSI-RS-IM-ReceptionForFeedback ::= SEQUENCE +SRSASN_CODE csi_rs_im_reception_for_feedback_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_eutra_epc, 1, 12)); - HANDLE_CODE(tac_eutra_epc.pack(bref)); - HANDLE_CODE(cell_id_eutra_epc.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_cfg_num_nzp_csi_rs_per_cc, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_integer(bref, max_cfg_num_ports_across_nzp_csi_rs_per_cc, (uint16_t)2u, (uint16_t)256u)); + HANDLE_CODE(max_cfg_num_csi_im_per_cc.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_num_simul_nzp_csi_rs_per_cc, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_integer(bref, total_num_ports_simul_nzp_csi_rs_per_cc, (uint16_t)2u, (uint16_t)256u)); return SRSASN_SUCCESS; } -SRSASN_CODE cell_access_related_info_eutra_epc_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_rs_im_reception_for_feedback_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_eutra_epc, bref, 1, 12)); - HANDLE_CODE(tac_eutra_epc.unpack(bref)); - HANDLE_CODE(cell_id_eutra_epc.unpack(bref)); + HANDLE_CODE(unpack_integer(max_cfg_num_nzp_csi_rs_per_cc, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_integer(max_cfg_num_ports_across_nzp_csi_rs_per_cc, bref, (uint16_t)2u, (uint16_t)256u)); + HANDLE_CODE(max_cfg_num_csi_im_per_cc.unpack(bref)); + HANDLE_CODE(unpack_integer(max_num_simul_nzp_csi_rs_per_cc, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_integer(total_num_ports_simul_nzp_csi_rs_per_cc, bref, (uint16_t)2u, (uint16_t)256u)); return SRSASN_SUCCESS; } -void cell_access_related_info_eutra_epc_s::to_json(json_writer& j) const +void csi_rs_im_reception_for_feedback_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("plmn-IdentityList-eutra-epc"); - 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()); - j.write_str("cellIdentity-eutra-epc", cell_id_eutra_epc.to_string()); + j.write_int("maxConfigNumberNZP-CSI-RS-PerCC", max_cfg_num_nzp_csi_rs_per_cc); + j.write_int("maxConfigNumberPortsAcrossNZP-CSI-RS-PerCC", max_cfg_num_ports_across_nzp_csi_rs_per_cc); + j.write_str("maxConfigNumberCSI-IM-PerCC", max_cfg_num_csi_im_per_cc.to_string()); + j.write_int("maxNumberSimultaneousNZP-CSI-RS-PerCC", max_num_simul_nzp_csi_rs_per_cc); + j.write_int("totalNumberPortsSimultaneousNZP-CSI-RS-PerCC", total_num_ports_simul_nzp_csi_rs_per_cc); j.end_obj(); } -// MeasQuantityResultsEUTRA ::= SEQUENCE -SRSASN_CODE meas_quant_results_eutra_s::pack(bit_ref& bref) const +std::string csi_rs_im_reception_for_feedback_s::max_cfg_num_csi_im_per_cc_opts::to_string() const { - HANDLE_CODE(bref.pack(rsrp_present, 1)); - HANDLE_CODE(bref.pack(rsrq_present, 1)); - HANDLE_CODE(bref.pack(sinr_present, 1)); + 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 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_"); +} - if (rsrp_present) { - HANDLE_CODE(pack_integer(bref, rsrp, (uint8_t)0u, (uint8_t)97u)); - } - if (rsrq_present) { - HANDLE_CODE(pack_integer(bref, rsrq, (uint8_t)0u, (uint8_t)34u)); - } - if (sinr_present) { - HANDLE_CODE(pack_integer(bref, sinr, (uint8_t)0u, (uint8_t)127u)); - } +// CSI-RS-ProcFrameworkForSRS ::= SEQUENCE +SRSASN_CODE csi_rs_proc_framework_for_srs_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, max_num_periodic_srs_assoc_csi_rs_per_bwp, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, max_num_aperiodic_srs_assoc_csi_rs_per_bwp, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, max_num_sp_srs_assoc_csi_rs_per_bwp, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, simul_srs_assoc_csi_rs_per_cc, (uint8_t)1u, (uint8_t)8u)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_quant_results_eutra_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_rs_proc_framework_for_srs_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(rsrp_present, 1)); - HANDLE_CODE(bref.unpack(rsrq_present, 1)); - HANDLE_CODE(bref.unpack(sinr_present, 1)); + HANDLE_CODE(unpack_integer(max_num_periodic_srs_assoc_csi_rs_per_bwp, bref, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(max_num_aperiodic_srs_assoc_csi_rs_per_bwp, bref, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(max_num_sp_srs_assoc_csi_rs_per_bwp, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(simul_srs_assoc_csi_rs_per_cc, bref, (uint8_t)1u, (uint8_t)8u)); - if (rsrp_present) { - HANDLE_CODE(unpack_integer(rsrp, bref, (uint8_t)0u, (uint8_t)97u)); - } - if (rsrq_present) { - HANDLE_CODE(unpack_integer(rsrq, bref, (uint8_t)0u, (uint8_t)34u)); - } - if (sinr_present) { - HANDLE_CODE(unpack_integer(sinr, bref, (uint8_t)0u, (uint8_t)127u)); - } + return SRSASN_SUCCESS; +} +void csi_rs_proc_framework_for_srs_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("maxNumberPeriodicSRS-AssocCSI-RS-PerBWP", max_num_periodic_srs_assoc_csi_rs_per_bwp); + j.write_int("maxNumberAperiodicSRS-AssocCSI-RS-PerBWP", max_num_aperiodic_srs_assoc_csi_rs_per_bwp); + j.write_int("maxNumberSP-SRS-AssocCSI-RS-PerBWP", max_num_sp_srs_assoc_csi_rs_per_bwp); + j.write_int("simultaneousSRS-AssocCSI-RS-PerCC", simul_srs_assoc_csi_rs_per_cc); + j.end_obj(); +} + +// CSI-ReportFramework ::= SEQUENCE +SRSASN_CODE csi_report_framework_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, max_num_periodic_csi_per_bwp_for_csi_report, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, max_num_aperiodic_csi_per_bwp_for_csi_report, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, max_num_semi_persistent_csi_per_bwp_for_csi_report, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, max_num_periodic_csi_per_bwp_for_beam_report, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, max_num_aperiodic_csi_per_bwp_for_beam_report, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(max_num_aperiodic_csi_trigger_state_per_cc.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_num_semi_persistent_csi_per_bwp_for_beam_report, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, simul_csi_reports_per_cc, (uint8_t)1u, (uint8_t)8u)); return SRSASN_SUCCESS; } -void meas_quant_results_eutra_s::to_json(json_writer& j) const +SRSASN_CODE csi_report_framework_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(max_num_periodic_csi_per_bwp_for_csi_report, bref, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(max_num_aperiodic_csi_per_bwp_for_csi_report, bref, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(max_num_semi_persistent_csi_per_bwp_for_csi_report, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(max_num_periodic_csi_per_bwp_for_beam_report, bref, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(max_num_aperiodic_csi_per_bwp_for_beam_report, bref, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(max_num_aperiodic_csi_trigger_state_per_cc.unpack(bref)); + HANDLE_CODE(unpack_integer(max_num_semi_persistent_csi_per_bwp_for_beam_report, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(simul_csi_reports_per_cc, bref, (uint8_t)1u, (uint8_t)8u)); + + return SRSASN_SUCCESS; +} +void csi_report_framework_s::to_json(json_writer& j) const { j.start_obj(); - if (rsrp_present) { - j.write_int("rsrp", rsrp); - } - if (rsrq_present) { - j.write_int("rsrq", rsrq); - } - if (sinr_present) { - j.write_int("sinr", sinr); - } + j.write_int("maxNumberPeriodicCSI-PerBWP-ForCSI-Report", max_num_periodic_csi_per_bwp_for_csi_report); + j.write_int("maxNumberAperiodicCSI-PerBWP-ForCSI-Report", max_num_aperiodic_csi_per_bwp_for_csi_report); + j.write_int("maxNumberSemiPersistentCSI-PerBWP-ForCSI-Report", max_num_semi_persistent_csi_per_bwp_for_csi_report); + j.write_int("maxNumberPeriodicCSI-PerBWP-ForBeamReport", max_num_periodic_csi_per_bwp_for_beam_report); + j.write_int("maxNumberAperiodicCSI-PerBWP-ForBeamReport", max_num_aperiodic_csi_per_bwp_for_beam_report); + j.write_str("maxNumberAperiodicCSI-triggeringStatePerCC", max_num_aperiodic_csi_trigger_state_per_cc.to_string()); + j.write_int("maxNumberSemiPersistentCSI-PerBWP-ForBeamReport", max_num_semi_persistent_csi_per_bwp_for_beam_report); + j.write_int("simultaneousCSI-ReportsPerCC", simul_csi_reports_per_cc); j.end_obj(); } -// MeasResultNR ::= SEQUENCE -SRSASN_CODE meas_result_nr_s::pack(bit_ref& bref) const +std::string csi_report_framework_s::max_num_aperiodic_csi_trigger_state_per_cc_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pci_present, 1)); + 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 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_"); +} - if (pci_present) { - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); - } - HANDLE_CODE(bref.pack(meas_result.rs_idx_results_present, 1)); - HANDLE_CODE(bref.pack(meas_result.cell_results.results_ssb_cell_present, 1)); - HANDLE_CODE(bref.pack(meas_result.cell_results.results_csi_rs_cell_present, 1)); - if (meas_result.cell_results.results_ssb_cell_present) { - HANDLE_CODE(meas_result.cell_results.results_ssb_cell.pack(bref)); +// CodebookParameters ::= SEQUENCE +SRSASN_CODE codebook_params_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(type2_present, 1)); + HANDLE_CODE(bref.pack(type2_port_sel_present, 1)); + + HANDLE_CODE(bref.pack(type1.multi_panel_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, type1.single_panel.supported_csi_rs_res_list, 1, 7)); + HANDLE_CODE(type1.single_panel.modes.pack(bref)); + HANDLE_CODE(pack_integer(bref, type1.single_panel.max_num_csi_rs_per_res_set, (uint8_t)1u, (uint8_t)8u)); + if (type1.multi_panel_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, type1.multi_panel.supported_csi_rs_res_list, 1, 7)); + HANDLE_CODE(type1.multi_panel.modes.pack(bref)); + HANDLE_CODE(type1.multi_panel.nrof_panels.pack(bref)); + HANDLE_CODE(pack_integer(bref, type1.multi_panel.max_num_csi_rs_per_res_set, (uint8_t)1u, (uint8_t)8u)); } - if (meas_result.cell_results.results_csi_rs_cell_present) { - HANDLE_CODE(meas_result.cell_results.results_csi_rs_cell.pack(bref)); + if (type2_present) { + HANDLE_CODE(bref.pack(type2.amplitude_subset_restrict_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, type2.supported_csi_rs_res_list, 1, 7)); + HANDLE_CODE(pack_integer(bref, type2.param_lx, (uint8_t)2u, (uint8_t)4u)); + HANDLE_CODE(type2.amplitude_scaling_type.pack(bref)); } - if (meas_result.rs_idx_results_present) { - HANDLE_CODE(bref.pack(meas_result.rs_idx_results.results_ssb_idxes_present, 1)); - HANDLE_CODE(bref.pack(meas_result.rs_idx_results.results_csi_rs_idxes_present, 1)); - if (meas_result.rs_idx_results.results_ssb_idxes_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result.rs_idx_results.results_ssb_idxes, 1, 64)); - } - if (meas_result.rs_idx_results.results_csi_rs_idxes_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result.rs_idx_results.results_csi_rs_idxes, 1, 64)); - } + if (type2_port_sel_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, type2_port_sel.supported_csi_rs_res_list, 1, 7)); + HANDLE_CODE(pack_integer(bref, type2_port_sel.param_lx, (uint8_t)2u, (uint8_t)4u)); + HANDLE_CODE(type2_port_sel.amplitude_scaling_type.pack(bref)); } - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= cgi_info.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cgi_info.is_present(), 1)); - if (cgi_info.is_present()) { - HANDLE_CODE(cgi_info->pack(bref)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE meas_result_nr_s::unpack(cbit_ref& bref) +SRSASN_CODE codebook_params_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pci_present, 1)); + HANDLE_CODE(bref.unpack(type2_present, 1)); + HANDLE_CODE(bref.unpack(type2_port_sel_present, 1)); - if (pci_present) { - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); - } - HANDLE_CODE(bref.unpack(meas_result.rs_idx_results_present, 1)); - HANDLE_CODE(bref.unpack(meas_result.cell_results.results_ssb_cell_present, 1)); - HANDLE_CODE(bref.unpack(meas_result.cell_results.results_csi_rs_cell_present, 1)); - if (meas_result.cell_results.results_ssb_cell_present) { - HANDLE_CODE(meas_result.cell_results.results_ssb_cell.unpack(bref)); + HANDLE_CODE(bref.unpack(type1.multi_panel_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(type1.single_panel.supported_csi_rs_res_list, bref, 1, 7)); + HANDLE_CODE(type1.single_panel.modes.unpack(bref)); + HANDLE_CODE(unpack_integer(type1.single_panel.max_num_csi_rs_per_res_set, bref, (uint8_t)1u, (uint8_t)8u)); + if (type1.multi_panel_present) { + HANDLE_CODE(unpack_dyn_seq_of(type1.multi_panel.supported_csi_rs_res_list, bref, 1, 7)); + HANDLE_CODE(type1.multi_panel.modes.unpack(bref)); + HANDLE_CODE(type1.multi_panel.nrof_panels.unpack(bref)); + HANDLE_CODE(unpack_integer(type1.multi_panel.max_num_csi_rs_per_res_set, bref, (uint8_t)1u, (uint8_t)8u)); } - if (meas_result.cell_results.results_csi_rs_cell_present) { - HANDLE_CODE(meas_result.cell_results.results_csi_rs_cell.unpack(bref)); + if (type2_present) { + HANDLE_CODE(bref.unpack(type2.amplitude_subset_restrict_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(type2.supported_csi_rs_res_list, bref, 1, 7)); + HANDLE_CODE(unpack_integer(type2.param_lx, bref, (uint8_t)2u, (uint8_t)4u)); + HANDLE_CODE(type2.amplitude_scaling_type.unpack(bref)); } - if (meas_result.rs_idx_results_present) { - HANDLE_CODE(bref.unpack(meas_result.rs_idx_results.results_ssb_idxes_present, 1)); - HANDLE_CODE(bref.unpack(meas_result.rs_idx_results.results_csi_rs_idxes_present, 1)); - if (meas_result.rs_idx_results.results_ssb_idxes_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result.rs_idx_results.results_ssb_idxes, bref, 1, 64)); - } - if (meas_result.rs_idx_results.results_csi_rs_idxes_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result.rs_idx_results.results_csi_rs_idxes, bref, 1, 64)); - } + if (type2_port_sel_present) { + HANDLE_CODE(unpack_dyn_seq_of(type2_port_sel.supported_csi_rs_res_list, bref, 1, 7)); + HANDLE_CODE(unpack_integer(type2_port_sel.param_lx, bref, (uint8_t)2u, (uint8_t)4u)); + HANDLE_CODE(type2_port_sel.amplitude_scaling_type.unpack(bref)); } - if (ext) { - ext_groups_unpacker_guard group_flags(1); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - bool cgi_info_present; - HANDLE_CODE(bref.unpack(cgi_info_present, 1)); - cgi_info.set_present(cgi_info_present); - if (cgi_info.is_present()) { - HANDLE_CODE(cgi_info->unpack(bref)); - } - } - } return SRSASN_SUCCESS; } -void meas_result_nr_s::to_json(json_writer& j) const +void codebook_params_s::to_json(json_writer& j) const { j.start_obj(); - if (pci_present) { - j.write_int("physCellId", pci); - } - j.write_fieldname("measResult"); + j.write_fieldname("type1"); j.start_obj(); - j.write_fieldname("cellResults"); + j.write_fieldname("singlePanel"); j.start_obj(); - if (meas_result.cell_results.results_ssb_cell_present) { - j.write_fieldname("resultsSSB-Cell"); - meas_result.cell_results.results_ssb_cell.to_json(j); + j.start_array("supportedCSI-RS-ResourceList"); + for (const auto& e1 : type1.single_panel.supported_csi_rs_res_list) { + e1.to_json(j); } - if (meas_result.cell_results.results_csi_rs_cell_present) { - j.write_fieldname("resultsCSI-RS-Cell"); - meas_result.cell_results.results_csi_rs_cell.to_json(j); + j.end_array(); + j.write_str("modes", type1.single_panel.modes.to_string()); + j.write_int("maxNumberCSI-RS-PerResourceSet", type1.single_panel.max_num_csi_rs_per_res_set); + j.end_obj(); + if (type1.multi_panel_present) { + j.write_fieldname("multiPanel"); + j.start_obj(); + j.start_array("supportedCSI-RS-ResourceList"); + 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()); + j.write_str("nrofPanels", type1.multi_panel.nrof_panels.to_string()); + j.write_int("maxNumberCSI-RS-PerResourceSet", type1.multi_panel.max_num_csi_rs_per_res_set); + j.end_obj(); } j.end_obj(); - if (meas_result.rs_idx_results_present) { - j.write_fieldname("rsIndexResults"); + if (type2_present) { + j.write_fieldname("type2"); j.start_obj(); - if (meas_result.rs_idx_results.results_ssb_idxes_present) { - j.start_array("resultsSSB-Indexes"); - for (const auto& e1 : meas_result.rs_idx_results.results_ssb_idxes) { - e1.to_json(j); - } - j.end_array(); + j.start_array("supportedCSI-RS-ResourceList"); + for (const auto& e1 : type2.supported_csi_rs_res_list) { + e1.to_json(j); } - if (meas_result.rs_idx_results.results_csi_rs_idxes_present) { - j.start_array("resultsCSI-RS-Indexes"); - for (const auto& e1 : meas_result.rs_idx_results.results_csi_rs_idxes) { - e1.to_json(j); - } - j.end_array(); + j.end_array(); + j.write_int("parameterLx", type2.param_lx); + j.write_str("amplitudeScalingType", type2.amplitude_scaling_type.to_string()); + if (type2.amplitude_subset_restrict_present) { + j.write_str("amplitudeSubsetRestriction", "supported"); } j.end_obj(); } - j.end_obj(); - if (ext) { - if (cgi_info.is_present()) { - j.write_fieldname("cgi-Info"); - cgi_info->to_json(j); + if (type2_port_sel_present) { + j.write_fieldname("type2-PortSelection"); + j.start_obj(); + j.start_array("supportedCSI-RS-ResourceList"); + 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); + j.write_str("amplitudeScalingType", type2_port_sel.amplitude_scaling_type.to_string()); + j.end_obj(); } j.end_obj(); } -// UplinkTxDirectCurrentBWP ::= SEQUENCE -SRSASN_CODE ul_tx_direct_current_bwp_s::pack(bit_ref& bref) const +std::string codebook_params_s::type1_s_::single_panel_s_::modes_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(bref.pack(shift7dot5k_hz, 1)); - HANDLE_CODE(pack_integer(bref, tx_direct_current_location, (uint16_t)0u, (uint16_t)3301u)); - - return SRSASN_SUCCESS; + static const char* options[] = {"mode1", "mode1andMode2"}; + return convert_enum_idx(options, 2, value, "codebook_params_s::type1_s_::single_panel_s_::modes_e_"); } -SRSASN_CODE ul_tx_direct_current_bwp_s::unpack(cbit_ref& bref) + +std::string codebook_params_s::type1_s_::multi_panel_s_::modes_opts::to_string() const { - HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(bref.unpack(shift7dot5k_hz, 1)); - HANDLE_CODE(unpack_integer(tx_direct_current_location, bref, (uint16_t)0u, (uint16_t)3301u)); + 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 const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "codebook_params_s::type1_s_::multi_panel_s_::modes_e_"); +} - return SRSASN_SUCCESS; +std::string codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_opts::to_string() const +{ + static const char* options[] = {"n2", "n4"}; + return convert_enum_idx(options, 2, value, "codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_e_"); } -void ul_tx_direct_current_bwp_s::to_json(json_writer& j) const +uint8_t codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_opts::to_number() const { - j.start_obj(); - j.write_int("bwp-Id", bwp_id); - j.write_bool("shift7dot5kHz", shift7dot5k_hz); - j.write_int("txDirectCurrentLocation", tx_direct_current_location); - j.end_obj(); + 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_"); } -// EUTRA-RSTD-Info ::= SEQUENCE -SRSASN_CODE eutra_rstd_info_s::pack(bit_ref& bref) const +std::string codebook_params_s::type2_s_::amplitude_scaling_type_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(pack_integer(bref, meas_prs_offset, (uint8_t)0u, (uint8_t)39u)); + 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 const char* options[] = {"wideband", "widebandAndSubband"}; + return convert_enum_idx(options, 2, value, "codebook_params_s::type2_port_sel_s_::amplitude_scaling_type_e_"); +} + +// DummyG ::= SEQUENCE +SRSASN_CODE dummy_g_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(max_num_ssb_csi_rs_res_one_tx.pack(bref)); + HANDLE_CODE(max_num_ssb_csi_rs_res_two_tx.pack(bref)); + HANDLE_CODE(supported_csi_rs_density.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE eutra_rstd_info_s::unpack(cbit_ref& bref) +SRSASN_CODE dummy_g_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(unpack_integer(meas_prs_offset, bref, (uint8_t)0u, (uint8_t)39u)); + HANDLE_CODE(max_num_ssb_csi_rs_res_one_tx.unpack(bref)); + HANDLE_CODE(max_num_ssb_csi_rs_res_two_tx.unpack(bref)); + HANDLE_CODE(supported_csi_rs_density.unpack(bref)); return SRSASN_SUCCESS; } -void eutra_rstd_info_s::to_json(json_writer& j) const +void dummy_g_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("carrierFreq", carrier_freq); - j.write_int("measPRS-Offset", meas_prs_offset); + j.write_str("maxNumberSSB-CSI-RS-ResourceOneTx", max_num_ssb_csi_rs_res_one_tx.to_string()); + j.write_str("maxNumberSSB-CSI-RS-ResourceTwoTx", max_num_ssb_csi_rs_res_two_tx.to_string()); + j.write_str("supportedCSI-RS-Density", supported_csi_rs_density.to_string()); j.end_obj(); } -// MIMO-LayersDL ::= ENUMERATED -std::string mimo_layers_dl_opts::to_string() const +std::string dummy_g_s::max_num_ssb_csi_rs_res_one_tx_opts::to_string() const { - static const char* options[] = {"twoLayers", "fourLayers", "eightLayers"}; - return convert_enum_idx(options, 3, value, "mimo_layers_dl_e"); + 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 mimo_layers_dl_opts::to_number() const +uint8_t dummy_g_s::max_num_ssb_csi_rs_res_one_tx_opts::to_number() const { - static const uint8_t options[] = {2, 4, 8}; - return map_enum_number(options, 3, value, "mimo_layers_dl_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_"); } -// MIMO-LayersUL ::= ENUMERATED -std::string mimo_layers_ul_opts::to_string() const +std::string dummy_g_s::max_num_ssb_csi_rs_res_two_tx_opts::to_string() const { - static const char* options[] = {"oneLayer", "twoLayers", "fourLayers"}; - return convert_enum_idx(options, 3, value, "mimo_layers_ul_e"); + 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 mimo_layers_ul_opts::to_number() const +uint8_t dummy_g_s::max_num_ssb_csi_rs_res_two_tx_opts::to_number() const { - static const uint8_t options[] = {1, 2, 4}; - return map_enum_number(options, 3, value, "mimo_layers_ul_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_"); } -// MeasResultEUTRA ::= SEQUENCE -SRSASN_CODE meas_result_eutra_s::pack(bit_ref& bref) const +std::string dummy_g_s::supported_csi_rs_density_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cgi_info_present, 1)); + static const char* options[] = {"one", "three", "oneAndThree"}; + return convert_enum_idx(options, 3, value, "dummy_g_s::supported_csi_rs_density_e_"); +} - HANDLE_CODE(pack_integer(bref, eutra_pci, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(meas_result.pack(bref)); - if (cgi_info_present) { - HANDLE_CODE(bref.pack(cgi_info.cgi_info_epc_present, 1)); - HANDLE_CODE(bref.pack(cgi_info.cgi_info_minus5_gc_present, 1)); - HANDLE_CODE(bref.pack(cgi_info.multi_band_info_list_present, 1)); - HANDLE_CODE(bref.pack(cgi_info.freq_band_ind_prio_present, 1)); - if (cgi_info.cgi_info_epc_present) { - HANDLE_CODE(bref.pack(cgi_info.cgi_info_epc.cgi_info_epc_list_present, 1)); - HANDLE_CODE(cgi_info.cgi_info_epc.cgi_info_epc_legacy.pack(bref)); - if (cgi_info.cgi_info_epc.cgi_info_epc_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info.cgi_info_epc.cgi_info_epc_list, 1, 12)); - } - } - if (cgi_info.cgi_info_minus5_gc_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info.cgi_info_minus5_gc, 1, 12)); - } - HANDLE_CODE(pack_integer(bref, cgi_info.freq_band_ind, (uint16_t)1u, (uint16_t)256u)); - if (cgi_info.multi_band_info_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info.multi_band_info_list, 1, 8, integer_packer(1, 256))); - } - } +// DummyH ::= SEQUENCE +SRSASN_CODE dummy_h_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, burst_len, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(pack_integer(bref, max_simul_res_sets_per_cc, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_integer(bref, max_cfgured_res_sets_per_cc, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_integer(bref, max_cfgured_res_sets_all_cc, (uint8_t)1u, (uint8_t)128u)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_result_eutra_s::unpack(cbit_ref& bref) +SRSASN_CODE dummy_h_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cgi_info_present, 1)); - - HANDLE_CODE(unpack_integer(eutra_pci, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(meas_result.unpack(bref)); - if (cgi_info_present) { - HANDLE_CODE(bref.unpack(cgi_info.cgi_info_epc_present, 1)); - HANDLE_CODE(bref.unpack(cgi_info.cgi_info_minus5_gc_present, 1)); - HANDLE_CODE(bref.unpack(cgi_info.multi_band_info_list_present, 1)); - HANDLE_CODE(bref.unpack(cgi_info.freq_band_ind_prio_present, 1)); - if (cgi_info.cgi_info_epc_present) { - HANDLE_CODE(bref.unpack(cgi_info.cgi_info_epc.cgi_info_epc_list_present, 1)); - HANDLE_CODE(cgi_info.cgi_info_epc.cgi_info_epc_legacy.unpack(bref)); - if (cgi_info.cgi_info_epc.cgi_info_epc_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(cgi_info.cgi_info_epc.cgi_info_epc_list, bref, 1, 12)); - } - } - if (cgi_info.cgi_info_minus5_gc_present) { - HANDLE_CODE(unpack_dyn_seq_of(cgi_info.cgi_info_minus5_gc, bref, 1, 12)); - } - HANDLE_CODE(unpack_integer(cgi_info.freq_band_ind, bref, (uint16_t)1u, (uint16_t)256u)); - if (cgi_info.multi_band_info_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(cgi_info.multi_band_info_list, bref, 1, 8, integer_packer(1, 256))); - } - } + HANDLE_CODE(unpack_integer(burst_len, bref, (uint8_t)1u, (uint8_t)2u)); + HANDLE_CODE(unpack_integer(max_simul_res_sets_per_cc, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_integer(max_cfgured_res_sets_per_cc, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_integer(max_cfgured_res_sets_all_cc, bref, (uint8_t)1u, (uint8_t)128u)); return SRSASN_SUCCESS; } -void meas_result_eutra_s::to_json(json_writer& j) const +void dummy_h_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("eutra-PhysCellId", eutra_pci); - j.write_fieldname("measResult"); - meas_result.to_json(j); - if (cgi_info_present) { - j.write_fieldname("cgi-Info"); - j.start_obj(); - if (cgi_info.cgi_info_epc_present) { - j.write_fieldname("cgi-info-EPC"); - j.start_obj(); - j.write_fieldname("cgi-info-EPC-legacy"); - 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 (const auto& e1 : cgi_info.cgi_info_epc.cgi_info_epc_list) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - } - if (cgi_info.cgi_info_minus5_gc_present) { - j.start_array("cgi-info-5GC"); - 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 (const auto& e1 : cgi_info.multi_band_info_list) { - j.write_int(e1); - } - j.end_array(); - } - if (cgi_info.freq_band_ind_prio_present) { - j.write_str("freqBandIndicatorPriority", "true"); - } - j.end_obj(); - } + j.write_int("burstLength", burst_len); + j.write_int("maxSimultaneousResourceSetsPerCC", max_simul_res_sets_per_cc); + j.write_int("maxConfiguredResourceSetsPerCC", max_cfgured_res_sets_per_cc); + j.write_int("maxConfiguredResourceSetsAllCC", max_cfgured_res_sets_all_cc); j.end_obj(); } -// MeasResultServMO ::= SEQUENCE -SRSASN_CODE meas_result_serv_mo_s::pack(bit_ref& bref) const +// PTRS-DensityRecommendationDL ::= SEQUENCE +SRSASN_CODE ptrs_density_recommendation_dl_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_present, 1)); - - HANDLE_CODE(pack_integer(bref, serv_cell_id, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(meas_result_serving_cell.pack(bref)); - if (meas_result_best_neigh_cell_present) { - HANDLE_CODE(meas_result_best_neigh_cell.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, freq_density1, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, freq_density2, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, time_density1, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(pack_integer(bref, time_density2, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(pack_integer(bref, time_density3, (uint8_t)0u, (uint8_t)29u)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_result_serv_mo_s::unpack(cbit_ref& bref) +SRSASN_CODE ptrs_density_recommendation_dl_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_present, 1)); - - HANDLE_CODE(unpack_integer(serv_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(meas_result_serving_cell.unpack(bref)); - if (meas_result_best_neigh_cell_present) { - HANDLE_CODE(meas_result_best_neigh_cell.unpack(bref)); - } + HANDLE_CODE(unpack_integer(freq_density1, bref, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(freq_density2, bref, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(time_density1, bref, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(unpack_integer(time_density2, bref, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(unpack_integer(time_density3, bref, (uint8_t)0u, (uint8_t)29u)); return SRSASN_SUCCESS; } -void meas_result_serv_mo_s::to_json(json_writer& j) const +void ptrs_density_recommendation_dl_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("servCellId", serv_cell_id); - j.write_fieldname("measResultServingCell"); - meas_result_serving_cell.to_json(j); - if (meas_result_best_neigh_cell_present) { - j.write_fieldname("measResultBestNeighCell"); - meas_result_best_neigh_cell.to_json(j); - } + j.write_int("frequencyDensity1", freq_density1); + j.write_int("frequencyDensity2", freq_density2); + j.write_int("timeDensity1", time_density1); + j.write_int("timeDensity2", time_density2); + j.write_int("timeDensity3", time_density3); j.end_obj(); } -// ReducedAggregatedBandwidth ::= ENUMERATED -std::string reduced_aggregated_bw_opts::to_string() const +// PTRS-DensityRecommendationUL ::= SEQUENCE +SRSASN_CODE ptrs_density_recommendation_ul_s::pack(bit_ref& bref) const { - 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"); + HANDLE_CODE(pack_integer(bref, freq_density1, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, freq_density2, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, time_density1, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(pack_integer(bref, time_density2, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(pack_integer(bref, time_density3, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(pack_integer(bref, sample_density1, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, sample_density2, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, sample_density3, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, sample_density4, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, sample_density5, (uint16_t)1u, (uint16_t)276u)); + + return SRSASN_SUCCESS; } -uint16_t reduced_aggregated_bw_opts::to_number() const +SRSASN_CODE ptrs_density_recommendation_ul_s::unpack(cbit_ref& bref) { - 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"); + HANDLE_CODE(unpack_integer(freq_density1, bref, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(freq_density2, bref, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(time_density1, bref, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(unpack_integer(time_density2, bref, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(unpack_integer(time_density3, bref, (uint8_t)0u, (uint8_t)29u)); + HANDLE_CODE(unpack_integer(sample_density1, bref, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(sample_density2, bref, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(sample_density3, bref, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(sample_density4, bref, (uint16_t)1u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(sample_density5, bref, (uint16_t)1u, (uint16_t)276u)); + + return SRSASN_SUCCESS; +} +void ptrs_density_recommendation_ul_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("frequencyDensity1", freq_density1); + j.write_int("frequencyDensity2", freq_density2); + j.write_int("timeDensity1", time_density1); + j.write_int("timeDensity2", time_density2); + j.write_int("timeDensity3", time_density3); + j.write_int("sampleDensity1", sample_density1); + j.write_int("sampleDensity2", sample_density2); + j.write_int("sampleDensity3", sample_density3); + j.write_int("sampleDensity4", sample_density4); + j.write_int("sampleDensity5", sample_density5); + j.end_obj(); } -// UplinkTxDirectCurrentCell ::= SEQUENCE -SRSASN_CODE ul_tx_direct_current_cell_s::pack(bit_ref& bref) const +// SpatialRelations ::= SEQUENCE +SRSASN_CODE spatial_relations_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_dyn_seq_of(bref, ul_direct_current_bwp, 1, 4)); + HANDLE_CODE(bref.pack(add_active_spatial_relation_pucch_present, 1)); + + HANDLE_CODE(max_num_cfgured_spatial_relations.pack(bref)); + HANDLE_CODE(max_num_active_spatial_relations.pack(bref)); + HANDLE_CODE(max_num_dl_rs_qcl_type_d.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ul_tx_direct_current_cell_s::unpack(cbit_ref& bref) +SRSASN_CODE spatial_relations_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_dyn_seq_of(ul_direct_current_bwp, bref, 1, 4)); + HANDLE_CODE(bref.unpack(add_active_spatial_relation_pucch_present, 1)); + + HANDLE_CODE(max_num_cfgured_spatial_relations.unpack(bref)); + HANDLE_CODE(max_num_active_spatial_relations.unpack(bref)); + HANDLE_CODE(max_num_dl_rs_qcl_type_d.unpack(bref)); return SRSASN_SUCCESS; } -void ul_tx_direct_current_cell_s::to_json(json_writer& j) const +void spatial_relations_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("servCellIndex", serv_cell_idx); - j.start_array("uplinkDirectCurrentBWP"); - for (const auto& e1 : ul_direct_current_bwp) { - e1.to_json(j); + j.write_str("maxNumberConfiguredSpatialRelations", max_num_cfgured_spatial_relations.to_string()); + j.write_str("maxNumberActiveSpatialRelations", max_num_active_spatial_relations.to_string()); + if (add_active_spatial_relation_pucch_present) { + j.write_str("additionalActiveSpatialRelationPUCCH", "supported"); } - j.end_array(); + j.write_str("maxNumberDL-RS-QCL-TypeD", max_num_dl_rs_qcl_type_d.to_string()); j.end_obj(); } -// DRB-CountInfo ::= SEQUENCE -SRSASN_CODE drb_count_info_s::pack(bit_ref& bref) const +std::string spatial_relations_s::max_num_cfgured_spatial_relations_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, drb_id, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pack_integer(bref, count_ul, (uint64_t)0u, (uint64_t)4294967295u)); - HANDLE_CODE(pack_integer(bref, count_dl, (uint64_t)0u, (uint64_t)4294967295u)); + 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 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_"); +} - return SRSASN_SUCCESS; +std::string spatial_relations_s::max_num_active_spatial_relations_opts::to_string() const +{ + 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_"); } -SRSASN_CODE drb_count_info_s::unpack(cbit_ref& bref) +uint8_t spatial_relations_s::max_num_active_spatial_relations_opts::to_number() const { - HANDLE_CODE(unpack_integer(drb_id, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(unpack_integer(count_ul, bref, (uint64_t)0u, (uint64_t)4294967295u)); - HANDLE_CODE(unpack_integer(count_dl, bref, (uint64_t)0u, (uint64_t)4294967295u)); + 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_"); +} - return SRSASN_SUCCESS; +std::string spatial_relations_s::max_num_dl_rs_qcl_type_d_opts::to_string() const +{ + 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_"); } -void drb_count_info_s::to_json(json_writer& j) const +uint8_t spatial_relations_s::max_num_dl_rs_qcl_type_d_opts::to_number() const { - j.start_obj(); - j.write_int("drb-Identity", drb_id); - j.write_int("count-Uplink", count_ul); - j.write_int("count-Downlink", count_dl); - j.end_obj(); + 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_"); } -// OverheatingAssistance ::= SEQUENCE -SRSASN_CODE overheat_assist_s::pack(bit_ref& bref) const +// MIMO-ParametersPerBand ::= SEQUENCE +SRSASN_CODE mimo_params_per_band_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(reduced_max_ccs_present, 1)); - HANDLE_CODE(bref.pack(reduced_max_bw_fr1_present, 1)); - HANDLE_CODE(bref.pack(reduced_max_bw_fr2_present, 1)); - HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr1_present, 1)); - HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr2_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(tci_state_pdsch_present, 1)); + HANDLE_CODE(bref.pack(add_active_tci_state_pdcch_present, 1)); + HANDLE_CODE(bref.pack(pusch_trans_coherence_present, 1)); + HANDLE_CODE(bref.pack(beam_correspondence_without_ul_beam_sweeping_present, 1)); + HANDLE_CODE(bref.pack(periodic_beam_report_present, 1)); + HANDLE_CODE(bref.pack(aperiodic_beam_report_present, 1)); + HANDLE_CODE(bref.pack(sp_beam_report_pucch_present, 1)); + HANDLE_CODE(bref.pack(sp_beam_report_pusch_present, 1)); + HANDLE_CODE(bref.pack(dummy1_present, 1)); + HANDLE_CODE(bref.pack(max_num_rx_beam_present, 1)); + HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl_present, 1)); + HANDLE_CODE(bref.pack(max_num_non_group_beam_report_present, 1)); + HANDLE_CODE(bref.pack(group_beam_report_present, 1)); + HANDLE_CODE(bref.pack(ul_beam_management_present, 1)); + HANDLE_CODE(bref.pack(max_num_csi_rs_bfd_present, 1)); + HANDLE_CODE(bref.pack(max_num_ssb_bfd_present, 1)); + HANDLE_CODE(bref.pack(max_num_csi_rs_ssb_cbd_present, 1)); + HANDLE_CODE(bref.pack(dummy2_present, 1)); + HANDLE_CODE(bref.pack(two_ports_ptrs_ul_present, 1)); + HANDLE_CODE(bref.pack(dummy5_present, 1)); + HANDLE_CODE(bref.pack(dummy3_present, 1)); + HANDLE_CODE(bref.pack(beam_report_timing_present, 1)); + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl_present, 1)); + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul_present, 1)); + HANDLE_CODE(bref.pack(dummy4_present, 1)); + HANDLE_CODE(bref.pack(aperiodic_trs_present, 1)); - if (reduced_max_ccs_present) { - HANDLE_CODE(pack_integer(bref, reduced_max_ccs.reduced_ccs_dl, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, reduced_max_ccs.reduced_ccs_ul, (uint8_t)0u, (uint8_t)31u)); - } - if (reduced_max_bw_fr1_present) { - HANDLE_CODE(reduced_max_bw_fr1.reduced_bw_fr1_dl.pack(bref)); - HANDLE_CODE(reduced_max_bw_fr1.reduced_bw_fr1_ul.pack(bref)); + if (tci_state_pdsch_present) { + HANDLE_CODE(bref.pack(tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present, 1)); + HANDLE_CODE(bref.pack(tci_state_pdsch.max_num_active_tci_per_bwp_present, 1)); + if (tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present) { + HANDLE_CODE(tci_state_pdsch.max_num_cfgured_tcistates_per_cc.pack(bref)); + } + if (tci_state_pdsch.max_num_active_tci_per_bwp_present) { + HANDLE_CODE(tci_state_pdsch.max_num_active_tci_per_bwp.pack(bref)); + } } - if (reduced_max_bw_fr2_present) { - HANDLE_CODE(reduced_max_bw_fr2.reduced_bw_fr2_dl.pack(bref)); - HANDLE_CODE(reduced_max_bw_fr2.reduced_bw_fr2_ul.pack(bref)); + if (pusch_trans_coherence_present) { + HANDLE_CODE(pusch_trans_coherence.pack(bref)); } - if (reduced_max_mimo_layers_fr1_present) { - HANDLE_CODE(reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_dl.pack(bref)); - HANDLE_CODE(reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_ul.pack(bref)); + if (dummy1_present) { + HANDLE_CODE(dummy1.pack(bref)); } - if (reduced_max_mimo_layers_fr2_present) { - HANDLE_CODE(reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_dl.pack(bref)); - HANDLE_CODE(reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_ul.pack(bref)); + if (max_num_rx_beam_present) { + HANDLE_CODE(pack_integer(bref, max_num_rx_beam, (uint8_t)2u, (uint8_t)8u)); } - - return SRSASN_SUCCESS; -} -SRSASN_CODE overheat_assist_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(reduced_max_ccs_present, 1)); - HANDLE_CODE(bref.unpack(reduced_max_bw_fr1_present, 1)); - HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_present, 1)); - HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr1_present, 1)); - HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr2_present, 1)); - - if (reduced_max_ccs_present) { - HANDLE_CODE(unpack_integer(reduced_max_ccs.reduced_ccs_dl, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(reduced_max_ccs.reduced_ccs_ul, bref, (uint8_t)0u, (uint8_t)31u)); + if (max_num_rx_tx_beam_switch_dl_present) { + HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present, 1)); + HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present, 1)); + if (max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus15k_hz.pack(bref)); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus30k_hz.pack(bref)); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus60k_hz.pack(bref)); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus120k_hz.pack(bref)); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus240k_hz.pack(bref)); + } } - if (reduced_max_bw_fr1_present) { - HANDLE_CODE(reduced_max_bw_fr1.reduced_bw_fr1_dl.unpack(bref)); - HANDLE_CODE(reduced_max_bw_fr1.reduced_bw_fr1_ul.unpack(bref)); + if (max_num_non_group_beam_report_present) { + HANDLE_CODE(max_num_non_group_beam_report.pack(bref)); } - if (reduced_max_bw_fr2_present) { - HANDLE_CODE(reduced_max_bw_fr2.reduced_bw_fr2_dl.unpack(bref)); - HANDLE_CODE(reduced_max_bw_fr2.reduced_bw_fr2_ul.unpack(bref)); + if (ul_beam_management_present) { + HANDLE_CODE(ul_beam_management.max_num_srs_res_per_set_bm.pack(bref)); + HANDLE_CODE(pack_integer(bref, ul_beam_management.max_num_srs_res_set, (uint8_t)1u, (uint8_t)8u)); } - if (reduced_max_mimo_layers_fr1_present) { - HANDLE_CODE(reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_dl.unpack(bref)); - HANDLE_CODE(reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_ul.unpack(bref)); + if (max_num_csi_rs_bfd_present) { + HANDLE_CODE(pack_integer(bref, max_num_csi_rs_bfd, (uint8_t)1u, (uint8_t)64u)); } - if (reduced_max_mimo_layers_fr2_present) { - HANDLE_CODE(reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_dl.unpack(bref)); - HANDLE_CODE(reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_ul.unpack(bref)); + if (max_num_ssb_bfd_present) { + HANDLE_CODE(pack_integer(bref, max_num_ssb_bfd, (uint8_t)1u, (uint8_t)64u)); } - - return SRSASN_SUCCESS; -} -void overheat_assist_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (reduced_max_ccs_present) { - j.write_fieldname("reducedMaxCCs"); - j.start_obj(); - j.write_int("reducedCCsDL", reduced_max_ccs.reduced_ccs_dl); - j.write_int("reducedCCsUL", reduced_max_ccs.reduced_ccs_ul); - j.end_obj(); + if (max_num_csi_rs_ssb_cbd_present) { + HANDLE_CODE(pack_integer(bref, max_num_csi_rs_ssb_cbd, (uint16_t)1u, (uint16_t)256u)); } - if (reduced_max_bw_fr1_present) { - j.write_fieldname("reducedMaxBW-FR1"); - j.start_obj(); - j.write_str("reducedBW-FR1-DL", reduced_max_bw_fr1.reduced_bw_fr1_dl.to_string()); - j.write_str("reducedBW-FR1-UL", reduced_max_bw_fr1.reduced_bw_fr1_ul.to_string()); - j.end_obj(); + if (dummy5_present) { + HANDLE_CODE(dummy5.pack(bref)); } - if (reduced_max_bw_fr2_present) { - j.write_fieldname("reducedMaxBW-FR2"); - j.start_obj(); - j.write_str("reducedBW-FR2-DL", reduced_max_bw_fr2.reduced_bw_fr2_dl.to_string()); - j.write_str("reducedBW-FR2-UL", reduced_max_bw_fr2.reduced_bw_fr2_ul.to_string()); - j.end_obj(); + if (dummy3_present) { + HANDLE_CODE(pack_integer(bref, dummy3, (uint8_t)1u, (uint8_t)4u)); } - if (reduced_max_mimo_layers_fr1_present) { - j.write_fieldname("reducedMaxMIMO-LayersFR1"); - j.start_obj(); - j.write_str("reducedMIMO-LayersFR1-DL", reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_dl.to_string()); - j.write_str("reducedMIMO-LayersFR1-UL", reduced_max_mimo_layers_fr1.reduced_mimo_layers_fr1_ul.to_string()); - j.end_obj(); + if (beam_report_timing_present) { + HANDLE_CODE(bref.pack(beam_report_timing.scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.pack(beam_report_timing.scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.pack(beam_report_timing.scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(beam_report_timing.scs_minus120k_hz_present, 1)); + if (beam_report_timing.scs_minus15k_hz_present) { + HANDLE_CODE(beam_report_timing.scs_minus15k_hz.pack(bref)); + } + if (beam_report_timing.scs_minus30k_hz_present) { + HANDLE_CODE(beam_report_timing.scs_minus30k_hz.pack(bref)); + } + if (beam_report_timing.scs_minus60k_hz_present) { + HANDLE_CODE(beam_report_timing.scs_minus60k_hz.pack(bref)); + } + if (beam_report_timing.scs_minus120k_hz_present) { + HANDLE_CODE(beam_report_timing.scs_minus120k_hz.pack(bref)); + } } - if (reduced_max_mimo_layers_fr2_present) { - j.write_fieldname("reducedMaxMIMO-LayersFR2"); - j.start_obj(); - j.write_str("reducedMIMO-LayersFR2-DL", reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_dl.to_string()); - j.write_str("reducedMIMO-LayersFR2-UL", reduced_max_mimo_layers_fr2.reduced_mimo_layers_fr2_ul.to_string()); - j.end_obj(); + if (ptrs_density_recommendation_set_dl_present) { + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl.scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl.scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl.scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl.scs_minus120k_hz_present, 1)); + if (ptrs_density_recommendation_set_dl.scs_minus15k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus15k_hz.pack(bref)); + } + if (ptrs_density_recommendation_set_dl.scs_minus30k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus30k_hz.pack(bref)); + } + if (ptrs_density_recommendation_set_dl.scs_minus60k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus60k_hz.pack(bref)); + } + if (ptrs_density_recommendation_set_dl.scs_minus120k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus120k_hz.pack(bref)); + } + } + if (ptrs_density_recommendation_set_ul_present) { + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul.scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul.scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul.scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul.scs_minus120k_hz_present, 1)); + if (ptrs_density_recommendation_set_ul.scs_minus15k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus15k_hz.pack(bref)); + } + if (ptrs_density_recommendation_set_ul.scs_minus30k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus30k_hz.pack(bref)); + } + if (ptrs_density_recommendation_set_ul.scs_minus60k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus60k_hz.pack(bref)); + } + if (ptrs_density_recommendation_set_ul.scs_minus120k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus120k_hz.pack(bref)); + } + } + if (dummy4_present) { + HANDLE_CODE(dummy4.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= dummy6_present; + group_flags[0] |= beam_management_ssb_csi_rs.is_present(); + group_flags[0] |= beam_switch_timing.is_present(); + group_flags[0] |= codebook_params.is_present(); + group_flags[0] |= csi_rs_im_reception_for_feedback.is_present(); + group_flags[0] |= csi_rs_proc_framework_for_srs.is_present(); + group_flags[0] |= csi_report_framework.is_present(); + group_flags[0] |= csi_rs_for_tracking.is_present(); + group_flags[0] |= srs_assoc_csi_rs.is_present(); + group_flags[0] |= spatial_relations.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dummy6_present, 1)); + HANDLE_CODE(bref.pack(beam_management_ssb_csi_rs.is_present(), 1)); + HANDLE_CODE(bref.pack(beam_switch_timing.is_present(), 1)); + HANDLE_CODE(bref.pack(codebook_params.is_present(), 1)); + HANDLE_CODE(bref.pack(csi_rs_im_reception_for_feedback.is_present(), 1)); + HANDLE_CODE(bref.pack(csi_rs_proc_framework_for_srs.is_present(), 1)); + HANDLE_CODE(bref.pack(csi_report_framework.is_present(), 1)); + HANDLE_CODE(bref.pack(csi_rs_for_tracking.is_present(), 1)); + HANDLE_CODE(bref.pack(srs_assoc_csi_rs.is_present(), 1)); + HANDLE_CODE(bref.pack(spatial_relations.is_present(), 1)); + if (beam_management_ssb_csi_rs.is_present()) { + HANDLE_CODE(beam_management_ssb_csi_rs->pack(bref)); + } + if (beam_switch_timing.is_present()) { + HANDLE_CODE(bref.pack(beam_switch_timing->scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(beam_switch_timing->scs_minus120k_hz_present, 1)); + if (beam_switch_timing->scs_minus60k_hz_present) { + HANDLE_CODE(beam_switch_timing->scs_minus60k_hz.pack(bref)); + } + if (beam_switch_timing->scs_minus120k_hz_present) { + HANDLE_CODE(beam_switch_timing->scs_minus120k_hz.pack(bref)); + } + } + if (codebook_params.is_present()) { + HANDLE_CODE(codebook_params->pack(bref)); + } + if (csi_rs_im_reception_for_feedback.is_present()) { + HANDLE_CODE(csi_rs_im_reception_for_feedback->pack(bref)); + } + if (csi_rs_proc_framework_for_srs.is_present()) { + HANDLE_CODE(csi_rs_proc_framework_for_srs->pack(bref)); + } + if (csi_report_framework.is_present()) { + HANDLE_CODE(csi_report_framework->pack(bref)); + } + if (csi_rs_for_tracking.is_present()) { + HANDLE_CODE(csi_rs_for_tracking->pack(bref)); + } + if (srs_assoc_csi_rs.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_assoc_csi_rs, 1, 7)); + } + if (spatial_relations.is_present()) { + HANDLE_CODE(spatial_relations->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_params_per_band_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(tci_state_pdsch_present, 1)); + HANDLE_CODE(bref.unpack(add_active_tci_state_pdcch_present, 1)); + HANDLE_CODE(bref.unpack(pusch_trans_coherence_present, 1)); + HANDLE_CODE(bref.unpack(beam_correspondence_without_ul_beam_sweeping_present, 1)); + HANDLE_CODE(bref.unpack(periodic_beam_report_present, 1)); + HANDLE_CODE(bref.unpack(aperiodic_beam_report_present, 1)); + HANDLE_CODE(bref.unpack(sp_beam_report_pucch_present, 1)); + HANDLE_CODE(bref.unpack(sp_beam_report_pusch_present, 1)); + HANDLE_CODE(bref.unpack(dummy1_present, 1)); + HANDLE_CODE(bref.unpack(max_num_rx_beam_present, 1)); + HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl_present, 1)); + HANDLE_CODE(bref.unpack(max_num_non_group_beam_report_present, 1)); + HANDLE_CODE(bref.unpack(group_beam_report_present, 1)); + HANDLE_CODE(bref.unpack(ul_beam_management_present, 1)); + HANDLE_CODE(bref.unpack(max_num_csi_rs_bfd_present, 1)); + HANDLE_CODE(bref.unpack(max_num_ssb_bfd_present, 1)); + HANDLE_CODE(bref.unpack(max_num_csi_rs_ssb_cbd_present, 1)); + HANDLE_CODE(bref.unpack(dummy2_present, 1)); + HANDLE_CODE(bref.unpack(two_ports_ptrs_ul_present, 1)); + HANDLE_CODE(bref.unpack(dummy5_present, 1)); + HANDLE_CODE(bref.unpack(dummy3_present, 1)); + HANDLE_CODE(bref.unpack(beam_report_timing_present, 1)); + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl_present, 1)); + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul_present, 1)); + HANDLE_CODE(bref.unpack(dummy4_present, 1)); + HANDLE_CODE(bref.unpack(aperiodic_trs_present, 1)); + + if (tci_state_pdsch_present) { + HANDLE_CODE(bref.unpack(tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present, 1)); + HANDLE_CODE(bref.unpack(tci_state_pdsch.max_num_active_tci_per_bwp_present, 1)); + if (tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present) { + HANDLE_CODE(tci_state_pdsch.max_num_cfgured_tcistates_per_cc.unpack(bref)); + } + if (tci_state_pdsch.max_num_active_tci_per_bwp_present) { + HANDLE_CODE(tci_state_pdsch.max_num_active_tci_per_bwp.unpack(bref)); + } + } + if (pusch_trans_coherence_present) { + HANDLE_CODE(pusch_trans_coherence.unpack(bref)); + } + if (dummy1_present) { + HANDLE_CODE(dummy1.unpack(bref)); + } + if (max_num_rx_beam_present) { + HANDLE_CODE(unpack_integer(max_num_rx_beam, bref, (uint8_t)2u, (uint8_t)8u)); + } + if (max_num_rx_tx_beam_switch_dl_present) { + HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present, 1)); + HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present, 1)); + if (max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus15k_hz.unpack(bref)); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus30k_hz.unpack(bref)); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus60k_hz.unpack(bref)); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus120k_hz.unpack(bref)); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present) { + HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus240k_hz.unpack(bref)); + } + } + if (max_num_non_group_beam_report_present) { + HANDLE_CODE(max_num_non_group_beam_report.unpack(bref)); + } + if (ul_beam_management_present) { + HANDLE_CODE(ul_beam_management.max_num_srs_res_per_set_bm.unpack(bref)); + HANDLE_CODE(unpack_integer(ul_beam_management.max_num_srs_res_set, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (max_num_csi_rs_bfd_present) { + HANDLE_CODE(unpack_integer(max_num_csi_rs_bfd, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (max_num_ssb_bfd_present) { + HANDLE_CODE(unpack_integer(max_num_ssb_bfd, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (max_num_csi_rs_ssb_cbd_present) { + HANDLE_CODE(unpack_integer(max_num_csi_rs_ssb_cbd, bref, (uint16_t)1u, (uint16_t)256u)); + } + if (dummy5_present) { + HANDLE_CODE(dummy5.unpack(bref)); + } + if (dummy3_present) { + HANDLE_CODE(unpack_integer(dummy3, bref, (uint8_t)1u, (uint8_t)4u)); + } + if (beam_report_timing_present) { + HANDLE_CODE(bref.unpack(beam_report_timing.scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.unpack(beam_report_timing.scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.unpack(beam_report_timing.scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(beam_report_timing.scs_minus120k_hz_present, 1)); + if (beam_report_timing.scs_minus15k_hz_present) { + HANDLE_CODE(beam_report_timing.scs_minus15k_hz.unpack(bref)); + } + if (beam_report_timing.scs_minus30k_hz_present) { + HANDLE_CODE(beam_report_timing.scs_minus30k_hz.unpack(bref)); + } + if (beam_report_timing.scs_minus60k_hz_present) { + HANDLE_CODE(beam_report_timing.scs_minus60k_hz.unpack(bref)); + } + if (beam_report_timing.scs_minus120k_hz_present) { + HANDLE_CODE(beam_report_timing.scs_minus120k_hz.unpack(bref)); + } + } + if (ptrs_density_recommendation_set_dl_present) { + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl.scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl.scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl.scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl.scs_minus120k_hz_present, 1)); + if (ptrs_density_recommendation_set_dl.scs_minus15k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus15k_hz.unpack(bref)); + } + if (ptrs_density_recommendation_set_dl.scs_minus30k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus30k_hz.unpack(bref)); + } + if (ptrs_density_recommendation_set_dl.scs_minus60k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus60k_hz.unpack(bref)); + } + if (ptrs_density_recommendation_set_dl.scs_minus120k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus120k_hz.unpack(bref)); + } + } + if (ptrs_density_recommendation_set_ul_present) { + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul.scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul.scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul.scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul.scs_minus120k_hz_present, 1)); + if (ptrs_density_recommendation_set_ul.scs_minus15k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus15k_hz.unpack(bref)); + } + if (ptrs_density_recommendation_set_ul.scs_minus30k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus30k_hz.unpack(bref)); + } + if (ptrs_density_recommendation_set_ul.scs_minus60k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus60k_hz.unpack(bref)); + } + if (ptrs_density_recommendation_set_ul.scs_minus120k_hz_present) { + HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus120k_hz.unpack(bref)); + } + } + if (dummy4_present) { + HANDLE_CODE(dummy4.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(dummy6_present, 1)); + bool beam_management_ssb_csi_rs_present; + HANDLE_CODE(bref.unpack(beam_management_ssb_csi_rs_present, 1)); + beam_management_ssb_csi_rs.set_present(beam_management_ssb_csi_rs_present); + bool beam_switch_timing_present; + HANDLE_CODE(bref.unpack(beam_switch_timing_present, 1)); + beam_switch_timing.set_present(beam_switch_timing_present); + bool codebook_params_present; + HANDLE_CODE(bref.unpack(codebook_params_present, 1)); + codebook_params.set_present(codebook_params_present); + bool csi_rs_im_reception_for_feedback_present; + HANDLE_CODE(bref.unpack(csi_rs_im_reception_for_feedback_present, 1)); + csi_rs_im_reception_for_feedback.set_present(csi_rs_im_reception_for_feedback_present); + bool csi_rs_proc_framework_for_srs_present; + HANDLE_CODE(bref.unpack(csi_rs_proc_framework_for_srs_present, 1)); + csi_rs_proc_framework_for_srs.set_present(csi_rs_proc_framework_for_srs_present); + bool csi_report_framework_present; + HANDLE_CODE(bref.unpack(csi_report_framework_present, 1)); + csi_report_framework.set_present(csi_report_framework_present); + bool csi_rs_for_tracking_present; + HANDLE_CODE(bref.unpack(csi_rs_for_tracking_present, 1)); + csi_rs_for_tracking.set_present(csi_rs_for_tracking_present); + bool srs_assoc_csi_rs_present; + HANDLE_CODE(bref.unpack(srs_assoc_csi_rs_present, 1)); + srs_assoc_csi_rs.set_present(srs_assoc_csi_rs_present); + bool spatial_relations_present; + HANDLE_CODE(bref.unpack(spatial_relations_present, 1)); + spatial_relations.set_present(spatial_relations_present); + if (beam_management_ssb_csi_rs.is_present()) { + HANDLE_CODE(beam_management_ssb_csi_rs->unpack(bref)); + } + if (beam_switch_timing.is_present()) { + HANDLE_CODE(bref.unpack(beam_switch_timing->scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(beam_switch_timing->scs_minus120k_hz_present, 1)); + if (beam_switch_timing->scs_minus60k_hz_present) { + HANDLE_CODE(beam_switch_timing->scs_minus60k_hz.unpack(bref)); + } + if (beam_switch_timing->scs_minus120k_hz_present) { + HANDLE_CODE(beam_switch_timing->scs_minus120k_hz.unpack(bref)); + } + } + if (codebook_params.is_present()) { + HANDLE_CODE(codebook_params->unpack(bref)); + } + if (csi_rs_im_reception_for_feedback.is_present()) { + HANDLE_CODE(csi_rs_im_reception_for_feedback->unpack(bref)); + } + if (csi_rs_proc_framework_for_srs.is_present()) { + HANDLE_CODE(csi_rs_proc_framework_for_srs->unpack(bref)); + } + if (csi_report_framework.is_present()) { + HANDLE_CODE(csi_report_framework->unpack(bref)); + } + if (csi_rs_for_tracking.is_present()) { + HANDLE_CODE(csi_rs_for_tracking->unpack(bref)); + } + if (srs_assoc_csi_rs.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*srs_assoc_csi_rs, bref, 1, 7)); + } + if (spatial_relations.is_present()) { + HANDLE_CODE(spatial_relations->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void mimo_params_per_band_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tci_state_pdsch_present) { + j.write_fieldname("tci-StatePDSCH"); + j.start_obj(); + if (tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present) { + j.write_str("maxNumberConfiguredTCIstatesPerCC", tci_state_pdsch.max_num_cfgured_tcistates_per_cc.to_string()); + } + if (tci_state_pdsch.max_num_active_tci_per_bwp_present) { + j.write_str("maxNumberActiveTCI-PerBWP", tci_state_pdsch.max_num_active_tci_per_bwp.to_string()); + } + j.end_obj(); + } + if (add_active_tci_state_pdcch_present) { + j.write_str("additionalActiveTCI-StatePDCCH", "supported"); + } + if (pusch_trans_coherence_present) { + j.write_str("pusch-TransCoherence", pusch_trans_coherence.to_string()); + } + if (beam_correspondence_without_ul_beam_sweeping_present) { + j.write_str("beamCorrespondenceWithoutUL-BeamSweeping", "supported"); + } + if (periodic_beam_report_present) { + j.write_str("periodicBeamReport", "supported"); + } + if (aperiodic_beam_report_present) { + j.write_str("aperiodicBeamReport", "supported"); + } + if (sp_beam_report_pucch_present) { + j.write_str("sp-BeamReportPUCCH", "supported"); + } + if (sp_beam_report_pusch_present) { + j.write_str("sp-BeamReportPUSCH", "supported"); + } + if (dummy1_present) { + j.write_fieldname("dummy1"); + dummy1.to_json(j); + } + if (max_num_rx_beam_present) { + j.write_int("maxNumberRxBeam", max_num_rx_beam); + } + if (max_num_rx_tx_beam_switch_dl_present) { + j.write_fieldname("maxNumberRxTxBeamSwitchDL"); + j.start_obj(); + if (max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present) { + j.write_str("scs-15kHz", max_num_rx_tx_beam_switch_dl.scs_minus15k_hz.to_string()); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present) { + j.write_str("scs-30kHz", max_num_rx_tx_beam_switch_dl.scs_minus30k_hz.to_string()); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present) { + j.write_str("scs-60kHz", max_num_rx_tx_beam_switch_dl.scs_minus60k_hz.to_string()); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present) { + j.write_str("scs-120kHz", max_num_rx_tx_beam_switch_dl.scs_minus120k_hz.to_string()); + } + if (max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present) { + j.write_str("scs-240kHz", max_num_rx_tx_beam_switch_dl.scs_minus240k_hz.to_string()); + } + j.end_obj(); + } + if (max_num_non_group_beam_report_present) { + j.write_str("maxNumberNonGroupBeamReporting", max_num_non_group_beam_report.to_string()); + } + if (group_beam_report_present) { + j.write_str("groupBeamReporting", "supported"); + } + if (ul_beam_management_present) { + j.write_fieldname("uplinkBeamManagement"); + j.start_obj(); + j.write_str("maxNumberSRS-ResourcePerSet-BM", ul_beam_management.max_num_srs_res_per_set_bm.to_string()); + j.write_int("maxNumberSRS-ResourceSet", ul_beam_management.max_num_srs_res_set); + j.end_obj(); + } + if (max_num_csi_rs_bfd_present) { + j.write_int("maxNumberCSI-RS-BFD", max_num_csi_rs_bfd); + } + if (max_num_ssb_bfd_present) { + j.write_int("maxNumberSSB-BFD", max_num_ssb_bfd); + } + if (max_num_csi_rs_ssb_cbd_present) { + j.write_int("maxNumberCSI-RS-SSB-CBD", max_num_csi_rs_ssb_cbd); + } + if (dummy2_present) { + j.write_str("dummy2", "supported"); + } + if (two_ports_ptrs_ul_present) { + j.write_str("twoPortsPTRS-UL", "supported"); + } + if (dummy5_present) { + j.write_fieldname("dummy5"); + dummy5.to_json(j); + } + if (dummy3_present) { + j.write_int("dummy3", dummy3); + } + if (beam_report_timing_present) { + j.write_fieldname("beamReportTiming"); + j.start_obj(); + if (beam_report_timing.scs_minus15k_hz_present) { + j.write_str("scs-15kHz", beam_report_timing.scs_minus15k_hz.to_string()); + } + if (beam_report_timing.scs_minus30k_hz_present) { + j.write_str("scs-30kHz", beam_report_timing.scs_minus30k_hz.to_string()); + } + if (beam_report_timing.scs_minus60k_hz_present) { + j.write_str("scs-60kHz", beam_report_timing.scs_minus60k_hz.to_string()); + } + if (beam_report_timing.scs_minus120k_hz_present) { + j.write_str("scs-120kHz", beam_report_timing.scs_minus120k_hz.to_string()); + } + j.end_obj(); + } + if (ptrs_density_recommendation_set_dl_present) { + j.write_fieldname("ptrs-DensityRecommendationSetDL"); + j.start_obj(); + if (ptrs_density_recommendation_set_dl.scs_minus15k_hz_present) { + j.write_fieldname("scs-15kHz"); + ptrs_density_recommendation_set_dl.scs_minus15k_hz.to_json(j); + } + if (ptrs_density_recommendation_set_dl.scs_minus30k_hz_present) { + j.write_fieldname("scs-30kHz"); + ptrs_density_recommendation_set_dl.scs_minus30k_hz.to_json(j); + } + if (ptrs_density_recommendation_set_dl.scs_minus60k_hz_present) { + j.write_fieldname("scs-60kHz"); + ptrs_density_recommendation_set_dl.scs_minus60k_hz.to_json(j); + } + if (ptrs_density_recommendation_set_dl.scs_minus120k_hz_present) { + j.write_fieldname("scs-120kHz"); + ptrs_density_recommendation_set_dl.scs_minus120k_hz.to_json(j); + } + j.end_obj(); + } + if (ptrs_density_recommendation_set_ul_present) { + j.write_fieldname("ptrs-DensityRecommendationSetUL"); + j.start_obj(); + if (ptrs_density_recommendation_set_ul.scs_minus15k_hz_present) { + j.write_fieldname("scs-15kHz"); + ptrs_density_recommendation_set_ul.scs_minus15k_hz.to_json(j); + } + if (ptrs_density_recommendation_set_ul.scs_minus30k_hz_present) { + j.write_fieldname("scs-30kHz"); + ptrs_density_recommendation_set_ul.scs_minus30k_hz.to_json(j); + } + if (ptrs_density_recommendation_set_ul.scs_minus60k_hz_present) { + j.write_fieldname("scs-60kHz"); + ptrs_density_recommendation_set_ul.scs_minus60k_hz.to_json(j); + } + if (ptrs_density_recommendation_set_ul.scs_minus120k_hz_present) { + j.write_fieldname("scs-120kHz"); + ptrs_density_recommendation_set_ul.scs_minus120k_hz.to_json(j); + } + j.end_obj(); + } + if (dummy4_present) { + j.write_fieldname("dummy4"); + dummy4.to_json(j); + } + if (aperiodic_trs_present) { + j.write_str("aperiodicTRS", "supported"); + } + if (ext) { + if (dummy6_present) { + j.write_str("dummy6", "true"); + } + if (beam_management_ssb_csi_rs.is_present()) { + j.write_fieldname("beamManagementSSB-CSI-RS"); + beam_management_ssb_csi_rs->to_json(j); + } + if (beam_switch_timing.is_present()) { + j.write_fieldname("beamSwitchTiming"); + j.start_obj(); + if (beam_switch_timing->scs_minus60k_hz_present) { + j.write_str("scs-60kHz", beam_switch_timing->scs_minus60k_hz.to_string()); + } + if (beam_switch_timing->scs_minus120k_hz_present) { + j.write_str("scs-120kHz", beam_switch_timing->scs_minus120k_hz.to_string()); + } + j.end_obj(); + } + if (codebook_params.is_present()) { + j.write_fieldname("codebookParameters"); + codebook_params->to_json(j); + } + if (csi_rs_im_reception_for_feedback.is_present()) { + j.write_fieldname("csi-RS-IM-ReceptionForFeedback"); + csi_rs_im_reception_for_feedback->to_json(j); + } + if (csi_rs_proc_framework_for_srs.is_present()) { + j.write_fieldname("csi-RS-ProcFrameworkForSRS"); + csi_rs_proc_framework_for_srs->to_json(j); + } + if (csi_report_framework.is_present()) { + j.write_fieldname("csi-ReportFramework"); + csi_report_framework->to_json(j); + } + if (csi_rs_for_tracking.is_present()) { + j.write_fieldname("csi-RS-ForTracking"); + csi_rs_for_tracking->to_json(j); + } + if (srs_assoc_csi_rs.is_present()) { + j.start_array("srs-AssocCSI-RS"); + for (const auto& e1 : *srs_assoc_csi_rs) { + e1.to_json(j); + } + j.end_array(); + } + if (spatial_relations.is_present()) { + j.write_fieldname("spatialRelations"); + spatial_relations->to_json(j); + } + } + j.end_obj(); +} + +std::string mimo_params_per_band_s::tci_state_pdsch_s_::max_num_cfgured_tcistates_per_cc_opts::to_string() const +{ + 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 +SRSASN_CODE band_nr_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(modified_mpr_behaviour_present, 1)); + HANDLE_CODE(bref.pack(mimo_params_per_band_present, 1)); + HANDLE_CODE(bref.pack(extended_cp_present, 1)); + HANDLE_CODE(bref.pack(multiple_tci_present, 1)); + HANDLE_CODE(bref.pack(bwp_without_restrict_present, 1)); + HANDLE_CODE(bref.pack(bwp_same_numerology_present, 1)); + HANDLE_CODE(bref.pack(bwp_diff_numerology_present, 1)); + HANDLE_CODE(bref.pack(cross_carrier_sched_same_scs_present, 1)); + HANDLE_CODE(bref.pack(pdsch_minus256_qam_fr2_present, 1)); + HANDLE_CODE(bref.pack(pusch_minus256_qam_present, 1)); + HANDLE_CODE(bref.pack(ue_pwr_class_present, 1)); + HANDLE_CODE(bref.pack(rate_matching_lte_crs_present, 1)); + HANDLE_CODE(bref.pack(ch_bws_dl_present, 1)); + HANDLE_CODE(bref.pack(ch_bws_ul_present, 1)); + + HANDLE_CODE(pack_integer(bref, band_nr, (uint16_t)1u, (uint16_t)1024u)); + if (modified_mpr_behaviour_present) { + HANDLE_CODE(modified_mpr_behaviour.pack(bref)); + } + if (mimo_params_per_band_present) { + HANDLE_CODE(mimo_params_per_band.pack(bref)); + } + if (bwp_same_numerology_present) { + HANDLE_CODE(bwp_same_numerology.pack(bref)); + } + if (ue_pwr_class_present) { + HANDLE_CODE(ue_pwr_class.pack(bref)); + } + if (ch_bws_dl_present) { + HANDLE_CODE(ch_bws_dl.pack(bref)); + } + if (ch_bws_ul_present) { + HANDLE_CODE(ch_bws_ul.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= max_ul_duty_cycle_pc2_fr1_present; + group_flags[1] |= pucch_spatial_rel_info_mac_ce_present; + group_flags[1] |= pwr_boosting_pi2_bpsk_present; + group_flags[2] |= max_ul_duty_cycle_fr2_present; + group_flags[3] |= ch_bws_dl_v1590.is_present(); + group_flags[3] |= ch_bws_ul_v1590.is_present(); + group_flags[4] |= asymmetric_bw_combination_set_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(max_ul_duty_cycle_pc2_fr1_present, 1)); + if (max_ul_duty_cycle_pc2_fr1_present) { + HANDLE_CODE(max_ul_duty_cycle_pc2_fr1.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pucch_spatial_rel_info_mac_ce_present, 1)); + HANDLE_CODE(bref.pack(pwr_boosting_pi2_bpsk_present, 1)); + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(max_ul_duty_cycle_fr2_present, 1)); + if (max_ul_duty_cycle_fr2_present) { + HANDLE_CODE(max_ul_duty_cycle_fr2.pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ch_bws_dl_v1590.is_present(), 1)); + HANDLE_CODE(bref.pack(ch_bws_ul_v1590.is_present(), 1)); + if (ch_bws_dl_v1590.is_present()) { + HANDLE_CODE(ch_bws_dl_v1590->pack(bref)); + } + if (ch_bws_ul_v1590.is_present()) { + HANDLE_CODE(ch_bws_ul_v1590->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(asymmetric_bw_combination_set_present, 1)); + if (asymmetric_bw_combination_set_present) { + HANDLE_CODE(asymmetric_bw_combination_set.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE band_nr_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(modified_mpr_behaviour_present, 1)); + HANDLE_CODE(bref.unpack(mimo_params_per_band_present, 1)); + HANDLE_CODE(bref.unpack(extended_cp_present, 1)); + HANDLE_CODE(bref.unpack(multiple_tci_present, 1)); + HANDLE_CODE(bref.unpack(bwp_without_restrict_present, 1)); + HANDLE_CODE(bref.unpack(bwp_same_numerology_present, 1)); + HANDLE_CODE(bref.unpack(bwp_diff_numerology_present, 1)); + HANDLE_CODE(bref.unpack(cross_carrier_sched_same_scs_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_minus256_qam_fr2_present, 1)); + HANDLE_CODE(bref.unpack(pusch_minus256_qam_present, 1)); + HANDLE_CODE(bref.unpack(ue_pwr_class_present, 1)); + HANDLE_CODE(bref.unpack(rate_matching_lte_crs_present, 1)); + HANDLE_CODE(bref.unpack(ch_bws_dl_present, 1)); + HANDLE_CODE(bref.unpack(ch_bws_ul_present, 1)); + + HANDLE_CODE(unpack_integer(band_nr, bref, (uint16_t)1u, (uint16_t)1024u)); + if (modified_mpr_behaviour_present) { + HANDLE_CODE(modified_mpr_behaviour.unpack(bref)); + } + if (mimo_params_per_band_present) { + HANDLE_CODE(mimo_params_per_band.unpack(bref)); + } + if (bwp_same_numerology_present) { + HANDLE_CODE(bwp_same_numerology.unpack(bref)); + } + if (ue_pwr_class_present) { + HANDLE_CODE(ue_pwr_class.unpack(bref)); + } + if (ch_bws_dl_present) { + HANDLE_CODE(ch_bws_dl.unpack(bref)); + } + if (ch_bws_ul_present) { + HANDLE_CODE(ch_bws_ul.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(5); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(max_ul_duty_cycle_pc2_fr1_present, 1)); + if (max_ul_duty_cycle_pc2_fr1_present) { + HANDLE_CODE(max_ul_duty_cycle_pc2_fr1.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(pucch_spatial_rel_info_mac_ce_present, 1)); + HANDLE_CODE(bref.unpack(pwr_boosting_pi2_bpsk_present, 1)); + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(max_ul_duty_cycle_fr2_present, 1)); + if (max_ul_duty_cycle_fr2_present) { + HANDLE_CODE(max_ul_duty_cycle_fr2.unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool ch_bws_dl_v1590_present; + HANDLE_CODE(bref.unpack(ch_bws_dl_v1590_present, 1)); + ch_bws_dl_v1590.set_present(ch_bws_dl_v1590_present); + bool ch_bws_ul_v1590_present; + HANDLE_CODE(bref.unpack(ch_bws_ul_v1590_present, 1)); + ch_bws_ul_v1590.set_present(ch_bws_ul_v1590_present); + if (ch_bws_dl_v1590.is_present()) { + HANDLE_CODE(ch_bws_dl_v1590->unpack(bref)); + } + if (ch_bws_ul_v1590.is_present()) { + HANDLE_CODE(ch_bws_ul_v1590->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(asymmetric_bw_combination_set_present, 1)); + if (asymmetric_bw_combination_set_present) { + HANDLE_CODE(asymmetric_bw_combination_set.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void band_nr_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandNR", band_nr); + if (modified_mpr_behaviour_present) { + j.write_str("modifiedMPR-Behaviour", modified_mpr_behaviour.to_string()); + } + if (mimo_params_per_band_present) { + j.write_fieldname("mimo-ParametersPerBand"); + mimo_params_per_band.to_json(j); + } + if (extended_cp_present) { + j.write_str("extendedCP", "supported"); + } + if (multiple_tci_present) { + j.write_str("multipleTCI", "supported"); + } + if (bwp_without_restrict_present) { + j.write_str("bwp-WithoutRestriction", "supported"); + } + if (bwp_same_numerology_present) { + j.write_str("bwp-SameNumerology", bwp_same_numerology.to_string()); + } + if (bwp_diff_numerology_present) { + j.write_str("bwp-DiffNumerology", "upto4"); + } + if (cross_carrier_sched_same_scs_present) { + j.write_str("crossCarrierScheduling-SameSCS", "supported"); + } + if (pdsch_minus256_qam_fr2_present) { + j.write_str("pdsch-256QAM-FR2", "supported"); + } + if (pusch_minus256_qam_present) { + j.write_str("pusch-256QAM", "supported"); + } + if (ue_pwr_class_present) { + j.write_str("ue-PowerClass", ue_pwr_class.to_string()); + } + if (rate_matching_lte_crs_present) { + j.write_str("rateMatchingLTE-CRS", "supported"); + } + if (ch_bws_dl_present) { + j.write_fieldname("channelBWs-DL"); + ch_bws_dl.to_json(j); + } + if (ch_bws_ul_present) { + j.write_fieldname("channelBWs-UL"); + ch_bws_ul.to_json(j); + } + if (ext) { + if (max_ul_duty_cycle_pc2_fr1_present) { + j.write_str("maxUplinkDutyCycle-PC2-FR1", max_ul_duty_cycle_pc2_fr1.to_string()); + } + if (pucch_spatial_rel_info_mac_ce_present) { + j.write_str("pucch-SpatialRelInfoMAC-CE", "supported"); + } + if (pwr_boosting_pi2_bpsk_present) { + j.write_str("powerBoosting-pi2BPSK", "supported"); + } + if (max_ul_duty_cycle_fr2_present) { + j.write_str("maxUplinkDutyCycle-FR2", max_ul_duty_cycle_fr2.to_string()); + } + if (ch_bws_dl_v1590.is_present()) { + j.write_fieldname("channelBWs-DL-v1590"); + ch_bws_dl_v1590->to_json(j); + } + if (ch_bws_ul_v1590.is_present()) { + j.write_fieldname("channelBWs-UL-v1590"); + ch_bws_ul_v1590->to_json(j); + } + if (asymmetric_bw_combination_set_present) { + j.write_str("asymmetricBandwidthCombinationSet", asymmetric_bw_combination_set.to_string()); + } + } + j.end_obj(); +} + +std::string band_nr_s::bwp_same_numerology_opts::to_string() const +{ + 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 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 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 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_c_::destroy_() +{ + switch (type_) { + case types::fr1: + c.destroy(); + break; + case types::fr2: + c.destroy(); + break; + default: + break; + } +} +void band_nr_s::ch_bws_dl_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::fr1: + c.init(); + break; + case types::fr2: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_c_"); + } +} +band_nr_s::ch_bws_dl_c_::ch_bws_dl_c_(const band_nr_s::ch_bws_dl_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fr1: + c.init(other.c.get()); + break; + case types::fr2: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_c_"); + } +} +band_nr_s::ch_bws_dl_c_& band_nr_s::ch_bws_dl_c_::operator=(const band_nr_s::ch_bws_dl_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fr1: + c.set(other.c.get()); + break; + case types::fr2: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_c_"); + } + + return *this; +} +void band_nr_s::ch_bws_dl_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fr1: + j.write_fieldname("fr1"); + j.start_obj(); + if (c.get().scs_minus15k_hz_present) { + j.write_str("scs-15kHz", c.get().scs_minus15k_hz.to_string()); + } + if (c.get().scs_minus30k_hz_present) { + j.write_str("scs-30kHz", c.get().scs_minus30k_hz.to_string()); + } + if (c.get().scs_minus60k_hz_present) { + j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); + } + j.end_obj(); + break; + case types::fr2: + j.write_fieldname("fr2"); + j.start_obj(); + if (c.get().scs_minus60k_hz_present) { + j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); + } + if (c.get().scs_minus120k_hz_present) { + j.write_str("scs-120kHz", c.get().scs_minus120k_hz.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_c_"); + } + j.end_obj(); +} +SRSASN_CODE band_nr_s::ch_bws_dl_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::fr1: + HANDLE_CODE(bref.pack(c.get().scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); + if (c.get().scs_minus15k_hz_present) { + HANDLE_CODE(c.get().scs_minus15k_hz.pack(bref)); + } + if (c.get().scs_minus30k_hz_present) { + HANDLE_CODE(c.get().scs_minus30k_hz.pack(bref)); + } + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); + } + break; + case types::fr2: + HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus120k_hz_present, 1)); + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); + } + if (c.get().scs_minus120k_hz_present) { + HANDLE_CODE(c.get().scs_minus120k_hz.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE band_nr_s::ch_bws_dl_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::fr1: + HANDLE_CODE(bref.unpack(c.get().scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); + if (c.get().scs_minus15k_hz_present) { + HANDLE_CODE(c.get().scs_minus15k_hz.unpack(bref)); + } + if (c.get().scs_minus30k_hz_present) { + HANDLE_CODE(c.get().scs_minus30k_hz.unpack(bref)); + } + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); + } + break; + case types::fr2: + HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus120k_hz_present, 1)); + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); + } + if (c.get().scs_minus120k_hz_present) { + HANDLE_CODE(c.get().scs_minus120k_hz.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string band_nr_s::ch_bws_dl_c_::types_opts::to_string() const +{ + static const char* options[] = {"fr1", "fr2"}; + return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_dl_c_::types"); +} +uint8_t band_nr_s::ch_bws_dl_c_::types_opts::to_number() const +{ + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "band_nr_s::ch_bws_dl_c_::types"); +} + +void band_nr_s::ch_bws_ul_c_::destroy_() +{ + switch (type_) { + case types::fr1: + c.destroy(); + break; + case types::fr2: + c.destroy(); + break; + default: + break; + } +} +void band_nr_s::ch_bws_ul_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::fr1: + c.init(); + break; + case types::fr2: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_c_"); + } +} +band_nr_s::ch_bws_ul_c_::ch_bws_ul_c_(const band_nr_s::ch_bws_ul_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fr1: + c.init(other.c.get()); + break; + case types::fr2: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_c_"); + } +} +band_nr_s::ch_bws_ul_c_& band_nr_s::ch_bws_ul_c_::operator=(const band_nr_s::ch_bws_ul_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fr1: + c.set(other.c.get()); + break; + case types::fr2: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_c_"); + } + + return *this; +} +void band_nr_s::ch_bws_ul_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fr1: + j.write_fieldname("fr1"); + j.start_obj(); + if (c.get().scs_minus15k_hz_present) { + j.write_str("scs-15kHz", c.get().scs_minus15k_hz.to_string()); + } + if (c.get().scs_minus30k_hz_present) { + j.write_str("scs-30kHz", c.get().scs_minus30k_hz.to_string()); + } + if (c.get().scs_minus60k_hz_present) { + j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); + } + j.end_obj(); + break; + case types::fr2: + j.write_fieldname("fr2"); + j.start_obj(); + if (c.get().scs_minus60k_hz_present) { + j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); + } + if (c.get().scs_minus120k_hz_present) { + j.write_str("scs-120kHz", c.get().scs_minus120k_hz.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_c_"); + } + j.end_obj(); +} +SRSASN_CODE band_nr_s::ch_bws_ul_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::fr1: + HANDLE_CODE(bref.pack(c.get().scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); + if (c.get().scs_minus15k_hz_present) { + HANDLE_CODE(c.get().scs_minus15k_hz.pack(bref)); + } + if (c.get().scs_minus30k_hz_present) { + HANDLE_CODE(c.get().scs_minus30k_hz.pack(bref)); + } + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); + } + break; + case types::fr2: + HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus120k_hz_present, 1)); + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); + } + if (c.get().scs_minus120k_hz_present) { + HANDLE_CODE(c.get().scs_minus120k_hz.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE band_nr_s::ch_bws_ul_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::fr1: + HANDLE_CODE(bref.unpack(c.get().scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); + if (c.get().scs_minus15k_hz_present) { + HANDLE_CODE(c.get().scs_minus15k_hz.unpack(bref)); + } + if (c.get().scs_minus30k_hz_present) { + HANDLE_CODE(c.get().scs_minus30k_hz.unpack(bref)); + } + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); + } + break; + case types::fr2: + HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus120k_hz_present, 1)); + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); + } + if (c.get().scs_minus120k_hz_present) { + HANDLE_CODE(c.get().scs_minus120k_hz.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string band_nr_s::ch_bws_ul_c_::types_opts::to_string() const +{ + static const char* options[] = {"fr1", "fr2"}; + return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_ul_c_::types"); +} +uint8_t band_nr_s::ch_bws_ul_c_::types_opts::to_number() const +{ + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "band_nr_s::ch_bws_ul_c_::types"); +} + +std::string band_nr_s::max_ul_duty_cycle_pc2_fr1_opts::to_string() const +{ + 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 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_"); +} + +std::string band_nr_s::max_ul_duty_cycle_fr2_opts::to_string() const +{ + static const char* options[] = {"n15", "n20", "n25", "n30", "n40", "n50", "n60", "n70", "n80", "n90", "n100"}; + return convert_enum_idx(options, 11, value, "band_nr_s::max_ul_duty_cycle_fr2_e_"); +} +uint8_t band_nr_s::max_ul_duty_cycle_fr2_opts::to_number() const +{ + static const uint8_t options[] = {15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100}; + return map_enum_number(options, 11, value, "band_nr_s::max_ul_duty_cycle_fr2_e_"); +} + +void band_nr_s::ch_bws_dl_v1590_c_::destroy_() +{ + switch (type_) { + case types::fr1: + c.destroy(); + break; + case types::fr2: + c.destroy(); + break; + default: + break; + } +} +void band_nr_s::ch_bws_dl_v1590_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::fr1: + c.init(); + break; + case types::fr2: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1590_c_"); + } +} +band_nr_s::ch_bws_dl_v1590_c_::ch_bws_dl_v1590_c_(const band_nr_s::ch_bws_dl_v1590_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fr1: + c.init(other.c.get()); + break; + case types::fr2: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1590_c_"); + } +} +band_nr_s::ch_bws_dl_v1590_c_& band_nr_s::ch_bws_dl_v1590_c_::operator=(const band_nr_s::ch_bws_dl_v1590_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fr1: + c.set(other.c.get()); + break; + case types::fr2: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1590_c_"); + } + + return *this; +} +void band_nr_s::ch_bws_dl_v1590_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fr1: + j.write_fieldname("fr1"); + j.start_obj(); + if (c.get().scs_minus15k_hz_present) { + j.write_str("scs-15kHz", c.get().scs_minus15k_hz.to_string()); + } + if (c.get().scs_minus30k_hz_present) { + j.write_str("scs-30kHz", c.get().scs_minus30k_hz.to_string()); + } + if (c.get().scs_minus60k_hz_present) { + j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); + } + j.end_obj(); + break; + case types::fr2: + j.write_fieldname("fr2"); + j.start_obj(); + if (c.get().scs_minus60k_hz_present) { + j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); + } + if (c.get().scs_minus120k_hz_present) { + j.write_str("scs-120kHz", c.get().scs_minus120k_hz.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1590_c_"); + } + j.end_obj(); +} +SRSASN_CODE band_nr_s::ch_bws_dl_v1590_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::fr1: + HANDLE_CODE(bref.pack(c.get().scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); + if (c.get().scs_minus15k_hz_present) { + HANDLE_CODE(c.get().scs_minus15k_hz.pack(bref)); + } + if (c.get().scs_minus30k_hz_present) { + HANDLE_CODE(c.get().scs_minus30k_hz.pack(bref)); + } + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); + } + break; + case types::fr2: + HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus120k_hz_present, 1)); + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); + } + if (c.get().scs_minus120k_hz_present) { + HANDLE_CODE(c.get().scs_minus120k_hz.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1590_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE band_nr_s::ch_bws_dl_v1590_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::fr1: + HANDLE_CODE(bref.unpack(c.get().scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); + if (c.get().scs_minus15k_hz_present) { + HANDLE_CODE(c.get().scs_minus15k_hz.unpack(bref)); + } + if (c.get().scs_minus30k_hz_present) { + HANDLE_CODE(c.get().scs_minus30k_hz.unpack(bref)); + } + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); + } + break; + case types::fr2: + HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus120k_hz_present, 1)); + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); + } + if (c.get().scs_minus120k_hz_present) { + HANDLE_CODE(c.get().scs_minus120k_hz.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1590_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string band_nr_s::ch_bws_dl_v1590_c_::types_opts::to_string() const +{ + static const char* options[] = {"fr1", "fr2"}; + return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_dl_v1590_c_::types"); +} +uint8_t band_nr_s::ch_bws_dl_v1590_c_::types_opts::to_number() const +{ + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "band_nr_s::ch_bws_dl_v1590_c_::types"); +} + +void band_nr_s::ch_bws_ul_v1590_c_::destroy_() +{ + switch (type_) { + case types::fr1: + c.destroy(); + break; + case types::fr2: + c.destroy(); + break; + default: + break; + } +} +void band_nr_s::ch_bws_ul_v1590_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::fr1: + c.init(); + break; + case types::fr2: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1590_c_"); + } +} +band_nr_s::ch_bws_ul_v1590_c_::ch_bws_ul_v1590_c_(const band_nr_s::ch_bws_ul_v1590_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fr1: + c.init(other.c.get()); + break; + case types::fr2: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1590_c_"); + } +} +band_nr_s::ch_bws_ul_v1590_c_& band_nr_s::ch_bws_ul_v1590_c_::operator=(const band_nr_s::ch_bws_ul_v1590_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fr1: + c.set(other.c.get()); + break; + case types::fr2: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1590_c_"); + } + + return *this; +} +void band_nr_s::ch_bws_ul_v1590_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fr1: + j.write_fieldname("fr1"); + j.start_obj(); + if (c.get().scs_minus15k_hz_present) { + j.write_str("scs-15kHz", c.get().scs_minus15k_hz.to_string()); + } + if (c.get().scs_minus30k_hz_present) { + j.write_str("scs-30kHz", c.get().scs_minus30k_hz.to_string()); + } + if (c.get().scs_minus60k_hz_present) { + j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); + } + j.end_obj(); + break; + case types::fr2: + j.write_fieldname("fr2"); + j.start_obj(); + if (c.get().scs_minus60k_hz_present) { + j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); + } + if (c.get().scs_minus120k_hz_present) { + j.write_str("scs-120kHz", c.get().scs_minus120k_hz.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1590_c_"); + } + j.end_obj(); +} +SRSASN_CODE band_nr_s::ch_bws_ul_v1590_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::fr1: + HANDLE_CODE(bref.pack(c.get().scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); + if (c.get().scs_minus15k_hz_present) { + HANDLE_CODE(c.get().scs_minus15k_hz.pack(bref)); + } + if (c.get().scs_minus30k_hz_present) { + HANDLE_CODE(c.get().scs_minus30k_hz.pack(bref)); + } + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); + } + break; + case types::fr2: + HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.pack(c.get().scs_minus120k_hz_present, 1)); + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); + } + if (c.get().scs_minus120k_hz_present) { + HANDLE_CODE(c.get().scs_minus120k_hz.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1590_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE band_nr_s::ch_bws_ul_v1590_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::fr1: + HANDLE_CODE(bref.unpack(c.get().scs_minus15k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus30k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); + if (c.get().scs_minus15k_hz_present) { + HANDLE_CODE(c.get().scs_minus15k_hz.unpack(bref)); + } + if (c.get().scs_minus30k_hz_present) { + HANDLE_CODE(c.get().scs_minus30k_hz.unpack(bref)); + } + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); + } + break; + case types::fr2: + HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); + HANDLE_CODE(bref.unpack(c.get().scs_minus120k_hz_present, 1)); + if (c.get().scs_minus60k_hz_present) { + HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); + } + if (c.get().scs_minus120k_hz_present) { + HANDLE_CODE(c.get().scs_minus120k_hz.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1590_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string band_nr_s::ch_bws_ul_v1590_c_::types_opts::to_string() const +{ + static const char* options[] = {"fr1", "fr2"}; + return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_ul_v1590_c_::types"); +} +uint8_t band_nr_s::ch_bws_ul_v1590_c_::types_opts::to_number() const +{ + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "band_nr_s::ch_bws_ul_v1590_c_::types"); +} + +// CFRA-CSIRS-Resource ::= SEQUENCE +SRSASN_CODE cfra_csirs_res_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, csi_rs, (uint8_t)0u, (uint8_t)95u)); + HANDLE_CODE(pack_dyn_seq_of(bref, ra_occasion_list, 1, 64, integer_packer(0, 511))); + HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cfra_csirs_res_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(csi_rs, bref, (uint8_t)0u, (uint8_t)95u)); + HANDLE_CODE(unpack_dyn_seq_of(ra_occasion_list, bref, 1, 64, integer_packer(0, 511))); + HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); + + return SRSASN_SUCCESS; +} +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 (const auto& e1 : ra_occasion_list) { + j.write_int(e1); + } + j.end_array(); + j.write_int("ra-PreambleIndex", ra_preamb_idx); + j.end_obj(); +} + +// CFRA-SSB-Resource ::= SEQUENCE +SRSASN_CODE cfra_ssb_res_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, ssb, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, ra_preamb_idx, (uint8_t)0u, (uint8_t)63u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cfra_ssb_res_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(ssb, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(ra_preamb_idx, bref, (uint8_t)0u, (uint8_t)63u)); + + return SRSASN_SUCCESS; +} +void cfra_ssb_res_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ssb", ssb); + j.write_int("ra-PreambleIndex", ra_preamb_idx); + j.end_obj(); +} + +// CFRA ::= SEQUENCE +SRSASN_CODE cfra_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(occasions_present, 1)); + + if (occasions_present) { + HANDLE_CODE(bref.pack(occasions.ssb_per_rach_occasion_present, 1)); + HANDLE_CODE(occasions.rach_cfg_generic.pack(bref)); + if (occasions.ssb_per_rach_occasion_present) { + HANDLE_CODE(occasions.ssb_per_rach_occasion.pack(bref)); + } + } + HANDLE_CODE(res.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= total_nof_ra_preambs_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(total_nof_ra_preambs_present, 1)); + if (total_nof_ra_preambs_present) { + HANDLE_CODE(pack_integer(bref, total_nof_ra_preambs, (uint8_t)1u, (uint8_t)63u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cfra_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(occasions_present, 1)); + + if (occasions_present) { + HANDLE_CODE(bref.unpack(occasions.ssb_per_rach_occasion_present, 1)); + HANDLE_CODE(occasions.rach_cfg_generic.unpack(bref)); + if (occasions.ssb_per_rach_occasion_present) { + HANDLE_CODE(occasions.ssb_per_rach_occasion.unpack(bref)); + } + } + HANDLE_CODE(res.unpack(bref)); + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(total_nof_ra_preambs_present, 1)); + if (total_nof_ra_preambs_present) { + HANDLE_CODE(unpack_integer(total_nof_ra_preambs, bref, (uint8_t)1u, (uint8_t)63u)); + } + } + } + return SRSASN_SUCCESS; +} +void cfra_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (occasions_present) { + j.write_fieldname("occasions"); + j.start_obj(); + j.write_fieldname("rach-ConfigGeneric"); + occasions.rach_cfg_generic.to_json(j); + if (occasions.ssb_per_rach_occasion_present) { + j.write_str("ssb-perRACH-Occasion", occasions.ssb_per_rach_occasion.to_string()); + } + j.end_obj(); + } + j.write_fieldname("resources"); + res.to_json(j); + if (ext) { + if (total_nof_ra_preambs_present) { + j.write_int("totalNumberOfRA-Preambles", total_nof_ra_preambs); + } + } + j.end_obj(); +} + +std::string cfra_s::occasions_s_::ssb_per_rach_occasion_opts::to_string() const +{ + 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 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 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_"); +} + +void cfra_s::res_c_::destroy_() +{ + switch (type_) { + case types::ssb: + c.destroy(); + break; + case types::csirs: + c.destroy(); + break; + default: + break; + } +} +void cfra_s::res_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ssb: + c.init(); + break; + case types::csirs: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cfra_s::res_c_"); + } +} +cfra_s::res_c_::res_c_(const cfra_s::res_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ssb: + c.init(other.c.get()); + break; + case types::csirs: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cfra_s::res_c_"); + } +} +cfra_s::res_c_& cfra_s::res_c_::operator=(const cfra_s::res_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb: + c.set(other.c.get()); + break; + case types::csirs: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cfra_s::res_c_"); + } + + return *this; +} +void cfra_s::res_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ssb: + j.write_fieldname("ssb"); + j.start_obj(); + j.start_array("ssb-ResourceList"); + 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); + j.end_obj(); + break; + case types::csirs: + j.write_fieldname("csirs"); + j.start_obj(); + j.start_array("csirs-ResourceList"); + 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); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cfra_s::res_c_"); + } + j.end_obj(); +} +SRSASN_CODE cfra_s::res_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ssb: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().ssb_res_list, 1, 64)); + HANDLE_CODE(pack_integer(bref, c.get().ra_ssb_occasion_mask_idx, (uint8_t)0u, (uint8_t)15u)); + break; + case types::csirs: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().csirs_res_list, 1, 96)); + HANDLE_CODE(pack_integer(bref, c.get().rsrp_thres_csi_rs, (uint8_t)0u, (uint8_t)127u)); + break; + default: + log_invalid_choice_id(type_, "cfra_s::res_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cfra_s::res_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb: + HANDLE_CODE(unpack_dyn_seq_of(c.get().ssb_res_list, bref, 1, 64)); + HANDLE_CODE(unpack_integer(c.get().ra_ssb_occasion_mask_idx, bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::csirs: + HANDLE_CODE(unpack_dyn_seq_of(c.get().csirs_res_list, bref, 1, 96)); + HANDLE_CODE(unpack_integer(c.get().rsrp_thres_csi_rs, bref, (uint8_t)0u, (uint8_t)127u)); + break; + default: + log_invalid_choice_id(type_, "cfra_s::res_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string cfra_s::res_c_::types_opts::to_string() const +{ + static const char* options[] = {"ssb", "csirs"}; + return convert_enum_idx(options, 2, value, "cfra_s::res_c_::types"); +} + +// CSI-AssociatedReportConfigInfo ::= SEQUENCE +SRSASN_CODE csi_associated_report_cfg_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(csi_im_res_for_interference_present, 1)); + HANDLE_CODE(bref.pack(nzp_csi_rs_res_for_interference_present, 1)); + + HANDLE_CODE(pack_integer(bref, report_cfg_id, (uint8_t)0u, (uint8_t)47u)); + HANDLE_CODE(res_for_ch.pack(bref)); + if (csi_im_res_for_interference_present) { + HANDLE_CODE(pack_integer(bref, csi_im_res_for_interference, (uint8_t)1u, (uint8_t)16u)); + } + if (nzp_csi_rs_res_for_interference_present) { + HANDLE_CODE(pack_integer(bref, nzp_csi_rs_res_for_interference, (uint8_t)1u, (uint8_t)16u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_associated_report_cfg_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(csi_im_res_for_interference_present, 1)); + HANDLE_CODE(bref.unpack(nzp_csi_rs_res_for_interference_present, 1)); + + HANDLE_CODE(unpack_integer(report_cfg_id, bref, (uint8_t)0u, (uint8_t)47u)); + HANDLE_CODE(res_for_ch.unpack(bref)); + if (csi_im_res_for_interference_present) { + HANDLE_CODE(unpack_integer(csi_im_res_for_interference, bref, (uint8_t)1u, (uint8_t)16u)); + } + if (nzp_csi_rs_res_for_interference_present) { + HANDLE_CODE(unpack_integer(nzp_csi_rs_res_for_interference, bref, (uint8_t)1u, (uint8_t)16u)); + } + + return SRSASN_SUCCESS; +} +void csi_associated_report_cfg_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("reportConfigId", report_cfg_id); + j.write_fieldname("resourcesForChannel"); + res_for_ch.to_json(j); + if (csi_im_res_for_interference_present) { + j.write_int("csi-IM-ResourcesForInterference", csi_im_res_for_interference); + } + if (nzp_csi_rs_res_for_interference_present) { + j.write_int("nzp-CSI-RS-ResourcesForInterference", nzp_csi_rs_res_for_interference); + } + j.end_obj(); +} + +void csi_associated_report_cfg_info_s::res_for_ch_c_::destroy_() +{ + switch (type_) { + case types::nzp_csi_rs: + c.destroy(); + break; + default: + break; + } +} +void csi_associated_report_cfg_info_s::res_for_ch_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nzp_csi_rs: + c.init(); + break; + case types::csi_ssb_res_set: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + } +} +csi_associated_report_cfg_info_s::res_for_ch_c_::res_for_ch_c_( + const csi_associated_report_cfg_info_s::res_for_ch_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nzp_csi_rs: + c.init(other.c.get()); + break; + case types::csi_ssb_res_set: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + } +} +csi_associated_report_cfg_info_s::res_for_ch_c_& +csi_associated_report_cfg_info_s::res_for_ch_c_::operator=(const csi_associated_report_cfg_info_s::res_for_ch_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nzp_csi_rs: + c.set(other.c.get()); + break; + case types::csi_ssb_res_set: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + } + + return *this; +} +void csi_associated_report_cfg_info_s::res_for_ch_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nzp_csi_rs: + j.write_fieldname("nzp-CSI-RS"); + j.start_obj(); + j.write_int("resourceSet", c.get().res_set); + if (c.get().qcl_info_present) { + j.start_array("qcl-info"); + for (const auto& e1 : c.get().qcl_info) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); + break; + case types::csi_ssb_res_set: + j.write_int("csi-SSB-ResourceSet", c.get()); + break; + default: + log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_associated_report_cfg_info_s::res_for_ch_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nzp_csi_rs: + HANDLE_CODE(bref.pack(c.get().qcl_info_present, 1)); + HANDLE_CODE(pack_integer(bref, c.get().res_set, (uint8_t)1u, (uint8_t)16u)); + if (c.get().qcl_info_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().qcl_info, 1, 16, integer_packer(0, 127))); + } + break; + case types::csi_ssb_res_set: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)1u)); + break; + default: + log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_associated_report_cfg_info_s::res_for_ch_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nzp_csi_rs: + HANDLE_CODE(bref.unpack(c.get().qcl_info_present, 1)); + HANDLE_CODE(unpack_integer(c.get().res_set, bref, (uint8_t)1u, (uint8_t)16u)); + if (c.get().qcl_info_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().qcl_info, bref, 1, 16, integer_packer(0, 127))); + } + break; + case types::csi_ssb_res_set: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)1u)); + break; + default: + log_invalid_choice_id(type_, "csi_associated_report_cfg_info_s::res_for_ch_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string csi_associated_report_cfg_info_s::res_for_ch_c_::types_opts::to_string() const +{ + 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"); +} + +// CSI-AperiodicTriggerState ::= SEQUENCE +SRSASN_CODE csi_aperiodic_trigger_state_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, associated_report_cfg_info_list, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_aperiodic_trigger_state_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(associated_report_cfg_info_list, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void csi_aperiodic_trigger_state_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("associatedReportConfigInfoList"); + for (const auto& e1 : associated_report_cfg_info_list) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// CSI-IM-Resource ::= SEQUENCE +SRSASN_CODE csi_im_res_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(csi_im_res_elem_pattern_present, 1)); + HANDLE_CODE(bref.pack(freq_band_present, 1)); + HANDLE_CODE(bref.pack(periodicity_and_offset_present, 1)); + + HANDLE_CODE(pack_integer(bref, csi_im_res_id, (uint8_t)0u, (uint8_t)31u)); + if (csi_im_res_elem_pattern_present) { + HANDLE_CODE(csi_im_res_elem_pattern.pack(bref)); + } + if (freq_band_present) { + HANDLE_CODE(freq_band.pack(bref)); + } + if (periodicity_and_offset_present) { + HANDLE_CODE(periodicity_and_offset.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_im_res_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(csi_im_res_elem_pattern_present, 1)); + HANDLE_CODE(bref.unpack(freq_band_present, 1)); + HANDLE_CODE(bref.unpack(periodicity_and_offset_present, 1)); + + HANDLE_CODE(unpack_integer(csi_im_res_id, bref, (uint8_t)0u, (uint8_t)31u)); + if (csi_im_res_elem_pattern_present) { + HANDLE_CODE(csi_im_res_elem_pattern.unpack(bref)); + } + if (freq_band_present) { + HANDLE_CODE(freq_band.unpack(bref)); + } + if (periodicity_and_offset_present) { + HANDLE_CODE(periodicity_and_offset.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_im_res_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("csi-IM-ResourceId", csi_im_res_id); + if (csi_im_res_elem_pattern_present) { + j.write_fieldname("csi-IM-ResourceElementPattern"); + csi_im_res_elem_pattern.to_json(j); + } + if (freq_band_present) { + j.write_fieldname("freqBand"); + freq_band.to_json(j); + } + if (periodicity_and_offset_present) { + j.write_fieldname("periodicityAndOffset"); + periodicity_and_offset.to_json(j); + } + j.end_obj(); +} + +void csi_im_res_s::csi_im_res_elem_pattern_c_::destroy_() +{ + switch (type_) { + case types::pattern0: + c.destroy(); + break; + case types::pattern1: + c.destroy(); + break; + default: + break; + } +} +void csi_im_res_s::csi_im_res_elem_pattern_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::pattern0: + c.init(); + break; + case types::pattern1: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + } +} +csi_im_res_s::csi_im_res_elem_pattern_c_::csi_im_res_elem_pattern_c_( + const csi_im_res_s::csi_im_res_elem_pattern_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::pattern0: + c.init(other.c.get()); + break; + case types::pattern1: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + } +} +csi_im_res_s::csi_im_res_elem_pattern_c_& +csi_im_res_s::csi_im_res_elem_pattern_c_::operator=(const csi_im_res_s::csi_im_res_elem_pattern_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::pattern0: + c.set(other.c.get()); + break; + case types::pattern1: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + } + + return *this; +} +void csi_im_res_s::csi_im_res_elem_pattern_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::pattern0: + j.write_fieldname("pattern0"); + j.start_obj(); + j.write_str("subcarrierLocation-p0", c.get().subcarrier_location_p0.to_string()); + j.write_int("symbolLocation-p0", c.get().symbol_location_p0); + j.end_obj(); + break; + case types::pattern1: + j.write_fieldname("pattern1"); + j.start_obj(); + j.write_str("subcarrierLocation-p1", c.get().subcarrier_location_p1.to_string()); + j.write_int("symbolLocation-p1", c.get().symbol_location_p1); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_im_res_s::csi_im_res_elem_pattern_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::pattern0: + HANDLE_CODE(c.get().subcarrier_location_p0.pack(bref)); + HANDLE_CODE(pack_integer(bref, c.get().symbol_location_p0, (uint8_t)0u, (uint8_t)12u)); + break; + case types::pattern1: + HANDLE_CODE(c.get().subcarrier_location_p1.pack(bref)); + HANDLE_CODE(pack_integer(bref, c.get().symbol_location_p1, (uint8_t)0u, (uint8_t)13u)); + break; + default: + log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_im_res_s::csi_im_res_elem_pattern_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::pattern0: + HANDLE_CODE(c.get().subcarrier_location_p0.unpack(bref)); + HANDLE_CODE(unpack_integer(c.get().symbol_location_p0, bref, (uint8_t)0u, (uint8_t)12u)); + break; + case types::pattern1: + HANDLE_CODE(c.get().subcarrier_location_p1.unpack(bref)); + HANDLE_CODE(unpack_integer(c.get().symbol_location_p1, bref, (uint8_t)0u, (uint8_t)13u)); + break; + default: + log_invalid_choice_id(type_, "csi_im_res_s::csi_im_res_elem_pattern_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string csi_im_res_s::csi_im_res_elem_pattern_c_::pattern0_s_::subcarrier_location_p0_opts::to_string() const +{ + 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 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 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 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 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 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 +SRSASN_CODE csi_im_res_set_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, csi_im_res_set_id, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res, 1, 8, integer_packer(0, 31))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_im_res_set_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(csi_im_res_set_id, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_dyn_seq_of(csi_im_res, bref, 1, 8, integer_packer(0, 31))); + + return SRSASN_SUCCESS; +} +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 (const auto& e1 : csi_im_res) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); +} + +// CSI-ReportPeriodicityAndOffset ::= CHOICE +void csi_report_periodicity_and_offset_c::destroy_() {} +void csi_report_periodicity_and_offset_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +csi_report_periodicity_and_offset_c::csi_report_periodicity_and_offset_c( + const csi_report_periodicity_and_offset_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::slots4: + c.init(other.c.get()); + break; + case types::slots5: + c.init(other.c.get()); + break; + case types::slots8: + c.init(other.c.get()); + break; + case types::slots10: + c.init(other.c.get()); + break; + case types::slots16: + c.init(other.c.get()); + break; + case types::slots20: + c.init(other.c.get()); + break; + case types::slots40: + c.init(other.c.get()); + break; + case types::slots80: + c.init(other.c.get()); + break; + case types::slots160: + c.init(other.c.get()); + break; + case types::slots320: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + } +} +csi_report_periodicity_and_offset_c& +csi_report_periodicity_and_offset_c::operator=(const csi_report_periodicity_and_offset_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::slots4: + c.set(other.c.get()); + break; + case types::slots5: + c.set(other.c.get()); + break; + case types::slots8: + c.set(other.c.get()); + break; + case types::slots10: + c.set(other.c.get()); + break; + case types::slots16: + c.set(other.c.get()); + break; + case types::slots20: + c.set(other.c.get()); + break; + case types::slots40: + c.set(other.c.get()); + break; + case types::slots80: + c.set(other.c.get()); + break; + case types::slots160: + c.set(other.c.get()); + break; + case types::slots320: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + } + + return *this; +} +void csi_report_periodicity_and_offset_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::slots4: + j.write_int("slots4", c.get()); + break; + case types::slots5: + j.write_int("slots5", c.get()); + break; + case types::slots8: + j.write_int("slots8", c.get()); + break; + case types::slots10: + j.write_int("slots10", c.get()); + break; + case types::slots16: + j.write_int("slots16", c.get()); + break; + case types::slots20: + j.write_int("slots20", c.get()); + break; + case types::slots40: + j.write_int("slots40", c.get()); + break; + case types::slots80: + j.write_int("slots80", c.get()); + break; + case types::slots160: + j.write_int("slots160", c.get()); + break; + case types::slots320: + j.write_int("slots320", c.get()); + break; + default: + log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_report_periodicity_and_offset_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::slots4: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); + break; + case types::slots5: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); + break; + case types::slots8: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); + break; + case types::slots10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::slots16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + break; + case types::slots20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::slots40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::slots80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::slots160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::slots320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + default: + log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_report_periodicity_and_offset_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::slots4: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); + break; + case types::slots5: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); + break; + case types::slots8: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); + break; + case types::slots10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::slots16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::slots20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::slots40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::slots80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::slots160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::slots320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + default: + log_invalid_choice_id(type_, "csi_report_periodicity_and_offset_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string csi_report_periodicity_and_offset_c::types_opts::to_string() const +{ + 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 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 +SRSASN_CODE csi_semi_persistent_on_pusch_trigger_state_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, associated_report_cfg_info, (uint8_t)0u, (uint8_t)47u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_semi_persistent_on_pusch_trigger_state_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(associated_report_cfg_info, bref, (uint8_t)0u, (uint8_t)47u)); + + return SRSASN_SUCCESS; +} +void csi_semi_persistent_on_pusch_trigger_state_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("associatedReportConfigInfo", associated_report_cfg_info); + j.end_obj(); +} + +// CodebookConfig ::= SEQUENCE +SRSASN_CODE codebook_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(codebook_type.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE codebook_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(codebook_type.unpack(bref)); + + return SRSASN_SUCCESS; +} +void codebook_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("codebookType"); + codebook_type.to_json(j); + j.end_obj(); +} + +void codebook_cfg_s::codebook_type_c_::destroy_() +{ + switch (type_) { + case types::type1: + c.destroy(); + break; + case types::type2: + c.destroy(); + break; + default: + break; + } +} +void codebook_cfg_s::codebook_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::type1: + c.init(); + break; + case types::type2: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + } +} +codebook_cfg_s::codebook_type_c_::codebook_type_c_(const codebook_cfg_s::codebook_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::type1: + c.init(other.c.get()); + break; + case types::type2: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + } +} +codebook_cfg_s::codebook_type_c_& +codebook_cfg_s::codebook_type_c_::operator=(const codebook_cfg_s::codebook_type_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::type1: + c.set(other.c.get()); + break; + case types::type2: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + } + + return *this; +} +void codebook_cfg_s::codebook_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::type1: + j.write_fieldname("type1"); + j.start_obj(); + j.write_fieldname("subType"); + c.get().sub_type.to_json(j); + j.write_int("codebookMode", c.get().codebook_mode); + j.end_obj(); + break; + case types::type2: + j.write_fieldname("type2"); + j.start_obj(); + j.write_fieldname("subType"); + c.get().sub_type.to_json(j); + j.write_str("phaseAlphabetSize", c.get().phase_alphabet_size.to_string()); + j.write_bool("subbandAmplitude", c.get().subband_amplitude); + j.write_str("numberOfBeams", c.get().nof_beams.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE codebook_cfg_s::codebook_type_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::type1: + HANDLE_CODE(c.get().sub_type.pack(bref)); + HANDLE_CODE(pack_integer(bref, c.get().codebook_mode, (uint8_t)1u, (uint8_t)2u)); + break; + case types::type2: + HANDLE_CODE(c.get().sub_type.pack(bref)); + HANDLE_CODE(c.get().phase_alphabet_size.pack(bref)); + HANDLE_CODE(bref.pack(c.get().subband_amplitude, 1)); + HANDLE_CODE(c.get().nof_beams.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE codebook_cfg_s::codebook_type_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::type1: + HANDLE_CODE(c.get().sub_type.unpack(bref)); + HANDLE_CODE(unpack_integer(c.get().codebook_mode, bref, (uint8_t)1u, (uint8_t)2u)); + break; + case types::type2: + HANDLE_CODE(c.get().sub_type.unpack(bref)); + HANDLE_CODE(c.get().phase_alphabet_size.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().subband_amplitude, 1)); + HANDLE_CODE(c.get().nof_beams.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::destroy_() +{ + switch (type_) { + case types::type_i_single_panel: + c.destroy(); + break; + case types::type_i_multi_panel: + c.destroy(); + break; + default: + break; + } +} +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::type_i_single_panel: + c.init(); + break; + case types::type_i_multi_panel: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + } +} +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::sub_type_c_( + const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::type_i_single_panel: + c.init(other.c.get()); + break; + case types::type_i_multi_panel: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + } +} +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_& +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::operator=( + const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::type_i_single_panel: + c.set(other.c.get()); + break; + case types::type_i_multi_panel: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + } + + return *this; +} +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::type_i_single_panel: + j.write_fieldname("typeI-SinglePanel"); + j.start_obj(); + j.write_fieldname("nrOfAntennaPorts"); + c.get().nr_of_ant_ports.to_json(j); + j.write_str("typeI-SinglePanel-ri-Restriction", + c.get().type_i_single_panel_ri_restrict.to_string()); + j.end_obj(); + break; + case types::type_i_multi_panel: + j.write_fieldname("typeI-MultiPanel"); + j.start_obj(); + j.write_fieldname("ng-n1-n2"); + c.get().ng_n1_n2.to_json(j); + j.write_str("ri-Restriction", c.get().ri_restrict.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::type_i_single_panel: + HANDLE_CODE(c.get().nr_of_ant_ports.pack(bref)); + HANDLE_CODE(c.get().type_i_single_panel_ri_restrict.pack(bref)); + break; + case types::type_i_multi_panel: + HANDLE_CODE(c.get().ng_n1_n2.pack(bref)); + HANDLE_CODE(c.get().ri_restrict.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::type_i_single_panel: + HANDLE_CODE(c.get().nr_of_ant_ports.unpack(bref)); + HANDLE_CODE(c.get().type_i_single_panel_ri_restrict.unpack(bref)); + break; + case types::type_i_multi_panel: + HANDLE_CODE(c.get().ng_n1_n2.unpack(bref)); + HANDLE_CODE(c.get().ri_restrict.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::destroy_() +{ + switch (type_) { + case types::two: + c.destroy(); + break; + case types::more_than_two: + c.destroy(); + break; + default: + break; + } +} +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::set( + types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::two: + c.init(); + break; + case types::more_than_two: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + } +} +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::nr_of_ant_ports_c_( + const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::two: + c.init(other.c.get()); + break; + case types::more_than_two: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + } +} +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_& +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::operator=( + const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::two: + c.set(other.c.get()); + break; + case types::more_than_two: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + } + + return *this; +} +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::two: + j.write_fieldname("two"); + j.start_obj(); + j.write_str("twoTX-CodebookSubsetRestriction", c.get().two_tx_codebook_subset_restrict.to_string()); + j.end_obj(); + break; + case types::more_than_two: + j.write_fieldname("moreThanTwo"); + j.start_obj(); + j.write_fieldname("n1-n2"); + c.get().n1_n2.to_json(j); + if (c.get().type_i_single_panel_codebook_subset_restrict_i2_present) { + j.write_str("typeI-SinglePanel-codebookSubsetRestriction-i2", + c.get().type_i_single_panel_codebook_subset_restrict_i2.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + } + j.end_obj(); +} +SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::pack( + bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::two: + HANDLE_CODE(c.get().two_tx_codebook_subset_restrict.pack(bref)); + break; + case types::more_than_two: + HANDLE_CODE(bref.pack(c.get().type_i_single_panel_codebook_subset_restrict_i2_present, 1)); + HANDLE_CODE(c.get().n1_n2.pack(bref)); + if (c.get().type_i_single_panel_codebook_subset_restrict_i2_present) { + HANDLE_CODE(c.get().type_i_single_panel_codebook_subset_restrict_i2.pack(bref)); + } + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::unpack( + cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::two: + HANDLE_CODE(c.get().two_tx_codebook_subset_restrict.unpack(bref)); + break; + case types::more_than_two: + HANDLE_CODE(bref.unpack(c.get().type_i_single_panel_codebook_subset_restrict_i2_present, 1)); + HANDLE_CODE(c.get().n1_n2.unpack(bref)); + if (c.get().type_i_single_panel_codebook_subset_restrict_i2_present) { + HANDLE_CODE(c.get().type_i_single_panel_codebook_subset_restrict_i2.unpack(bref)); + } + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void 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_::destroy_() +{ + switch (type_) { + case types::two_one_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::two_two_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::four_one_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::three_two_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::six_one_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::four_two_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::eight_one_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::four_three_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::six_two_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::twelve_one_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::four_four_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::eight_two_type_i_single_panel_restrict: + c.destroy >(); + break; + case types::sixteen_one_type_i_single_panel_restrict: + c.destroy >(); + break; + default: + break; + } +} +void 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_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::two_one_type_i_single_panel_restrict: + c.init >(); + break; + case types::two_two_type_i_single_panel_restrict: + c.init >(); + break; + case types::four_one_type_i_single_panel_restrict: + c.init >(); + break; + case types::three_two_type_i_single_panel_restrict: + c.init >(); + break; + case types::six_one_type_i_single_panel_restrict: + c.init >(); + break; + case types::four_two_type_i_single_panel_restrict: + c.init >(); + break; + case types::eight_one_type_i_single_panel_restrict: + c.init >(); + break; + case types::four_three_type_i_single_panel_restrict: + c.init >(); + break; + case types::six_two_type_i_single_panel_restrict: + c.init >(); + break; + case types::twelve_one_type_i_single_panel_restrict: + c.init >(); + break; + case types::four_four_type_i_single_panel_restrict: + c.init >(); + break; + case types::eight_two_type_i_single_panel_restrict: + c.init >(); + break; + case types::sixteen_one_type_i_single_panel_restrict: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "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_"); + } +} +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_::n1_n2_c_(const 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_& other) +{ + type_ = other.type(); + switch (type_) { + case types::two_one_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::two_two_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::four_one_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::three_two_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::six_one_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::four_two_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::eight_one_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::four_three_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::six_two_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::twelve_one_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::four_four_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::eight_two_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::sixteen_one_type_i_single_panel_restrict: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "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_"); + } +} +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_& + 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_::operator=( + const 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_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::two_one_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::two_two_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::four_one_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::three_two_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::six_one_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::four_two_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::eight_one_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::four_three_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::six_two_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::twelve_one_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::four_four_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::eight_two_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::sixteen_one_type_i_single_panel_restrict: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "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_"); + } + + return *this; +} +void 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_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::two_one_type_i_single_panel_restrict: + j.write_str("two-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::two_two_type_i_single_panel_restrict: + j.write_str("two-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::four_one_type_i_single_panel_restrict: + j.write_str("four-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::three_two_type_i_single_panel_restrict: + j.write_str("three-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::six_one_type_i_single_panel_restrict: + j.write_str("six-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::four_two_type_i_single_panel_restrict: + j.write_str("four-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::eight_one_type_i_single_panel_restrict: + j.write_str("eight-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::four_three_type_i_single_panel_restrict: + j.write_str("four-three-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::six_two_type_i_single_panel_restrict: + j.write_str("six-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::twelve_one_type_i_single_panel_restrict: + j.write_str("twelve-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::four_four_type_i_single_panel_restrict: + j.write_str("four-four-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::eight_two_type_i_single_panel_restrict: + j.write_str("eight-two-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + case types::sixteen_one_type_i_single_panel_restrict: + j.write_str("sixteen-one-TypeI-SinglePanel-Restriction", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, + "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_"); + } + j.end_obj(); +} +SRSASN_CODE 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_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::two_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::two_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::three_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::six_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::eight_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_three_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::six_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::twelve_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_four_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::eight_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sixteen_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, + "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_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE 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_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::two_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::two_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::three_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::six_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::eight_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_three_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::six_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::twelve_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_four_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::eight_two_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sixteen_one_type_i_single_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, + "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_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +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 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, + "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"); +} + +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 const char* options[] = {"two", "moreThanTwo"}; + return convert_enum_idx( + options, + 2, + value, + "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::types"); +} +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 const uint8_t options[] = {2}; + return map_enum_number( + options, + 1, + value, + "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::types"); +} + +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::destroy_() +{ + switch (type_) { + case types::two_two_one_type_i_multi_panel_restrict: + c.destroy >(); + break; + case types::two_four_one_type_i_multi_panel_restrict: + c.destroy >(); + break; + case types::four_two_one_type_i_multi_panel_restrict: + c.destroy >(); + break; + case types::two_two_two_type_i_multi_panel_restrict: + c.destroy >(); + break; + case types::two_eight_one_type_i_multi_panel_restrict: + c.destroy >(); + break; + case types::four_four_one_type_i_multi_panel_restrict: + c.destroy >(); + break; + case types::two_four_two_type_i_multi_panel_restrict: + c.destroy >(); + break; + case types::four_two_two_type_i_multi_panel_restrict: + c.destroy >(); + break; + default: + break; } - j.end_obj(); } - -// UE-CapabilityRAT-Container ::= SEQUENCE -SRSASN_CODE ue_cap_rat_container_s::pack(bit_ref& bref) const +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::set(types::options e) { - HANDLE_CODE(rat_type.pack(bref)); - HANDLE_CODE(ue_cap_rat_container.pack(bref)); - - return SRSASN_SUCCESS; + destroy_(); + type_ = e; + switch (type_) { + case types::two_two_one_type_i_multi_panel_restrict: + c.init >(); + break; + case types::two_four_one_type_i_multi_panel_restrict: + c.init >(); + break; + case types::four_two_one_type_i_multi_panel_restrict: + c.init >(); + break; + case types::two_two_two_type_i_multi_panel_restrict: + c.init >(); + break; + case types::two_eight_one_type_i_multi_panel_restrict: + c.init >(); + break; + case types::four_four_one_type_i_multi_panel_restrict: + c.init >(); + break; + case types::two_four_two_type_i_multi_panel_restrict: + c.init >(); + break; + case types::four_two_two_type_i_multi_panel_restrict: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + } } -SRSASN_CODE ue_cap_rat_container_s::unpack(cbit_ref& bref) +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::ng_n1_n2_c_( + const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_& other) { - HANDLE_CODE(rat_type.unpack(bref)); - HANDLE_CODE(ue_cap_rat_container.unpack(bref)); - - return SRSASN_SUCCESS; + type_ = other.type(); + switch (type_) { + case types::two_two_one_type_i_multi_panel_restrict: + c.init(other.c.get >()); + break; + case types::two_four_one_type_i_multi_panel_restrict: + c.init(other.c.get >()); + break; + case types::four_two_one_type_i_multi_panel_restrict: + c.init(other.c.get >()); + break; + case types::two_two_two_type_i_multi_panel_restrict: + c.init(other.c.get >()); + break; + case types::two_eight_one_type_i_multi_panel_restrict: + c.init(other.c.get >()); + break; + case types::four_four_one_type_i_multi_panel_restrict: + c.init(other.c.get >()); + break; + case types::two_four_two_type_i_multi_panel_restrict: + c.init(other.c.get >()); + break; + case types::four_two_two_type_i_multi_panel_restrict: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + } } -void ue_cap_rat_container_s::to_json(json_writer& j) const +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_& +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::operator=( + const codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_& other) { - j.start_obj(); - j.write_str("rat-Type", rat_type.to_string()); - j.write_str("ue-CapabilityRAT-Container", ue_cap_rat_container.to_string()); - j.end_obj(); -} + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::two_two_one_type_i_multi_panel_restrict: + c.set(other.c.get >()); + break; + case types::two_four_one_type_i_multi_panel_restrict: + c.set(other.c.get >()); + break; + case types::four_two_one_type_i_multi_panel_restrict: + c.set(other.c.get >()); + break; + case types::two_two_two_type_i_multi_panel_restrict: + c.set(other.c.get >()); + break; + case types::two_eight_one_type_i_multi_panel_restrict: + c.set(other.c.get >()); + break; + case types::four_four_one_type_i_multi_panel_restrict: + c.set(other.c.get >()); + break; + case types::two_four_two_type_i_multi_panel_restrict: + c.set(other.c.get >()); + break; + case types::four_two_two_type_i_multi_panel_restrict: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + } -// DelayBudgetReport ::= CHOICE -void delay_budget_report_c::to_json(json_writer& j) const + return *this; +} +void codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::to_json( + json_writer& j) const { j.start_obj(); - j.write_str("type1", c.to_string()); + switch (type_) { + case types::two_two_one_type_i_multi_panel_restrict: + j.write_str("two-two-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); + break; + case types::two_four_one_type_i_multi_panel_restrict: + j.write_str("two-four-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); + break; + case types::four_two_one_type_i_multi_panel_restrict: + j.write_str("four-two-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); + break; + case types::two_two_two_type_i_multi_panel_restrict: + j.write_str("two-two-two-TypeI-MultiPanel-Restriction", c.get >().to_string()); + break; + case types::two_eight_one_type_i_multi_panel_restrict: + j.write_str("two-eight-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); + break; + case types::four_four_one_type_i_multi_panel_restrict: + j.write_str("four-four-one-TypeI-MultiPanel-Restriction", c.get >().to_string()); + break; + case types::two_four_two_type_i_multi_panel_restrict: + j.write_str("two-four-two-TypeI-MultiPanel-Restriction", c.get >().to_string()); + break; + case types::four_two_two_type_i_multi_panel_restrict: + j.write_str("four-two-two-TypeI-MultiPanel-Restriction", c.get >().to_string()); + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + } j.end_obj(); } -SRSASN_CODE delay_budget_report_c::pack(bit_ref& bref) const +SRSASN_CODE +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::pack(bit_ref& bref) const { - pack_enum(bref, type()); - HANDLE_CODE(c.pack(bref)); + type_.pack(bref); + switch (type_) { + case types::two_two_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::two_four_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_two_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::two_two_two_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::two_eight_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_four_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::two_four_two_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_two_two_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } return SRSASN_SUCCESS; } -SRSASN_CODE delay_budget_report_c::unpack(cbit_ref& bref) +SRSASN_CODE +codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::unpack(cbit_ref& bref) { types e; - unpack_enum(e, bref); - if (e != type()) { - log_invalid_choice_id(e, "delay_budget_report_c"); - return SRSASN_ERROR_DECODE_FAIL; + e.unpack(bref); + set(e); + switch (type_) { + case types::two_two_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::two_four_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_two_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::two_two_two_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::two_eight_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_four_one_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::two_four_two_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_two_two_type_i_multi_panel_restrict: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id( + type_, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - HANDLE_CODE(c.unpack(bref)); return SRSASN_SUCCESS; } -std::string delay_budget_report_c::type1_opts::to_string() const -{ - 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 +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 const int16_t options[] = { - -1280, -640, -320, -160, -80, -60, -40, -20, 0, 20, 40, 60, 80, 160, 320, 640, 1280}; - return map_enum_number(options, 17, value, "delay_budget_report_c::type1_e_"); + 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, + value, + "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::types"); } -std::string delay_budget_report_c::types_opts::to_string() const -{ - 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 +std::string codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::types_opts::to_string() const { - static const uint8_t options[] = {1}; - return map_enum_number(options, 1, value, "delay_budget_report_c::types"); + 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"); } -// FailureInfoRLC-Bearer ::= SEQUENCE -SRSASN_CODE fail_info_rlc_bearer_s::pack(bit_ref& bref) const +void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::destroy_() { - HANDLE_CODE(pack_integer(bref, cell_group_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pack_integer(bref, lc_ch_id, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(fail_type.pack(bref)); - - return SRSASN_SUCCESS; + switch (type_) { + case types::type_ii: + c.destroy(); + break; + case types::type_ii_port_sel: + c.destroy(); + break; + default: + break; + } } -SRSASN_CODE fail_info_rlc_bearer_s::unpack(cbit_ref& bref) +void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::set(types::options e) { - HANDLE_CODE(unpack_integer(cell_group_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(unpack_integer(lc_ch_id, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(fail_type.unpack(bref)); - - return SRSASN_SUCCESS; + destroy_(); + type_ = e; + switch (type_) { + case types::type_ii: + c.init(); + break; + case types::type_ii_port_sel: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + } } -void fail_info_rlc_bearer_s::to_json(json_writer& j) const +codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::sub_type_c_( + const codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_& other) { - j.start_obj(); - j.write_int("cellGroupId", cell_group_id); - j.write_int("logicalChannelIdentity", lc_ch_id); - j.write_str("failureType", fail_type.to_string()); - j.end_obj(); + type_ = other.type(); + switch (type_) { + case types::type_ii: + c.init(other.c.get()); + break; + case types::type_ii_port_sel: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + } } - -std::string fail_info_rlc_bearer_s::fail_type_opts::to_string() const +codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_& +codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::operator=( + const codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_& other) { - static const char* options[] = {"duplication", "spare3", "spare2", "spare1"}; - return convert_enum_idx(options, 4, value, "fail_info_rlc_bearer_s::fail_type_e_"); -} + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::type_ii: + c.set(other.c.get()); + break; + case types::type_ii_port_sel: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); + } -// LocationMeasurementInfo ::= CHOICE -void location_meas_info_c::set(types::options e) -{ - type_ = e; + return *this; } -void location_meas_info_c::to_json(json_writer& j) const +void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::eutra_rstd: - j.start_array("eutra-RSTD"); - for (const auto& e1 : c) { - e1.to_json(j); - } - j.end_array(); + case types::type_ii: + j.write_fieldname("typeII"); + j.start_obj(); + j.write_fieldname("n1-n2-codebookSubsetRestriction"); + c.get().n1_n2_codebook_subset_restrict.to_json(j); + j.write_str("typeII-RI-Restriction", c.get().type_ii_ri_restrict.to_string()); + j.end_obj(); break; - case types::eutra_fine_timing_detection: + case types::type_ii_port_sel: + j.write_fieldname("typeII-PortSelection"); + j.start_obj(); + if (c.get().port_sel_sampling_size_present) { + j.write_str("portSelectionSamplingSize", c.get().port_sel_sampling_size.to_string()); + } + j.write_str("typeII-PortSelectionRI-Restriction", + c.get().type_ii_port_sel_ri_restrict.to_string()); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "location_meas_info_c"); + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); } j.end_obj(); } -SRSASN_CODE location_meas_info_c::pack(bit_ref& bref) const +SRSASN_CODE codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::eutra_rstd: - HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 3)); + case types::type_ii: + HANDLE_CODE(c.get().n1_n2_codebook_subset_restrict.pack(bref)); + HANDLE_CODE(c.get().type_ii_ri_restrict.pack(bref)); break; - case types::eutra_fine_timing_detection: + case types::type_ii_port_sel: + HANDLE_CODE(bref.pack(c.get().port_sel_sampling_size_present, 1)); + if (c.get().port_sel_sampling_size_present) { + HANDLE_CODE(c.get().port_sel_sampling_size.pack(bref)); + } + HANDLE_CODE(c.get().type_ii_port_sel_ri_restrict.pack(bref)); break; default: - log_invalid_choice_id(type_, "location_meas_info_c"); + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE location_meas_info_c::unpack(cbit_ref& bref) +SRSASN_CODE codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::eutra_rstd: - HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 3)); + case types::type_ii: + HANDLE_CODE(c.get().n1_n2_codebook_subset_restrict.unpack(bref)); + HANDLE_CODE(c.get().type_ii_ri_restrict.unpack(bref)); break; - case types::eutra_fine_timing_detection: + case types::type_ii_port_sel: + HANDLE_CODE(bref.unpack(c.get().port_sel_sampling_size_present, 1)); + if (c.get().port_sel_sampling_size_present) { + HANDLE_CODE(c.get().port_sel_sampling_size.unpack(bref)); + } + HANDLE_CODE(c.get().type_ii_port_sel_ri_restrict.unpack(bref)); break; default: - log_invalid_choice_id(type_, "location_meas_info_c"); + log_invalid_choice_id(type_, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string location_meas_info_c::types_opts::to_string() const -{ - static const char* options[] = {"eutra-RSTD", "eutra-FineTimingDetection"}; - return convert_enum_idx(options, 2, value, "location_meas_info_c::types"); -} - -// MeasResults ::= SEQUENCE -SRSASN_CODE meas_results_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_result_neigh_cells_present, 1)); - - HANDLE_CODE(pack_integer(bref, meas_id, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_serving_mo_list, 1, 32)); - if (meas_result_neigh_cells_present) { - HANDLE_CODE(meas_result_neigh_cells.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_results_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(meas_result_neigh_cells_present, 1)); - - HANDLE_CODE(unpack_integer(meas_id, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(unpack_dyn_seq_of(meas_result_serving_mo_list, bref, 1, 32)); - if (meas_result_neigh_cells_present) { - HANDLE_CODE(meas_result_neigh_cells.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_results_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("measId", meas_id); - j.start_array("measResultServingMOList"); - for (const auto& e1 : meas_result_serving_mo_list) { - e1.to_json(j); - } - j.end_array(); - if (meas_result_neigh_cells_present) { - j.write_fieldname("measResultNeighCells"); - meas_result_neigh_cells.to_json(j); - } - j.end_obj(); -} - -void meas_results_s::meas_result_neigh_cells_c_::destroy_() +void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::destroy_() { switch (type_) { - case types::meas_result_list_nr: - c.destroy(); + case types::two_one: + c.destroy >(); + break; + case types::two_two: + c.destroy >(); + break; + case types::four_one: + c.destroy >(); + break; + case types::three_two: + c.destroy >(); + break; + case types::six_one: + c.destroy >(); + break; + case types::four_two: + c.destroy >(); break; - case types::meas_result_list_eutra: - c.destroy(); + case types::eight_one: + c.destroy >(); + break; + case types::four_three: + c.destroy >(); + break; + case types::six_two: + c.destroy >(); + break; + case types::twelve_one: + c.destroy >(); + break; + case types::four_four: + c.destroy >(); + break; + case types::eight_two: + c.destroy >(); + break; + case types::sixteen_one: + c.destroy >(); break; default: break; } } -void meas_results_s::meas_result_neigh_cells_c_::set(types::options e) +void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::set( + types::options e) { destroy_(); type_ = e; switch (type_) { - case types::meas_result_list_nr: - c.init(); + case types::two_one: + c.init >(); break; - case types::meas_result_list_eutra: - c.init(); + case types::two_two: + c.init >(); + break; + case types::four_one: + c.init >(); + break; + case types::three_two: + c.init >(); + break; + case types::six_one: + c.init >(); + break; + case types::four_two: + c.init >(); + break; + case types::eight_one: + c.init >(); + break; + case types::four_three: + c.init >(); + break; + case types::six_two: + c.init >(); + break; + case types::twelve_one: + c.init >(); + break; + case types::four_four: + c.init >(); + break; + case types::eight_two: + c.init >(); + break; + case types::sixteen_one: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + log_invalid_choice_id( + type_, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); } } -meas_results_s::meas_result_neigh_cells_c_::meas_result_neigh_cells_c_( - const meas_results_s::meas_result_neigh_cells_c_& other) +codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_:: + n1_n2_codebook_subset_restrict_c_( + const codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_& + other) { type_ = other.type(); switch (type_) { - case types::meas_result_list_nr: - c.init(other.c.get()); + case types::two_one: + c.init(other.c.get >()); break; - case types::meas_result_list_eutra: - c.init(other.c.get()); + case types::two_two: + c.init(other.c.get >()); + break; + case types::four_one: + c.init(other.c.get >()); + break; + case types::three_two: + c.init(other.c.get >()); + break; + case types::six_one: + c.init(other.c.get >()); + break; + case types::four_two: + c.init(other.c.get >()); + break; + case types::eight_one: + c.init(other.c.get >()); + break; + case types::four_three: + c.init(other.c.get >()); + break; + case types::six_two: + c.init(other.c.get >()); + break; + case types::twelve_one: + c.init(other.c.get >()); + break; + case types::four_four: + c.init(other.c.get >()); + break; + case types::eight_two: + c.init(other.c.get >()); + break; + case types::sixteen_one: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + log_invalid_choice_id( + type_, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); } } -meas_results_s::meas_result_neigh_cells_c_& meas_results_s::meas_result_neigh_cells_c_:: - operator=(const meas_results_s::meas_result_neigh_cells_c_& other) +codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_& +codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::operator=( + const codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::meas_result_list_nr: - c.set(other.c.get()); + case types::two_one: + c.set(other.c.get >()); break; - case types::meas_result_list_eutra: - c.set(other.c.get()); + case types::two_two: + c.set(other.c.get >()); + break; + case types::four_one: + c.set(other.c.get >()); + break; + case types::three_two: + c.set(other.c.get >()); + break; + case types::six_one: + c.set(other.c.get >()); + break; + case types::four_two: + c.set(other.c.get >()); + break; + case types::eight_one: + c.set(other.c.get >()); + break; + case types::four_three: + c.set(other.c.get >()); + break; + case types::six_two: + c.set(other.c.get >()); + break; + case types::twelve_one: + c.set(other.c.get >()); + break; + case types::four_four: + c.set(other.c.get >()); + break; + case types::eight_two: + c.set(other.c.get >()); + break; + case types::sixteen_one: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + log_invalid_choice_id( + type_, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); } return *this; } -void meas_results_s::meas_result_neigh_cells_c_::to_json(json_writer& j) const +void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::to_json( + json_writer& j) const { j.start_obj(); switch (type_) { - case types::meas_result_list_nr: - j.start_array("measResultListNR"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::two_one: + j.write_str("two-one", c.get >().to_string()); break; - case types::meas_result_list_eutra: - j.start_array("measResultListEUTRA"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::two_two: + j.write_str("two-two", c.get >().to_string()); + break; + case types::four_one: + j.write_str("four-one", c.get >().to_string()); + break; + case types::three_two: + j.write_str("three-two", c.get >().to_string()); + break; + case types::six_one: + j.write_str("six-one", c.get >().to_string()); + break; + case types::four_two: + j.write_str("four-two", c.get >().to_string()); + break; + case types::eight_one: + j.write_str("eight-one", c.get >().to_string()); + break; + case types::four_three: + j.write_str("four-three", c.get >().to_string()); + break; + case types::six_two: + j.write_str("six-two", c.get >().to_string()); + break; + case types::twelve_one: + j.write_str("twelve-one", c.get >().to_string()); + break; + case types::four_four: + j.write_str("four-four", c.get >().to_string()); + break; + case types::eight_two: + j.write_str("eight-two", c.get >().to_string()); + break; + case types::sixteen_one: + j.write_str("sixteen-one", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + log_invalid_choice_id( + type_, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); } j.end_obj(); } -SRSASN_CODE meas_results_s::meas_result_neigh_cells_c_::pack(bit_ref& bref) const +SRSASN_CODE +codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::pack( + bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::meas_result_list_nr: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + case types::two_one: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::two_two: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_one: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::three_two: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::six_one: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_two: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::eight_one: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_three: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::six_two: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::twelve_one: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_four: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::eight_two: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sixteen_one: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::meas_result_list_eutra: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); - } break; default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + log_invalid_choice_id( + type_, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE meas_results_s::meas_result_neigh_cells_c_::unpack(cbit_ref& bref) +SRSASN_CODE +codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::unpack( + cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::meas_result_list_nr: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + case types::two_one: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::two_two: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_one: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::three_two: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::six_one: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_two: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::eight_one: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_three: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::six_two: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::twelve_one: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_four: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::eight_two: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sixteen_one: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::meas_result_list_eutra: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); - } break; default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + log_invalid_choice_id( + type_, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const +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 const char* options[] = {"measResultListNR", "measResultListEUTRA"}; - return convert_enum_idx(options, 2, value, "meas_results_s::meas_result_neigh_cells_c_::types"); + 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, + value, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::types"); } -// RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_v1530_ies_s::pack(bit_ref& bref) const +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 { - HANDLE_CODE(bref.pack(ul_tx_direct_current_list_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + static const char* options[] = {"n1", "n2", "n3", "n4"}; + return convert_enum_idx( + options, + 4, + value, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::port_sel_sampling_size_e_"); +} +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 const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number( + options, + 4, + value, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::port_sel_sampling_size_e_"); +} - if (ul_tx_direct_current_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_list, 1, 32)); - } +std::string codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::types_opts::to_string() const +{ + 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"); +} - return SRSASN_SUCCESS; +std::string codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_opts::to_string() const +{ + 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_"); } -SRSASN_CODE rrc_recfg_complete_v1530_ies_s::unpack(cbit_ref& bref) +uint8_t codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_opts::to_number() const { - HANDLE_CODE(bref.unpack(ul_tx_direct_current_list_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_list, bref, 1, 32)); - } + 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_"); +} - return SRSASN_SUCCESS; +std::string codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_opts::to_string() const +{ + 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_"); } -void rrc_recfg_complete_v1530_ies_s::to_json(json_writer& j) const +uint8_t codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_opts::to_number() const { - j.start_obj(); - if (ul_tx_direct_current_list_present) { - j.start_array("uplinkTxDirectCurrentList"); - for (const auto& e1 : ul_tx_direct_current_list) { - e1.to_json(j); - } - j.end_array(); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); + 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_"); } -// RegisteredAMF ::= SEQUENCE -SRSASN_CODE registered_amf_s::pack(bit_ref& bref) const +std::string codebook_cfg_s::codebook_type_c_::types_opts::to_string() const { - HANDLE_CODE(bref.pack(plmn_id_present, 1)); + 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 const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "codebook_cfg_s::codebook_type_c_::types"); +} - if (plmn_id_present) { - HANDLE_CODE(plmn_id.pack(bref)); - } - HANDLE_CODE(amf_id.pack(bref)); +// PUCCH-CSI-Resource ::= SEQUENCE +SRSASN_CODE pucch_csi_res_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, ul_bw_part_id, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(pack_integer(bref, pucch_res, (uint8_t)0u, (uint8_t)127u)); return SRSASN_SUCCESS; } -SRSASN_CODE registered_amf_s::unpack(cbit_ref& bref) +SRSASN_CODE pucch_csi_res_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(plmn_id_present, 1)); - - if (plmn_id_present) { - HANDLE_CODE(plmn_id.unpack(bref)); - } - HANDLE_CODE(amf_id.unpack(bref)); + HANDLE_CODE(unpack_integer(ul_bw_part_id, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(unpack_integer(pucch_res, bref, (uint8_t)0u, (uint8_t)127u)); return SRSASN_SUCCESS; } -void registered_amf_s::to_json(json_writer& j) const +void pucch_csi_res_s::to_json(json_writer& j) const { j.start_obj(); - if (plmn_id_present) { - j.write_fieldname("plmn-Identity"); - plmn_id.to_json(j); - } - j.write_str("amf-Identifier", amf_id.to_string()); + j.write_int("uplinkBandwidthPartId", ul_bw_part_id); + j.write_int("pucch-Resource", pucch_res); j.end_obj(); } -// S-NSSAI ::= CHOICE -void s_nssai_c::destroy_() +// PortIndexFor8Ranks ::= CHOICE +void port_idx_for8_ranks_c::destroy_() { switch (type_) { - case types::sst: - c.destroy >(); + case types::port_idx8: + c.destroy(); break; - case types::sst_sd: - c.destroy >(); + case types::port_idx4: + c.destroy(); + break; + case types::port_idx2: + c.destroy(); break; default: break; } } -void s_nssai_c::set(types::options e) +void port_idx_for8_ranks_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::sst: - c.init >(); + case types::port_idx8: + c.init(); break; - case types::sst_sd: - c.init >(); + case types::port_idx4: + c.init(); + break; + case types::port_idx2: + c.init(); + break; + case types::port_idx1: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "s_nssai_c"); + log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); } } -s_nssai_c::s_nssai_c(const s_nssai_c& other) +port_idx_for8_ranks_c::port_idx_for8_ranks_c(const port_idx_for8_ranks_c& other) { type_ = other.type(); switch (type_) { - case types::sst: - c.init(other.c.get >()); + case types::port_idx8: + c.init(other.c.get()); break; - case types::sst_sd: - c.init(other.c.get >()); + case types::port_idx4: + c.init(other.c.get()); + break; + case types::port_idx2: + c.init(other.c.get()); + break; + case types::port_idx1: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "s_nssai_c"); + log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); } } -s_nssai_c& s_nssai_c::operator=(const s_nssai_c& other) +port_idx_for8_ranks_c& port_idx_for8_ranks_c::operator=(const port_idx_for8_ranks_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::sst: - c.set(other.c.get >()); + case types::port_idx8: + c.set(other.c.get()); break; - case types::sst_sd: - c.set(other.c.get >()); + case types::port_idx4: + c.set(other.c.get()); + break; + case types::port_idx2: + c.set(other.c.get()); + break; + case types::port_idx1: break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "s_nssai_c"); + log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); } return *this; } -void s_nssai_c::to_json(json_writer& j) const +void port_idx_for8_ranks_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::sst: - j.write_str("sst", c.get >().to_string()); + case types::port_idx8: + j.write_fieldname("portIndex8"); + j.start_obj(); + if (c.get().rank1_minus8_present) { + j.write_int("rank1-8", c.get().rank1_minus8); + } + if (c.get().rank2_minus8_present) { + j.start_array("rank2-8"); + 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 (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 (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 (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 (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 (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 (const auto& e1 : c.get().rank8_minus8) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); break; - case types::sst_sd: - j.write_str("sst-SD", c.get >().to_string()); + case types::port_idx4: + j.write_fieldname("portIndex4"); + j.start_obj(); + if (c.get().rank1_minus4_present) { + j.write_int("rank1-4", c.get().rank1_minus4); + } + if (c.get().rank2_minus4_present) { + j.start_array("rank2-4"); + 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 (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 (const auto& e1 : c.get().rank4_minus4) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); + break; + case types::port_idx2: + j.write_fieldname("portIndex2"); + j.start_obj(); + if (c.get().rank1_minus2_present) { + j.write_int("rank1-2", c.get().rank1_minus2); + } + if (c.get().rank2_minus2_present) { + j.start_array("rank2-2"); + for (const auto& e1 : c.get().rank2_minus2) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); + break; + case types::port_idx1: break; default: - log_invalid_choice_id(type_, "s_nssai_c"); + log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); } j.end_obj(); } -SRSASN_CODE s_nssai_c::pack(bit_ref& bref) const +SRSASN_CODE port_idx_for8_ranks_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::sst: - HANDLE_CODE(c.get >().pack(bref)); + case types::port_idx8: + HANDLE_CODE(bref.pack(c.get().rank1_minus8_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank2_minus8_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank3_minus8_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank4_minus8_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank5_minus8_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank6_minus8_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank7_minus8_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank8_minus8_present, 1)); + if (c.get().rank1_minus8_present) { + HANDLE_CODE(pack_integer(bref, c.get().rank1_minus8, (uint8_t)0u, (uint8_t)7u)); + } + if (c.get().rank2_minus8_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank2_minus8)[0], + c.get().rank2_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank3_minus8_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank3_minus8)[0], + c.get().rank3_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank4_minus8_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank4_minus8)[0], + c.get().rank4_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank5_minus8_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank5_minus8)[0], + c.get().rank5_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank6_minus8_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank6_minus8)[0], + c.get().rank6_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank7_minus8_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank7_minus8)[0], + c.get().rank7_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank8_minus8_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank8_minus8)[0], + c.get().rank8_minus8.size(), + integer_packer(0, 7))); + } break; - case types::sst_sd: - HANDLE_CODE(c.get >().pack(bref)); + case types::port_idx4: + HANDLE_CODE(bref.pack(c.get().rank1_minus4_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank2_minus4_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank3_minus4_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank4_minus4_present, 1)); + if (c.get().rank1_minus4_present) { + HANDLE_CODE(pack_integer(bref, c.get().rank1_minus4, (uint8_t)0u, (uint8_t)3u)); + } + if (c.get().rank2_minus4_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank2_minus4)[0], + c.get().rank2_minus4.size(), + integer_packer(0, 3))); + } + if (c.get().rank3_minus4_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank3_minus4)[0], + c.get().rank3_minus4.size(), + integer_packer(0, 3))); + } + if (c.get().rank4_minus4_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank4_minus4)[0], + c.get().rank4_minus4.size(), + integer_packer(0, 3))); + } + break; + case types::port_idx2: + HANDLE_CODE(bref.pack(c.get().rank1_minus2_present, 1)); + HANDLE_CODE(bref.pack(c.get().rank2_minus2_present, 1)); + if (c.get().rank1_minus2_present) { + HANDLE_CODE(pack_integer(bref, c.get().rank1_minus2, (uint8_t)0u, (uint8_t)1u)); + } + if (c.get().rank2_minus2_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().rank2_minus2)[0], + c.get().rank2_minus2.size(), + integer_packer(0, 1))); + } + break; + case types::port_idx1: break; default: - log_invalid_choice_id(type_, "s_nssai_c"); + log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE s_nssai_c::unpack(cbit_ref& bref) +SRSASN_CODE port_idx_for8_ranks_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::sst: - HANDLE_CODE(c.get >().unpack(bref)); + case types::port_idx8: + HANDLE_CODE(bref.unpack(c.get().rank1_minus8_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank2_minus8_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank3_minus8_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank4_minus8_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank5_minus8_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank6_minus8_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank7_minus8_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank8_minus8_present, 1)); + if (c.get().rank1_minus8_present) { + HANDLE_CODE(unpack_integer(c.get().rank1_minus8, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (c.get().rank2_minus8_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank2_minus8)[0], + bref, + c.get().rank2_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank3_minus8_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank3_minus8)[0], + bref, + c.get().rank3_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank4_minus8_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank4_minus8)[0], + bref, + c.get().rank4_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank5_minus8_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank5_minus8)[0], + bref, + c.get().rank5_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank6_minus8_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank6_minus8)[0], + bref, + c.get().rank6_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank7_minus8_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank7_minus8)[0], + bref, + c.get().rank7_minus8.size(), + integer_packer(0, 7))); + } + if (c.get().rank8_minus8_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank8_minus8)[0], + bref, + c.get().rank8_minus8.size(), + integer_packer(0, 7))); + } break; - case types::sst_sd: - HANDLE_CODE(c.get >().unpack(bref)); + case types::port_idx4: + HANDLE_CODE(bref.unpack(c.get().rank1_minus4_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank2_minus4_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank3_minus4_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank4_minus4_present, 1)); + if (c.get().rank1_minus4_present) { + HANDLE_CODE(unpack_integer(c.get().rank1_minus4, bref, (uint8_t)0u, (uint8_t)3u)); + } + if (c.get().rank2_minus4_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank2_minus4)[0], + bref, + c.get().rank2_minus4.size(), + integer_packer(0, 3))); + } + if (c.get().rank3_minus4_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank3_minus4)[0], + bref, + c.get().rank3_minus4.size(), + integer_packer(0, 3))); + } + if (c.get().rank4_minus4_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank4_minus4)[0], + bref, + c.get().rank4_minus4.size(), + integer_packer(0, 3))); + } break; - default: - log_invalid_choice_id(type_, "s_nssai_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string s_nssai_c::types_opts::to_string() const -{ - static const char* options[] = {"sst", "sst-SD"}; - return convert_enum_idx(options, 2, value, "s_nssai_c::types"); -} - -// UEAssistanceInformation-v1540-IEs ::= SEQUENCE -SRSASN_CODE ueassist_info_v1540_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(overheat_assist_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (overheat_assist_present) { - HANDLE_CODE(overheat_assist.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ueassist_info_v1540_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(overheat_assist_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (overheat_assist_present) { - HANDLE_CODE(overheat_assist.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ueassist_info_v1540_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (overheat_assist_present) { - j.write_fieldname("overheatingAssistance"); - overheat_assist.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// CounterCheckResponse-IEs ::= SEQUENCE -SRSASN_CODE counter_check_resp_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, drb_count_info_list, 0, 29)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE counter_check_resp_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(drb_count_info_list, bref, 0, 29)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void counter_check_resp_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("drb-CountInfoList"); - for (const auto& e1 : drb_count_info_list) { - e1.to_json(j); - } - j.end_array(); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// FailureInformation-IEs ::= SEQUENCE -SRSASN_CODE fail_info_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(fail_info_rlc_bearer_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (fail_info_rlc_bearer_present) { - HANDLE_CODE(fail_info_rlc_bearer.pack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_info_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(fail_info_rlc_bearer_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (fail_info_rlc_bearer_present) { - HANDLE_CODE(fail_info_rlc_bearer.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void fail_info_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fail_info_rlc_bearer_present) { - j.write_fieldname("failureInfoRLC-Bearer"); - fail_info_rlc_bearer.to_json(j); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// LocationMeasurementIndication-IEs ::= SEQUENCE -SRSASN_CODE location_meas_ind_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(meas_ind.pack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE location_meas_ind_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(meas_ind.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void location_meas_ind_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measurementIndication"); - meas_ind.to_json(j); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// MeasurementReport-IEs ::= SEQUENCE -SRSASN_CODE meas_report_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(meas_results.pack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + case types::port_idx2: + HANDLE_CODE(bref.unpack(c.get().rank1_minus2_present, 1)); + HANDLE_CODE(bref.unpack(c.get().rank2_minus2_present, 1)); + if (c.get().rank1_minus2_present) { + HANDLE_CODE(unpack_integer(c.get().rank1_minus2, bref, (uint8_t)0u, (uint8_t)1u)); + } + if (c.get().rank2_minus2_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().rank2_minus2)[0], + bref, + c.get().rank2_minus2.size(), + integer_packer(0, 1))); + } + break; + case types::port_idx1: + break; + default: + log_invalid_choice_id(type_, "port_idx_for8_ranks_c"); + return SRSASN_ERROR_DECODE_FAIL; } - return SRSASN_SUCCESS; } -SRSASN_CODE meas_report_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(meas_results.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - return SRSASN_SUCCESS; +std::string port_idx_for8_ranks_c::types_opts::to_string() const +{ + static const char* options[] = {"portIndex8", "portIndex4", "portIndex2", "portIndex1"}; + return convert_enum_idx(options, 4, value, "port_idx_for8_ranks_c::types"); } -void meas_report_ies_s::to_json(json_writer& j) const +uint8_t port_idx_for8_ranks_c::types_opts::to_number() const { - j.start_obj(); - j.write_fieldname("measResults"); - meas_results.to_json(j); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); + static const uint8_t options[] = {8, 4, 2, 1}; + return map_enum_number(options, 4, value, "port_idx_for8_ranks_c::types"); } -// RRCReconfigurationComplete-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_ies_s::pack(bit_ref& bref) const +// CSI-ReportConfig ::= SEQUENCE +SRSASN_CODE csi_report_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(carrier_present, 1)); + HANDLE_CODE(bref.pack(csi_im_res_for_interference_present, 1)); + HANDLE_CODE(bref.pack(nzp_csi_rs_res_for_interference_present, 1)); + HANDLE_CODE(bref.pack(report_freq_cfg_present, 1)); + HANDLE_CODE(bref.pack(codebook_cfg_present, 1)); + HANDLE_CODE(bref.pack(dummy_present, 1)); + HANDLE_CODE(bref.pack(cqi_table_present, 1)); + HANDLE_CODE(bref.pack(non_pmi_port_ind_present, 1)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + HANDLE_CODE(pack_integer(bref, report_cfg_id, (uint8_t)0u, (uint8_t)47u)); + if (carrier_present) { + HANDLE_CODE(pack_integer(bref, carrier, (uint8_t)0u, (uint8_t)31u)); } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); + HANDLE_CODE(pack_integer(bref, res_for_ch_meas, (uint8_t)0u, (uint8_t)111u)); + if (csi_im_res_for_interference_present) { + HANDLE_CODE(pack_integer(bref, csi_im_res_for_interference, (uint8_t)0u, (uint8_t)111u)); } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_complete_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + if (nzp_csi_rs_res_for_interference_present) { + HANDLE_CODE(pack_integer(bref, nzp_csi_rs_res_for_interference, (uint8_t)0u, (uint8_t)111u)); } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); + HANDLE_CODE(report_cfg_type.pack(bref)); + HANDLE_CODE(report_quant.pack(bref)); + if (report_freq_cfg_present) { + HANDLE_CODE(bref.pack(report_freq_cfg.cqi_format_ind_present, 1)); + HANDLE_CODE(bref.pack(report_freq_cfg.pmi_format_ind_present, 1)); + HANDLE_CODE(bref.pack(report_freq_cfg.csi_report_band_present, 1)); + if (report_freq_cfg.cqi_format_ind_present) { + HANDLE_CODE(report_freq_cfg.cqi_format_ind.pack(bref)); + } + if (report_freq_cfg.pmi_format_ind_present) { + HANDLE_CODE(report_freq_cfg.pmi_format_ind.pack(bref)); + } + if (report_freq_cfg.csi_report_band_present) { + HANDLE_CODE(report_freq_cfg.csi_report_band.pack(bref)); + } } - - return SRSASN_SUCCESS; -} -void rrc_recfg_complete_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + HANDLE_CODE(time_restrict_for_ch_meass.pack(bref)); + HANDLE_CODE(time_restrict_for_interference_meass.pack(bref)); + if (codebook_cfg_present) { + HANDLE_CODE(codebook_cfg.pack(bref)); } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); + if (dummy_present) { + HANDLE_CODE(dummy.pack(bref)); } - j.end_obj(); -} - -// RRCReestablishmentComplete-IEs ::= SEQUENCE -SRSASN_CODE rrc_reest_complete_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + HANDLE_CODE(group_based_beam_report.pack(bref)); + if (cqi_table_present) { + HANDLE_CODE(cqi_table.pack(bref)); } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reest_complete_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + HANDLE_CODE(subband_size.pack(bref)); + if (non_pmi_port_ind_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, non_pmi_port_ind, 1, 128)); } - return SRSASN_SUCCESS; -} -void rrc_reest_complete_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= semi_persistent_on_pusch_v1530.is_present(); + group_flags.pack(bref); -// RRCResumeComplete-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_complete_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ded_nas_msg_present, 1)); - HANDLE_CODE(bref.pack(sel_plmn_id_present, 1)); - HANDLE_CODE(bref.pack(ul_tx_direct_current_list_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); - if (ded_nas_msg_present) { - HANDLE_CODE(ded_nas_msg.pack(bref)); - } - if (sel_plmn_id_present) { - HANDLE_CODE(pack_integer(bref, sel_plmn_id, (uint8_t)1u, (uint8_t)12u)); - } - if (ul_tx_direct_current_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_list, 1, 32)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + HANDLE_CODE(bref.pack(semi_persistent_on_pusch_v1530.is_present(), 1)); + if (semi_persistent_on_pusch_v1530.is_present()) { + HANDLE_CODE(semi_persistent_on_pusch_v1530->report_slot_cfg_v1530.pack(bref)); + } + } } - return SRSASN_SUCCESS; } -SRSASN_CODE rrc_resume_complete_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_report_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); - HANDLE_CODE(bref.unpack(sel_plmn_id_present, 1)); - HANDLE_CODE(bref.unpack(ul_tx_direct_current_list_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(carrier_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_res_for_interference_present, 1)); + HANDLE_CODE(bref.unpack(nzp_csi_rs_res_for_interference_present, 1)); + HANDLE_CODE(bref.unpack(report_freq_cfg_present, 1)); + HANDLE_CODE(bref.unpack(codebook_cfg_present, 1)); + HANDLE_CODE(bref.unpack(dummy_present, 1)); + HANDLE_CODE(bref.unpack(cqi_table_present, 1)); + HANDLE_CODE(bref.unpack(non_pmi_port_ind_present, 1)); - if (ded_nas_msg_present) { - HANDLE_CODE(ded_nas_msg.unpack(bref)); - } - if (sel_plmn_id_present) { - HANDLE_CODE(unpack_integer(sel_plmn_id, bref, (uint8_t)1u, (uint8_t)12u)); + HANDLE_CODE(unpack_integer(report_cfg_id, bref, (uint8_t)0u, (uint8_t)47u)); + if (carrier_present) { + HANDLE_CODE(unpack_integer(carrier, bref, (uint8_t)0u, (uint8_t)31u)); } - if (ul_tx_direct_current_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_list, bref, 1, 32)); + HANDLE_CODE(unpack_integer(res_for_ch_meas, bref, (uint8_t)0u, (uint8_t)111u)); + if (csi_im_res_for_interference_present) { + HANDLE_CODE(unpack_integer(csi_im_res_for_interference, bref, (uint8_t)0u, (uint8_t)111u)); } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + if (nzp_csi_rs_res_for_interference_present) { + HANDLE_CODE(unpack_integer(nzp_csi_rs_res_for_interference, bref, (uint8_t)0u, (uint8_t)111u)); } - - return SRSASN_SUCCESS; -} -void rrc_resume_complete_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ded_nas_msg_present) { - j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); + HANDLE_CODE(report_cfg_type.unpack(bref)); + HANDLE_CODE(report_quant.unpack(bref)); + if (report_freq_cfg_present) { + HANDLE_CODE(bref.unpack(report_freq_cfg.cqi_format_ind_present, 1)); + HANDLE_CODE(bref.unpack(report_freq_cfg.pmi_format_ind_present, 1)); + HANDLE_CODE(bref.unpack(report_freq_cfg.csi_report_band_present, 1)); + if (report_freq_cfg.cqi_format_ind_present) { + HANDLE_CODE(report_freq_cfg.cqi_format_ind.unpack(bref)); + } + if (report_freq_cfg.pmi_format_ind_present) { + HANDLE_CODE(report_freq_cfg.pmi_format_ind.unpack(bref)); + } + if (report_freq_cfg.csi_report_band_present) { + HANDLE_CODE(report_freq_cfg.csi_report_band.unpack(bref)); + } } - if (sel_plmn_id_present) { - j.write_int("selectedPLMN-Identity", sel_plmn_id); + HANDLE_CODE(time_restrict_for_ch_meass.unpack(bref)); + HANDLE_CODE(time_restrict_for_interference_meass.unpack(bref)); + if (codebook_cfg_present) { + HANDLE_CODE(codebook_cfg.unpack(bref)); } - if (ul_tx_direct_current_list_present) { - j.start_array("uplinkTxDirectCurrentList"); - for (const auto& e1 : ul_tx_direct_current_list) { - e1.to_json(j); - } - j.end_array(); + if (dummy_present) { + HANDLE_CODE(dummy.unpack(bref)); } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + HANDLE_CODE(group_based_beam_report.unpack(bref)); + if (cqi_table_present) { + HANDLE_CODE(cqi_table.unpack(bref)); } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + HANDLE_CODE(subband_size.unpack(bref)); + if (non_pmi_port_ind_present) { + HANDLE_CODE(unpack_dyn_seq_of(non_pmi_port_ind, bref, 1, 128)); } - j.end_obj(); -} -// RRCSetupComplete-IEs ::= SEQUENCE -SRSASN_CODE rrc_setup_complete_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(registered_amf_present, 1)); - HANDLE_CODE(bref.pack(guami_type_present, 1)); - HANDLE_CODE(bref.pack(s_nssai_list_present, 1)); - HANDLE_CODE(bref.pack(ng_minus5_g_s_tmsi_value_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); - HANDLE_CODE(pack_integer(bref, sel_plmn_id, (uint8_t)1u, (uint8_t)12u)); - if (registered_amf_present) { - HANDLE_CODE(registered_amf.pack(bref)); - } - if (guami_type_present) { - HANDLE_CODE(guami_type.pack(bref)); - } - if (s_nssai_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, s_nssai_list, 1, 8)); - } - HANDLE_CODE(ded_nas_msg.pack(bref)); - if (ng_minus5_g_s_tmsi_value_present) { - HANDLE_CODE(ng_minus5_g_s_tmsi_value.pack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + bool semi_persistent_on_pusch_v1530_present; + HANDLE_CODE(bref.unpack(semi_persistent_on_pusch_v1530_present, 1)); + semi_persistent_on_pusch_v1530.set_present(semi_persistent_on_pusch_v1530_present); + if (semi_persistent_on_pusch_v1530.is_present()) { + HANDLE_CODE(semi_persistent_on_pusch_v1530->report_slot_cfg_v1530.unpack(bref)); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_setup_complete_ies_s::unpack(cbit_ref& bref) +void csi_report_cfg_s::to_json(json_writer& j) const { - HANDLE_CODE(bref.unpack(registered_amf_present, 1)); - HANDLE_CODE(bref.unpack(guami_type_present, 1)); - HANDLE_CODE(bref.unpack(s_nssai_list_present, 1)); - HANDLE_CODE(bref.unpack(ng_minus5_g_s_tmsi_value_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(unpack_integer(sel_plmn_id, bref, (uint8_t)1u, (uint8_t)12u)); - if (registered_amf_present) { - HANDLE_CODE(registered_amf.unpack(bref)); + j.start_obj(); + j.write_int("reportConfigId", report_cfg_id); + if (carrier_present) { + j.write_int("carrier", carrier); } - if (guami_type_present) { - HANDLE_CODE(guami_type.unpack(bref)); + j.write_int("resourcesForChannelMeasurement", res_for_ch_meas); + if (csi_im_res_for_interference_present) { + j.write_int("csi-IM-ResourcesForInterference", csi_im_res_for_interference); } - if (s_nssai_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(s_nssai_list, bref, 1, 8)); + if (nzp_csi_rs_res_for_interference_present) { + j.write_int("nzp-CSI-RS-ResourcesForInterference", nzp_csi_rs_res_for_interference); } - HANDLE_CODE(ded_nas_msg.unpack(bref)); - if (ng_minus5_g_s_tmsi_value_present) { - HANDLE_CODE(ng_minus5_g_s_tmsi_value.unpack(bref)); + j.write_fieldname("reportConfigType"); + report_cfg_type.to_json(j); + j.write_fieldname("reportQuantity"); + report_quant.to_json(j); + if (report_freq_cfg_present) { + j.write_fieldname("reportFreqConfiguration"); + j.start_obj(); + if (report_freq_cfg.cqi_format_ind_present) { + j.write_str("cqi-FormatIndicator", report_freq_cfg.cqi_format_ind.to_string()); + } + if (report_freq_cfg.pmi_format_ind_present) { + j.write_str("pmi-FormatIndicator", report_freq_cfg.pmi_format_ind.to_string()); + } + if (report_freq_cfg.csi_report_band_present) { + j.write_fieldname("csi-ReportingBand"); + report_freq_cfg.csi_report_band.to_json(j); + } + j.end_obj(); } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + j.write_str("timeRestrictionForChannelMeasurements", time_restrict_for_ch_meass.to_string()); + j.write_str("timeRestrictionForInterferenceMeasurements", time_restrict_for_interference_meass.to_string()); + if (codebook_cfg_present) { + j.write_fieldname("codebookConfig"); + codebook_cfg.to_json(j); } - - return SRSASN_SUCCESS; -} -void rrc_setup_complete_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("selectedPLMN-Identity", sel_plmn_id); - if (registered_amf_present) { - j.write_fieldname("registeredAMF"); - registered_amf.to_json(j); + if (dummy_present) { + j.write_str("dummy", dummy.to_string()); } - if (guami_type_present) { - j.write_str("guami-Type", guami_type.to_string()); + j.write_fieldname("groupBasedBeamReporting"); + group_based_beam_report.to_json(j); + if (cqi_table_present) { + j.write_str("cqi-Table", cqi_table.to_string()); } - if (s_nssai_list_present) { - j.start_array("s-NSSAI-List"); - for (const auto& e1 : s_nssai_list) { + j.write_str("subbandSize", subband_size.to_string()); + if (non_pmi_port_ind_present) { + j.start_array("non-PMI-PortIndication"); + for (const auto& e1 : non_pmi_port_ind) { e1.to_json(j); } j.end_array(); } - j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); - if (ng_minus5_g_s_tmsi_value_present) { - j.write_fieldname("ng-5G-S-TMSI-Value"); - ng_minus5_g_s_tmsi_value.to_json(j); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + if (ext) { + if (semi_persistent_on_pusch_v1530.is_present()) { + j.write_fieldname("semiPersistentOnPUSCH-v1530"); + j.start_obj(); + j.write_str("reportSlotConfig-v1530", semi_persistent_on_pusch_v1530->report_slot_cfg_v1530.to_string()); + j.end_obj(); + } } j.end_obj(); } -std::string rrc_setup_complete_ies_s::guami_type_opts::to_string() const -{ - static const char* options[] = {"native", "mapped"}; - return convert_enum_idx(options, 2, value, "rrc_setup_complete_ies_s::guami_type_e_"); -} - -void rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::destroy_() +void csi_report_cfg_s::report_cfg_type_c_::destroy_() { switch (type_) { - case types::ng_minus5_g_s_tmsi: - c.destroy >(); + case types::periodic: + c.destroy(); break; - case types::ng_minus5_g_s_tmsi_part2: - c.destroy >(); + case types::semi_persistent_on_pucch: + c.destroy(); + break; + case types::semi_persistent_on_pusch: + c.destroy(); + break; + case types::aperiodic: + c.destroy(); break; default: break; } } -void rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::set(types::options e) +void csi_report_cfg_s::report_cfg_type_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ng_minus5_g_s_tmsi: - c.init >(); + case types::periodic: + c.init(); break; - case types::ng_minus5_g_s_tmsi_part2: - c.init >(); + case types::semi_persistent_on_pucch: + c.init(); + break; + case types::semi_persistent_on_pusch: + c.init(); + break; + case types::aperiodic: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); } } -rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::ng_minus5_g_s_tmsi_value_c_( - const rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_& other) +csi_report_cfg_s::report_cfg_type_c_::report_cfg_type_c_(const csi_report_cfg_s::report_cfg_type_c_& other) { type_ = other.type(); switch (type_) { - case types::ng_minus5_g_s_tmsi: - c.init(other.c.get >()); + case types::periodic: + c.init(other.c.get()); break; - case types::ng_minus5_g_s_tmsi_part2: - c.init(other.c.get >()); + case types::semi_persistent_on_pucch: + c.init(other.c.get()); + break; + case types::semi_persistent_on_pusch: + c.init(other.c.get()); + break; + case types::aperiodic: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); } } -rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_& rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_:: - operator=(const rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_& other) +csi_report_cfg_s::report_cfg_type_c_& +csi_report_cfg_s::report_cfg_type_c_::operator=(const csi_report_cfg_s::report_cfg_type_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ng_minus5_g_s_tmsi: - c.set(other.c.get >()); + case types::periodic: + c.set(other.c.get()); break; - case types::ng_minus5_g_s_tmsi_part2: - c.set(other.c.get >()); + case types::semi_persistent_on_pucch: + c.set(other.c.get()); + break; + case types::semi_persistent_on_pusch: + c.set(other.c.get()); + break; + case types::aperiodic: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); } return *this; } -void rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::to_json(json_writer& j) const +void csi_report_cfg_s::report_cfg_type_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ng_minus5_g_s_tmsi: - j.write_str("ng-5G-S-TMSI", c.get >().to_string()); + case types::periodic: + j.write_fieldname("periodic"); + j.start_obj(); + j.write_fieldname("reportSlotConfig"); + c.get().report_slot_cfg.to_json(j); + j.start_array("pucch-CSI-ResourceList"); + for (const auto& e1 : c.get().pucch_csi_res_list) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); + break; + case types::semi_persistent_on_pucch: + j.write_fieldname("semiPersistentOnPUCCH"); + j.start_obj(); + j.write_fieldname("reportSlotConfig"); + c.get().report_slot_cfg.to_json(j); + j.start_array("pucch-CSI-ResourceList"); + for (const auto& e1 : c.get().pucch_csi_res_list) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); break; - case types::ng_minus5_g_s_tmsi_part2: - j.write_str("ng-5G-S-TMSI-Part2", c.get >().to_string()); + case types::semi_persistent_on_pusch: + j.write_fieldname("semiPersistentOnPUSCH"); + j.start_obj(); + j.write_str("reportSlotConfig", c.get().report_slot_cfg.to_string()); + j.start_array("reportSlotOffsetList"); + for (const auto& e1 : c.get().report_slot_offset_list) { + j.write_int(e1); + } + j.end_array(); + j.write_int("p0alpha", c.get().p0alpha); + j.end_obj(); + break; + case types::aperiodic: + j.write_fieldname("aperiodic"); + j.start_obj(); + j.start_array("reportSlotOffsetList"); + for (const auto& e1 : c.get().report_slot_offset_list) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); } j.end_obj(); } -SRSASN_CODE rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::pack(bit_ref& bref) const +SRSASN_CODE csi_report_cfg_s::report_cfg_type_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ng_minus5_g_s_tmsi: - HANDLE_CODE(c.get >().pack(bref)); + case types::periodic: + HANDLE_CODE(c.get().report_slot_cfg.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().pucch_csi_res_list, 1, 4)); break; - case types::ng_minus5_g_s_tmsi_part2: - HANDLE_CODE(c.get >().pack(bref)); + case types::semi_persistent_on_pucch: + HANDLE_CODE(c.get().report_slot_cfg.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().pucch_csi_res_list, 1, 4)); + break; + case types::semi_persistent_on_pusch: + HANDLE_CODE(c.get().report_slot_cfg.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get().report_slot_offset_list, 1, 16, integer_packer(0, 32))); + HANDLE_CODE(pack_integer(bref, c.get().p0alpha, (uint8_t)0u, (uint8_t)29u)); + break; + case types::aperiodic: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get().report_slot_offset_list, 1, 16, integer_packer(0, 32))); break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::unpack(cbit_ref& bref) +SRSASN_CODE csi_report_cfg_s::report_cfg_type_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ng_minus5_g_s_tmsi: - HANDLE_CODE(c.get >().unpack(bref)); + case types::periodic: + HANDLE_CODE(c.get().report_slot_cfg.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(c.get().pucch_csi_res_list, bref, 1, 4)); break; - case types::ng_minus5_g_s_tmsi_part2: - HANDLE_CODE(c.get >().unpack(bref)); + case types::semi_persistent_on_pucch: + HANDLE_CODE(c.get().report_slot_cfg.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(c.get().pucch_csi_res_list, bref, 1, 4)); + break; + case types::semi_persistent_on_pusch: + HANDLE_CODE(c.get().report_slot_cfg.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of( + c.get().report_slot_offset_list, bref, 1, 16, integer_packer(0, 32))); + HANDLE_CODE(unpack_integer(c.get().p0alpha, bref, (uint8_t)0u, (uint8_t)29u)); + break; + case types::aperiodic: + HANDLE_CODE(unpack_dyn_seq_of( + c.get().report_slot_offset_list, bref, 1, 16, integer_packer(0, 32))); break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_cfg_type_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::types_opts::to_string() const +std::string csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_opts::to_string() const { - 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"); + 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_"); } - -// SecurityModeComplete-IEs ::= SEQUENCE -SRSASN_CODE security_mode_complete_ies_s::pack(bit_ref& bref) const +uint16_t csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_opts::to_number() const { - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE security_mode_complete_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - return SRSASN_SUCCESS; -} -void security_mode_complete_ies_s::to_json(json_writer& j) const +std::string csi_report_cfg_s::report_cfg_type_c_::types_opts::to_string() const { - j.start_obj(); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); + static const char* options[] = {"periodic", "semiPersistentOnPUCCH", "semiPersistentOnPUSCH", "aperiodic"}; + return convert_enum_idx(options, 4, value, "csi_report_cfg_s::report_cfg_type_c_::types"); } -// SecurityModeFailure-IEs ::= SEQUENCE -SRSASN_CODE security_mode_fail_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_mode_fail_ies_s::unpack(cbit_ref& bref) +void csi_report_cfg_s::report_quant_c_::set(types::options e) { - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; + type_ = e; } -void security_mode_fail_ies_s::to_json(json_writer& j) const +void csi_report_cfg_s::report_quant_c_::to_json(json_writer& j) const { j.start_obj(); - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + switch (type_) { + case types::none: + break; + case types::cri_ri_pmi_cqi: + break; + case types::cri_ri_i1: + break; + case types::cri_ri_i1_cqi: + j.write_fieldname("cri-RI-i1-CQI"); + j.start_obj(); + if (c.pdsch_bundle_size_for_csi_present) { + j.write_str("pdsch-BundleSizeForCSI", c.pdsch_bundle_size_for_csi.to_string()); + } + j.end_obj(); + break; + case types::cri_ri_cqi: + break; + case types::cri_rsrp: + break; + case types::ssb_idx_rsrp: + break; + case types::cri_ri_li_pmi_cqi: + break; + default: + log_invalid_choice_id(type_, "csi_report_cfg_s::report_quant_c_"); } j.end_obj(); } - -// UEAssistanceInformation-IEs ::= SEQUENCE -SRSASN_CODE ueassist_info_ies_s::pack(bit_ref& bref) const +SRSASN_CODE csi_report_cfg_s::report_quant_c_::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(delay_budget_report_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (delay_budget_report_present) { - HANDLE_CODE(delay_budget_report.pack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); + type_.pack(bref); + switch (type_) { + case types::none: + break; + case types::cri_ri_pmi_cqi: + break; + case types::cri_ri_i1: + break; + case types::cri_ri_i1_cqi: + HANDLE_CODE(bref.pack(c.pdsch_bundle_size_for_csi_present, 1)); + if (c.pdsch_bundle_size_for_csi_present) { + HANDLE_CODE(c.pdsch_bundle_size_for_csi.pack(bref)); + } + break; + case types::cri_ri_cqi: + break; + case types::cri_rsrp: + break; + case types::ssb_idx_rsrp: + break; + case types::cri_ri_li_pmi_cqi: + break; + default: + log_invalid_choice_id(type_, "csi_report_cfg_s::report_quant_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - return SRSASN_SUCCESS; } -SRSASN_CODE ueassist_info_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_report_cfg_s::report_quant_c_::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(delay_budget_report_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (delay_budget_report_present) { - HANDLE_CODE(delay_budget_report.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::none: + break; + case types::cri_ri_pmi_cqi: + break; + case types::cri_ri_i1: + break; + case types::cri_ri_i1_cqi: + HANDLE_CODE(bref.unpack(c.pdsch_bundle_size_for_csi_present, 1)); + if (c.pdsch_bundle_size_for_csi_present) { + HANDLE_CODE(c.pdsch_bundle_size_for_csi.unpack(bref)); + } + break; + case types::cri_ri_cqi: + break; + case types::cri_rsrp: + break; + case types::ssb_idx_rsrp: + break; + case types::cri_ri_li_pmi_cqi: + break; + default: + log_invalid_choice_id(type_, "csi_report_cfg_s::report_quant_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - return SRSASN_SUCCESS; } -void ueassist_info_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (delay_budget_report_present) { - j.write_fieldname("delayBudgetReport"); - delay_budget_report.to_json(j); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UECapabilityInformation-IEs ::= SEQUENCE -SRSASN_CODE ue_cap_info_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ue_cap_rat_container_list_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ue_cap_rat_container_list_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ue_cap_rat_container_list, 0, 8)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_info_ies_s::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 { - HANDLE_CODE(bref.unpack(ue_cap_rat_container_list_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ue_cap_rat_container_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ue_cap_rat_container_list, bref, 0, 8)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; + 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_"); } -void ue_cap_info_ies_s::to_json(json_writer& j) const +uint8_t csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_for_csi_opts::to_number() const { - j.start_obj(); - if (ue_cap_rat_container_list_present) { - j.start_array("ue-CapabilityRAT-ContainerList"); - for (const auto& e1 : ue_cap_rat_container_list) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); + 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_"); } -// ULInformationTransfer-IEs ::= SEQUENCE -SRSASN_CODE ul_info_transfer_ies_s::pack(bit_ref& bref) const +std::string csi_report_cfg_s::report_quant_c_::types_opts::to_string() const { - HANDLE_CODE(bref.pack(ded_nas_msg_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ded_nas_msg_present) { - HANDLE_CODE(ded_nas_msg.pack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; + 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"); } -SRSASN_CODE ul_info_transfer_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ded_nas_msg_present) { - HANDLE_CODE(ded_nas_msg.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - return SRSASN_SUCCESS; -} -void ul_info_transfer_ies_s::to_json(json_writer& j) const +std::string csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::to_string() const { - j.start_obj(); - if (ded_nas_msg_present) { - j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); - } - if (late_non_crit_ext_present) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); + 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_"); } -// CounterCheckResponse ::= SEQUENCE -SRSASN_CODE counter_check_resp_s::pack(bit_ref& bref) const +std::string csi_report_cfg_s::report_freq_cfg_s_::pmi_format_ind_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE counter_check_resp_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); - return SRSASN_SUCCESS; -} -void counter_check_resp_s::to_json(json_writer& j) const +void csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::destroy_() { - j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); + switch (type_) { + case types::subbands3: + c.destroy >(); + break; + case types::subbands4: + c.destroy >(); + break; + case types::subbands5: + c.destroy >(); + break; + case types::subbands6: + c.destroy >(); + break; + case types::subbands7: + c.destroy >(); + break; + case types::subbands8: + c.destroy >(); + break; + case types::subbands9: + c.destroy >(); + break; + case types::subbands10: + c.destroy >(); + break; + case types::subbands11: + c.destroy >(); + break; + case types::subbands12: + c.destroy >(); + break; + case types::subbands13: + c.destroy >(); + break; + case types::subbands14: + c.destroy >(); + break; + case types::subbands15: + c.destroy >(); + break; + case types::subbands16: + c.destroy >(); + break; + case types::subbands17: + c.destroy >(); + break; + case types::subbands18: + c.destroy >(); + break; + case types::subbands19_v1530: + c.destroy >(); + break; + default: + break; + } } - -void counter_check_resp_s::crit_exts_c_::destroy_() +void csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::set(types::options e) { + destroy_(); + type_ = e; switch (type_) { - case types::counter_check_resp: - c.destroy(); + case types::subbands3: + c.init >(); + break; + case types::subbands4: + c.init >(); + break; + case types::subbands5: + c.init >(); + break; + case types::subbands6: + c.init >(); + break; + case types::subbands7: + c.init >(); + break; + case types::subbands8: + c.init >(); + break; + case types::subbands9: + c.init >(); + break; + case types::subbands10: + c.init >(); + break; + case types::subbands11: + c.init >(); + break; + case types::subbands12: + c.init >(); + break; + case types::subbands13: + c.init >(); + break; + case types::subbands14: + c.init >(); + break; + case types::subbands15: + c.init >(); + break; + case types::subbands16: + c.init >(); break; - default: + case types::subbands17: + c.init >(); break; - } -} -void counter_check_resp_s::crit_exts_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::counter_check_resp: - c.init(); + case types::subbands18: + c.init >(); break; - case types::crit_exts_future: + case types::subbands19_v1530: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); } } -counter_check_resp_s::crit_exts_c_::crit_exts_c_(const counter_check_resp_s::crit_exts_c_& other) +csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::csi_report_band_c_( + const csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_& other) { type_ = other.type(); switch (type_) { - case types::counter_check_resp: - c.init(other.c.get()); + case types::subbands3: + c.init(other.c.get >()); break; - case types::crit_exts_future: + case types::subbands4: + c.init(other.c.get >()); + break; + case types::subbands5: + c.init(other.c.get >()); + break; + case types::subbands6: + c.init(other.c.get >()); + break; + case types::subbands7: + c.init(other.c.get >()); + break; + case types::subbands8: + c.init(other.c.get >()); + break; + case types::subbands9: + c.init(other.c.get >()); + break; + case types::subbands10: + c.init(other.c.get >()); + break; + case types::subbands11: + c.init(other.c.get >()); + break; + case types::subbands12: + c.init(other.c.get >()); + break; + case types::subbands13: + c.init(other.c.get >()); + break; + case types::subbands14: + c.init(other.c.get >()); + break; + case types::subbands15: + c.init(other.c.get >()); + break; + case types::subbands16: + c.init(other.c.get >()); + break; + case types::subbands17: + c.init(other.c.get >()); + break; + case types::subbands18: + c.init(other.c.get >()); + break; + case types::subbands19_v1530: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); } } -counter_check_resp_s::crit_exts_c_& counter_check_resp_s::crit_exts_c_:: - operator=(const counter_check_resp_s::crit_exts_c_& other) +csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_& +csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::operator=( + const csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::counter_check_resp: - c.set(other.c.get()); + case types::subbands3: + c.set(other.c.get >()); break; - case types::crit_exts_future: + case types::subbands4: + c.set(other.c.get >()); + break; + case types::subbands5: + c.set(other.c.get >()); + break; + case types::subbands6: + c.set(other.c.get >()); + break; + case types::subbands7: + c.set(other.c.get >()); + break; + case types::subbands8: + c.set(other.c.get >()); + break; + case types::subbands9: + c.set(other.c.get >()); + break; + case types::subbands10: + c.set(other.c.get >()); + break; + case types::subbands11: + c.set(other.c.get >()); + break; + case types::subbands12: + c.set(other.c.get >()); + break; + case types::subbands13: + c.set(other.c.get >()); + break; + case types::subbands14: + c.set(other.c.get >()); + break; + case types::subbands15: + c.set(other.c.get >()); + break; + case types::subbands16: + c.set(other.c.get >()); + break; + case types::subbands17: + c.set(other.c.get >()); + break; + case types::subbands18: + c.set(other.c.get >()); + break; + case types::subbands19_v1530: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); } return *this; } -void counter_check_resp_s::crit_exts_c_::to_json(json_writer& j) const +void csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::counter_check_resp: - j.write_fieldname("counterCheckResponse"); - c.get().to_json(j); + case types::subbands3: + j.write_str("subbands3", c.get >().to_string()); break; - case types::crit_exts_future: + case types::subbands4: + j.write_str("subbands4", c.get >().to_string()); break; - default: - log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE counter_check_resp_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::counter_check_resp: - HANDLE_CODE(c.get().pack(bref)); + case types::subbands5: + j.write_str("subbands5", c.get >().to_string()); break; - case types::crit_exts_future: + case types::subbands6: + j.write_str("subbands6", c.get >().to_string()); break; - default: - log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE counter_check_resp_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::counter_check_resp: - HANDLE_CODE(c.get().unpack(bref)); + case types::subbands7: + j.write_str("subbands7", c.get >().to_string()); break; - case types::crit_exts_future: + case types::subbands8: + j.write_str("subbands8", c.get >().to_string()); + break; + case types::subbands9: + j.write_str("subbands9", c.get >().to_string()); + break; + case types::subbands10: + j.write_str("subbands10", c.get >().to_string()); + break; + case types::subbands11: + j.write_str("subbands11", c.get >().to_string()); + break; + case types::subbands12: + j.write_str("subbands12", c.get >().to_string()); + break; + case types::subbands13: + j.write_str("subbands13", c.get >().to_string()); + break; + case types::subbands14: + j.write_str("subbands14", c.get >().to_string()); + break; + case types::subbands15: + j.write_str("subbands15", c.get >().to_string()); + break; + case types::subbands16: + j.write_str("subbands16", c.get >().to_string()); + break; + case types::subbands17: + j.write_str("subbands17", c.get >().to_string()); + break; + case types::subbands18: + j.write_str("subbands18", c.get >().to_string()); + break; + case types::subbands19_v1530: + j.write_str("subbands19-v1530", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; + log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); } - return SRSASN_SUCCESS; -} - -std::string counter_check_resp_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* options[] = {"counterCheckResponse", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "counter_check_resp_s::crit_exts_c_::types"); -} - -// FailureInformation ::= SEQUENCE -SRSASN_CODE fail_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void fail_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); j.end_obj(); } - -void fail_info_s::crit_exts_c_::destroy_() +SRSASN_CODE csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::pack(bit_ref& bref) const { + type_.pack(bref); switch (type_) { - case types::fail_info: - c.destroy(); + case types::subbands3: + HANDLE_CODE(c.get >().pack(bref)); break; - default: + case types::subbands4: + HANDLE_CODE(c.get >().pack(bref)); break; - } -} -void fail_info_s::crit_exts_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::fail_info: - c.init(); + case types::subbands5: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::crit_exts_future: + case types::subbands6: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::nulltype: + case types::subbands7: + HANDLE_CODE(c.get >().pack(bref)); break; - default: - log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); - } -} -fail_info_s::crit_exts_c_::crit_exts_c_(const fail_info_s::crit_exts_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::fail_info: - c.init(other.c.get()); + case types::subbands8: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::crit_exts_future: + case types::subbands9: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::nulltype: + case types::subbands10: + HANDLE_CODE(c.get >().pack(bref)); break; - default: - log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); - } -} -fail_info_s::crit_exts_c_& fail_info_s::crit_exts_c_::operator=(const fail_info_s::crit_exts_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::fail_info: - c.set(other.c.get()); + case types::subbands11: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::crit_exts_future: + case types::subbands12: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::nulltype: + case types::subbands13: + HANDLE_CODE(c.get >().pack(bref)); break; - default: - log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); - } - - return *this; -} -void fail_info_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::fail_info: - j.write_fieldname("failureInformation"); - c.get().to_json(j); + case types::subbands14: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::crit_exts_future: + case types::subbands15: + HANDLE_CODE(c.get >().pack(bref)); break; - default: - log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE fail_info_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::fail_info: - HANDLE_CODE(c.get().pack(bref)); + case types::subbands16: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::crit_exts_future: + case types::subbands17: + HANDLE_CODE(c.get >().pack(bref)); break; + case types::subbands18: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::subbands19_v1530: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get >().pack(bref)); + } break; default: - log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE fail_info_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::fail_info: - HANDLE_CODE(c.get().unpack(bref)); + case types::subbands3: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::crit_exts_future: + case types::subbands4: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands5: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands6: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands7: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands8: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands9: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands11: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands16: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands17: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::subbands18: + HANDLE_CODE(c.get >().unpack(bref)); break; + case types::subbands19_v1530: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get >().unpack(bref)); + } break; default: - log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string fail_info_s::crit_exts_c_::types_opts::to_string() const +std::string csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types_opts::to_string() const { - static const char* options[] = {"failureInformation", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "fail_info_s::crit_exts_c_::types"); + 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"); } - -// LocationMeasurementIndication ::= SEQUENCE -SRSASN_CODE location_meas_ind_s::pack(bit_ref& bref) const +uint8_t csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types_opts::to_number() const { - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; + 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"); } -SRSASN_CODE location_meas_ind_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - return SRSASN_SUCCESS; -} -void location_meas_ind_s::to_json(json_writer& j) const +std::string csi_report_cfg_s::time_restrict_for_ch_meass_opts::to_string() const { - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); + static const char* options[] = {"configured", "notConfigured"}; + return convert_enum_idx(options, 2, value, "csi_report_cfg_s::time_restrict_for_ch_meass_e_"); } -void location_meas_ind_s::crit_exts_c_::destroy_() -{ - switch (type_) { - case types::location_meas_ind: - c.destroy(); - break; - default: - break; - } -} -void location_meas_ind_s::crit_exts_c_::set(types::options e) +std::string csi_report_cfg_s::time_restrict_for_interference_meass_opts::to_string() const { - destroy_(); - type_ = e; - switch (type_) { - case types::location_meas_ind: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); - } + static const char* options[] = {"configured", "notConfigured"}; + return convert_enum_idx(options, 2, value, "csi_report_cfg_s::time_restrict_for_interference_meass_e_"); } -location_meas_ind_s::crit_exts_c_::crit_exts_c_(const location_meas_ind_s::crit_exts_c_& other) + +std::string csi_report_cfg_s::dummy_opts::to_string() const { - type_ = other.type(); - switch (type_) { - case types::location_meas_ind: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); - } + static const char* options[] = {"n1", "n2"}; + return convert_enum_idx(options, 2, value, "csi_report_cfg_s::dummy_e_"); } -location_meas_ind_s::crit_exts_c_& location_meas_ind_s::crit_exts_c_:: - operator=(const location_meas_ind_s::crit_exts_c_& other) +uint8_t csi_report_cfg_s::dummy_opts::to_number() const { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::location_meas_ind: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); - } + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "csi_report_cfg_s::dummy_e_"); +} - return *this; +void csi_report_cfg_s::group_based_beam_report_c_::set(types::options e) +{ + type_ = e; } -void location_meas_ind_s::crit_exts_c_::to_json(json_writer& j) const +void csi_report_cfg_s::group_based_beam_report_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::location_meas_ind: - j.write_fieldname("locationMeasurementIndication"); - c.get().to_json(j); + case types::enabled: break; - case types::crit_exts_future: + case types::disabled: + j.write_fieldname("disabled"); + j.start_obj(); + if (c.nrof_reported_rs_present) { + j.write_str("nrofReportedRS", c.nrof_reported_rs.to_string()); + } + j.end_obj(); break; default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::group_based_beam_report_c_"); } j.end_obj(); } -SRSASN_CODE location_meas_ind_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE csi_report_cfg_s::group_based_beam_report_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::location_meas_ind: - HANDLE_CODE(c.get().pack(bref)); + case types::enabled: break; - case types::crit_exts_future: + case types::disabled: + HANDLE_CODE(bref.pack(c.nrof_reported_rs_present, 1)); + if (c.nrof_reported_rs_present) { + HANDLE_CODE(c.nrof_reported_rs.pack(bref)); + } break; default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::group_based_beam_report_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE location_meas_ind_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE csi_report_cfg_s::group_based_beam_report_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::location_meas_ind: - HANDLE_CODE(c.get().unpack(bref)); + case types::enabled: break; - case types::crit_exts_future: + case types::disabled: + HANDLE_CODE(bref.unpack(c.nrof_reported_rs_present, 1)); + if (c.nrof_reported_rs_present) { + HANDLE_CODE(c.nrof_reported_rs.unpack(bref)); + } break; default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_report_cfg_s::group_based_beam_report_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string location_meas_ind_s::crit_exts_c_::types_opts::to_string() const +std::string csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported_rs_opts::to_string() const { - static const char* options[] = {"locationMeasurementIndication", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "location_meas_ind_s::crit_exts_c_::types"); + 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_"); } - -// MeasurementReport ::= SEQUENCE -SRSASN_CODE meas_report_s::pack(bit_ref& bref) const +uint8_t csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported_rs_opts::to_number() const { - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE meas_report_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - return SRSASN_SUCCESS; -} -void meas_report_s::to_json(json_writer& j) const +std::string csi_report_cfg_s::group_based_beam_report_c_::types_opts::to_string() const { - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); + static const char* options[] = {"enabled", "disabled"}; + return convert_enum_idx(options, 2, value, "csi_report_cfg_s::group_based_beam_report_c_::types"); } -void meas_report_s::crit_exts_c_::destroy_() -{ - switch (type_) { - case types::meas_report: - c.destroy(); - break; - default: - break; - } -} -void meas_report_s::crit_exts_c_::set(types::options e) +std::string csi_report_cfg_s::cqi_table_opts::to_string() const { - destroy_(); - type_ = e; - switch (type_) { - case types::meas_report: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); - } + static const char* options[] = {"table1", "table2", "table3", "spare1"}; + return convert_enum_idx(options, 4, value, "csi_report_cfg_s::cqi_table_e_"); } -meas_report_s::crit_exts_c_::crit_exts_c_(const meas_report_s::crit_exts_c_& other) +uint8_t csi_report_cfg_s::cqi_table_opts::to_number() const { - type_ = other.type(); - switch (type_) { - case types::meas_report: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); - } + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "csi_report_cfg_s::cqi_table_e_"); } -meas_report_s::crit_exts_c_& meas_report_s::crit_exts_c_::operator=(const meas_report_s::crit_exts_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::meas_report: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); - } - return *this; -} -void meas_report_s::crit_exts_c_::to_json(json_writer& j) const +std::string csi_report_cfg_s::subband_size_opts::to_string() const { - j.start_obj(); - switch (type_) { - case types::meas_report: - j.write_fieldname("measurementReport"); - c.get().to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); - } - j.end_obj(); + static const char* options[] = {"value1", "value2"}; + return convert_enum_idx(options, 2, value, "csi_report_cfg_s::subband_size_e_"); } -SRSASN_CODE meas_report_s::crit_exts_c_::pack(bit_ref& bref) const +uint8_t csi_report_cfg_s::subband_size_opts::to_number() const { - type_.pack(bref); - switch (type_) { - case types::meas_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "csi_report_cfg_s::subband_size_e_"); } -SRSASN_CODE meas_report_s::crit_exts_c_::unpack(cbit_ref& bref) + +std::string csi_report_cfg_s::semi_persistent_on_pusch_v1530_s_::report_slot_cfg_v1530_opts::to_string() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::meas_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + 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_"); } - -std::string meas_report_s::crit_exts_c_::types_opts::to_string() const +uint8_t csi_report_cfg_s::semi_persistent_on_pusch_v1530_s_::report_slot_cfg_v1530_opts::to_number() const { - static const char* options[] = {"measurementReport", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "meas_report_s::crit_exts_c_::types"); + 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_"); } -// RRCReconfigurationComplete ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_s::pack(bit_ref& bref) const +// CSI-ResourceConfig ::= SEQUENCE +SRSASN_CODE csi_res_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, csi_res_cfg_id, (uint8_t)0u, (uint8_t)111u)); + HANDLE_CODE(csi_rs_res_set_list.pack(bref)); + HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(res_type.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE rrc_recfg_complete_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_res_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(csi_res_cfg_id, bref, (uint8_t)0u, (uint8_t)111u)); + HANDLE_CODE(csi_rs_res_set_list.unpack(bref)); + HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(res_type.unpack(bref)); return SRSASN_SUCCESS; } -void rrc_recfg_complete_s::to_json(json_writer& j) const +void csi_res_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_int("csi-ResourceConfigId", csi_res_cfg_id); + j.write_fieldname("csi-RS-ResourceSetList"); + csi_rs_res_set_list.to_json(j); + j.write_int("bwp-Id", bwp_id); + j.write_str("resourceType", res_type.to_string()); j.end_obj(); } -void rrc_recfg_complete_s::crit_exts_c_::destroy_() +void csi_res_cfg_s::csi_rs_res_set_list_c_::destroy_() { switch (type_) { - case types::rrc_recfg_complete: - c.destroy(); + case types::nzp_csi_rs_ssb: + c.destroy(); + break; + case types::csi_im_res_set_list: + c.destroy(); break; default: break; } } -void rrc_recfg_complete_s::crit_exts_c_::set(types::options e) +void csi_res_cfg_s::csi_rs_res_set_list_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::rrc_recfg_complete: - c.init(); + case types::nzp_csi_rs_ssb: + c.init(); break; - case types::crit_exts_future: + case types::csi_im_res_set_list: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); } } -rrc_recfg_complete_s::crit_exts_c_::crit_exts_c_(const rrc_recfg_complete_s::crit_exts_c_& other) +csi_res_cfg_s::csi_rs_res_set_list_c_::csi_rs_res_set_list_c_(const csi_res_cfg_s::csi_rs_res_set_list_c_& other) { type_ = other.type(); switch (type_) { - case types::rrc_recfg_complete: - c.init(other.c.get()); + case types::nzp_csi_rs_ssb: + c.init(other.c.get()); break; - case types::crit_exts_future: + case types::csi_im_res_set_list: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); } } -rrc_recfg_complete_s::crit_exts_c_& rrc_recfg_complete_s::crit_exts_c_:: - operator=(const rrc_recfg_complete_s::crit_exts_c_& other) +csi_res_cfg_s::csi_rs_res_set_list_c_& +csi_res_cfg_s::csi_rs_res_set_list_c_::operator=(const csi_res_cfg_s::csi_rs_res_set_list_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_recfg_complete: - c.set(other.c.get()); + case types::nzp_csi_rs_ssb: + c.set(other.c.get()); break; - case types::crit_exts_future: + case types::csi_im_res_set_list: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); } return *this; } -void rrc_recfg_complete_s::crit_exts_c_::to_json(json_writer& j) const +void csi_res_cfg_s::csi_rs_res_set_list_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_recfg_complete: - j.write_fieldname("rrcReconfigurationComplete"); - c.get().to_json(j); + case types::nzp_csi_rs_ssb: + j.write_fieldname("nzp-CSI-RS-SSB"); + j.start_obj(); + if (c.get().nzp_csi_rs_res_set_list_present) { + j.start_array("nzp-CSI-RS-ResourceSetList"); + 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 (const auto& e1 : c.get().csi_ssb_res_set_list) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); break; - case types::crit_exts_future: + case types::csi_im_res_set_list: + j.start_array("csi-IM-ResourceSetList"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); break; default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); } j.end_obj(); } -SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE csi_res_cfg_s::csi_rs_res_set_list_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rrc_recfg_complete: - HANDLE_CODE(c.get().pack(bref)); + case types::nzp_csi_rs_ssb: + HANDLE_CODE(bref.pack(c.get().nzp_csi_rs_res_set_list_present, 1)); + HANDLE_CODE(bref.pack(c.get().csi_ssb_res_set_list_present, 1)); + if (c.get().nzp_csi_rs_res_set_list_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get().nzp_csi_rs_res_set_list, 1, 16, integer_packer(0, 63))); + } + if (c.get().csi_ssb_res_set_list_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + &(c.get().csi_ssb_res_set_list)[0], + c.get().csi_ssb_res_set_list.size(), + integer_packer(0, 63))); + } break; - case types::crit_exts_future: + case types::csi_im_res_set_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16, integer_packer(0, 63))); break; default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE csi_res_cfg_s::csi_rs_res_set_list_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rrc_recfg_complete: - HANDLE_CODE(c.get().unpack(bref)); + case types::nzp_csi_rs_ssb: + HANDLE_CODE(bref.unpack(c.get().nzp_csi_rs_res_set_list_present, 1)); + HANDLE_CODE(bref.unpack(c.get().csi_ssb_res_set_list_present, 1)); + if (c.get().nzp_csi_rs_res_set_list_present) { + HANDLE_CODE(unpack_dyn_seq_of( + c.get().nzp_csi_rs_res_set_list, bref, 1, 16, integer_packer(0, 63))); + } + if (c.get().csi_ssb_res_set_list_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().csi_ssb_res_set_list)[0], + bref, + c.get().csi_ssb_res_set_list.size(), + integer_packer(0, 63))); + } break; - case types::crit_exts_future: + case types::csi_im_res_set_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16, integer_packer(0, 63))); break; default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "csi_res_cfg_s::csi_rs_res_set_list_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rrc_recfg_complete_s::crit_exts_c_::types_opts::to_string() const +std::string csi_res_cfg_s::csi_rs_res_set_list_c_::types_opts::to_string() const { - static const char* options[] = {"rrcReconfigurationComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_recfg_complete_s::crit_exts_c_::types"); + 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"); } -// RRCReestablishmentComplete ::= SEQUENCE -SRSASN_CODE rrc_reest_complete_s::pack(bit_ref& bref) const +std::string csi_res_cfg_s::res_type_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + static const char* options[] = {"aperiodic", "semiPersistent", "periodic"}; + return convert_enum_idx(options, 3, value, "csi_res_cfg_s::res_type_e_"); +} + +// CSI-SSB-ResourceSet ::= SEQUENCE +SRSASN_CODE csi_ssb_res_set_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, csi_ssb_res_set_id, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_dyn_seq_of(bref, csi_ssb_res_list, 1, 64, integer_packer(0, 63))); return SRSASN_SUCCESS; } -SRSASN_CODE rrc_reest_complete_s::unpack(cbit_ref& bref) +SRSASN_CODE csi_ssb_res_set_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(csi_ssb_res_set_id, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_dyn_seq_of(csi_ssb_res_list, bref, 1, 64, integer_packer(0, 63))); return SRSASN_SUCCESS; } -void rrc_reest_complete_s::to_json(json_writer& j) const +void csi_ssb_res_set_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_int("csi-SSB-ResourceSetId", csi_ssb_res_set_id); + j.start_array("csi-SSB-ResourceList"); + for (const auto& e1 : csi_ssb_res_list) { + j.write_int(e1); + } + j.end_array(); j.end_obj(); } -void rrc_reest_complete_s::crit_exts_c_::destroy_() -{ - switch (type_) { - case types::rrc_reest_complete: - c.destroy(); - break; - default: - break; - } -} -void rrc_reest_complete_s::crit_exts_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::rrc_reest_complete: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); - } -} -rrc_reest_complete_s::crit_exts_c_::crit_exts_c_(const rrc_reest_complete_s::crit_exts_c_& other) +// NZP-CSI-RS-Resource ::= SEQUENCE +SRSASN_CODE nzp_csi_rs_res_s::pack(bit_ref& bref) const { - type_ = other.type(); - switch (type_) { - case types::rrc_reest_complete: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pwr_ctrl_offset_ss_present, 1)); + HANDLE_CODE(bref.pack(periodicity_and_offset_present, 1)); + HANDLE_CODE(bref.pack(qcl_info_periodic_csi_rs_present, 1)); + + HANDLE_CODE(pack_integer(bref, nzp_csi_rs_res_id, (uint8_t)0u, (uint8_t)191u)); + HANDLE_CODE(res_map.pack(bref)); + HANDLE_CODE(pack_integer(bref, pwr_ctrl_offset, (int8_t)-8, (int8_t)15)); + if (pwr_ctrl_offset_ss_present) { + HANDLE_CODE(pwr_ctrl_offset_ss.pack(bref)); } -} -rrc_reest_complete_s::crit_exts_c_& rrc_reest_complete_s::crit_exts_c_:: - operator=(const rrc_reest_complete_s::crit_exts_c_& other) -{ - if (this == &other) { - return *this; + HANDLE_CODE(pack_integer(bref, scrambling_id, (uint16_t)0u, (uint16_t)1023u)); + if (periodicity_and_offset_present) { + HANDLE_CODE(periodicity_and_offset.pack(bref)); } - set(other.type()); - switch (type_) { - case types::rrc_reest_complete: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); + if (qcl_info_periodic_csi_rs_present) { + HANDLE_CODE(pack_integer(bref, qcl_info_periodic_csi_rs, (uint8_t)0u, (uint8_t)127u)); } - return *this; -} -void rrc_reest_complete_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_reest_complete: - j.write_fieldname("rrcReestablishmentComplete"); - c.get().to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_reest_complete_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_reest_complete: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_reest_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE nzp_csi_rs_res_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_reest_complete: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_reest_complete_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pwr_ctrl_offset_ss_present, 1)); + HANDLE_CODE(bref.unpack(periodicity_and_offset_present, 1)); + HANDLE_CODE(bref.unpack(qcl_info_periodic_csi_rs_present, 1)); + + HANDLE_CODE(unpack_integer(nzp_csi_rs_res_id, bref, (uint8_t)0u, (uint8_t)191u)); + HANDLE_CODE(res_map.unpack(bref)); + HANDLE_CODE(unpack_integer(pwr_ctrl_offset, bref, (int8_t)-8, (int8_t)15)); + if (pwr_ctrl_offset_ss_present) { + HANDLE_CODE(pwr_ctrl_offset_ss.unpack(bref)); + } + HANDLE_CODE(unpack_integer(scrambling_id, bref, (uint16_t)0u, (uint16_t)1023u)); + if (periodicity_and_offset_present) { + HANDLE_CODE(periodicity_and_offset.unpack(bref)); } + if (qcl_info_periodic_csi_rs_present) { + HANDLE_CODE(unpack_integer(qcl_info_periodic_csi_rs, bref, (uint8_t)0u, (uint8_t)127u)); + } + return SRSASN_SUCCESS; } +void nzp_csi_rs_res_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("nzp-CSI-RS-ResourceId", nzp_csi_rs_res_id); + j.write_fieldname("resourceMapping"); + res_map.to_json(j); + j.write_int("powerControlOffset", pwr_ctrl_offset); + if (pwr_ctrl_offset_ss_present) { + j.write_str("powerControlOffsetSS", pwr_ctrl_offset_ss.to_string()); + } + j.write_int("scramblingID", scrambling_id); + if (periodicity_and_offset_present) { + j.write_fieldname("periodicityAndOffset"); + periodicity_and_offset.to_json(j); + } + if (qcl_info_periodic_csi_rs_present) { + j.write_int("qcl-InfoPeriodicCSI-RS", qcl_info_periodic_csi_rs); + } + j.end_obj(); +} -std::string rrc_reest_complete_s::crit_exts_c_::types_opts::to_string() const +std::string nzp_csi_rs_res_s::pwr_ctrl_offset_ss_opts::to_string() const { - static const char* options[] = {"rrcReestablishmentComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_reest_complete_s::crit_exts_c_::types"); + 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 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_"); } -// RRCResumeComplete ::= SEQUENCE -SRSASN_CODE rrc_resume_complete_s::pack(bit_ref& bref) const +// NZP-CSI-RS-ResourceSet ::= SEQUENCE +SRSASN_CODE nzp_csi_rs_res_set_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(repeat_present, 1)); + HANDLE_CODE(bref.pack(aperiodic_trigger_offset_present, 1)); + HANDLE_CODE(bref.pack(trs_info_present, 1)); + + HANDLE_CODE(pack_integer(bref, nzp_csi_res_set_id, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res, 1, 64, integer_packer(0, 191))); + if (repeat_present) { + HANDLE_CODE(repeat.pack(bref)); + } + if (aperiodic_trigger_offset_present) { + HANDLE_CODE(pack_integer(bref, aperiodic_trigger_offset, (uint8_t)0u, (uint8_t)6u)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_resume_complete_s::unpack(cbit_ref& bref) +SRSASN_CODE nzp_csi_rs_res_set_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(repeat_present, 1)); + HANDLE_CODE(bref.unpack(aperiodic_trigger_offset_present, 1)); + HANDLE_CODE(bref.unpack(trs_info_present, 1)); + + HANDLE_CODE(unpack_integer(nzp_csi_res_set_id, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res, bref, 1, 64, integer_packer(0, 191))); + if (repeat_present) { + HANDLE_CODE(repeat.unpack(bref)); + } + if (aperiodic_trigger_offset_present) { + HANDLE_CODE(unpack_integer(aperiodic_trigger_offset, bref, (uint8_t)0u, (uint8_t)6u)); + } return SRSASN_SUCCESS; } -void rrc_resume_complete_s::to_json(json_writer& j) const +void nzp_csi_rs_res_set_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_int("nzp-CSI-ResourceSetId", nzp_csi_res_set_id); + j.start_array("nzp-CSI-RS-Resources"); + for (const auto& e1 : nzp_csi_rs_res) { + j.write_int(e1); + } + j.end_array(); + if (repeat_present) { + j.write_str("repetition", repeat.to_string()); + } + if (aperiodic_trigger_offset_present) { + j.write_int("aperiodicTriggeringOffset", aperiodic_trigger_offset); + } + if (trs_info_present) { + j.write_str("trs-Info", "true"); + } j.end_obj(); } -void rrc_resume_complete_s::crit_exts_c_::destroy_() +std::string nzp_csi_rs_res_set_s::repeat_opts::to_string() const { - switch (type_) { - case types::rrc_resume_complete: - c.destroy(); - break; - default: - break; - } + static const char* options[] = {"on", "off"}; + return convert_enum_idx(options, 2, value, "nzp_csi_rs_res_set_s::repeat_e_"); } -void rrc_resume_complete_s::crit_exts_c_::set(types::options e) + +// CSI-MeasConfig ::= SEQUENCE +SRSASN_CODE csi_meas_cfg_s::pack(bit_ref& bref) const { - destroy_(); - type_ = e; - switch (type_) { - case types::rrc_resume_complete: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(nzp_csi_rs_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(nzp_csi_rs_res_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(nzp_csi_rs_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(nzp_csi_rs_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(csi_im_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(csi_im_res_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(csi_im_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(csi_im_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(csi_ssb_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(csi_ssb_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(csi_res_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(csi_res_cfg_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(csi_report_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(csi_report_cfg_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(report_trigger_size_present, 1)); + HANDLE_CODE(bref.pack(aperiodic_trigger_state_list_present, 1)); + HANDLE_CODE(bref.pack(semi_persistent_on_pusch_trigger_state_list_present, 1)); + + if (nzp_csi_rs_res_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res_to_add_mod_list, 1, 192)); } -} -rrc_resume_complete_s::crit_exts_c_::crit_exts_c_(const rrc_resume_complete_s::crit_exts_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::rrc_resume_complete: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); + if (nzp_csi_rs_res_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res_to_release_list, 1, 192, integer_packer(0, 191))); } -} -rrc_resume_complete_s::crit_exts_c_& rrc_resume_complete_s::crit_exts_c_:: - operator=(const rrc_resume_complete_s::crit_exts_c_& other) -{ - if (this == &other) { - return *this; + if (nzp_csi_rs_res_set_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res_set_to_add_mod_list, 1, 64)); } - set(other.type()); - switch (type_) { - case types::rrc_resume_complete: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); + if (nzp_csi_rs_res_set_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, nzp_csi_rs_res_set_to_release_list, 1, 64, integer_packer(0, 63))); + } + if (csi_im_res_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res_to_add_mod_list, 1, 32)); + } + if (csi_im_res_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res_to_release_list, 1, 32, integer_packer(0, 31))); + } + if (csi_im_res_set_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res_set_to_add_mod_list, 1, 64)); + } + if (csi_im_res_set_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_res_set_to_release_list, 1, 64, integer_packer(0, 63))); + } + if (csi_ssb_res_set_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_ssb_res_set_to_add_mod_list, 1, 64)); + } + if (csi_ssb_res_set_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_ssb_res_set_to_release_list, 1, 64, integer_packer(0, 63))); + } + if (csi_res_cfg_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_res_cfg_to_add_mod_list, 1, 112)); + } + if (csi_res_cfg_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_res_cfg_to_release_list, 1, 112, integer_packer(0, 111))); + } + if (csi_report_cfg_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_report_cfg_to_add_mod_list, 1, 48)); + } + if (csi_report_cfg_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_report_cfg_to_release_list, 1, 48, integer_packer(0, 47))); + } + if (report_trigger_size_present) { + HANDLE_CODE(pack_integer(bref, report_trigger_size, (uint8_t)0u, (uint8_t)6u)); + } + if (aperiodic_trigger_state_list_present) { + HANDLE_CODE(aperiodic_trigger_state_list.pack(bref)); + } + if (semi_persistent_on_pusch_trigger_state_list_present) { + HANDLE_CODE(semi_persistent_on_pusch_trigger_state_list.pack(bref)); } - return *this; + return SRSASN_SUCCESS; } -void rrc_resume_complete_s::crit_exts_c_::to_json(json_writer& j) const +SRSASN_CODE csi_meas_cfg_s::unpack(cbit_ref& bref) { - j.start_obj(); - switch (type_) { - case types::rrc_resume_complete: - j.write_fieldname("rrcResumeComplete"); - c.get().to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(nzp_csi_rs_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(nzp_csi_rs_res_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(nzp_csi_rs_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(nzp_csi_rs_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_res_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_res_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_ssb_res_set_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_ssb_res_set_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_res_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_res_cfg_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_report_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_report_cfg_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(report_trigger_size_present, 1)); + HANDLE_CODE(bref.unpack(aperiodic_trigger_state_list_present, 1)); + HANDLE_CODE(bref.unpack(semi_persistent_on_pusch_trigger_state_list_present, 1)); + + if (nzp_csi_rs_res_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res_to_add_mod_list, bref, 1, 192)); } - j.end_obj(); -} -SRSASN_CODE rrc_resume_complete_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_resume_complete: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (nzp_csi_rs_res_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res_to_release_list, bref, 1, 192, integer_packer(0, 191))); + } + if (nzp_csi_rs_res_set_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res_set_to_add_mod_list, bref, 1, 64)); + } + if (nzp_csi_rs_res_set_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(nzp_csi_rs_res_set_to_release_list, bref, 1, 64, integer_packer(0, 63))); + } + if (csi_im_res_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_res_to_add_mod_list, bref, 1, 32)); + } + if (csi_im_res_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_res_to_release_list, bref, 1, 32, integer_packer(0, 31))); + } + if (csi_im_res_set_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_res_set_to_add_mod_list, bref, 1, 64)); + } + if (csi_im_res_set_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_res_set_to_release_list, bref, 1, 64, integer_packer(0, 63))); + } + if (csi_ssb_res_set_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_ssb_res_set_to_add_mod_list, bref, 1, 64)); + } + if (csi_ssb_res_set_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_ssb_res_set_to_release_list, bref, 1, 64, integer_packer(0, 63))); + } + if (csi_res_cfg_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_res_cfg_to_add_mod_list, bref, 1, 112)); + } + if (csi_res_cfg_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_res_cfg_to_release_list, bref, 1, 112, integer_packer(0, 111))); } + if (csi_report_cfg_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_report_cfg_to_add_mod_list, bref, 1, 48)); + } + if (csi_report_cfg_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_report_cfg_to_release_list, bref, 1, 48, integer_packer(0, 47))); + } + if (report_trigger_size_present) { + HANDLE_CODE(unpack_integer(report_trigger_size, bref, (uint8_t)0u, (uint8_t)6u)); + } + if (aperiodic_trigger_state_list_present) { + HANDLE_CODE(aperiodic_trigger_state_list.unpack(bref)); + } + if (semi_persistent_on_pusch_trigger_state_list_present) { + HANDLE_CODE(semi_persistent_on_pusch_trigger_state_list.unpack(bref)); + } + return SRSASN_SUCCESS; } -SRSASN_CODE rrc_resume_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +void csi_meas_cfg_s::to_json(json_writer& j) const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_resume_complete: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; + j.start_obj(); + if (nzp_csi_rs_res_to_add_mod_list_present) { + j.start_array("nzp-CSI-RS-ResourceToAddModList"); + for (const auto& e1 : nzp_csi_rs_res_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); } - return SRSASN_SUCCESS; + if (nzp_csi_rs_res_to_release_list_present) { + j.start_array("nzp-CSI-RS-ResourceToReleaseList"); + 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 (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 (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 (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 (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 (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 (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 (const auto& e1 : csi_ssb_res_set_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); + } + if (csi_ssb_res_set_to_release_list_present) { + j.start_array("csi-SSB-ResourceSetToReleaseList"); + for (const auto& e1 : csi_ssb_res_set_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (csi_res_cfg_to_add_mod_list_present) { + j.start_array("csi-ResourceConfigToAddModList"); + 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 (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 (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 (const auto& e1 : csi_report_cfg_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (report_trigger_size_present) { + j.write_int("reportTriggerSize", report_trigger_size); + } + if (aperiodic_trigger_state_list_present) { + j.write_fieldname("aperiodicTriggerStateList"); + aperiodic_trigger_state_list.to_json(j); + } + if (semi_persistent_on_pusch_trigger_state_list_present) { + j.write_fieldname("semiPersistentOnPUSCH-TriggerStateList"); + semi_persistent_on_pusch_trigger_state_list.to_json(j); + } + j.end_obj(); } -std::string rrc_resume_complete_s::crit_exts_c_::types_opts::to_string() const +// EUTRA-MBSFN-SubframeConfig ::= SEQUENCE +SRSASN_CODE eutra_mbsfn_sf_cfg_s::pack(bit_ref& bref) const { - static const char* options[] = {"rrcResumeComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_resume_complete_s::crit_exts_c_::types"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sf_alloc2_present, 1)); -// RRCSetupComplete ::= SEQUENCE -SRSASN_CODE rrc_setup_complete_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + HANDLE_CODE(radioframe_alloc_period.pack(bref)); + HANDLE_CODE(pack_integer(bref, radioframe_alloc_offset, (uint8_t)0u, (uint8_t)7u)); + HANDLE_CODE(sf_alloc1.pack(bref)); + if (sf_alloc2_present) { + HANDLE_CODE(sf_alloc2.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_setup_complete_s::unpack(cbit_ref& bref) +SRSASN_CODE eutra_mbsfn_sf_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sf_alloc2_present, 1)); + + HANDLE_CODE(radioframe_alloc_period.unpack(bref)); + HANDLE_CODE(unpack_integer(radioframe_alloc_offset, bref, (uint8_t)0u, (uint8_t)7u)); + HANDLE_CODE(sf_alloc1.unpack(bref)); + if (sf_alloc2_present) { + HANDLE_CODE(sf_alloc2.unpack(bref)); + } return SRSASN_SUCCESS; } -void rrc_setup_complete_s::to_json(json_writer& j) const +void eutra_mbsfn_sf_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_str("radioframeAllocationPeriod", radioframe_alloc_period.to_string()); + j.write_int("radioframeAllocationOffset", radioframe_alloc_offset); + j.write_fieldname("subframeAllocation1"); + sf_alloc1.to_json(j); + if (sf_alloc2_present) { + j.write_fieldname("subframeAllocation2"); + sf_alloc2.to_json(j); + } j.end_obj(); } -void rrc_setup_complete_s::crit_exts_c_::destroy_() +std::string eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_string() const +{ + 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 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_() { switch (type_) { - case types::rrc_setup_complete: - c.destroy(); + case types::one_frame: + c.destroy >(); + break; + case types::four_frames: + c.destroy >(); break; default: break; } } -void rrc_setup_complete_s::crit_exts_c_::set(types::options e) +void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::rrc_setup_complete: - c.init(); + case types::one_frame: + c.init >(); break; - case types::crit_exts_future: + case types::four_frames: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); } } -rrc_setup_complete_s::crit_exts_c_::crit_exts_c_(const rrc_setup_complete_s::crit_exts_c_& other) +eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::sf_alloc1_c_(const eutra_mbsfn_sf_cfg_s::sf_alloc1_c_& other) { type_ = other.type(); switch (type_) { - case types::rrc_setup_complete: - c.init(other.c.get()); + case types::one_frame: + c.init(other.c.get >()); break; - case types::crit_exts_future: + case types::four_frames: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); } } -rrc_setup_complete_s::crit_exts_c_& rrc_setup_complete_s::crit_exts_c_:: - operator=(const rrc_setup_complete_s::crit_exts_c_& other) +eutra_mbsfn_sf_cfg_s::sf_alloc1_c_& +eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::operator=(const eutra_mbsfn_sf_cfg_s::sf_alloc1_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::rrc_setup_complete: - c.set(other.c.get()); + case types::one_frame: + c.set(other.c.get >()); break; - case types::crit_exts_future: + case types::four_frames: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); } return *this; } -void rrc_setup_complete_s::crit_exts_c_::to_json(json_writer& j) const +void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::rrc_setup_complete: - j.write_fieldname("rrcSetupComplete"); - c.get().to_json(j); + case types::one_frame: + j.write_str("oneFrame", c.get >().to_string()); break; - case types::crit_exts_future: + case types::four_frames: + j.write_str("fourFrames", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); } j.end_obj(); } -SRSASN_CODE rrc_setup_complete_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::rrc_setup_complete: - HANDLE_CODE(c.get().pack(bref)); + case types::one_frame: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::crit_exts_future: + case types::four_frames: + HANDLE_CODE(c.get >().pack(bref)); break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_setup_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::rrc_setup_complete: - HANDLE_CODE(c.get().unpack(bref)); + case types::one_frame: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::crit_exts_future: + case types::four_frames: + HANDLE_CODE(c.get >().unpack(bref)); break; default: - log_invalid_choice_id(type_, "rrc_setup_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string rrc_setup_complete_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* options[] = {"rrcSetupComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "rrc_setup_complete_s::crit_exts_c_::types"); -} - -// SecurityModeComplete ::= SEQUENCE -SRSASN_CODE security_mode_complete_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_mode_complete_s::unpack(cbit_ref& bref) +std::string eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_string() const { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; + static const char* options[] = {"oneFrame", "fourFrames"}; + return convert_enum_idx(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); } -void security_mode_complete_s::to_json(json_writer& j) const +uint8_t eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_number() const { - j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); + static const uint8_t options[] = {1, 4}; + return map_enum_number(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); } -void security_mode_complete_s::crit_exts_c_::destroy_() +void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::destroy_() { switch (type_) { - case types::security_mode_complete: - c.destroy(); + case types::one_frame: + c.destroy >(); + break; + case types::four_frames: + c.destroy >(); break; default: break; } } -void security_mode_complete_s::crit_exts_c_::set(types::options e) +void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::security_mode_complete: - c.init(); + case types::one_frame: + c.init >(); break; - case types::crit_exts_future: + case types::four_frames: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); } } -security_mode_complete_s::crit_exts_c_::crit_exts_c_(const security_mode_complete_s::crit_exts_c_& other) +eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::sf_alloc2_c_(const eutra_mbsfn_sf_cfg_s::sf_alloc2_c_& other) { type_ = other.type(); switch (type_) { - case types::security_mode_complete: - c.init(other.c.get()); + case types::one_frame: + c.init(other.c.get >()); break; - case types::crit_exts_future: + case types::four_frames: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); } } -security_mode_complete_s::crit_exts_c_& security_mode_complete_s::crit_exts_c_:: - operator=(const security_mode_complete_s::crit_exts_c_& other) +eutra_mbsfn_sf_cfg_s::sf_alloc2_c_& +eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::operator=(const eutra_mbsfn_sf_cfg_s::sf_alloc2_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::security_mode_complete: - c.set(other.c.get()); + case types::one_frame: + c.set(other.c.get >()); break; - case types::crit_exts_future: + case types::four_frames: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); } return *this; } -void security_mode_complete_s::crit_exts_c_::to_json(json_writer& j) const +void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::security_mode_complete: - j.write_fieldname("securityModeComplete"); - c.get().to_json(j); + case types::one_frame: + j.write_str("oneFrame", c.get >().to_string()); break; - case types::crit_exts_future: + case types::four_frames: + j.write_str("fourFrames", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); } j.end_obj(); } -SRSASN_CODE security_mode_complete_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::security_mode_complete: - HANDLE_CODE(c.get().pack(bref)); + case types::one_frame: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::crit_exts_future: + case types::four_frames: + HANDLE_CODE(c.get >().pack(bref)); break; default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE security_mode_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::security_mode_complete: - HANDLE_CODE(c.get().unpack(bref)); + case types::one_frame: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::crit_exts_future: + case types::four_frames: + HANDLE_CODE(c.get >().unpack(bref)); break; default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string security_mode_complete_s::crit_exts_c_::types_opts::to_string() const +std::string eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types_opts::to_string() const { - static const char* options[] = {"securityModeComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "security_mode_complete_s::crit_exts_c_::types"); + 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 const uint8_t options[] = {1, 4}; + return map_enum_number(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types"); } -// SecurityModeFailure ::= SEQUENCE -SRSASN_CODE security_mode_fail_s::pack(bit_ref& bref) const +// SRS-CC-SetIndex ::= SEQUENCE +SRSASN_CODE srs_cc_set_idx_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + HANDLE_CODE(bref.pack(cc_set_idx_present, 1)); + HANDLE_CODE(bref.pack(cc_idx_in_one_cc_set_present, 1)); + + if (cc_set_idx_present) { + HANDLE_CODE(pack_integer(bref, cc_set_idx, (uint8_t)0u, (uint8_t)3u)); + } + if (cc_idx_in_one_cc_set_present) { + HANDLE_CODE(pack_integer(bref, cc_idx_in_one_cc_set, (uint8_t)0u, (uint8_t)7u)); + } return SRSASN_SUCCESS; } -SRSASN_CODE security_mode_fail_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_cc_set_idx_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + HANDLE_CODE(bref.unpack(cc_set_idx_present, 1)); + HANDLE_CODE(bref.unpack(cc_idx_in_one_cc_set_present, 1)); + + if (cc_set_idx_present) { + HANDLE_CODE(unpack_integer(cc_set_idx, bref, (uint8_t)0u, (uint8_t)3u)); + } + if (cc_idx_in_one_cc_set_present) { + HANDLE_CODE(unpack_integer(cc_idx_in_one_cc_set, bref, (uint8_t)0u, (uint8_t)7u)); + } return SRSASN_SUCCESS; } -void security_mode_fail_s::to_json(json_writer& j) const +void srs_cc_set_idx_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + if (cc_set_idx_present) { + j.write_int("cc-SetIndex", cc_set_idx); + } + if (cc_idx_in_one_cc_set_present) { + j.write_int("cc-IndexInOneCC-Set", cc_idx_in_one_cc_set); + } j.end_obj(); } -void security_mode_fail_s::crit_exts_c_::destroy_() +// SlotFormatCombination ::= SEQUENCE +SRSASN_CODE slot_format_combination_s::pack(bit_ref& bref) const { - switch (type_) { - case types::security_mode_fail: - c.destroy(); - break; - default: - break; + HANDLE_CODE(pack_integer(bref, slot_format_combination_id, (uint16_t)0u, (uint16_t)511u)); + HANDLE_CODE(pack_dyn_seq_of(bref, slot_formats, 1, 256, integer_packer(0, 255))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE slot_format_combination_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(slot_format_combination_id, bref, (uint16_t)0u, (uint16_t)511u)); + HANDLE_CODE(unpack_dyn_seq_of(slot_formats, bref, 1, 256, integer_packer(0, 255))); + + return SRSASN_SUCCESS; +} +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 (const auto& e1 : slot_formats) { + j.write_int(e1); } + j.end_array(); + j.end_obj(); } -void security_mode_fail_s::crit_exts_c_::set(types::options e) + +// FrequencyInfoDL ::= SEQUENCE +SRSASN_CODE freq_info_dl_s::pack(bit_ref& bref) const { - destroy_(); - type_ = e; - switch (type_) { - case types::security_mode_fail: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(absolute_freq_ssb_present, 1)); + + if (absolute_freq_ssb_present) { + HANDLE_CODE(pack_integer(bref, absolute_freq_ssb, (uint32_t)0u, (uint32_t)3279165u)); } + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8, integer_packer(1, 1024))); + HANDLE_CODE(pack_integer(bref, absolute_freq_point_a, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_dyn_seq_of(bref, scs_specific_carrier_list, 1, 5)); + + return SRSASN_SUCCESS; } -security_mode_fail_s::crit_exts_c_::crit_exts_c_(const security_mode_fail_s::crit_exts_c_& other) +SRSASN_CODE freq_info_dl_s::unpack(cbit_ref& bref) { - type_ = other.type(); - switch (type_) { - case types::security_mode_fail: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(absolute_freq_ssb_present, 1)); + + if (absolute_freq_ssb_present) { + HANDLE_CODE(unpack_integer(absolute_freq_ssb, bref, (uint32_t)0u, (uint32_t)3279165u)); } + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8, integer_packer(1, 1024))); + HANDLE_CODE(unpack_integer(absolute_freq_point_a, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_dyn_seq_of(scs_specific_carrier_list, bref, 1, 5)); + + return SRSASN_SUCCESS; } -security_mode_fail_s::crit_exts_c_& security_mode_fail_s::crit_exts_c_:: - operator=(const security_mode_fail_s::crit_exts_c_& other) +void freq_info_dl_s::to_json(json_writer& j) const { - if (this == &other) { - return *this; + j.start_obj(); + if (absolute_freq_ssb_present) { + j.write_int("absoluteFrequencySSB", absolute_freq_ssb); } - set(other.type()); - switch (type_) { - case types::security_mode_fail: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + j.start_array("frequencyBandList"); + 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 (const auto& e1 : scs_specific_carrier_list) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// FrequencyInfoUL ::= SEQUENCE +SRSASN_CODE freq_info_ul_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(freq_band_list_present, 1)); + HANDLE_CODE(bref.pack(absolute_freq_point_a_present, 1)); + HANDLE_CODE(bref.pack(add_spec_emission_present, 1)); + HANDLE_CODE(bref.pack(p_max_present, 1)); + HANDLE_CODE(bref.pack(freq_shift7p5khz_present, 1)); + + if (freq_band_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8, integer_packer(1, 1024))); + } + if (absolute_freq_point_a_present) { + HANDLE_CODE(pack_integer(bref, absolute_freq_point_a, (uint32_t)0u, (uint32_t)3279165u)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, scs_specific_carrier_list, 1, 5)); + if (add_spec_emission_present) { + HANDLE_CODE(pack_integer(bref, add_spec_emission, (uint8_t)0u, (uint8_t)7u)); + } + if (p_max_present) { + HANDLE_CODE(pack_integer(bref, p_max, (int8_t)-30, (int8_t)33)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_info_ul_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); + HANDLE_CODE(bref.unpack(absolute_freq_point_a_present, 1)); + HANDLE_CODE(bref.unpack(add_spec_emission_present, 1)); + HANDLE_CODE(bref.unpack(p_max_present, 1)); + HANDLE_CODE(bref.unpack(freq_shift7p5khz_present, 1)); + + if (freq_band_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8, integer_packer(1, 1024))); + } + if (absolute_freq_point_a_present) { + HANDLE_CODE(unpack_integer(absolute_freq_point_a, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + HANDLE_CODE(unpack_dyn_seq_of(scs_specific_carrier_list, bref, 1, 5)); + if (add_spec_emission_present) { + HANDLE_CODE(unpack_integer(add_spec_emission, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (p_max_present) { + HANDLE_CODE(unpack_integer(p_max, bref, (int8_t)-30, (int8_t)33)); + } + + return SRSASN_SUCCESS; +} +void freq_info_ul_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_list_present) { + j.start_array("frequencyBandList"); + for (const auto& e1 : freq_band_list) { + j.write_int(e1); + } + j.end_array(); + } + if (absolute_freq_point_a_present) { + j.write_int("absoluteFrequencyPointA", absolute_freq_point_a); + } + j.start_array("scs-SpecificCarrierList"); + for (const auto& e1 : scs_specific_carrier_list) { + e1.to_json(j); + } + j.end_array(); + if (add_spec_emission_present) { + j.write_int("additionalSpectrumEmission", add_spec_emission); + } + if (p_max_present) { + j.write_int("p-Max", p_max); + } + if (freq_shift7p5khz_present) { + j.write_str("frequencyShift7p5khz", "true"); + } + j.end_obj(); +} + +// PUSCH-CodeBlockGroupTransmission ::= SEQUENCE +SRSASN_CODE pusch_code_block_group_tx_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(max_code_block_groups_per_transport_block.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_code_block_group_tx_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(max_code_block_groups_per_transport_block.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pusch_code_block_group_tx_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("maxCodeBlockGroupsPerTransportBlock", max_code_block_groups_per_transport_block.to_string()); + j.end_obj(); +} + +std::string pusch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_string() const +{ + 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 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_"); +} + +// SRS-TPC-PDCCH-Config ::= SEQUENCE +SRSASN_CODE srs_tpc_pdcch_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(srs_cc_set_idxlist_present, 1)); + + if (srs_cc_set_idxlist_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_cc_set_idxlist, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_tpc_pdcch_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(srs_cc_set_idxlist_present, 1)); + + if (srs_cc_set_idxlist_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_cc_set_idxlist, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +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 (const auto& e1 : srs_cc_set_idxlist) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SlotFormatCombinationsPerCell ::= SEQUENCE +SRSASN_CODE slot_format_combinations_per_cell_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(subcarrier_spacing2_present, 1)); + HANDLE_CODE(bref.pack(slot_format_combinations_present, 1)); + HANDLE_CODE(bref.pack(position_in_dci_present, 1)); + + HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(subcarrier_spacing.pack(bref)); + if (subcarrier_spacing2_present) { + HANDLE_CODE(subcarrier_spacing2.pack(bref)); + } + if (slot_format_combinations_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, slot_format_combinations, 1, 512)); + } + if (position_in_dci_present) { + HANDLE_CODE(pack_integer(bref, position_in_dci, (uint8_t)0u, (uint8_t)127u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE slot_format_combinations_per_cell_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(subcarrier_spacing2_present, 1)); + HANDLE_CODE(bref.unpack(slot_format_combinations_present, 1)); + HANDLE_CODE(bref.unpack(position_in_dci_present, 1)); + + HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(subcarrier_spacing.unpack(bref)); + if (subcarrier_spacing2_present) { + HANDLE_CODE(subcarrier_spacing2.unpack(bref)); + } + if (slot_format_combinations_present) { + HANDLE_CODE(unpack_dyn_seq_of(slot_format_combinations, bref, 1, 512)); + } + if (position_in_dci_present) { + HANDLE_CODE(unpack_integer(position_in_dci, bref, (uint8_t)0u, (uint8_t)127u)); + } + + return SRSASN_SUCCESS; +} +void slot_format_combinations_per_cell_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servingCellId", serving_cell_id); + j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); + if (subcarrier_spacing2_present) { + j.write_str("subcarrierSpacing2", subcarrier_spacing2.to_string()); + } + if (slot_format_combinations_present) { + j.start_array("slotFormatCombinations"); + for (const auto& e1 : slot_format_combinations) { + e1.to_json(j); + } + j.end_array(); } - - return *this; -} -void security_mode_fail_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::security_mode_fail: - j.write_fieldname("securityModeFailure"); - c.get().to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + if (position_in_dci_present) { + j.write_int("positionInDCI", position_in_dci); } j.end_obj(); } -SRSASN_CODE security_mode_fail_s::crit_exts_c_::pack(bit_ref& bref) const + +// DownlinkConfigCommon ::= SEQUENCE +SRSASN_CODE dl_cfg_common_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::security_mode_fail: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(freq_info_dl_present, 1)); + HANDLE_CODE(bref.pack(init_dl_bwp_present, 1)); + + if (freq_info_dl_present) { + HANDLE_CODE(freq_info_dl.pack(bref)); + } + if (init_dl_bwp_present) { + HANDLE_CODE(init_dl_bwp.pack(bref)); } + return SRSASN_SUCCESS; } -SRSASN_CODE security_mode_fail_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE dl_cfg_common_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::security_mode_fail: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(freq_info_dl_present, 1)); + HANDLE_CODE(bref.unpack(init_dl_bwp_present, 1)); + + if (freq_info_dl_present) { + HANDLE_CODE(freq_info_dl.unpack(bref)); + } + if (init_dl_bwp_present) { + HANDLE_CODE(init_dl_bwp.unpack(bref)); } + return SRSASN_SUCCESS; } - -std::string security_mode_fail_s::crit_exts_c_::types_opts::to_string() const +void dl_cfg_common_s::to_json(json_writer& j) const { - static const char* options[] = {"securityModeFailure", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "security_mode_fail_s::crit_exts_c_::types"); + j.start_obj(); + if (freq_info_dl_present) { + j.write_fieldname("frequencyInfoDL"); + freq_info_dl.to_json(j); + } + if (init_dl_bwp_present) { + j.write_fieldname("initialDownlinkBWP"); + init_dl_bwp.to_json(j); + } + j.end_obj(); } -// UEAssistanceInformation ::= SEQUENCE -SRSASN_CODE ueassist_info_s::pack(bit_ref& bref) const +// PDSCH-CodeBlockGroupTransmission ::= SEQUENCE +SRSASN_CODE pdsch_code_block_group_tx_s::pack(bit_ref& bref) const { - HANDLE_CODE(crit_exts.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(max_code_block_groups_per_transport_block.pack(bref)); + HANDLE_CODE(bref.pack(code_block_group_flush_ind, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE ueassist_info_s::unpack(cbit_ref& bref) +SRSASN_CODE pdsch_code_block_group_tx_s::unpack(cbit_ref& bref) { - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(max_code_block_groups_per_transport_block.unpack(bref)); + HANDLE_CODE(bref.unpack(code_block_group_flush_ind, 1)); return SRSASN_SUCCESS; } -void ueassist_info_s::to_json(json_writer& j) const +void pdsch_code_block_group_tx_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_str("maxCodeBlockGroupsPerTransportBlock", max_code_block_groups_per_transport_block.to_string()); + j.write_bool("codeBlockGroupFlushIndicator", code_block_group_flush_ind); j.end_obj(); } -void ueassist_info_s::crit_exts_c_::destroy_() +std::string pdsch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_string() const { - switch (type_) { - case types::ue_assist_info: - c.destroy(); - break; - default: - break; - } + 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_"); } -void ueassist_info_s::crit_exts_c_::set(types::options e) +uint8_t pdsch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_number() const { - destroy_(); - type_ = e; - switch (type_) { - case types::ue_assist_info: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); - } + 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_"); } -ueassist_info_s::crit_exts_c_::crit_exts_c_(const ueassist_info_s::crit_exts_c_& other) + +// PUSCH-ServingCellConfig ::= SEQUENCE +SRSASN_CODE pusch_serving_cell_cfg_s::pack(bit_ref& bref) const { - type_ = other.type(); - switch (type_) { - case types::ue_assist_info: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(code_block_group_tx_present, 1)); + HANDLE_CODE(bref.pack(rate_matching_present, 1)); + HANDLE_CODE(bref.pack(xoverhead_present, 1)); + + if (code_block_group_tx_present) { + HANDLE_CODE(code_block_group_tx.pack(bref)); + } + if (xoverhead_present) { + HANDLE_CODE(xoverhead.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= max_mimo_layers_present; + group_flags[0] |= processing_type2_enabled_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(max_mimo_layers_present, 1)); + HANDLE_CODE(bref.pack(processing_type2_enabled_present, 1)); + if (max_mimo_layers_present) { + HANDLE_CODE(pack_integer(bref, max_mimo_layers, (uint8_t)1u, (uint8_t)4u)); + } + if (processing_type2_enabled_present) { + HANDLE_CODE(bref.pack(processing_type2_enabled, 1)); + } + } } + return SRSASN_SUCCESS; } -ueassist_info_s::crit_exts_c_& ueassist_info_s::crit_exts_c_::operator=(const ueassist_info_s::crit_exts_c_& other) +SRSASN_CODE pusch_serving_cell_cfg_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(code_block_group_tx_present, 1)); + HANDLE_CODE(bref.unpack(rate_matching_present, 1)); + HANDLE_CODE(bref.unpack(xoverhead_present, 1)); + + if (code_block_group_tx_present) { + HANDLE_CODE(code_block_group_tx.unpack(bref)); } - set(other.type()); - switch (type_) { - case types::ue_assist_info: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); + if (xoverhead_present) { + HANDLE_CODE(xoverhead.unpack(bref)); } - return *this; + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(max_mimo_layers_present, 1)); + HANDLE_CODE(bref.unpack(processing_type2_enabled_present, 1)); + if (max_mimo_layers_present) { + HANDLE_CODE(unpack_integer(max_mimo_layers, bref, (uint8_t)1u, (uint8_t)4u)); + } + if (processing_type2_enabled_present) { + HANDLE_CODE(bref.unpack(processing_type2_enabled, 1)); + } + } + } + return SRSASN_SUCCESS; } -void ueassist_info_s::crit_exts_c_::to_json(json_writer& j) const +void pusch_serving_cell_cfg_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::ue_assist_info: - j.write_fieldname("ueAssistanceInformation"); - c.get().to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); + if (code_block_group_tx_present) { + j.write_fieldname("codeBlockGroupTransmission"); + code_block_group_tx.to_json(j); + } + if (rate_matching_present) { + j.write_str("rateMatching", "limitedBufferRM"); + } + if (xoverhead_present) { + j.write_str("xOverhead", xoverhead.to_string()); + } + if (ext) { + if (max_mimo_layers_present) { + j.write_int("maxMIMO-Layers", max_mimo_layers); + } + if (processing_type2_enabled_present) { + j.write_bool("processingType2Enabled", processing_type2_enabled); + } } j.end_obj(); } -SRSASN_CODE ueassist_info_s::crit_exts_c_::pack(bit_ref& bref) const + +std::string pusch_serving_cell_cfg_s::xoverhead_opts::to_string() const { - type_.pack(bref); - switch (type_) { - case types::ue_assist_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + static const char* options[] = {"xoh6", "xoh12", "xoh18"}; + return convert_enum_idx(options, 3, value, "pusch_serving_cell_cfg_s::xoverhead_e_"); } -SRSASN_CODE ueassist_info_s::crit_exts_c_::unpack(cbit_ref& bref) +uint8_t pusch_serving_cell_cfg_s::xoverhead_opts::to_number() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ue_assist_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ueassist_info_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + static const uint8_t options[] = {6, 12, 18}; + return map_enum_number(options, 3, value, "pusch_serving_cell_cfg_s::xoverhead_e_"); } -std::string ueassist_info_s::crit_exts_c_::types_opts::to_string() const +// PollByte ::= ENUMERATED +std::string poll_byte_opts::to_string() const { - static const char* options[] = {"ueAssistanceInformation", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "ueassist_info_s::crit_exts_c_::types"); + 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", + "mB10", "mB11", "mB12", "mB13", "mB14", "mB15", "mB16", "mB17", "mB18", "mB20", + "mB25", "mB30", "mB40", "infinity", "spare20", "spare19", "spare18", "spare17", "spare16", "spare15", + "spare14", "spare13", "spare12", "spare11", "spare10", "spare9", "spare8", "spare7", "spare6", "spare5", + "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(options, 64, value, "poll_byte_e"); } -// UECapabilityInformation ::= SEQUENCE -SRSASN_CODE ue_cap_info_s::pack(bit_ref& bref) const +// PollPDU ::= ENUMERATED +std::string poll_pdu_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.pack(bref)); + 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 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 +SRSASN_CODE rate_match_pattern_lte_crs_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_present, 1)); + + HANDLE_CODE(pack_integer(bref, carrier_freq_dl, (uint16_t)0u, (uint16_t)16383u)); + HANDLE_CODE(carrier_bw_dl.pack(bref)); + if (mbsfn_sf_cfg_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbsfn_sf_cfg_list, 1, 8)); + } + HANDLE_CODE(nrof_crs_ports.pack(bref)); + HANDLE_CODE(v_shift.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ue_cap_info_s::unpack(cbit_ref& bref) +SRSASN_CODE rate_match_pattern_lte_crs_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_present, 1)); + + HANDLE_CODE(unpack_integer(carrier_freq_dl, bref, (uint16_t)0u, (uint16_t)16383u)); + HANDLE_CODE(carrier_bw_dl.unpack(bref)); + if (mbsfn_sf_cfg_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbsfn_sf_cfg_list, bref, 1, 8)); + } + HANDLE_CODE(nrof_crs_ports.unpack(bref)); + HANDLE_CODE(v_shift.unpack(bref)); return SRSASN_SUCCESS; } -void ue_cap_info_s::to_json(json_writer& j) const +void rate_match_pattern_lte_crs_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + j.write_int("carrierFreqDL", carrier_freq_dl); + j.write_str("carrierBandwidthDL", carrier_bw_dl.to_string()); + if (mbsfn_sf_cfg_list_present) { + j.start_array("mbsfn-SubframeConfigList"); + for (const auto& e1 : mbsfn_sf_cfg_list) { + e1.to_json(j); + } + j.end_array(); + } + j.write_str("nrofCRS-Ports", nrof_crs_ports.to_string()); + j.write_str("v-Shift", v_shift.to_string()); j.end_obj(); } -void ue_cap_info_s::crit_exts_c_::destroy_() +std::string rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_string() const { - switch (type_) { - case types::ue_cap_info: - c.destroy(); - break; - default: - break; - } + 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_"); } -void ue_cap_info_s::crit_exts_c_::set(types::options e) +uint8_t rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_number() const { - destroy_(); - type_ = e; - switch (type_) { - case types::ue_cap_info: - c.init(); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); - } + 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_"); } -ue_cap_info_s::crit_exts_c_::crit_exts_c_(const ue_cap_info_s::crit_exts_c_& other) + +std::string rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_string() const { - type_ = other.type(); - switch (type_) { - case types::ue_cap_info: - c.init(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); - } + static const char* options[] = {"n1", "n2", "n4"}; + return convert_enum_idx(options, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); } -ue_cap_info_s::crit_exts_c_& ue_cap_info_s::crit_exts_c_::operator=(const ue_cap_info_s::crit_exts_c_& other) +uint8_t rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_number() const { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ue_cap_info: - c.set(other.c.get()); - break; - case types::crit_exts_future: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); - } + 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_"); +} - return *this; +std::string rate_match_pattern_lte_crs_s::v_shift_opts::to_string() const +{ + 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_"); } -void ue_cap_info_s::crit_exts_c_::to_json(json_writer& j) const +uint8_t rate_match_pattern_lte_crs_s::v_shift_opts::to_number() const { - j.start_obj(); - switch (type_) { - case types::ue_cap_info: - j.write_fieldname("ueCapabilityInformation"); - c.get().to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); - } - j.end_obj(); + 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_"); } -SRSASN_CODE ue_cap_info_s::crit_exts_c_::pack(bit_ref& bref) const + +// SN-FieldLengthAM ::= ENUMERATED +std::string sn_field_len_am_opts::to_string() const { - type_.pack(bref); - switch (type_) { - case types::ue_cap_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + static const char* options[] = {"size12", "size18"}; + return convert_enum_idx(options, 2, value, "sn_field_len_am_e"); } -SRSASN_CODE ue_cap_info_s::crit_exts_c_::unpack(cbit_ref& bref) +uint8_t sn_field_len_am_opts::to_number() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ue_cap_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + static const uint8_t options[] = {12, 18}; + return map_enum_number(options, 2, value, "sn_field_len_am_e"); } -std::string ue_cap_info_s::crit_exts_c_::types_opts::to_string() const +// SN-FieldLengthUM ::= ENUMERATED +std::string sn_field_len_um_opts::to_string() const { - static const char* options[] = {"ueCapabilityInformation", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "ue_cap_info_s::crit_exts_c_::types"); + 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 const uint8_t options[] = {6, 12}; + return map_enum_number(options, 2, value, "sn_field_len_um_e"); } -// ULInformationTransfer ::= SEQUENCE -SRSASN_CODE ul_info_transfer_s::pack(bit_ref& bref) const +// SRS-CarrierSwitching ::= SEQUENCE +SRSASN_CODE srs_carrier_switching_s::pack(bit_ref& bref) const { - HANDLE_CODE(crit_exts.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(srs_switch_from_serv_cell_idx_present, 1)); + HANDLE_CODE(bref.pack(srs_tpc_pdcch_group_present, 1)); + HANDLE_CODE(bref.pack(monitoring_cells_present, 1)); + + if (srs_switch_from_serv_cell_idx_present) { + HANDLE_CODE(pack_integer(bref, srs_switch_from_serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(srs_switch_from_carrier.pack(bref)); + if (srs_tpc_pdcch_group_present) { + HANDLE_CODE(srs_tpc_pdcch_group.pack(bref)); + } + if (monitoring_cells_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, monitoring_cells, 1, 32, integer_packer(0, 31))); + } return SRSASN_SUCCESS; } -SRSASN_CODE ul_info_transfer_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_carrier_switching_s::unpack(cbit_ref& bref) { - HANDLE_CODE(crit_exts.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(srs_switch_from_serv_cell_idx_present, 1)); + HANDLE_CODE(bref.unpack(srs_tpc_pdcch_group_present, 1)); + HANDLE_CODE(bref.unpack(monitoring_cells_present, 1)); + + if (srs_switch_from_serv_cell_idx_present) { + HANDLE_CODE(unpack_integer(srs_switch_from_serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(srs_switch_from_carrier.unpack(bref)); + if (srs_tpc_pdcch_group_present) { + HANDLE_CODE(srs_tpc_pdcch_group.unpack(bref)); + } + if (monitoring_cells_present) { + HANDLE_CODE(unpack_dyn_seq_of(monitoring_cells, bref, 1, 32, integer_packer(0, 31))); + } return SRSASN_SUCCESS; } -void ul_info_transfer_s::to_json(json_writer& j) const +void srs_carrier_switching_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); + if (srs_switch_from_serv_cell_idx_present) { + j.write_int("srs-SwitchFromServCellIndex", srs_switch_from_serv_cell_idx); + } + j.write_str("srs-SwitchFromCarrier", srs_switch_from_carrier.to_string()); + if (srs_tpc_pdcch_group_present) { + j.write_fieldname("srs-TPC-PDCCH-Group"); + srs_tpc_pdcch_group.to_json(j); + } + if (monitoring_cells_present) { + j.start_array("monitoringCells"); + for (const auto& e1 : monitoring_cells) { + j.write_int(e1); + } + j.end_array(); + } j.end_obj(); } -void ul_info_transfer_s::crit_exts_c_::destroy_() +std::string srs_carrier_switching_s::srs_switch_from_carrier_opts::to_string() const +{ + static const char* options[] = {"sUL", "nUL"}; + return convert_enum_idx(options, 2, value, "srs_carrier_switching_s::srs_switch_from_carrier_e_"); +} + +void srs_carrier_switching_s::srs_tpc_pdcch_group_c_::destroy_() { switch (type_) { - case types::ul_info_transfer: - c.destroy(); + case types::type_a: + c.destroy(); + break; + case types::type_b: + c.destroy(); break; default: break; } } -void ul_info_transfer_s::crit_exts_c_::set(types::options e) +void srs_carrier_switching_s::srs_tpc_pdcch_group_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ul_info_transfer: - c.init(); + case types::type_a: + c.init(); break; - case types::crit_exts_future: + case types::type_b: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); } } -ul_info_transfer_s::crit_exts_c_::crit_exts_c_(const ul_info_transfer_s::crit_exts_c_& other) +srs_carrier_switching_s::srs_tpc_pdcch_group_c_::srs_tpc_pdcch_group_c_( + const srs_carrier_switching_s::srs_tpc_pdcch_group_c_& other) { type_ = other.type(); switch (type_) { - case types::ul_info_transfer: - c.init(other.c.get()); + case types::type_a: + c.init(other.c.get()); break; - case types::crit_exts_future: + case types::type_b: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); } } -ul_info_transfer_s::crit_exts_c_& ul_info_transfer_s::crit_exts_c_:: - operator=(const ul_info_transfer_s::crit_exts_c_& other) +srs_carrier_switching_s::srs_tpc_pdcch_group_c_& +srs_carrier_switching_s::srs_tpc_pdcch_group_c_::operator=(const srs_carrier_switching_s::srs_tpc_pdcch_group_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ul_info_transfer: - c.set(other.c.get()); + case types::type_a: + c.set(other.c.get()); break; - case types::crit_exts_future: + case types::type_b: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); } return *this; } -void ul_info_transfer_s::crit_exts_c_::to_json(json_writer& j) const +void srs_carrier_switching_s::srs_tpc_pdcch_group_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ul_info_transfer: - j.write_fieldname("ulInformationTransfer"); - c.get().to_json(j); + case types::type_a: + j.start_array("typeA"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); break; - case types::crit_exts_future: + case types::type_b: + j.write_fieldname("typeB"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); } j.end_obj(); } -SRSASN_CODE ul_info_transfer_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE srs_carrier_switching_s::srs_tpc_pdcch_group_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ul_info_transfer: - HANDLE_CODE(c.get().pack(bref)); + case types::type_a: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 32)); break; - case types::crit_exts_future: + case types::type_b: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE ul_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE srs_carrier_switching_s::srs_tpc_pdcch_group_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ul_info_transfer: - HANDLE_CODE(c.get().unpack(bref)); + case types::type_a: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 32)); break; - case types::crit_exts_future: + case types::type_b: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + log_invalid_choice_id(type_, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string ul_info_transfer_s::crit_exts_c_::types_opts::to_string() const +std::string srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types_opts::to_string() const { - static const char* options[] = {"ulInformationTransfer", "criticalExtensionsFuture"}; - return convert_enum_idx(options, 2, value, "ul_info_transfer_s::crit_exts_c_::types"); + static const char* options[] = {"typeA", "typeB"}; + return convert_enum_idx(options, 2, value, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types"); } -// UL-DCCH-MessageType ::= CHOICE -void ul_dcch_msg_type_c::destroy_() +// SlotFormatIndicator ::= SEQUENCE +SRSASN_CODE slot_format_ind_s::pack(bit_ref& bref) const { - switch (type_) { - case types::c1: - c.destroy(); - break; - default: - break; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(slot_format_comb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(slot_format_comb_to_release_list_present, 1)); + + HANDLE_CODE(pack_integer(bref, sfi_rnti, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(pack_integer(bref, dci_payload_size, (uint8_t)1u, (uint8_t)128u)); + if (slot_format_comb_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, slot_format_comb_to_add_mod_list, 1, 16)); } -} -void ul_dcch_msg_type_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::c1: - c.init(); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + if (slot_format_comb_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, slot_format_comb_to_release_list, 1, 16, integer_packer(0, 31))); } + + return SRSASN_SUCCESS; } -ul_dcch_msg_type_c::ul_dcch_msg_type_c(const ul_dcch_msg_type_c& other) +SRSASN_CODE slot_format_ind_s::unpack(cbit_ref& bref) { - type_ = other.type(); - switch (type_) { - case types::c1: - c.init(other.c.get()); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(slot_format_comb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(slot_format_comb_to_release_list_present, 1)); + + HANDLE_CODE(unpack_integer(sfi_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(unpack_integer(dci_payload_size, bref, (uint8_t)1u, (uint8_t)128u)); + if (slot_format_comb_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(slot_format_comb_to_add_mod_list, bref, 1, 16)); + } + if (slot_format_comb_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(slot_format_comb_to_release_list, bref, 1, 16, integer_packer(0, 31))); } + + return SRSASN_SUCCESS; } -ul_dcch_msg_type_c& ul_dcch_msg_type_c::operator=(const ul_dcch_msg_type_c& other) +void slot_format_ind_s::to_json(json_writer& j) const { - if (this == &other) { - return *this; + j.start_obj(); + j.write_int("sfi-RNTI", sfi_rnti); + j.write_int("dci-PayloadSize", dci_payload_size); + if (slot_format_comb_to_add_mod_list_present) { + j.start_array("slotFormatCombToAddModList"); + for (const auto& e1 : slot_format_comb_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); } - set(other.type()); - switch (type_) { - case types::c1: - c.set(other.c.get()); - break; - case types::msg_class_ext: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + if (slot_format_comb_to_release_list_present) { + j.start_array("slotFormatCombToReleaseList"); + for (const auto& e1 : slot_format_comb_to_release_list) { + j.write_int(e1); + } + j.end_array(); } + j.end_obj(); +} - return *this; +// T-PollRetransmit ::= ENUMERATED +std::string t_poll_retx_opts::to_string() const +{ + 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", + "ms170", "ms175", "ms180", "ms185", "ms190", "ms195", "ms200", "ms205", "ms210", "ms215", "ms220", + "ms225", "ms230", "ms235", "ms240", "ms245", "ms250", "ms300", "ms350", "ms400", "ms450", "ms500", + "ms800", "ms1000", "ms2000", "ms4000", "spare5", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(options, 64, value, "t_poll_retx_e"); } -void ul_dcch_msg_type_c::to_json(json_writer& j) const +uint16_t t_poll_retx_opts::to_number() const +{ + 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 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 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 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", + "ms165", "ms170", "ms175", "ms180", "ms185", "ms190", "ms195", "ms200", "ms205", "ms210", "ms215", + "ms220", "ms225", "ms230", "ms235", "ms240", "ms245", "ms250", "ms300", "ms350", "ms400", "ms450", + "ms500", "ms800", "ms1000", "ms1200", "ms1600", "ms2000", "ms2400", "spare2", "spare1"}; + return convert_enum_idx(options, 64, value, "t_status_prohibit_e"); +} +uint16_t t_status_prohibit_opts::to_number() const +{ + 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 +SRSASN_CODE tdd_ul_dl_slot_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, slot_idx, (uint16_t)0u, (uint16_t)319u)); + HANDLE_CODE(symbols.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE tdd_ul_dl_slot_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(slot_idx, bref, (uint16_t)0u, (uint16_t)319u)); + HANDLE_CODE(symbols.unpack(bref)); + + return SRSASN_SUCCESS; +} +void tdd_ul_dl_slot_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("slotIndex", slot_idx); + j.write_fieldname("symbols"); + symbols.to_json(j); + j.end_obj(); +} + +void tdd_ul_dl_slot_cfg_s::symbols_c_::set(types::options e) +{ + type_ = e; +} +void tdd_ul_dl_slot_cfg_s::symbols_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.get().to_json(j); + case types::all_dl: break; - case types::msg_class_ext: + case types::all_ul: + break; + case types::explicit_type: + j.write_fieldname("explicit"); + j.start_obj(); + if (c.nrof_dl_symbols_present) { + j.write_int("nrofDownlinkSymbols", c.nrof_dl_symbols); + } + if (c.nrof_ul_symbols_present) { + j.write_int("nrofUplinkSymbols", c.nrof_ul_symbols); + } + j.end_obj(); break; default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + log_invalid_choice_id(type_, "tdd_ul_dl_slot_cfg_s::symbols_c_"); } j.end_obj(); } -SRSASN_CODE ul_dcch_msg_type_c::pack(bit_ref& bref) const +SRSASN_CODE tdd_ul_dl_slot_cfg_s::symbols_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::c1: - HANDLE_CODE(c.get().pack(bref)); + case types::all_dl: break; - case types::msg_class_ext: + case types::all_ul: + break; + case types::explicit_type: + HANDLE_CODE(bref.pack(c.nrof_dl_symbols_present, 1)); + HANDLE_CODE(bref.pack(c.nrof_ul_symbols_present, 1)); + if (c.nrof_dl_symbols_present) { + HANDLE_CODE(pack_integer(bref, c.nrof_dl_symbols, (uint8_t)1u, (uint8_t)13u)); + } + if (c.nrof_ul_symbols_present) { + HANDLE_CODE(pack_integer(bref, c.nrof_ul_symbols, (uint8_t)1u, (uint8_t)13u)); + } break; default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + log_invalid_choice_id(type_, "tdd_ul_dl_slot_cfg_s::symbols_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE ul_dcch_msg_type_c::unpack(cbit_ref& bref) +SRSASN_CODE tdd_ul_dl_slot_cfg_s::symbols_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::c1: - HANDLE_CODE(c.get().unpack(bref)); + case types::all_dl: break; - case types::msg_class_ext: + case types::all_ul: + break; + case types::explicit_type: + HANDLE_CODE(bref.unpack(c.nrof_dl_symbols_present, 1)); + HANDLE_CODE(bref.unpack(c.nrof_ul_symbols_present, 1)); + if (c.nrof_dl_symbols_present) { + HANDLE_CODE(unpack_integer(c.nrof_dl_symbols, bref, (uint8_t)1u, (uint8_t)13u)); + } + if (c.nrof_ul_symbols_present) { + HANDLE_CODE(unpack_integer(c.nrof_ul_symbols, bref, (uint8_t)1u, (uint8_t)13u)); + } break; default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + log_invalid_choice_id(type_, "tdd_ul_dl_slot_cfg_s::symbols_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void ul_dcch_msg_type_c::c1_c_::destroy_() +std::string tdd_ul_dl_slot_cfg_s::symbols_c_::types_opts::to_string() const { - switch (type_) { - case types::meas_report: - c.destroy(); - break; - case types::rrc_recfg_complete: - c.destroy(); - break; - case types::rrc_setup_complete: - c.destroy(); - break; - case types::rrc_reest_complete: - c.destroy(); - break; - case types::rrc_resume_complete: - c.destroy(); - break; - case types::security_mode_complete: - c.destroy(); - break; - case types::security_mode_fail: - c.destroy(); - break; - case types::ul_info_transfer: - c.destroy(); - break; - case types::location_meas_ind: - c.destroy(); - break; - case types::ue_cap_info: - c.destroy(); - break; - case types::counter_check_resp: - c.destroy(); - break; - case types::ue_assist_info: - c.destroy(); - break; - case types::fail_info: - c.destroy(); - break; - default: - break; + static const char* options[] = {"allDownlink", "allUplink", "explicit"}; + return convert_enum_idx(options, 3, value, "tdd_ul_dl_slot_cfg_s::symbols_c_::types"); +} + +// UplinkConfigCommon ::= SEQUENCE +SRSASN_CODE ul_cfg_common_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_info_ul_present, 1)); + HANDLE_CODE(bref.pack(init_ul_bwp_present, 1)); + + if (freq_info_ul_present) { + HANDLE_CODE(freq_info_ul.pack(bref)); + } + if (init_ul_bwp_present) { + HANDLE_CODE(init_ul_bwp.pack(bref)); } + HANDLE_CODE(dummy.pack(bref)); + + return SRSASN_SUCCESS; } -void ul_dcch_msg_type_c::c1_c_::set(types::options e) +SRSASN_CODE ul_cfg_common_s::unpack(cbit_ref& bref) { - destroy_(); - type_ = e; - switch (type_) { - case types::meas_report: - c.init(); - break; - case types::rrc_recfg_complete: - c.init(); - break; - case types::rrc_setup_complete: - c.init(); - break; - case types::rrc_reest_complete: - c.init(); - break; - case types::rrc_resume_complete: - c.init(); - break; - case types::security_mode_complete: - c.init(); - break; - case types::security_mode_fail: - c.init(); - break; - case types::ul_info_transfer: - c.init(); - break; - case types::location_meas_ind: - c.init(); - break; - case types::ue_cap_info: - c.init(); - break; - case types::counter_check_resp: - c.init(); - break; - case types::ue_assist_info: - c.init(); + HANDLE_CODE(bref.unpack(freq_info_ul_present, 1)); + HANDLE_CODE(bref.unpack(init_ul_bwp_present, 1)); + + if (freq_info_ul_present) { + HANDLE_CODE(freq_info_ul.unpack(bref)); + } + if (init_ul_bwp_present) { + HANDLE_CODE(init_ul_bwp.unpack(bref)); + } + HANDLE_CODE(dummy.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_info_ul_present) { + j.write_fieldname("frequencyInfoUL"); + freq_info_ul.to_json(j); + } + if (init_ul_bwp_present) { + j.write_fieldname("initialUplinkBWP"); + init_ul_bwp.to_json(j); + } + j.write_str("dummy", dummy.to_string()); + j.end_obj(); +} + +// CrossCarrierSchedulingConfig ::= SEQUENCE +SRSASN_CODE cross_carrier_sched_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(sched_cell_info.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cross_carrier_sched_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(sched_cell_info.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cross_carrier_sched_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("schedulingCellInfo"); + sched_cell_info.to_json(j); + j.end_obj(); +} + +void cross_carrier_sched_cfg_s::sched_cell_info_c_::destroy_() +{ + switch (type_) { + case types::own: + c.destroy(); break; - case types::fail_info: - c.init(); + case types::other: + c.destroy(); break; - case types::spare3: + default: break; - case types::spare2: + } +} +void cross_carrier_sched_cfg_s::sched_cell_info_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::own: + c.init(); break; - case types::spare1: + case types::other: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); } } -ul_dcch_msg_type_c::c1_c_::c1_c_(const ul_dcch_msg_type_c::c1_c_& other) +cross_carrier_sched_cfg_s::sched_cell_info_c_::sched_cell_info_c_( + const cross_carrier_sched_cfg_s::sched_cell_info_c_& other) { type_ = other.type(); switch (type_) { - case types::meas_report: - c.init(other.c.get()); - break; - case types::rrc_recfg_complete: - c.init(other.c.get()); - break; - case types::rrc_setup_complete: - c.init(other.c.get()); - break; - case types::rrc_reest_complete: - c.init(other.c.get()); - break; - case types::rrc_resume_complete: - c.init(other.c.get()); - break; - case types::security_mode_complete: - c.init(other.c.get()); - break; - case types::security_mode_fail: - c.init(other.c.get()); - break; - case types::ul_info_transfer: - c.init(other.c.get()); - break; - case types::location_meas_ind: - c.init(other.c.get()); - break; - case types::ue_cap_info: - c.init(other.c.get()); - break; - case types::counter_check_resp: - c.init(other.c.get()); - break; - case types::ue_assist_info: - c.init(other.c.get()); - break; - case types::fail_info: - c.init(other.c.get()); - break; - case types::spare3: - break; - case types::spare2: + case types::own: + c.init(other.c.get()); break; - case types::spare1: + case types::other: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); } } -ul_dcch_msg_type_c::c1_c_& ul_dcch_msg_type_c::c1_c_::operator=(const ul_dcch_msg_type_c::c1_c_& other) +cross_carrier_sched_cfg_s::sched_cell_info_c_& +cross_carrier_sched_cfg_s::sched_cell_info_c_::operator=(const cross_carrier_sched_cfg_s::sched_cell_info_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::meas_report: - c.set(other.c.get()); - break; - case types::rrc_recfg_complete: - c.set(other.c.get()); - break; - case types::rrc_setup_complete: - c.set(other.c.get()); - break; - case types::rrc_reest_complete: - c.set(other.c.get()); - break; - case types::rrc_resume_complete: - c.set(other.c.get()); - break; - case types::security_mode_complete: - c.set(other.c.get()); - break; - case types::security_mode_fail: - c.set(other.c.get()); - break; - case types::ul_info_transfer: - c.set(other.c.get()); - break; - case types::location_meas_ind: - c.set(other.c.get()); - break; - case types::ue_cap_info: - c.set(other.c.get()); - break; - case types::counter_check_resp: - c.set(other.c.get()); - break; - case types::ue_assist_info: - c.set(other.c.get()); - break; - case types::fail_info: - c.set(other.c.get()); - break; - case types::spare3: - break; - case types::spare2: + case types::own: + c.set(other.c.get()); break; - case types::spare1: + case types::other: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); } return *this; } -void ul_dcch_msg_type_c::c1_c_::to_json(json_writer& j) const +void cross_carrier_sched_cfg_s::sched_cell_info_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::meas_report: - j.write_fieldname("measurementReport"); - c.get().to_json(j); - break; - case types::rrc_recfg_complete: - j.write_fieldname("rrcReconfigurationComplete"); - c.get().to_json(j); - break; - case types::rrc_setup_complete: - j.write_fieldname("rrcSetupComplete"); - c.get().to_json(j); - break; - case types::rrc_reest_complete: - j.write_fieldname("rrcReestablishmentComplete"); - c.get().to_json(j); - break; - case types::rrc_resume_complete: - j.write_fieldname("rrcResumeComplete"); - c.get().to_json(j); - break; - case types::security_mode_complete: - j.write_fieldname("securityModeComplete"); - c.get().to_json(j); - break; - case types::security_mode_fail: - j.write_fieldname("securityModeFailure"); - c.get().to_json(j); - break; - case types::ul_info_transfer: - j.write_fieldname("ulInformationTransfer"); - c.get().to_json(j); - break; - case types::location_meas_ind: - j.write_fieldname("locationMeasurementIndication"); - c.get().to_json(j); - break; - case types::ue_cap_info: - j.write_fieldname("ueCapabilityInformation"); - c.get().to_json(j); - break; - case types::counter_check_resp: - j.write_fieldname("counterCheckResponse"); - c.get().to_json(j); + case types::own: + j.write_fieldname("own"); + j.start_obj(); + j.write_bool("cif-Presence", c.get().cif_presence); + j.end_obj(); break; - case types::ue_assist_info: - j.write_fieldname("ueAssistanceInformation"); - c.get().to_json(j); + case types::other: + j.write_fieldname("other"); + j.start_obj(); + j.write_int("schedulingCellId", c.get().sched_cell_id); + j.write_int("cif-InSchedulingCell", c.get().cif_in_sched_cell); + j.end_obj(); break; - case types::fail_info: - j.write_fieldname("failureInformation"); - c.get().to_json(j); + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + } + j.end_obj(); +} +SRSASN_CODE cross_carrier_sched_cfg_s::sched_cell_info_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::own: + HANDLE_CODE(bref.pack(c.get().cif_presence, 1)); break; - case types::spare3: + case types::other: + HANDLE_CODE(pack_integer(bref, c.get().sched_cell_id, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, c.get().cif_in_sched_cell, (uint8_t)1u, (uint8_t)7u)); break; - case types::spare2: + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cross_carrier_sched_cfg_s::sched_cell_info_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::own: + HANDLE_CODE(bref.unpack(c.get().cif_presence, 1)); break; - case types::spare1: + case types::other: + HANDLE_CODE(unpack_integer(c.get().sched_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(c.get().cif_in_sched_cell, bref, (uint8_t)1u, (uint8_t)7u)); break; default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_s::sched_cell_info_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string cross_carrier_sched_cfg_s::sched_cell_info_c_::types_opts::to_string() const +{ + static const char* options[] = {"own", "other"}; + return convert_enum_idx(options, 2, value, "cross_carrier_sched_cfg_s::sched_cell_info_c_::types"); +} + +// DL-AM-RLC ::= SEQUENCE +SRSASN_CODE dl_am_rlc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sn_field_len_present, 1)); + + if (sn_field_len_present) { + HANDLE_CODE(sn_field_len.pack(bref)); + } + HANDLE_CODE(t_reassembly.pack(bref)); + HANDLE_CODE(t_status_prohibit.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_am_rlc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sn_field_len_present, 1)); + + if (sn_field_len_present) { + HANDLE_CODE(sn_field_len.unpack(bref)); + } + HANDLE_CODE(t_reassembly.unpack(bref)); + HANDLE_CODE(t_status_prohibit.unpack(bref)); + + return SRSASN_SUCCESS; +} +void dl_am_rlc_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sn_field_len_present) { + j.write_str("sn-FieldLength", sn_field_len.to_string()); + } + j.write_str("t-Reassembly", t_reassembly.to_string()); + j.write_str("t-StatusProhibit", t_status_prohibit.to_string()); + j.end_obj(); +} + +// DL-UM-RLC ::= SEQUENCE +SRSASN_CODE dl_um_rlc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sn_field_len_present, 1)); + + if (sn_field_len_present) { + HANDLE_CODE(sn_field_len.pack(bref)); + } + HANDLE_CODE(t_reassembly.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_um_rlc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sn_field_len_present, 1)); + + if (sn_field_len_present) { + HANDLE_CODE(sn_field_len.unpack(bref)); + } + HANDLE_CODE(t_reassembly.unpack(bref)); + + return SRSASN_SUCCESS; +} +void dl_um_rlc_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sn_field_len_present) { + j.write_str("sn-FieldLength", sn_field_len.to_string()); + } + j.write_str("t-Reassembly", t_reassembly.to_string()); + j.end_obj(); +} + +// PDCCH-ServingCellConfig ::= SEQUENCE +SRSASN_CODE pdcch_serving_cell_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(slot_format_ind_present, 1)); + + if (slot_format_ind_present) { + HANDLE_CODE(slot_format_ind.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_serving_cell_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(slot_format_ind_present, 1)); + + if (slot_format_ind_present) { + HANDLE_CODE(slot_format_ind.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pdcch_serving_cell_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (slot_format_ind_present) { + j.write_fieldname("slotFormatIndicator"); + slot_format_ind.to_json(j); + } + j.end_obj(); +} + +// PDSCH-ServingCellConfig ::= SEQUENCE +SRSASN_CODE pdsch_serving_cell_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(code_block_group_tx_present, 1)); + HANDLE_CODE(bref.pack(xoverhead_present, 1)); + HANDLE_CODE(bref.pack(nrof_harq_processes_for_pdsch_present, 1)); + HANDLE_CODE(bref.pack(pucch_cell_present, 1)); + + if (code_block_group_tx_present) { + HANDLE_CODE(code_block_group_tx.pack(bref)); + } + if (xoverhead_present) { + HANDLE_CODE(xoverhead.pack(bref)); + } + if (nrof_harq_processes_for_pdsch_present) { + HANDLE_CODE(nrof_harq_processes_for_pdsch.pack(bref)); + } + if (pucch_cell_present) { + HANDLE_CODE(pack_integer(bref, pucch_cell, (uint8_t)0u, (uint8_t)31u)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= max_mimo_layers_present; + group_flags[0] |= processing_type2_enabled_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(max_mimo_layers_present, 1)); + HANDLE_CODE(bref.pack(processing_type2_enabled_present, 1)); + if (max_mimo_layers_present) { + HANDLE_CODE(pack_integer(bref, max_mimo_layers, (uint8_t)1u, (uint8_t)8u)); + } + if (processing_type2_enabled_present) { + HANDLE_CODE(bref.pack(processing_type2_enabled, 1)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_serving_cell_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(code_block_group_tx_present, 1)); + HANDLE_CODE(bref.unpack(xoverhead_present, 1)); + HANDLE_CODE(bref.unpack(nrof_harq_processes_for_pdsch_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cell_present, 1)); + + if (code_block_group_tx_present) { + HANDLE_CODE(code_block_group_tx.unpack(bref)); + } + if (xoverhead_present) { + HANDLE_CODE(xoverhead.unpack(bref)); + } + if (nrof_harq_processes_for_pdsch_present) { + HANDLE_CODE(nrof_harq_processes_for_pdsch.unpack(bref)); + } + if (pucch_cell_present) { + HANDLE_CODE(unpack_integer(pucch_cell, bref, (uint8_t)0u, (uint8_t)31u)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(max_mimo_layers_present, 1)); + HANDLE_CODE(bref.unpack(processing_type2_enabled_present, 1)); + if (max_mimo_layers_present) { + HANDLE_CODE(unpack_integer(max_mimo_layers, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (processing_type2_enabled_present) { + HANDLE_CODE(bref.unpack(processing_type2_enabled, 1)); + } + } + } + return SRSASN_SUCCESS; +} +void pdsch_serving_cell_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (code_block_group_tx_present) { + j.write_fieldname("codeBlockGroupTransmission"); + code_block_group_tx.to_json(j); + } + if (xoverhead_present) { + j.write_str("xOverhead", xoverhead.to_string()); + } + if (nrof_harq_processes_for_pdsch_present) { + j.write_str("nrofHARQ-ProcessesForPDSCH", nrof_harq_processes_for_pdsch.to_string()); + } + if (pucch_cell_present) { + j.write_int("pucch-Cell", pucch_cell); + } + if (ext) { + if (max_mimo_layers_present) { + j.write_int("maxMIMO-Layers", max_mimo_layers); + } + if (processing_type2_enabled_present) { + j.write_bool("processingType2Enabled", processing_type2_enabled); + } + } + j.end_obj(); +} + +std::string pdsch_serving_cell_cfg_s::xoverhead_opts::to_string() const +{ + 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 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 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 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 +SRSASN_CODE rach_cfg_ded_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cfra_present, 1)); + HANDLE_CODE(bref.pack(ra_prioritization_present, 1)); + + if (cfra_present) { + HANDLE_CODE(cfra.pack(bref)); + } + if (ra_prioritization_present) { + HANDLE_CODE(ra_prioritization.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_ded_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cfra_present, 1)); + HANDLE_CODE(bref.unpack(ra_prioritization_present, 1)); + + if (cfra_present) { + HANDLE_CODE(cfra.unpack(bref)); + } + if (ra_prioritization_present) { + HANDLE_CODE(ra_prioritization.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rach_cfg_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cfra_present) { + j.write_fieldname("cfra"); + cfra.to_json(j); + } + if (ra_prioritization_present) { + j.write_fieldname("ra-Prioritization"); + ra_prioritization.to_json(j); } j.end_obj(); } -SRSASN_CODE ul_dcch_msg_type_c::c1_c_::pack(bit_ref& bref) const + +// SchedulingRequestToAddMod ::= SEQUENCE +SRSASN_CODE sched_request_to_add_mod_s::pack(bit_ref& bref) const { - type_.pack(bref); - switch (type_) { - case types::meas_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_recfg_complete: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_setup_complete: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_reest_complete: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_resume_complete: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::security_mode_complete: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::security_mode_fail: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_info_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_meas_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_cap_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::counter_check_resp: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_assist_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::fail_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + HANDLE_CODE(bref.pack(sr_prohibit_timer_present, 1)); + + HANDLE_CODE(pack_integer(bref, sched_request_id, (uint8_t)0u, (uint8_t)7u)); + if (sr_prohibit_timer_present) { + HANDLE_CODE(sr_prohibit_timer.pack(bref)); } + HANDLE_CODE(sr_trans_max.pack(bref)); + return SRSASN_SUCCESS; } -SRSASN_CODE ul_dcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) +SRSASN_CODE sched_request_to_add_mod_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::meas_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_recfg_complete: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_setup_complete: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_reest_complete: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_resume_complete: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::security_mode_complete: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::security_mode_fail: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_info_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_meas_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_cap_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::counter_check_resp: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_assist_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::fail_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; + HANDLE_CODE(bref.unpack(sr_prohibit_timer_present, 1)); + + HANDLE_CODE(unpack_integer(sched_request_id, bref, (uint8_t)0u, (uint8_t)7u)); + if (sr_prohibit_timer_present) { + HANDLE_CODE(sr_prohibit_timer.unpack(bref)); } + HANDLE_CODE(sr_trans_max.unpack(bref)); + return SRSASN_SUCCESS; } +void sched_request_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("schedulingRequestId", sched_request_id); + if (sr_prohibit_timer_present) { + j.write_str("sr-ProhibitTimer", sr_prohibit_timer.to_string()); + } + j.write_str("sr-TransMax", sr_trans_max.to_string()); + j.end_obj(); +} -std::string ul_dcch_msg_type_c::c1_c_::types_opts::to_string() const +std::string sched_request_to_add_mod_s::sr_prohibit_timer_opts::to_string() const { - 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"); + 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 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 ul_dcch_msg_type_c::types_opts::to_string() const +std::string sched_request_to_add_mod_s::sr_trans_max_opts::to_string() const { - static const char* options[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(options, 2, value, "ul_dcch_msg_type_c::types"); + 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 ul_dcch_msg_type_c::types_opts::to_number() const +uint8_t sched_request_to_add_mod_s::sr_trans_max_opts::to_number() const { - static const uint8_t options[] = {1}; - return map_enum_number(options, 1, value, "ul_dcch_msg_type_c::types"); + 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_"); } -// UL-DCCH-Message ::= SEQUENCE -SRSASN_CODE ul_dcch_msg_s::pack(bit_ref& bref) const +// ServingCellConfigCommon ::= SEQUENCE +SRSASN_CODE serving_cell_cfg_common_s::pack(bit_ref& bref) const { - HANDLE_CODE(msg.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pci_present, 1)); + HANDLE_CODE(bref.pack(dl_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(supplementary_ul_cfg_present, 1)); + HANDLE_CODE(bref.pack(n_timing_advance_offset_present, 1)); + HANDLE_CODE(bref.pack(ssb_positions_in_burst_present, 1)); + HANDLE_CODE(bref.pack(ssb_periodicity_serving_cell_present, 1)); + HANDLE_CODE(bref.pack(lte_crs_to_match_around_present, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(ssb_subcarrier_spacing_present, 1)); + HANDLE_CODE(bref.pack(tdd_ul_dl_cfg_common_present, 1)); - bref.align_bytes_zero(); + if (pci_present) { + HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); + } + if (dl_cfg_common_present) { + HANDLE_CODE(dl_cfg_common.pack(bref)); + } + if (ul_cfg_common_present) { + HANDLE_CODE(ul_cfg_common.pack(bref)); + } + if (supplementary_ul_cfg_present) { + HANDLE_CODE(supplementary_ul_cfg.pack(bref)); + } + if (n_timing_advance_offset_present) { + HANDLE_CODE(n_timing_advance_offset.pack(bref)); + } + if (ssb_positions_in_burst_present) { + HANDLE_CODE(ssb_positions_in_burst.pack(bref)); + } + if (ssb_periodicity_serving_cell_present) { + HANDLE_CODE(ssb_periodicity_serving_cell.pack(bref)); + } + HANDLE_CODE(dmrs_type_a_position.pack(bref)); + if (lte_crs_to_match_around_present) { + HANDLE_CODE(lte_crs_to_match_around.pack(bref)); + } + if (rate_match_pattern_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_add_mod_list, 1, 4)); + } + if (rate_match_pattern_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_release_list, 1, 4, integer_packer(0, 3))); + } + if (ssb_subcarrier_spacing_present) { + HANDLE_CODE(ssb_subcarrier_spacing.pack(bref)); + } + if (tdd_ul_dl_cfg_common_present) { + HANDLE_CODE(tdd_ul_dl_cfg_common.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, ss_pbch_block_pwr, (int8_t)-60, (int8_t)50)); return SRSASN_SUCCESS; } -SRSASN_CODE ul_dcch_msg_s::unpack(cbit_ref& bref) +SRSASN_CODE serving_cell_cfg_common_s::unpack(cbit_ref& bref) { - HANDLE_CODE(msg.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pci_present, 1)); + HANDLE_CODE(bref.unpack(dl_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(supplementary_ul_cfg_present, 1)); + HANDLE_CODE(bref.unpack(n_timing_advance_offset_present, 1)); + HANDLE_CODE(bref.unpack(ssb_positions_in_burst_present, 1)); + HANDLE_CODE(bref.unpack(ssb_periodicity_serving_cell_present, 1)); + HANDLE_CODE(bref.unpack(lte_crs_to_match_around_present, 1)); + HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(rate_match_pattern_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(ssb_subcarrier_spacing_present, 1)); + HANDLE_CODE(bref.unpack(tdd_ul_dl_cfg_common_present, 1)); - bref.align_bytes(); + if (pci_present) { + HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); + } + if (dl_cfg_common_present) { + HANDLE_CODE(dl_cfg_common.unpack(bref)); + } + if (ul_cfg_common_present) { + HANDLE_CODE(ul_cfg_common.unpack(bref)); + } + if (supplementary_ul_cfg_present) { + HANDLE_CODE(supplementary_ul_cfg.unpack(bref)); + } + if (n_timing_advance_offset_present) { + HANDLE_CODE(n_timing_advance_offset.unpack(bref)); + } + if (ssb_positions_in_burst_present) { + HANDLE_CODE(ssb_positions_in_burst.unpack(bref)); + } + if (ssb_periodicity_serving_cell_present) { + HANDLE_CODE(ssb_periodicity_serving_cell.unpack(bref)); + } + HANDLE_CODE(dmrs_type_a_position.unpack(bref)); + if (lte_crs_to_match_around_present) { + HANDLE_CODE(lte_crs_to_match_around.unpack(bref)); + } + if (rate_match_pattern_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_add_mod_list, bref, 1, 4)); + } + if (rate_match_pattern_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_release_list, bref, 1, 4, integer_packer(0, 3))); + } + if (ssb_subcarrier_spacing_present) { + HANDLE_CODE(ssb_subcarrier_spacing.unpack(bref)); + } + if (tdd_ul_dl_cfg_common_present) { + HANDLE_CODE(tdd_ul_dl_cfg_common.unpack(bref)); + } + HANDLE_CODE(unpack_integer(ss_pbch_block_pwr, bref, (int8_t)-60, (int8_t)50)); return SRSASN_SUCCESS; } -void ul_dcch_msg_s::to_json(json_writer& j) const +void serving_cell_cfg_common_s::to_json(json_writer& j) const { - j.start_array(); j.start_obj(); - j.start_obj("UL-DCCH-Message"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); + if (pci_present) { + j.write_int("physCellId", pci); + } + if (dl_cfg_common_present) { + j.write_fieldname("downlinkConfigCommon"); + dl_cfg_common.to_json(j); + } + if (ul_cfg_common_present) { + j.write_fieldname("uplinkConfigCommon"); + ul_cfg_common.to_json(j); + } + if (supplementary_ul_cfg_present) { + j.write_fieldname("supplementaryUplinkConfig"); + supplementary_ul_cfg.to_json(j); + } + if (n_timing_advance_offset_present) { + j.write_str("n-TimingAdvanceOffset", n_timing_advance_offset.to_string()); + } + if (ssb_positions_in_burst_present) { + j.write_fieldname("ssb-PositionsInBurst"); + ssb_positions_in_burst.to_json(j); + } + if (ssb_periodicity_serving_cell_present) { + j.write_str("ssb-periodicityServingCell", ssb_periodicity_serving_cell.to_string()); + } + j.write_str("dmrs-TypeA-Position", dmrs_type_a_position.to_string()); + if (lte_crs_to_match_around_present) { + j.write_fieldname("lte-CRS-ToMatchAround"); + lte_crs_to_match_around.to_json(j); + } + if (rate_match_pattern_to_add_mod_list_present) { + j.start_array("rateMatchPatternToAddModList"); + 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 (const auto& e1 : rate_match_pattern_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (ssb_subcarrier_spacing_present) { + j.write_str("ssbSubcarrierSpacing", ssb_subcarrier_spacing.to_string()); + } + if (tdd_ul_dl_cfg_common_present) { + j.write_fieldname("tdd-UL-DL-ConfigurationCommon"); + tdd_ul_dl_cfg_common.to_json(j); + } + j.write_int("ss-PBCH-BlockPower", ss_pbch_block_pwr); j.end_obj(); - j.end_array(); } -// CA-BandwidthClassEUTRA ::= ENUMERATED -std::string ca_bw_class_eutra_opts::to_string() const +std::string serving_cell_cfg_common_s::n_timing_advance_offset_opts::to_string() const { - static const char* options[] = {"a", "b", "c", "d", "e", "f"}; - return convert_enum_idx(options, 6, value, "ca_bw_class_eutra_e"); + static const char* options[] = {"n0", "n25600", "n39936"}; + return convert_enum_idx(options, 3, value, "serving_cell_cfg_common_s::n_timing_advance_offset_e_"); } - -// CA-BandwidthClassNR ::= ENUMERATED -std::string ca_bw_class_nr_opts::to_string() const +uint16_t serving_cell_cfg_common_s::n_timing_advance_offset_opts::to_number() const { - 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"); + 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_"); } -// BandParameters ::= CHOICE -void band_params_c::destroy_() +void serving_cell_cfg_common_s::ssb_positions_in_burst_c_::destroy_() { switch (type_) { - case types::eutra: - c.destroy(); + case types::short_bitmap: + c.destroy >(); break; - case types::nr: - c.destroy(); + case types::medium_bitmap: + c.destroy >(); + break; + case types::long_bitmap: + c.destroy >(); break; default: break; } } -void band_params_c::set(types::options e) +void serving_cell_cfg_common_s::ssb_positions_in_burst_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::eutra: - c.init(); + case types::short_bitmap: + c.init >(); break; - case types::nr: - c.init(); + case types::medium_bitmap: + c.init >(); + break; + case types::long_bitmap: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "band_params_c"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); } } -band_params_c::band_params_c(const band_params_c& other) +serving_cell_cfg_common_s::ssb_positions_in_burst_c_::ssb_positions_in_burst_c_( + const serving_cell_cfg_common_s::ssb_positions_in_burst_c_& other) { type_ = other.type(); switch (type_) { - case types::eutra: - c.init(other.c.get()); + case types::short_bitmap: + c.init(other.c.get >()); break; - case types::nr: - c.init(other.c.get()); + case types::medium_bitmap: + c.init(other.c.get >()); + break; + case types::long_bitmap: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "band_params_c"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); } } -band_params_c& band_params_c::operator=(const band_params_c& other) +serving_cell_cfg_common_s::ssb_positions_in_burst_c_& serving_cell_cfg_common_s::ssb_positions_in_burst_c_::operator=( + const serving_cell_cfg_common_s::ssb_positions_in_burst_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::eutra: - c.set(other.c.get()); + case types::short_bitmap: + c.set(other.c.get >()); break; - case types::nr: - c.set(other.c.get()); + case types::medium_bitmap: + c.set(other.c.get >()); + break; + case types::long_bitmap: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "band_params_c"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); } return *this; } -void band_params_c::to_json(json_writer& j) const +void serving_cell_cfg_common_s::ssb_positions_in_burst_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::eutra: - j.write_fieldname("eutra"); - j.start_obj(); - j.write_int("bandEUTRA", c.get().band_eutra); - if (c.get().ca_bw_class_dl_eutra_present) { - j.write_str("ca-BandwidthClassDL-EUTRA", c.get().ca_bw_class_dl_eutra.to_string()); - } - if (c.get().ca_bw_class_ul_eutra_present) { - j.write_str("ca-BandwidthClassUL-EUTRA", c.get().ca_bw_class_ul_eutra.to_string()); - } - j.end_obj(); + case types::short_bitmap: + j.write_str("shortBitmap", c.get >().to_string()); break; - case types::nr: - j.write_fieldname("nr"); - j.start_obj(); - j.write_int("bandNR", c.get().band_nr); - if (c.get().ca_bw_class_dl_nr_present) { - j.write_str("ca-BandwidthClassDL-NR", c.get().ca_bw_class_dl_nr.to_string()); - } - if (c.get().ca_bw_class_ul_nr_present) { - j.write_str("ca-BandwidthClassUL-NR", c.get().ca_bw_class_ul_nr.to_string()); - } - j.end_obj(); + case types::medium_bitmap: + j.write_str("mediumBitmap", c.get >().to_string()); + break; + case types::long_bitmap: + j.write_str("longBitmap", c.get >().to_string()); break; default: - log_invalid_choice_id(type_, "band_params_c"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); } j.end_obj(); } -SRSASN_CODE band_params_c::pack(bit_ref& bref) const +SRSASN_CODE serving_cell_cfg_common_s::ssb_positions_in_burst_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::eutra: - HANDLE_CODE(bref.pack(c.get().ca_bw_class_dl_eutra_present, 1)); - HANDLE_CODE(bref.pack(c.get().ca_bw_class_ul_eutra_present, 1)); - HANDLE_CODE(pack_integer(bref, c.get().band_eutra, (uint16_t)1u, (uint16_t)256u)); - if (c.get().ca_bw_class_dl_eutra_present) { - HANDLE_CODE(c.get().ca_bw_class_dl_eutra.pack(bref)); - } - if (c.get().ca_bw_class_ul_eutra_present) { - HANDLE_CODE(c.get().ca_bw_class_ul_eutra.pack(bref)); - } + case types::short_bitmap: + HANDLE_CODE(c.get >().pack(bref)); break; - case types::nr: - HANDLE_CODE(bref.pack(c.get().ca_bw_class_dl_nr_present, 1)); - HANDLE_CODE(bref.pack(c.get().ca_bw_class_ul_nr_present, 1)); - HANDLE_CODE(pack_integer(bref, c.get().band_nr, (uint16_t)1u, (uint16_t)1024u)); - if (c.get().ca_bw_class_dl_nr_present) { - HANDLE_CODE(c.get().ca_bw_class_dl_nr.pack(bref)); - } - if (c.get().ca_bw_class_ul_nr_present) { - HANDLE_CODE(c.get().ca_bw_class_ul_nr.pack(bref)); - } + case types::medium_bitmap: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::long_bitmap: + HANDLE_CODE(c.get >().pack(bref)); break; default: - log_invalid_choice_id(type_, "band_params_c"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE band_params_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::eutra: - HANDLE_CODE(bref.unpack(c.get().ca_bw_class_dl_eutra_present, 1)); - HANDLE_CODE(bref.unpack(c.get().ca_bw_class_ul_eutra_present, 1)); - HANDLE_CODE(unpack_integer(c.get().band_eutra, bref, (uint16_t)1u, (uint16_t)256u)); - if (c.get().ca_bw_class_dl_eutra_present) { - HANDLE_CODE(c.get().ca_bw_class_dl_eutra.unpack(bref)); - } - if (c.get().ca_bw_class_ul_eutra_present) { - HANDLE_CODE(c.get().ca_bw_class_ul_eutra.unpack(bref)); - } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE serving_cell_cfg_common_s::ssb_positions_in_burst_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::short_bitmap: + HANDLE_CODE(c.get >().unpack(bref)); break; - case types::nr: - HANDLE_CODE(bref.unpack(c.get().ca_bw_class_dl_nr_present, 1)); - HANDLE_CODE(bref.unpack(c.get().ca_bw_class_ul_nr_present, 1)); - HANDLE_CODE(unpack_integer(c.get().band_nr, bref, (uint16_t)1u, (uint16_t)1024u)); - if (c.get().ca_bw_class_dl_nr_present) { - HANDLE_CODE(c.get().ca_bw_class_dl_nr.unpack(bref)); - } - if (c.get().ca_bw_class_ul_nr_present) { - HANDLE_CODE(c.get().ca_bw_class_ul_nr.unpack(bref)); - } + case types::medium_bitmap: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::long_bitmap: + HANDLE_CODE(c.get >().unpack(bref)); break; default: - log_invalid_choice_id(type_, "band_params_c"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string band_params_c::types_opts::to_string() const +std::string serving_cell_cfg_common_s::ssb_positions_in_burst_c_::types_opts::to_string() const { - static const char* options[] = {"eutra", "nr"}; - return convert_enum_idx(options, 2, value, "band_params_c::types"); + 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"); } -// CA-ParametersEUTRA ::= SEQUENCE -SRSASN_CODE ca_params_eutra_s::pack(bit_ref& bref) const +std::string serving_cell_cfg_common_s::ssb_periodicity_serving_cell_opts::to_string() const +{ + 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 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 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 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 +SRSASN_CODE tag_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(multiple_timing_advance_present, 1)); - HANDLE_CODE(bref.pack(simul_rx_tx_present, 1)); - HANDLE_CODE(bref.pack(supported_naics_minus2_crs_ap_present, 1)); - HANDLE_CODE(bref.pack(add_rx_tx_performance_req_present, 1)); - HANDLE_CODE(bref.pack(ue_ca_pwr_class_n_present, 1)); - HANDLE_CODE(bref.pack(supported_bw_combination_set_eutra_v1530_present, 1)); + HANDLE_CODE(pack_integer(bref, tag_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(time_align_timer.pack(bref)); - if (supported_naics_minus2_crs_ap_present) { - HANDLE_CODE(supported_naics_minus2_crs_ap.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE tag_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(tag_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(time_align_timer.unpack(bref)); + + return SRSASN_SUCCESS; +} +void tag_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("tag-Id", tag_id); + j.write_str("timeAlignmentTimer", time_align_timer.to_string()); + j.end_obj(); +} + +// TDD-UL-DL-ConfigDedicated ::= SEQUENCE +SRSASN_CODE tdd_ul_dl_cfg_ded_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(slot_specific_cfgs_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(slot_specific_cfgs_to_release_list_present, 1)); + + if (slot_specific_cfgs_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, slot_specific_cfgs_to_add_mod_list, 1, 320)); } - if (supported_bw_combination_set_eutra_v1530_present) { - HANDLE_CODE(supported_bw_combination_set_eutra_v1530.pack(bref)); + if (slot_specific_cfgs_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, slot_specific_cfgs_to_release_list, 1, 320, integer_packer(0, 319))); } return SRSASN_SUCCESS; } -SRSASN_CODE ca_params_eutra_s::unpack(cbit_ref& bref) +SRSASN_CODE tdd_ul_dl_cfg_ded_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(multiple_timing_advance_present, 1)); - HANDLE_CODE(bref.unpack(simul_rx_tx_present, 1)); - HANDLE_CODE(bref.unpack(supported_naics_minus2_crs_ap_present, 1)); - HANDLE_CODE(bref.unpack(add_rx_tx_performance_req_present, 1)); - HANDLE_CODE(bref.unpack(ue_ca_pwr_class_n_present, 1)); - HANDLE_CODE(bref.unpack(supported_bw_combination_set_eutra_v1530_present, 1)); + HANDLE_CODE(bref.unpack(slot_specific_cfgs_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(slot_specific_cfgs_to_release_list_present, 1)); - if (supported_naics_minus2_crs_ap_present) { - HANDLE_CODE(supported_naics_minus2_crs_ap.unpack(bref)); + if (slot_specific_cfgs_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(slot_specific_cfgs_to_add_mod_list, bref, 1, 320)); } - if (supported_bw_combination_set_eutra_v1530_present) { - HANDLE_CODE(supported_bw_combination_set_eutra_v1530.unpack(bref)); + if (slot_specific_cfgs_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(slot_specific_cfgs_to_release_list, bref, 1, 320, integer_packer(0, 319))); } return SRSASN_SUCCESS; } -void ca_params_eutra_s::to_json(json_writer& j) const +void tdd_ul_dl_cfg_ded_s::to_json(json_writer& j) const { j.start_obj(); - if (multiple_timing_advance_present) { - j.write_str("multipleTimingAdvance", "supported"); - } - if (simul_rx_tx_present) { - j.write_str("simultaneousRx-Tx", "supported"); - } - if (supported_naics_minus2_crs_ap_present) { - j.write_str("supportedNAICS-2CRS-AP", supported_naics_minus2_crs_ap.to_string()); - } - if (add_rx_tx_performance_req_present) { - j.write_str("additionalRx-Tx-PerformanceReq", "supported"); - } - if (ue_ca_pwr_class_n_present) { - j.write_str("ue-CA-PowerClass-N", "class2"); + if (slot_specific_cfgs_to_add_mod_list_present) { + j.start_array("slotSpecificConfigurationsToAddModList"); + for (const auto& e1 : slot_specific_cfgs_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); } - if (supported_bw_combination_set_eutra_v1530_present) { - j.write_str("supportedBandwidthCombinationSetEUTRA-v1530", supported_bw_combination_set_eutra_v1530.to_string()); + if (slot_specific_cfgs_to_release_list_present) { + j.start_array("slotSpecificConfigurationsToReleaseList"); + for (const auto& e1 : slot_specific_cfgs_to_release_list) { + j.write_int(e1); + } + j.end_array(); } j.end_obj(); } -// CA-ParametersNR ::= SEQUENCE -SRSASN_CODE ca_params_nr_s::pack(bit_ref& bref) const +// UL-AM-RLC ::= SEQUENCE +SRSASN_CODE ul_am_rlc_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(multiple_timing_advances_present, 1)); - HANDLE_CODE(bref.pack(parallel_tx_srs_pucch_pusch_present, 1)); - HANDLE_CODE(bref.pack(parallel_tx_prach_srs_pucch_pusch_present, 1)); - HANDLE_CODE(bref.pack(simul_rx_tx_inter_band_ca_present, 1)); - HANDLE_CODE(bref.pack(simul_rx_tx_sul_present, 1)); - HANDLE_CODE(bref.pack(diff_numerology_across_pucch_group_present, 1)); - HANDLE_CODE(bref.pack(diff_numerology_within_pucch_group_present, 1)); - HANDLE_CODE(bref.pack(supported_num_tag_present, 1)); + HANDLE_CODE(bref.pack(sn_field_len_present, 1)); - if (supported_num_tag_present) { - HANDLE_CODE(supported_num_tag.pack(bref)); + if (sn_field_len_present) { + HANDLE_CODE(sn_field_len.pack(bref)); } + HANDLE_CODE(t_poll_retx.pack(bref)); + HANDLE_CODE(poll_pdu.pack(bref)); + HANDLE_CODE(poll_byte.pack(bref)); + HANDLE_CODE(max_retx_thres.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ca_params_nr_s::unpack(cbit_ref& bref) +SRSASN_CODE ul_am_rlc_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(multiple_timing_advances_present, 1)); - HANDLE_CODE(bref.unpack(parallel_tx_srs_pucch_pusch_present, 1)); - HANDLE_CODE(bref.unpack(parallel_tx_prach_srs_pucch_pusch_present, 1)); - HANDLE_CODE(bref.unpack(simul_rx_tx_inter_band_ca_present, 1)); - HANDLE_CODE(bref.unpack(simul_rx_tx_sul_present, 1)); - HANDLE_CODE(bref.unpack(diff_numerology_across_pucch_group_present, 1)); - HANDLE_CODE(bref.unpack(diff_numerology_within_pucch_group_present, 1)); - HANDLE_CODE(bref.unpack(supported_num_tag_present, 1)); + HANDLE_CODE(bref.unpack(sn_field_len_present, 1)); - if (supported_num_tag_present) { - HANDLE_CODE(supported_num_tag.unpack(bref)); + if (sn_field_len_present) { + HANDLE_CODE(sn_field_len.unpack(bref)); } + HANDLE_CODE(t_poll_retx.unpack(bref)); + HANDLE_CODE(poll_pdu.unpack(bref)); + HANDLE_CODE(poll_byte.unpack(bref)); + HANDLE_CODE(max_retx_thres.unpack(bref)); return SRSASN_SUCCESS; } -void ca_params_nr_s::to_json(json_writer& j) const +void ul_am_rlc_s::to_json(json_writer& j) const { j.start_obj(); - if (multiple_timing_advances_present) { - j.write_str("multipleTimingAdvances", "supported"); - } - if (parallel_tx_srs_pucch_pusch_present) { - j.write_str("parallelTxSRS-PUCCH-PUSCH", "supported"); - } - if (parallel_tx_prach_srs_pucch_pusch_present) { - j.write_str("parallelTxPRACH-SRS-PUCCH-PUSCH", "supported"); - } - if (simul_rx_tx_inter_band_ca_present) { - j.write_str("simultaneousRxTxInterBandCA", "supported"); - } - if (simul_rx_tx_sul_present) { - j.write_str("simultaneousRxTxSUL", "supported"); - } - if (diff_numerology_across_pucch_group_present) { - j.write_str("diffNumerologyAcrossPUCCH-Group", "supported"); - } - if (diff_numerology_within_pucch_group_present) { - j.write_str("diffNumerologyWithinPUCCH-Group", "supported"); - } - if (supported_num_tag_present) { - j.write_str("supportedNumberTAG", supported_num_tag.to_string()); + if (sn_field_len_present) { + j.write_str("sn-FieldLength", sn_field_len.to_string()); } + j.write_str("t-PollRetransmit", t_poll_retx.to_string()); + j.write_str("pollPDU", poll_pdu.to_string()); + j.write_str("pollByte", poll_byte.to_string()); + j.write_str("maxRetxThreshold", max_retx_thres.to_string()); j.end_obj(); } -std::string ca_params_nr_s::supported_num_tag_opts::to_string() const +std::string ul_am_rlc_s::max_retx_thres_opts::to_string() const { - static const char* options[] = {"n2", "n3", "n4"}; - return convert_enum_idx(options, 3, value, "ca_params_nr_s::supported_num_tag_e_"); + 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 ca_params_nr_s::supported_num_tag_opts::to_number() const +uint8_t ul_am_rlc_s::max_retx_thres_opts::to_number() const { - static const uint8_t options[] = {2, 3, 4}; - return map_enum_number(options, 3, value, "ca_params_nr_s::supported_num_tag_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_"); } -// MRDC-Parameters ::= SEQUENCE -SRSASN_CODE mrdc_params_s::pack(bit_ref& bref) const +// UL-UM-RLC ::= SEQUENCE +SRSASN_CODE ul_um_rlc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sn_field_len_present, 1)); + + if (sn_field_len_present) { + HANDLE_CODE(sn_field_len.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_um_rlc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sn_field_len_present, 1)); + + if (sn_field_len_present) { + HANDLE_CODE(sn_field_len.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_um_rlc_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sn_field_len_present) { + j.write_str("sn-FieldLength", sn_field_len.to_string()); + } + j.end_obj(); +} + +// UplinkConfig ::= SEQUENCE +SRSASN_CODE ul_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(single_ul_tx_present, 1)); - HANDLE_CODE(bref.pack(dynamic_pwr_sharing_present, 1)); - HANDLE_CODE(bref.pack(tdm_pattern_present, 1)); - HANDLE_CODE(bref.pack(ul_sharing_eutra_nr_present, 1)); - HANDLE_CODE(bref.pack(ul_switching_time_eutra_nr_present, 1)); - HANDLE_CODE(bref.pack(simul_rx_tx_inter_band_endc_present, 1)); - HANDLE_CODE(bref.pack(async_intra_band_endc_present, 1)); + HANDLE_CODE(bref.pack(init_ul_bwp_present, 1)); + HANDLE_CODE(bref.pack(ul_bwp_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(ul_bwp_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(first_active_ul_bwp_id_present, 1)); + HANDLE_CODE(bref.pack(pusch_serving_cell_cfg_present, 1)); + HANDLE_CODE(bref.pack(carrier_switching_present, 1)); - if (ul_sharing_eutra_nr_present) { - HANDLE_CODE(ul_sharing_eutra_nr.pack(bref)); + if (init_ul_bwp_present) { + HANDLE_CODE(init_ul_bwp.pack(bref)); } - if (ul_switching_time_eutra_nr_present) { - HANDLE_CODE(ul_switching_time_eutra_nr.pack(bref)); + if (ul_bwp_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_bwp_to_release_list, 1, 4, integer_packer(0, 4))); + } + if (ul_bwp_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_bwp_to_add_mod_list, 1, 4)); + } + if (first_active_ul_bwp_id_present) { + HANDLE_CODE(pack_integer(bref, first_active_ul_bwp_id, (uint8_t)0u, (uint8_t)4u)); + } + if (pusch_serving_cell_cfg_present) { + HANDLE_CODE(pusch_serving_cell_cfg.pack(bref)); + } + if (carrier_switching_present) { + HANDLE_CODE(carrier_switching.pack(bref)); } if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= dual_pa_architecture_present; - group_flags[0] |= intra_band_endc_support_v1540_present; - group_flags[0] |= ul_timing_align_eutra_nr_present; + group_flags[0] |= pwr_boost_pi2_bpsk_present; + group_flags[0] |= ul_ch_bw_per_scs_list.is_present(); group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(dual_pa_architecture_present, 1)); - HANDLE_CODE(bref.pack(intra_band_endc_support_v1540_present, 1)); - HANDLE_CODE(bref.pack(ul_timing_align_eutra_nr_present, 1)); - if (intra_band_endc_support_v1540_present) { - HANDLE_CODE(intra_band_endc_support_v1540.pack(bref)); + HANDLE_CODE(bref.pack(pwr_boost_pi2_bpsk_present, 1)); + HANDLE_CODE(bref.pack(ul_ch_bw_per_scs_list.is_present(), 1)); + if (pwr_boost_pi2_bpsk_present) { + HANDLE_CODE(bref.pack(pwr_boost_pi2_bpsk, 1)); + } + if (ul_ch_bw_per_scs_list.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ul_ch_bw_per_scs_list, 1, 5)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE mrdc_params_s::unpack(cbit_ref& bref) +SRSASN_CODE ul_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(single_ul_tx_present, 1)); - HANDLE_CODE(bref.unpack(dynamic_pwr_sharing_present, 1)); - HANDLE_CODE(bref.unpack(tdm_pattern_present, 1)); - HANDLE_CODE(bref.unpack(ul_sharing_eutra_nr_present, 1)); - HANDLE_CODE(bref.unpack(ul_switching_time_eutra_nr_present, 1)); - HANDLE_CODE(bref.unpack(simul_rx_tx_inter_band_endc_present, 1)); - HANDLE_CODE(bref.unpack(async_intra_band_endc_present, 1)); + HANDLE_CODE(bref.unpack(init_ul_bwp_present, 1)); + HANDLE_CODE(bref.unpack(ul_bwp_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(ul_bwp_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(first_active_ul_bwp_id_present, 1)); + HANDLE_CODE(bref.unpack(pusch_serving_cell_cfg_present, 1)); + HANDLE_CODE(bref.unpack(carrier_switching_present, 1)); - if (ul_sharing_eutra_nr_present) { - HANDLE_CODE(ul_sharing_eutra_nr.unpack(bref)); + if (init_ul_bwp_present) { + HANDLE_CODE(init_ul_bwp.unpack(bref)); } - if (ul_switching_time_eutra_nr_present) { - HANDLE_CODE(ul_switching_time_eutra_nr.unpack(bref)); + if (ul_bwp_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_bwp_to_release_list, bref, 1, 4, integer_packer(0, 4))); + } + if (ul_bwp_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_bwp_to_add_mod_list, bref, 1, 4)); + } + if (first_active_ul_bwp_id_present) { + HANDLE_CODE(unpack_integer(first_active_ul_bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); + } + if (pusch_serving_cell_cfg_present) { + HANDLE_CODE(pusch_serving_cell_cfg.unpack(bref)); + } + if (carrier_switching_present) { + HANDLE_CODE(carrier_switching.unpack(bref)); } if (ext) { @@ -42530,1751 +45175,1832 @@ SRSASN_CODE mrdc_params_s::unpack(cbit_ref& bref) if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(dual_pa_architecture_present, 1)); - HANDLE_CODE(bref.unpack(intra_band_endc_support_v1540_present, 1)); - HANDLE_CODE(bref.unpack(ul_timing_align_eutra_nr_present, 1)); - if (intra_band_endc_support_v1540_present) { - HANDLE_CODE(intra_band_endc_support_v1540.unpack(bref)); + HANDLE_CODE(bref.unpack(pwr_boost_pi2_bpsk_present, 1)); + bool ul_ch_bw_per_scs_list_present; + HANDLE_CODE(bref.unpack(ul_ch_bw_per_scs_list_present, 1)); + ul_ch_bw_per_scs_list.set_present(ul_ch_bw_per_scs_list_present); + if (pwr_boost_pi2_bpsk_present) { + HANDLE_CODE(bref.unpack(pwr_boost_pi2_bpsk, 1)); + } + if (ul_ch_bw_per_scs_list.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*ul_ch_bw_per_scs_list, bref, 1, 5)); } } } return SRSASN_SUCCESS; } -void mrdc_params_s::to_json(json_writer& j) const +void ul_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (single_ul_tx_present) { - j.write_str("singleUL-Transmission", "supported"); - } - if (dynamic_pwr_sharing_present) { - j.write_str("dynamicPowerSharing", "supported"); + if (init_ul_bwp_present) { + j.write_fieldname("initialUplinkBWP"); + init_ul_bwp.to_json(j); } - if (tdm_pattern_present) { - j.write_str("tdm-Pattern", "supported"); + if (ul_bwp_to_release_list_present) { + j.start_array("uplinkBWP-ToReleaseList"); + for (const auto& e1 : ul_bwp_to_release_list) { + j.write_int(e1); + } + j.end_array(); } - if (ul_sharing_eutra_nr_present) { - j.write_str("ul-SharingEUTRA-NR", ul_sharing_eutra_nr.to_string()); + if (ul_bwp_to_add_mod_list_present) { + j.start_array("uplinkBWP-ToAddModList"); + for (const auto& e1 : ul_bwp_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); } - if (ul_switching_time_eutra_nr_present) { - j.write_str("ul-SwitchingTimeEUTRA-NR", ul_switching_time_eutra_nr.to_string()); + if (first_active_ul_bwp_id_present) { + j.write_int("firstActiveUplinkBWP-Id", first_active_ul_bwp_id); } - if (simul_rx_tx_inter_band_endc_present) { - j.write_str("simultaneousRxTxInterBandENDC", "supported"); + if (pusch_serving_cell_cfg_present) { + j.write_fieldname("pusch-ServingCellConfig"); + pusch_serving_cell_cfg.to_json(j); } - if (async_intra_band_endc_present) { - j.write_str("asyncIntraBandENDC", "supported"); + if (carrier_switching_present) { + j.write_fieldname("carrierSwitching"); + carrier_switching.to_json(j); } if (ext) { - if (dual_pa_architecture_present) { - j.write_str("dualPA-Architecture", "supported"); - } - if (intra_band_endc_support_v1540_present) { - j.write_str("intraBandENDC-Support-v1540", intra_band_endc_support_v1540.to_string()); + if (pwr_boost_pi2_bpsk_present) { + j.write_bool("powerBoostPi2BPSK", pwr_boost_pi2_bpsk); } - if (ul_timing_align_eutra_nr_present) { - j.write_str("ul-TimingAlignmentEUTRA-NR", "required"); + if (ul_ch_bw_per_scs_list.is_present()) { + j.start_array("uplinkChannelBW-PerSCS-List"); + for (const auto& e1 : *ul_ch_bw_per_scs_list) { + e1.to_json(j); + } + j.end_array(); } } j.end_obj(); } -std::string mrdc_params_s::ul_sharing_eutra_nr_opts::to_string() const -{ - 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 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 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 const char* options[] = {"non-contiguous", "both"}; - return convert_enum_idx(options, 2, value, "mrdc_params_s::intra_band_endc_support_v1540_e_"); -} - -// BandCombination ::= SEQUENCE -SRSASN_CODE band_combination_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ca_params_eutra_present, 1)); - HANDLE_CODE(bref.pack(ca_params_nr_present, 1)); - HANDLE_CODE(bref.pack(mrdc_params_present, 1)); - HANDLE_CODE(bref.pack(supported_bw_combination_set_present, 1)); - HANDLE_CODE(bref.pack(pwr_class_v1530_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, band_list, 1, 32)); - HANDLE_CODE(pack_integer(bref, feature_set_combination, (uint16_t)0u, (uint16_t)1024u)); - if (ca_params_eutra_present) { - HANDLE_CODE(ca_params_eutra.pack(bref)); - } - if (ca_params_nr_present) { - HANDLE_CODE(ca_params_nr.pack(bref)); - } - if (mrdc_params_present) { - HANDLE_CODE(mrdc_params.pack(bref)); - } - if (supported_bw_combination_set_present) { - HANDLE_CODE(supported_bw_combination_set.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE band_combination_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ca_params_eutra_present, 1)); - HANDLE_CODE(bref.unpack(ca_params_nr_present, 1)); - HANDLE_CODE(bref.unpack(mrdc_params_present, 1)); - HANDLE_CODE(bref.unpack(supported_bw_combination_set_present, 1)); - HANDLE_CODE(bref.unpack(pwr_class_v1530_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(band_list, bref, 1, 32)); - HANDLE_CODE(unpack_integer(feature_set_combination, bref, (uint16_t)0u, (uint16_t)1024u)); - if (ca_params_eutra_present) { - HANDLE_CODE(ca_params_eutra.unpack(bref)); - } - if (ca_params_nr_present) { - HANDLE_CODE(ca_params_nr.unpack(bref)); - } - if (mrdc_params_present) { - HANDLE_CODE(mrdc_params.unpack(bref)); - } - if (supported_bw_combination_set_present) { - HANDLE_CODE(supported_bw_combination_set.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void band_combination_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("bandList"); - for (const auto& e1 : band_list) { - e1.to_json(j); - } - j.end_array(); - j.write_int("featureSetCombination", feature_set_combination); - if (ca_params_eutra_present) { - j.write_fieldname("ca-ParametersEUTRA"); - ca_params_eutra.to_json(j); - } - if (ca_params_nr_present) { - j.write_fieldname("ca-ParametersNR"); - ca_params_nr.to_json(j); - } - if (mrdc_params_present) { - j.write_fieldname("mrdc-Parameters"); - mrdc_params.to_json(j); - } - if (supported_bw_combination_set_present) { - j.write_str("supportedBandwidthCombinationSet", supported_bw_combination_set.to_string()); - } - if (pwr_class_v1530_present) { - j.write_str("powerClass-v1530", "pc2"); - } - j.end_obj(); -} - -// SRS-SwitchingTimeEUTRA ::= SEQUENCE -SRSASN_CODE srs_switching_time_eutra_s::pack(bit_ref& bref) const +// BSR-Config ::= SEQUENCE +SRSASN_CODE bsr_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(switching_time_dl_present, 1)); - HANDLE_CODE(bref.pack(switching_time_ul_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(lc_ch_sr_delay_timer_present, 1)); - if (switching_time_dl_present) { - HANDLE_CODE(switching_time_dl.pack(bref)); - } - if (switching_time_ul_present) { - HANDLE_CODE(switching_time_ul.pack(bref)); + HANDLE_CODE(periodic_bsr_timer.pack(bref)); + HANDLE_CODE(retx_bsr_timer.pack(bref)); + if (lc_ch_sr_delay_timer_present) { + HANDLE_CODE(lc_ch_sr_delay_timer.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE srs_switching_time_eutra_s::unpack(cbit_ref& bref) +SRSASN_CODE bsr_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(switching_time_dl_present, 1)); - HANDLE_CODE(bref.unpack(switching_time_ul_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(lc_ch_sr_delay_timer_present, 1)); - if (switching_time_dl_present) { - HANDLE_CODE(switching_time_dl.unpack(bref)); - } - if (switching_time_ul_present) { - HANDLE_CODE(switching_time_ul.unpack(bref)); + HANDLE_CODE(periodic_bsr_timer.unpack(bref)); + HANDLE_CODE(retx_bsr_timer.unpack(bref)); + if (lc_ch_sr_delay_timer_present) { + HANDLE_CODE(lc_ch_sr_delay_timer.unpack(bref)); } return SRSASN_SUCCESS; } -void srs_switching_time_eutra_s::to_json(json_writer& j) const +void bsr_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (switching_time_dl_present) { - j.write_str("switchingTimeDL", switching_time_dl.to_string()); - } - if (switching_time_ul_present) { - j.write_str("switchingTimeUL", switching_time_ul.to_string()); + j.write_str("periodicBSR-Timer", periodic_bsr_timer.to_string()); + j.write_str("retxBSR-Timer", retx_bsr_timer.to_string()); + if (lc_ch_sr_delay_timer_present) { + j.write_str("logicalChannelSR-DelayTimer", lc_ch_sr_delay_timer.to_string()); } j.end_obj(); } -std::string srs_switching_time_eutra_s::switching_time_dl_opts::to_string() const +std::string bsr_cfg_s::periodic_bsr_timer_opts::to_string() const { - 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_"); + 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_"); } -float srs_switching_time_eutra_s::switching_time_dl_opts::to_number() const +int16_t bsr_cfg_s::periodic_bsr_timer_opts::to_number() const { - 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_"); + 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 srs_switching_time_eutra_s::switching_time_dl_opts::to_number_string() const + +std::string bsr_cfg_s::retx_bsr_timer_opts::to_string() const { - 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_"); + 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_"); } - -std::string srs_switching_time_eutra_s::switching_time_ul_opts::to_string() const +uint16_t bsr_cfg_s::retx_bsr_timer_opts::to_number() const { - 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_"); + 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_"); } -float srs_switching_time_eutra_s::switching_time_ul_opts::to_number() const + +std::string bsr_cfg_s::lc_ch_sr_delay_timer_opts::to_string() const { - 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_"); + 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_"); } -std::string srs_switching_time_eutra_s::switching_time_ul_opts::to_number_string() const +uint16_t bsr_cfg_s::lc_ch_sr_delay_timer_opts::to_number() const { - 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_"); + 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_"); } -// SRS-SwitchingTimeNR ::= SEQUENCE -SRSASN_CODE srs_switching_time_nr_s::pack(bit_ref& bref) const +// DRX-Config ::= SEQUENCE +SRSASN_CODE drx_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(switching_time_dl_present, 1)); - HANDLE_CODE(bref.pack(switching_time_ul_present, 1)); + HANDLE_CODE(bref.pack(short_drx_present, 1)); - if (switching_time_dl_present) { - HANDLE_CODE(switching_time_dl.pack(bref)); - } - if (switching_time_ul_present) { - HANDLE_CODE(switching_time_ul.pack(bref)); + HANDLE_CODE(drx_on_dur_timer.pack(bref)); + HANDLE_CODE(drx_inactivity_timer.pack(bref)); + HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_dl, (uint8_t)0u, (uint8_t)56u)); + HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_ul, (uint8_t)0u, (uint8_t)56u)); + HANDLE_CODE(drx_retx_timer_dl.pack(bref)); + HANDLE_CODE(drx_retx_timer_ul.pack(bref)); + HANDLE_CODE(drx_long_cycle_start_offset.pack(bref)); + if (short_drx_present) { + HANDLE_CODE(short_drx.drx_short_cycle.pack(bref)); + HANDLE_CODE(pack_integer(bref, short_drx.drx_short_cycle_timer, (uint8_t)1u, (uint8_t)16u)); } + HANDLE_CODE(pack_integer(bref, drx_slot_offset, (uint8_t)0u, (uint8_t)31u)); return SRSASN_SUCCESS; } -SRSASN_CODE srs_switching_time_nr_s::unpack(cbit_ref& bref) +SRSASN_CODE drx_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(switching_time_dl_present, 1)); - HANDLE_CODE(bref.unpack(switching_time_ul_present, 1)); + HANDLE_CODE(bref.unpack(short_drx_present, 1)); - if (switching_time_dl_present) { - HANDLE_CODE(switching_time_dl.unpack(bref)); - } - if (switching_time_ul_present) { - HANDLE_CODE(switching_time_ul.unpack(bref)); + HANDLE_CODE(drx_on_dur_timer.unpack(bref)); + HANDLE_CODE(drx_inactivity_timer.unpack(bref)); + HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_dl, bref, (uint8_t)0u, (uint8_t)56u)); + HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_ul, bref, (uint8_t)0u, (uint8_t)56u)); + HANDLE_CODE(drx_retx_timer_dl.unpack(bref)); + HANDLE_CODE(drx_retx_timer_ul.unpack(bref)); + HANDLE_CODE(drx_long_cycle_start_offset.unpack(bref)); + if (short_drx_present) { + HANDLE_CODE(short_drx.drx_short_cycle.unpack(bref)); + HANDLE_CODE(unpack_integer(short_drx.drx_short_cycle_timer, bref, (uint8_t)1u, (uint8_t)16u)); } + HANDLE_CODE(unpack_integer(drx_slot_offset, bref, (uint8_t)0u, (uint8_t)31u)); return SRSASN_SUCCESS; } -void srs_switching_time_nr_s::to_json(json_writer& j) const +void drx_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (switching_time_dl_present) { - j.write_str("switchingTimeDL", switching_time_dl.to_string()); - } - if (switching_time_ul_present) { - j.write_str("switchingTimeUL", switching_time_ul.to_string()); + j.write_fieldname("drx-onDurationTimer"); + drx_on_dur_timer.to_json(j); + j.write_str("drx-InactivityTimer", drx_inactivity_timer.to_string()); + j.write_int("drx-HARQ-RTT-TimerDL", drx_harq_rtt_timer_dl); + j.write_int("drx-HARQ-RTT-TimerUL", drx_harq_rtt_timer_ul); + j.write_str("drx-RetransmissionTimerDL", drx_retx_timer_dl.to_string()); + j.write_str("drx-RetransmissionTimerUL", drx_retx_timer_ul.to_string()); + j.write_fieldname("drx-LongCycleStartOffset"); + drx_long_cycle_start_offset.to_json(j); + if (short_drx_present) { + j.write_fieldname("shortDRX"); + j.start_obj(); + j.write_str("drx-ShortCycle", short_drx.drx_short_cycle.to_string()); + j.write_int("drx-ShortCycleTimer", short_drx.drx_short_cycle_timer); + j.end_obj(); } + j.write_int("drx-SlotOffset", drx_slot_offset); j.end_obj(); } -std::string srs_switching_time_nr_s::switching_time_dl_opts::to_string() const -{ - 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 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 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 +void drx_cfg_s::drx_on_dur_timer_c_::destroy_() {} +void drx_cfg_s::drx_on_dur_timer_c_::set(types::options 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_"); + destroy_(); + type_ = e; } - -// BandParameters-v1540 ::= SEQUENCE -SRSASN_CODE band_params_v1540_s::pack(bit_ref& bref) const +drx_cfg_s::drx_on_dur_timer_c_::drx_on_dur_timer_c_(const drx_cfg_s::drx_on_dur_timer_c_& other) { - HANDLE_CODE(bref.pack(srs_carrier_switch_present, 1)); - HANDLE_CODE(bref.pack(srs_tx_switch_v1540_present, 1)); - - if (srs_carrier_switch_present) { - HANDLE_CODE(srs_carrier_switch.pack(bref)); - } - if (srs_tx_switch_v1540_present) { - HANDLE_CODE(bref.pack(srs_tx_switch_v1540.tx_switch_impact_to_rx_present, 1)); - HANDLE_CODE(bref.pack(srs_tx_switch_v1540.tx_switch_with_another_band_present, 1)); - HANDLE_CODE(srs_tx_switch_v1540.supported_srs_tx_port_switch.pack(bref)); - if (srs_tx_switch_v1540.tx_switch_impact_to_rx_present) { - HANDLE_CODE(pack_integer(bref, srs_tx_switch_v1540.tx_switch_impact_to_rx, (uint8_t)1u, (uint8_t)32u)); - } - if (srs_tx_switch_v1540.tx_switch_with_another_band_present) { - HANDLE_CODE(pack_integer(bref, srs_tx_switch_v1540.tx_switch_with_another_band, (uint8_t)1u, (uint8_t)32u)); - } + type_ = other.type(); + switch (type_) { + case types::sub_milli_seconds: + c.init(other.c.get()); + break; + case types::milli_seconds: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE band_params_v1540_s::unpack(cbit_ref& bref) +drx_cfg_s::drx_on_dur_timer_c_& drx_cfg_s::drx_on_dur_timer_c_::operator=(const drx_cfg_s::drx_on_dur_timer_c_& other) { - HANDLE_CODE(bref.unpack(srs_carrier_switch_present, 1)); - HANDLE_CODE(bref.unpack(srs_tx_switch_v1540_present, 1)); - - if (srs_carrier_switch_present) { - HANDLE_CODE(srs_carrier_switch.unpack(bref)); + if (this == &other) { + return *this; } - if (srs_tx_switch_v1540_present) { - HANDLE_CODE(bref.unpack(srs_tx_switch_v1540.tx_switch_impact_to_rx_present, 1)); - HANDLE_CODE(bref.unpack(srs_tx_switch_v1540.tx_switch_with_another_band_present, 1)); - HANDLE_CODE(srs_tx_switch_v1540.supported_srs_tx_port_switch.unpack(bref)); - if (srs_tx_switch_v1540.tx_switch_impact_to_rx_present) { - HANDLE_CODE(unpack_integer(srs_tx_switch_v1540.tx_switch_impact_to_rx, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (srs_tx_switch_v1540.tx_switch_with_another_band_present) { - HANDLE_CODE(unpack_integer(srs_tx_switch_v1540.tx_switch_with_another_band, bref, (uint8_t)1u, (uint8_t)32u)); - } + set(other.type()); + switch (type_) { + case types::sub_milli_seconds: + c.set(other.c.get()); + break; + case types::milli_seconds: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); } - return SRSASN_SUCCESS; + return *this; } -void band_params_v1540_s::to_json(json_writer& j) const +void drx_cfg_s::drx_on_dur_timer_c_::to_json(json_writer& j) const { j.start_obj(); - if (srs_carrier_switch_present) { - j.write_fieldname("srs-CarrierSwitch"); - srs_carrier_switch.to_json(j); - } - if (srs_tx_switch_v1540_present) { - j.write_fieldname("srs-TxSwitch-v1540"); - j.start_obj(); - j.write_str("supportedSRS-TxPortSwitch", srs_tx_switch_v1540.supported_srs_tx_port_switch.to_string()); - if (srs_tx_switch_v1540.tx_switch_impact_to_rx_present) { - j.write_int("txSwitchImpactToRx", srs_tx_switch_v1540.tx_switch_impact_to_rx); - } - if (srs_tx_switch_v1540.tx_switch_with_another_band_present) { - j.write_int("txSwitchWithAnotherBand", srs_tx_switch_v1540.tx_switch_with_another_band); - } - j.end_obj(); + switch (type_) { + case types::sub_milli_seconds: + j.write_int("subMilliSeconds", c.get()); + break; + case types::milli_seconds: + j.write_str("milliSeconds", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); } j.end_obj(); } - -void band_params_v1540_s::srs_carrier_switch_c_::destroy_() +SRSASN_CODE drx_cfg_s::drx_on_dur_timer_c_::pack(bit_ref& bref) const { + type_.pack(bref); switch (type_) { - case types::nr: - c.destroy(); + case types::sub_milli_seconds: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)31u)); break; - case types::eutra: - c.destroy(); + case types::milli_seconds: + HANDLE_CODE(c.get().pack(bref)); break; default: - break; + log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } + return SRSASN_SUCCESS; } -void band_params_v1540_s::srs_carrier_switch_c_::set(types::options e) +SRSASN_CODE drx_cfg_s::drx_on_dur_timer_c_::unpack(cbit_ref& bref) { - destroy_(); - type_ = e; + types e; + e.unpack(bref); + set(e); switch (type_) { - case types::nr: - c.init(); - break; - case types::eutra: - c.init(); + case types::sub_milli_seconds: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)31u)); break; - case types::nulltype: + case types::milli_seconds: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); + log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + return SRSASN_ERROR_DECODE_FAIL; } + return SRSASN_SUCCESS; } -band_params_v1540_s::srs_carrier_switch_c_::srs_carrier_switch_c_( - const band_params_v1540_s::srs_carrier_switch_c_& other) + +std::string drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_opts::to_string() const +{ + 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 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 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 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 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 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 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 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 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_() {} +void drx_cfg_s::drx_long_cycle_start_offset_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +drx_cfg_s::drx_long_cycle_start_offset_c_::drx_long_cycle_start_offset_c_( + const drx_cfg_s::drx_long_cycle_start_offset_c_& other) { type_ = other.type(); switch (type_) { - case types::nr: - c.init(other.c.get()); + case types::ms10: + c.init(other.c.get()); break; - case types::eutra: - c.init(other.c.get()); + case types::ms20: + c.init(other.c.get()); + break; + case types::ms32: + c.init(other.c.get()); + break; + case types::ms40: + c.init(other.c.get()); + break; + case types::ms60: + c.init(other.c.get()); + break; + case types::ms64: + c.init(other.c.get()); + break; + case types::ms70: + c.init(other.c.get()); + break; + case types::ms80: + c.init(other.c.get()); + break; + case types::ms128: + c.init(other.c.get()); + break; + case types::ms160: + c.init(other.c.get()); + break; + case types::ms256: + c.init(other.c.get()); + break; + case types::ms320: + c.init(other.c.get()); + break; + case types::ms512: + c.init(other.c.get()); + break; + case types::ms640: + c.init(other.c.get()); + break; + case types::ms1024: + c.init(other.c.get()); + break; + case types::ms1280: + c.init(other.c.get()); + break; + case types::ms2048: + c.init(other.c.get()); + break; + case types::ms2560: + c.init(other.c.get()); + break; + case types::ms5120: + c.init(other.c.get()); + break; + case types::ms10240: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); } } -band_params_v1540_s::srs_carrier_switch_c_& band_params_v1540_s::srs_carrier_switch_c_:: - operator=(const band_params_v1540_s::srs_carrier_switch_c_& other) +drx_cfg_s::drx_long_cycle_start_offset_c_& +drx_cfg_s::drx_long_cycle_start_offset_c_::operator=(const drx_cfg_s::drx_long_cycle_start_offset_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::nr: - c.set(other.c.get()); + case types::ms10: + c.set(other.c.get()); + break; + case types::ms20: + c.set(other.c.get()); + break; + case types::ms32: + c.set(other.c.get()); + break; + case types::ms40: + c.set(other.c.get()); + break; + case types::ms60: + c.set(other.c.get()); + break; + case types::ms64: + c.set(other.c.get()); + break; + case types::ms70: + c.set(other.c.get()); + break; + case types::ms80: + c.set(other.c.get()); + break; + case types::ms128: + c.set(other.c.get()); + break; + case types::ms160: + c.set(other.c.get()); + break; + case types::ms256: + c.set(other.c.get()); + break; + case types::ms320: + c.set(other.c.get()); + break; + case types::ms512: + c.set(other.c.get()); + break; + case types::ms640: + c.set(other.c.get()); + break; + case types::ms1024: + c.set(other.c.get()); + break; + case types::ms1280: + c.set(other.c.get()); + break; + case types::ms2048: + c.set(other.c.get()); + break; + case types::ms2560: + c.set(other.c.get()); break; - case types::eutra: - c.set(other.c.get()); + case types::ms5120: + c.set(other.c.get()); + break; + case types::ms10240: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); } return *this; } -void band_params_v1540_s::srs_carrier_switch_c_::to_json(json_writer& j) const +void drx_cfg_s::drx_long_cycle_start_offset_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::nr: - j.write_fieldname("nr"); - j.start_obj(); - j.start_array("srs-SwitchingTimesListNR"); - for (const auto& e1 : c.get().srs_switching_times_list_nr) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); + case types::ms10: + j.write_int("ms10", c.get()); break; - case types::eutra: - j.write_fieldname("eutra"); - j.start_obj(); - j.start_array("srs-SwitchingTimesListEUTRA"); - for (const auto& e1 : c.get().srs_switching_times_list_eutra) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); + case types::ms20: + j.write_int("ms20", c.get()); + break; + case types::ms32: + j.write_int("ms32", c.get()); + break; + case types::ms40: + j.write_int("ms40", c.get()); + break; + case types::ms60: + j.write_int("ms60", c.get()); + break; + case types::ms64: + j.write_int("ms64", c.get()); + break; + case types::ms70: + j.write_int("ms70", c.get()); + break; + case types::ms80: + j.write_int("ms80", c.get()); + break; + case types::ms128: + j.write_int("ms128", c.get()); + break; + case types::ms160: + j.write_int("ms160", c.get()); + break; + case types::ms256: + j.write_int("ms256", c.get()); + break; + case types::ms320: + j.write_int("ms320", c.get()); + break; + case types::ms512: + j.write_int("ms512", c.get()); + break; + case types::ms640: + j.write_int("ms640", c.get()); + break; + case types::ms1024: + j.write_int("ms1024", c.get()); + break; + case types::ms1280: + j.write_int("ms1280", c.get()); + break; + case types::ms2048: + j.write_int("ms2048", c.get()); + break; + case types::ms2560: + j.write_int("ms2560", c.get()); + break; + case types::ms5120: + j.write_int("ms5120", c.get()); + break; + case types::ms10240: + j.write_int("ms10240", c.get()); break; default: - log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); } j.end_obj(); } -SRSASN_CODE band_params_v1540_s::srs_carrier_switch_c_::pack(bit_ref& bref) const +SRSASN_CODE drx_cfg_s::drx_long_cycle_start_offset_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::nr: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().srs_switching_times_list_nr, 1, 32)); + case types::ms10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); break; - case types::eutra: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().srs_switching_times_list_eutra, 1, 32)); + case types::ms20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::ms32: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::ms40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::ms60: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)59u)); + break; + case types::ms64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::ms70: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)69u)); + break; + case types::ms80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::ms128: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::ms160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::ms256: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); + break; + case types::ms320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::ms512: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)511u)); + break; + case types::ms640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::ms1024: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1023u)); + break; + case types::ms1280: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + case types::ms2048: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2047u)); + break; + case types::ms2560: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + break; + case types::ms5120: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + break; + case types::ms10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); break; default: - log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE band_params_v1540_s::srs_carrier_switch_c_::unpack(cbit_ref& bref) +SRSASN_CODE drx_cfg_s::drx_long_cycle_start_offset_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::nr: - HANDLE_CODE(unpack_dyn_seq_of(c.get().srs_switching_times_list_nr, bref, 1, 32)); + case types::ms10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); break; - case types::eutra: - HANDLE_CODE(unpack_dyn_seq_of(c.get().srs_switching_times_list_eutra, bref, 1, 32)); + case types::ms20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::ms32: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::ms40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::ms60: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)59u)); + break; + case types::ms64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::ms70: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)69u)); + break; + case types::ms80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::ms128: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::ms160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::ms256: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); + break; + case types::ms320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::ms512: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)511u)); + break; + case types::ms640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::ms1024: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1023u)); + break; + case types::ms1280: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + case types::ms2048: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2047u)); + break; + case types::ms2560: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + break; + case types::ms5120: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + break; + case types::ms10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); break; default: - log_invalid_choice_id(type_, "band_params_v1540_s::srs_carrier_switch_c_"); + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string band_params_v1540_s::srs_carrier_switch_c_::types_opts::to_string() const +std::string drx_cfg_s::drx_long_cycle_start_offset_c_::types_opts::to_string() const { - static const char* options[] = {"nr", "eutra"}; - return convert_enum_idx(options, 2, value, "band_params_v1540_s::srs_carrier_switch_c_::types"); + 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"); } - -std::string band_params_v1540_s::srs_tx_switch_v1540_s_::supported_srs_tx_port_switch_opts::to_string() const +uint16_t drx_cfg_s::drx_long_cycle_start_offset_c_::types_opts::to_number() const { - 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_"); + 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"); } -// CA-ParametersNR-v1540 ::= SEQUENCE -SRSASN_CODE ca_params_nr_v1540_s::pack(bit_ref& bref) const +std::string drx_cfg_s::short_drx_s_::drx_short_cycle_opts::to_string() const { - HANDLE_CODE(bref.pack(simul_srs_assoc_csi_rs_all_cc_present, 1)); - HANDLE_CODE(bref.pack(csi_rs_im_reception_for_feedback_per_band_comb_present, 1)); - HANDLE_CODE(bref.pack(simul_csi_reports_all_cc_present, 1)); - HANDLE_CODE(bref.pack(dual_pa_architecture_present, 1)); - - if (simul_srs_assoc_csi_rs_all_cc_present) { - HANDLE_CODE(pack_integer(bref, simul_srs_assoc_csi_rs_all_cc, (uint8_t)5u, (uint8_t)32u)); - } - if (csi_rs_im_reception_for_feedback_per_band_comb_present) { - HANDLE_CODE( - bref.pack(csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present, 1)); - HANDLE_CODE(bref.pack( - csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present, 1)); - if (csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present) { - HANDLE_CODE(pack_integer(bref, - csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc, - (uint8_t)1u, - (uint8_t)64u)); - } - if (csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present) { - HANDLE_CODE( - pack_integer(bref, - csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc, - (uint16_t)2u, - (uint16_t)256u)); - } - } - if (simul_csi_reports_all_cc_present) { - HANDLE_CODE(pack_integer(bref, simul_csi_reports_all_cc, (uint8_t)5u, (uint8_t)32u)); - } - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE ca_params_nr_v1540_s::unpack(cbit_ref& bref) +uint16_t drx_cfg_s::short_drx_s_::drx_short_cycle_opts::to_number() const { - HANDLE_CODE(bref.unpack(simul_srs_assoc_csi_rs_all_cc_present, 1)); - HANDLE_CODE(bref.unpack(csi_rs_im_reception_for_feedback_per_band_comb_present, 1)); - HANDLE_CODE(bref.unpack(simul_csi_reports_all_cc_present, 1)); - HANDLE_CODE(bref.unpack(dual_pa_architecture_present, 1)); - - if (simul_srs_assoc_csi_rs_all_cc_present) { - HANDLE_CODE(unpack_integer(simul_srs_assoc_csi_rs_all_cc, bref, (uint8_t)5u, (uint8_t)32u)); - } - if (csi_rs_im_reception_for_feedback_per_band_comb_present) { - HANDLE_CODE( - bref.unpack(csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present, 1)); - HANDLE_CODE(bref.unpack( - csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present, 1)); - if (csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present) { - HANDLE_CODE(unpack_integer(csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc, - bref, - (uint8_t)1u, - (uint8_t)64u)); - } - if (csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present) { - HANDLE_CODE( - unpack_integer(csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc, - bref, - (uint16_t)2u, - (uint16_t)256u)); - } - } - if (simul_csi_reports_all_cc_present) { - HANDLE_CODE(unpack_integer(simul_csi_reports_all_cc, bref, (uint8_t)5u, (uint8_t)32u)); - } + 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_"); +} - return SRSASN_SUCCESS; +// DataInactivityTimer ::= ENUMERATED +std::string data_inactivity_timer_opts::to_string() const +{ + 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"); } -void ca_params_nr_v1540_s::to_json(json_writer& j) const +uint8_t data_inactivity_timer_opts::to_number() const { - j.start_obj(); - if (simul_srs_assoc_csi_rs_all_cc_present) { - j.write_int("simultaneousSRS-AssocCSI-RS-AllCC", simul_srs_assoc_csi_rs_all_cc); - } - if (csi_rs_im_reception_for_feedback_per_band_comb_present) { - j.write_fieldname("csi-RS-IM-ReceptionForFeedbackPerBandComb"); - j.start_obj(); - if (csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present) { - j.write_int("maxNumberSimultaneousNZP-CSI-RS-ActBWP-AllCC", - csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc); - } - if (csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present) { - j.write_int("totalNumberPortsSimultaneousNZP-CSI-RS-ActBWP-AllCC", - csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc); - } - j.end_obj(); - } - if (simul_csi_reports_all_cc_present) { - j.write_int("simultaneousCSI-ReportsAllCC", simul_csi_reports_all_cc); - } - if (dual_pa_architecture_present) { - j.write_str("dualPA-Architecture", "supported"); - } - j.end_obj(); + 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"); } -// BandCombination-v1540 ::= SEQUENCE -SRSASN_CODE band_combination_v1540_s::pack(bit_ref& bref) const +// LogicalChannelConfig ::= SEQUENCE +SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ca_params_nr_v1540_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ul_specific_params_present, 1)); - HANDLE_CODE(pack_dyn_seq_of(bref, band_list_v1540, 1, 32)); - if (ca_params_nr_v1540_present) { - HANDLE_CODE(ca_params_nr_v1540.pack(bref)); + if (ul_specific_params_present) { + HANDLE_CODE(ul_specific_params.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE band_combination_v1540_s::unpack(cbit_ref& bref) +SRSASN_CODE lc_ch_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ca_params_nr_v1540_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ul_specific_params_present, 1)); - HANDLE_CODE(unpack_dyn_seq_of(band_list_v1540, bref, 1, 32)); - if (ca_params_nr_v1540_present) { - HANDLE_CODE(ca_params_nr_v1540.unpack(bref)); + if (ul_specific_params_present) { + HANDLE_CODE(ul_specific_params.unpack(bref)); } return SRSASN_SUCCESS; } -void band_combination_v1540_s::to_json(json_writer& j) const +void lc_ch_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("bandList-v1540"); - for (const auto& e1 : band_list_v1540) { - e1.to_json(j); - } - j.end_array(); - if (ca_params_nr_v1540_present) { - j.write_fieldname("ca-ParametersNR-v1540"); - ca_params_nr_v1540.to_json(j); + if (ul_specific_params_present) { + j.write_fieldname("ul-SpecificParameters"); + ul_specific_params.to_json(j); } j.end_obj(); } -// CA-ParametersNR-v1550 ::= SEQUENCE -SRSASN_CODE ca_params_nr_v1550_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(aperiodic_csi_diff_scs_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ca_params_nr_v1550_s::unpack(cbit_ref& bref) +SRSASN_CODE lc_ch_cfg_s::ul_specific_params_s_::pack(bit_ref& bref) const { - HANDLE_CODE(bref.unpack(aperiodic_csi_diff_scs_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(allowed_serving_cells_present, 1)); + HANDLE_CODE(bref.pack(allowed_scs_list_present, 1)); + HANDLE_CODE(bref.pack(max_pusch_dur_present, 1)); + HANDLE_CODE(bref.pack(cfgured_grant_type1_allowed_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_group_present, 1)); + HANDLE_CODE(bref.pack(sched_request_id_present, 1)); - return SRSASN_SUCCESS; -} -void ca_params_nr_v1550_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (aperiodic_csi_diff_scs_present) { - j.write_str("aperiodic-CSI-diffSCS", "supported"); + HANDLE_CODE(pack_integer(bref, prio, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(prioritised_bit_rate.pack(bref)); + HANDLE_CODE(bucket_size_dur.pack(bref)); + if (allowed_serving_cells_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_serving_cells, 1, 31, integer_packer(0, 31))); } - j.end_obj(); -} - -// BandCombination-v1550 ::= SEQUENCE -SRSASN_CODE band_combination_v1550_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(ca_params_nr_v1550.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE band_combination_v1550_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(ca_params_nr_v1550.unpack(bref)); - - return SRSASN_SUCCESS; -} -void band_combination_v1550_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("ca-ParametersNR-v1550"); - ca_params_nr_v1550.to_json(j); - j.end_obj(); -} - -// SupportedCSI-RS-Resource ::= SEQUENCE -SRSASN_CODE supported_csi_rs_res_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(max_num_tx_ports_per_res.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_num_res_per_band, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(pack_integer(bref, total_num_tx_ports_per_band, (uint16_t)2u, (uint16_t)256u)); + if (allowed_scs_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_scs_list, 1, 5)); + } + if (max_pusch_dur_present) { + HANDLE_CODE(max_pusch_dur.pack(bref)); + } + if (lc_ch_group_present) { + HANDLE_CODE(pack_integer(bref, lc_ch_group, (uint8_t)0u, (uint8_t)7u)); + } + if (sched_request_id_present) { + HANDLE_CODE(pack_integer(bref, sched_request_id, (uint8_t)0u, (uint8_t)7u)); + } + HANDLE_CODE(bref.pack(lc_ch_sr_mask, 1)); + HANDLE_CODE(bref.pack(lc_ch_sr_delay_timer_applied, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE supported_csi_rs_res_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(max_num_tx_ports_per_res.unpack(bref)); - HANDLE_CODE(unpack_integer(max_num_res_per_band, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(unpack_integer(total_num_tx_ports_per_band, bref, (uint16_t)2u, (uint16_t)256u)); + if (ext) { + HANDLE_CODE(bref.pack(bit_rate_query_prohibit_timer_present, 1)); + if (bit_rate_query_prohibit_timer_present) { + HANDLE_CODE(bit_rate_query_prohibit_timer.pack(bref)); + } + } return SRSASN_SUCCESS; } -void supported_csi_rs_res_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("maxNumberTxPortsPerResource", max_num_tx_ports_per_res.to_string()); - j.write_int("maxNumberResourcesPerBand", max_num_res_per_band); - j.write_int("totalNumberTxPortsPerBand", total_num_tx_ports_per_band); - j.end_obj(); -} - -std::string supported_csi_rs_res_s::max_num_tx_ports_per_res_opts::to_string() const -{ - 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 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 -SRSASN_CODE beam_management_ssb_csi_rs_s::pack(bit_ref& bref) const +SRSASN_CODE lc_ch_cfg_s::ul_specific_params_s_::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.pack(supported_csi_rs_density_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(allowed_serving_cells_present, 1)); + HANDLE_CODE(bref.unpack(allowed_scs_list_present, 1)); + HANDLE_CODE(bref.unpack(max_pusch_dur_present, 1)); + HANDLE_CODE(bref.unpack(cfgured_grant_type1_allowed_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_group_present, 1)); + HANDLE_CODE(bref.unpack(sched_request_id_present, 1)); - HANDLE_CODE(max_num_ssb_csi_rs_res_one_tx.pack(bref)); - HANDLE_CODE(max_num_csi_rs_res.pack(bref)); - HANDLE_CODE(max_num_csi_rs_res_two_tx.pack(bref)); - if (supported_csi_rs_density_present) { - HANDLE_CODE(supported_csi_rs_density.pack(bref)); + HANDLE_CODE(unpack_integer(prio, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(prioritised_bit_rate.unpack(bref)); + HANDLE_CODE(bucket_size_dur.unpack(bref)); + if (allowed_serving_cells_present) { + HANDLE_CODE(unpack_dyn_seq_of(allowed_serving_cells, bref, 1, 31, integer_packer(0, 31))); + } + if (allowed_scs_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(allowed_scs_list, bref, 1, 5)); + } + if (max_pusch_dur_present) { + HANDLE_CODE(max_pusch_dur.unpack(bref)); } - HANDLE_CODE(max_num_aperiodic_csi_rs_res.pack(bref)); + if (lc_ch_group_present) { + HANDLE_CODE(unpack_integer(lc_ch_group, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (sched_request_id_present) { + HANDLE_CODE(unpack_integer(sched_request_id, bref, (uint8_t)0u, (uint8_t)7u)); + } + HANDLE_CODE(bref.unpack(lc_ch_sr_mask, 1)); + HANDLE_CODE(bref.unpack(lc_ch_sr_delay_timer_applied, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE beam_management_ssb_csi_rs_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(supported_csi_rs_density_present, 1)); + if (ext) { + HANDLE_CODE(bref.unpack(bit_rate_query_prohibit_timer_present, 1)); - HANDLE_CODE(max_num_ssb_csi_rs_res_one_tx.unpack(bref)); - HANDLE_CODE(max_num_csi_rs_res.unpack(bref)); - HANDLE_CODE(max_num_csi_rs_res_two_tx.unpack(bref)); - if (supported_csi_rs_density_present) { - HANDLE_CODE(supported_csi_rs_density.unpack(bref)); + if (bit_rate_query_prohibit_timer_present) { + HANDLE_CODE(bit_rate_query_prohibit_timer.unpack(bref)); + } } - HANDLE_CODE(max_num_aperiodic_csi_rs_res.unpack(bref)); - return SRSASN_SUCCESS; } -void beam_management_ssb_csi_rs_s::to_json(json_writer& j) const +void lc_ch_cfg_s::ul_specific_params_s_::to_json(json_writer& j) const { j.start_obj(); - j.write_str("maxNumberSSB-CSI-RS-ResourceOneTx", max_num_ssb_csi_rs_res_one_tx.to_string()); - j.write_str("maxNumberCSI-RS-Resource", max_num_csi_rs_res.to_string()); - j.write_str("maxNumberCSI-RS-ResourceTwoTx", max_num_csi_rs_res_two_tx.to_string()); - if (supported_csi_rs_density_present) { - j.write_str("supportedCSI-RS-Density", supported_csi_rs_density.to_string()); + j.write_int("priority", prio); + j.write_str("prioritisedBitRate", prioritised_bit_rate.to_string()); + j.write_str("bucketSizeDuration", bucket_size_dur.to_string()); + if (allowed_serving_cells_present) { + j.start_array("allowedServingCells"); + 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 (const auto& e1 : allowed_scs_list) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (max_pusch_dur_present) { + j.write_str("maxPUSCH-Duration", max_pusch_dur.to_string()); + } + if (cfgured_grant_type1_allowed_present) { + j.write_str("configuredGrantType1Allowed", "true"); + } + if (lc_ch_group_present) { + j.write_int("logicalChannelGroup", lc_ch_group); + } + if (sched_request_id_present) { + j.write_int("schedulingRequestID", sched_request_id); + } + j.write_bool("logicalChannelSR-Mask", lc_ch_sr_mask); + j.write_bool("logicalChannelSR-DelayTimerApplied", lc_ch_sr_delay_timer_applied); + if (ext) { + if (bit_rate_query_prohibit_timer_present) { + j.write_str("bitRateQueryProhibitTimer", bit_rate_query_prohibit_timer.to_string()); + } } - j.write_str("maxNumberAperiodicCSI-RS-Resource", max_num_aperiodic_csi_rs_res.to_string()); j.end_obj(); } -std::string beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_opts::to_string() const +std::string lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_opts::to_string() const { - 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_"); + 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_"); } -uint8_t beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_opts::to_number() const +int32_t lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_opts::to_number() const { - 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_"); + 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 beam_management_ssb_csi_rs_s::max_num_csi_rs_res_opts::to_string() const +std::string lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_opts::to_string() const { - 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_"); + 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_"); } -uint8_t beam_management_ssb_csi_rs_s::max_num_csi_rs_res_opts::to_number() const +uint16_t lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_opts::to_number() const { - 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_"); + 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 beam_management_ssb_csi_rs_s::max_num_csi_rs_res_two_tx_opts::to_string() const -{ - 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 +std::string lc_ch_cfg_s::ul_specific_params_s_::max_pusch_dur_opts::to_string() const { - 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_"); + 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 beam_management_ssb_csi_rs_s::supported_csi_rs_density_opts::to_string() const +std::string lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_opts::to_string() const { - 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_"); + 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_"); } - -std::string beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_opts::to_string() const +float lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_opts::to_number() const { - 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_"); + 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_"); } -uint8_t beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_opts::to_number() const +std::string lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_opts::to_number_string() const { - 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_"); + 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_"); } -// CSI-RS-ForTracking ::= SEQUENCE -SRSASN_CODE csi_rs_for_tracking_s::pack(bit_ref& bref) const +// PHR-Config ::= SEQUENCE +SRSASN_CODE phr_cfg_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, max_burst_len, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(pack_integer(bref, max_simul_res_sets_per_cc, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pack_integer(bref, max_cfgured_res_sets_per_cc, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(pack_integer(bref, max_cfgured_res_sets_all_cc, (uint16_t)1u, (uint16_t)256u)); + bref.pack(ext, 1); + HANDLE_CODE(phr_periodic_timer.pack(bref)); + HANDLE_CODE(phr_prohibit_timer.pack(bref)); + HANDLE_CODE(phr_tx_pwr_factor_change.pack(bref)); + HANDLE_CODE(bref.pack(multiple_phr, 1)); + HANDLE_CODE(bref.pack(dummy, 1)); + HANDLE_CODE(bref.pack(phr_type2_other_cell, 1)); + HANDLE_CODE(phr_mode_other_cg.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE csi_rs_for_tracking_s::unpack(cbit_ref& bref) +SRSASN_CODE phr_cfg_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(max_burst_len, bref, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(unpack_integer(max_simul_res_sets_per_cc, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(unpack_integer(max_cfgured_res_sets_per_cc, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(unpack_integer(max_cfgured_res_sets_all_cc, bref, (uint16_t)1u, (uint16_t)256u)); + bref.unpack(ext, 1); + HANDLE_CODE(phr_periodic_timer.unpack(bref)); + HANDLE_CODE(phr_prohibit_timer.unpack(bref)); + HANDLE_CODE(phr_tx_pwr_factor_change.unpack(bref)); + HANDLE_CODE(bref.unpack(multiple_phr, 1)); + HANDLE_CODE(bref.unpack(dummy, 1)); + HANDLE_CODE(bref.unpack(phr_type2_other_cell, 1)); + HANDLE_CODE(phr_mode_other_cg.unpack(bref)); return SRSASN_SUCCESS; } -void csi_rs_for_tracking_s::to_json(json_writer& j) const +void phr_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("maxBurstLength", max_burst_len); - j.write_int("maxSimultaneousResourceSetsPerCC", max_simul_res_sets_per_cc); - j.write_int("maxConfiguredResourceSetsPerCC", max_cfgured_res_sets_per_cc); - j.write_int("maxConfiguredResourceSetsAllCC", max_cfgured_res_sets_all_cc); + j.write_str("phr-PeriodicTimer", phr_periodic_timer.to_string()); + j.write_str("phr-ProhibitTimer", phr_prohibit_timer.to_string()); + j.write_str("phr-Tx-PowerFactorChange", phr_tx_pwr_factor_change.to_string()); + j.write_bool("multiplePHR", multiple_phr); + j.write_bool("dummy", dummy); + j.write_bool("phr-Type2OtherCell", phr_type2_other_cell); + j.write_str("phr-ModeOtherCG", phr_mode_other_cg.to_string()); j.end_obj(); } -// CSI-RS-IM-ReceptionForFeedback ::= SEQUENCE -SRSASN_CODE csi_rs_im_reception_for_feedback_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, max_cfg_num_nzp_csi_rs_per_cc, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(pack_integer(bref, max_cfg_num_ports_across_nzp_csi_rs_per_cc, (uint16_t)2u, (uint16_t)256u)); - HANDLE_CODE(max_cfg_num_csi_im_per_cc.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_num_simul_nzp_csi_rs_per_cc, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(pack_integer(bref, total_num_ports_simul_nzp_csi_rs_per_cc, (uint16_t)2u, (uint16_t)256u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_rs_im_reception_for_feedback_s::unpack(cbit_ref& bref) +std::string phr_cfg_s::phr_periodic_timer_opts::to_string() const { - HANDLE_CODE(unpack_integer(max_cfg_num_nzp_csi_rs_per_cc, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(unpack_integer(max_cfg_num_ports_across_nzp_csi_rs_per_cc, bref, (uint16_t)2u, (uint16_t)256u)); - HANDLE_CODE(max_cfg_num_csi_im_per_cc.unpack(bref)); - HANDLE_CODE(unpack_integer(max_num_simul_nzp_csi_rs_per_cc, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(unpack_integer(total_num_ports_simul_nzp_csi_rs_per_cc, bref, (uint16_t)2u, (uint16_t)256u)); - - return SRSASN_SUCCESS; + 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_"); } -void csi_rs_im_reception_for_feedback_s::to_json(json_writer& j) const +int16_t phr_cfg_s::phr_periodic_timer_opts::to_number() const { - j.start_obj(); - j.write_int("maxConfigNumberNZP-CSI-RS-PerCC", max_cfg_num_nzp_csi_rs_per_cc); - j.write_int("maxConfigNumberPortsAcrossNZP-CSI-RS-PerCC", max_cfg_num_ports_across_nzp_csi_rs_per_cc); - j.write_str("maxConfigNumberCSI-IM-PerCC", max_cfg_num_csi_im_per_cc.to_string()); - j.write_int("maxNumberSimultaneousNZP-CSI-RS-PerCC", max_num_simul_nzp_csi_rs_per_cc); - j.write_int("totalNumberPortsSimultaneousNZP-CSI-RS-PerCC", total_num_ports_simul_nzp_csi_rs_per_cc); - j.end_obj(); + 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 csi_rs_im_reception_for_feedback_s::max_cfg_num_csi_im_per_cc_opts::to_string() const -{ - 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 +std::string phr_cfg_s::phr_prohibit_timer_opts::to_string() const { - 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_"); + 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_"); } - -// CSI-RS-ProcFrameworkForSRS ::= SEQUENCE -SRSASN_CODE csi_rs_proc_framework_for_srs_s::pack(bit_ref& bref) const +uint16_t phr_cfg_s::phr_prohibit_timer_opts::to_number() const { - HANDLE_CODE(pack_integer(bref, max_num_periodic_srs_assoc_csi_rs_per_bwp, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, max_num_aperiodic_srs_assoc_csi_rs_per_bwp, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, max_num_sp_srs_assoc_csi_rs_per_bwp, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, simul_srs_assoc_csi_rs_per_cc, (uint8_t)1u, (uint8_t)8u)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE csi_rs_proc_framework_for_srs_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(max_num_periodic_srs_assoc_csi_rs_per_bwp, bref, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(max_num_aperiodic_srs_assoc_csi_rs_per_bwp, bref, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(max_num_sp_srs_assoc_csi_rs_per_bwp, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(simul_srs_assoc_csi_rs_per_cc, bref, (uint8_t)1u, (uint8_t)8u)); - return SRSASN_SUCCESS; -} -void csi_rs_proc_framework_for_srs_s::to_json(json_writer& j) const +std::string phr_cfg_s::phr_tx_pwr_factor_change_opts::to_string() const { - j.start_obj(); - j.write_int("maxNumberPeriodicSRS-AssocCSI-RS-PerBWP", max_num_periodic_srs_assoc_csi_rs_per_bwp); - j.write_int("maxNumberAperiodicSRS-AssocCSI-RS-PerBWP", max_num_aperiodic_srs_assoc_csi_rs_per_bwp); - j.write_int("maxNumberSP-SRS-AssocCSI-RS-PerBWP", max_num_sp_srs_assoc_csi_rs_per_bwp); - j.write_int("simultaneousSRS-AssocCSI-RS-PerCC", simul_srs_assoc_csi_rs_per_cc); - j.end_obj(); + static const char* options[] = {"dB1", "dB3", "dB6", "infinity"}; + return convert_enum_idx(options, 4, value, "phr_cfg_s::phr_tx_pwr_factor_change_e_"); } - -// CSI-ReportFramework ::= SEQUENCE -SRSASN_CODE csi_report_framework_s::pack(bit_ref& bref) const +int8_t phr_cfg_s::phr_tx_pwr_factor_change_opts::to_number() const { - HANDLE_CODE(pack_integer(bref, max_num_periodic_csi_per_bwp_for_csi_report, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, max_num_aperiodic_csi_per_bwp_for_csi_report, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, max_num_semi_persistent_csi_per_bwp_for_csi_report, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, max_num_periodic_csi_per_bwp_for_beam_report, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, max_num_aperiodic_csi_per_bwp_for_beam_report, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(max_num_aperiodic_csi_trigger_state_per_cc.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_num_semi_persistent_csi_per_bwp_for_beam_report, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(pack_integer(bref, simul_csi_reports_per_cc, (uint8_t)1u, (uint8_t)8u)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE csi_report_framework_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(max_num_periodic_csi_per_bwp_for_csi_report, bref, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(max_num_aperiodic_csi_per_bwp_for_csi_report, bref, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(max_num_semi_persistent_csi_per_bwp_for_csi_report, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(max_num_periodic_csi_per_bwp_for_beam_report, bref, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(max_num_aperiodic_csi_per_bwp_for_beam_report, bref, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(max_num_aperiodic_csi_trigger_state_per_cc.unpack(bref)); - HANDLE_CODE(unpack_integer(max_num_semi_persistent_csi_per_bwp_for_beam_report, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(unpack_integer(simul_csi_reports_per_cc, bref, (uint8_t)1u, (uint8_t)8u)); - return SRSASN_SUCCESS; -} -void csi_report_framework_s::to_json(json_writer& j) const +std::string phr_cfg_s::phr_mode_other_cg_opts::to_string() const { - j.start_obj(); - j.write_int("maxNumberPeriodicCSI-PerBWP-ForCSI-Report", max_num_periodic_csi_per_bwp_for_csi_report); - j.write_int("maxNumberAperiodicCSI-PerBWP-ForCSI-Report", max_num_aperiodic_csi_per_bwp_for_csi_report); - j.write_int("maxNumberSemiPersistentCSI-PerBWP-ForCSI-Report", max_num_semi_persistent_csi_per_bwp_for_csi_report); - j.write_int("maxNumberPeriodicCSI-PerBWP-ForBeamReport", max_num_periodic_csi_per_bwp_for_beam_report); - j.write_int("maxNumberAperiodicCSI-PerBWP-ForBeamReport", max_num_aperiodic_csi_per_bwp_for_beam_report); - j.write_str("maxNumberAperiodicCSI-triggeringStatePerCC", max_num_aperiodic_csi_trigger_state_per_cc.to_string()); - j.write_int("maxNumberSemiPersistentCSI-PerBWP-ForBeamReport", max_num_semi_persistent_csi_per_bwp_for_beam_report); - j.write_int("simultaneousCSI-ReportsPerCC", simul_csi_reports_per_cc); - j.end_obj(); + static const char* options[] = {"real", "virtual"}; + return convert_enum_idx(options, 2, value, "phr_cfg_s::phr_mode_other_cg_e_"); } -std::string csi_report_framework_s::max_num_aperiodic_csi_trigger_state_per_cc_opts::to_string() const +// RLC-Config ::= CHOICE +void rlc_cfg_c::destroy_() { - 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_"); + switch (type_) { + case types::am: + c.destroy(); + break; + case types::um_bi_dir: + c.destroy(); + break; + case types::um_uni_dir_ul: + c.destroy(); + break; + case types::um_uni_dir_dl: + c.destroy(); + break; + default: + break; + } } -uint8_t csi_report_framework_s::max_num_aperiodic_csi_trigger_state_per_cc_opts::to_number() const +void rlc_cfg_c::set(types::options 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_"); + destroy_(); + type_ = e; + switch (type_) { + case types::am: + c.init(); + break; + case types::um_bi_dir: + c.init(); + break; + case types::um_uni_dir_ul: + c.init(); + break; + case types::um_uni_dir_dl: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + } } - -// CodebookParameters ::= SEQUENCE -SRSASN_CODE codebook_params_s::pack(bit_ref& bref) const +rlc_cfg_c::rlc_cfg_c(const rlc_cfg_c& other) { - HANDLE_CODE(bref.pack(type2_present, 1)); - HANDLE_CODE(bref.pack(type2_port_sel_present, 1)); - - HANDLE_CODE(bref.pack(type1.multi_panel_present, 1)); - HANDLE_CODE(pack_dyn_seq_of(bref, type1.single_panel.supported_csi_rs_res_list, 1, 7)); - HANDLE_CODE(type1.single_panel.modes.pack(bref)); - HANDLE_CODE(pack_integer(bref, type1.single_panel.max_num_csi_rs_per_res_set, (uint8_t)1u, (uint8_t)8u)); - if (type1.multi_panel_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, type1.multi_panel.supported_csi_rs_res_list, 1, 7)); - HANDLE_CODE(type1.multi_panel.modes.pack(bref)); - HANDLE_CODE(type1.multi_panel.nrof_panels.pack(bref)); - HANDLE_CODE(pack_integer(bref, type1.multi_panel.max_num_csi_rs_per_res_set, (uint8_t)1u, (uint8_t)8u)); - } - if (type2_present) { - HANDLE_CODE(bref.pack(type2.amplitude_subset_restrict_present, 1)); - HANDLE_CODE(pack_dyn_seq_of(bref, type2.supported_csi_rs_res_list, 1, 7)); - HANDLE_CODE(pack_integer(bref, type2.param_lx, (uint8_t)2u, (uint8_t)4u)); - HANDLE_CODE(type2.amplitude_scaling_type.pack(bref)); - } - if (type2_port_sel_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, type2_port_sel.supported_csi_rs_res_list, 1, 7)); - HANDLE_CODE(pack_integer(bref, type2_port_sel.param_lx, (uint8_t)2u, (uint8_t)4u)); - HANDLE_CODE(type2_port_sel.amplitude_scaling_type.pack(bref)); + type_ = other.type(); + switch (type_) { + case types::am: + c.init(other.c.get()); + break; + case types::um_bi_dir: + c.init(other.c.get()); + break; + case types::um_uni_dir_ul: + c.init(other.c.get()); + break; + case types::um_uni_dir_dl: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE codebook_params_s::unpack(cbit_ref& bref) +rlc_cfg_c& rlc_cfg_c::operator=(const rlc_cfg_c& other) { - HANDLE_CODE(bref.unpack(type2_present, 1)); - HANDLE_CODE(bref.unpack(type2_port_sel_present, 1)); - - HANDLE_CODE(bref.unpack(type1.multi_panel_present, 1)); - HANDLE_CODE(unpack_dyn_seq_of(type1.single_panel.supported_csi_rs_res_list, bref, 1, 7)); - HANDLE_CODE(type1.single_panel.modes.unpack(bref)); - HANDLE_CODE(unpack_integer(type1.single_panel.max_num_csi_rs_per_res_set, bref, (uint8_t)1u, (uint8_t)8u)); - if (type1.multi_panel_present) { - HANDLE_CODE(unpack_dyn_seq_of(type1.multi_panel.supported_csi_rs_res_list, bref, 1, 7)); - HANDLE_CODE(type1.multi_panel.modes.unpack(bref)); - HANDLE_CODE(type1.multi_panel.nrof_panels.unpack(bref)); - HANDLE_CODE(unpack_integer(type1.multi_panel.max_num_csi_rs_per_res_set, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (type2_present) { - HANDLE_CODE(bref.unpack(type2.amplitude_subset_restrict_present, 1)); - HANDLE_CODE(unpack_dyn_seq_of(type2.supported_csi_rs_res_list, bref, 1, 7)); - HANDLE_CODE(unpack_integer(type2.param_lx, bref, (uint8_t)2u, (uint8_t)4u)); - HANDLE_CODE(type2.amplitude_scaling_type.unpack(bref)); + if (this == &other) { + return *this; } - if (type2_port_sel_present) { - HANDLE_CODE(unpack_dyn_seq_of(type2_port_sel.supported_csi_rs_res_list, bref, 1, 7)); - HANDLE_CODE(unpack_integer(type2_port_sel.param_lx, bref, (uint8_t)2u, (uint8_t)4u)); - HANDLE_CODE(type2_port_sel.amplitude_scaling_type.unpack(bref)); + set(other.type()); + switch (type_) { + case types::am: + c.set(other.c.get()); + break; + case types::um_bi_dir: + c.set(other.c.get()); + break; + case types::um_uni_dir_ul: + c.set(other.c.get()); + break; + case types::um_uni_dir_dl: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); } - return SRSASN_SUCCESS; + return *this; } -void codebook_params_s::to_json(json_writer& j) const +void rlc_cfg_c::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("type1"); - j.start_obj(); - j.write_fieldname("singlePanel"); - j.start_obj(); - j.start_array("supportedCSI-RS-ResourceList"); - 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()); - j.write_int("maxNumberCSI-RS-PerResourceSet", type1.single_panel.max_num_csi_rs_per_res_set); - j.end_obj(); - if (type1.multi_panel_present) { - j.write_fieldname("multiPanel"); - j.start_obj(); - j.start_array("supportedCSI-RS-ResourceList"); - 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()); - j.write_str("nrofPanels", type1.multi_panel.nrof_panels.to_string()); - j.write_int("maxNumberCSI-RS-PerResourceSet", type1.multi_panel.max_num_csi_rs_per_res_set); - j.end_obj(); - } - j.end_obj(); - if (type2_present) { - j.write_fieldname("type2"); - j.start_obj(); - j.start_array("supportedCSI-RS-ResourceList"); - for (const auto& e1 : type2.supported_csi_rs_res_list) { - e1.to_json(j); - } - j.end_array(); - j.write_int("parameterLx", type2.param_lx); - j.write_str("amplitudeScalingType", type2.amplitude_scaling_type.to_string()); - if (type2.amplitude_subset_restrict_present) { - j.write_str("amplitudeSubsetRestriction", "supported"); - } - j.end_obj(); - } - if (type2_port_sel_present) { - j.write_fieldname("type2-PortSelection"); - j.start_obj(); - j.start_array("supportedCSI-RS-ResourceList"); - 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); - j.write_str("amplitudeScalingType", type2_port_sel.amplitude_scaling_type.to_string()); - j.end_obj(); + switch (type_) { + case types::am: + j.write_fieldname("am"); + j.start_obj(); + j.write_fieldname("ul-AM-RLC"); + c.get().ul_am_rlc.to_json(j); + j.write_fieldname("dl-AM-RLC"); + c.get().dl_am_rlc.to_json(j); + j.end_obj(); + break; + case types::um_bi_dir: + j.write_fieldname("um-Bi-Directional"); + j.start_obj(); + j.write_fieldname("ul-UM-RLC"); + c.get().ul_um_rlc.to_json(j); + j.write_fieldname("dl-UM-RLC"); + c.get().dl_um_rlc.to_json(j); + j.end_obj(); + break; + case types::um_uni_dir_ul: + j.write_fieldname("um-Uni-Directional-UL"); + j.start_obj(); + j.write_fieldname("ul-UM-RLC"); + c.get().ul_um_rlc.to_json(j); + j.end_obj(); + break; + case types::um_uni_dir_dl: + j.write_fieldname("um-Uni-Directional-DL"); + j.start_obj(); + j.write_fieldname("dl-UM-RLC"); + c.get().dl_um_rlc.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); } j.end_obj(); } - -std::string codebook_params_s::type1_s_::single_panel_s_::modes_opts::to_string() const -{ - 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 +SRSASN_CODE rlc_cfg_c::pack(bit_ref& bref) const { - static const char* options[] = {"mode1", "mode2", "both"}; - return convert_enum_idx(options, 3, value, "codebook_params_s::type1_s_::multi_panel_s_::modes_e_"); + type_.pack(bref); + switch (type_) { + case types::am: + HANDLE_CODE(c.get().ul_am_rlc.pack(bref)); + HANDLE_CODE(c.get().dl_am_rlc.pack(bref)); + break; + case types::um_bi_dir: + HANDLE_CODE(c.get().ul_um_rlc.pack(bref)); + HANDLE_CODE(c.get().dl_um_rlc.pack(bref)); + break; + case types::um_uni_dir_ul: + HANDLE_CODE(c.get().ul_um_rlc.pack(bref)); + break; + case types::um_uni_dir_dl: + HANDLE_CODE(c.get().dl_um_rlc.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -uint8_t codebook_params_s::type1_s_::multi_panel_s_::modes_opts::to_number() const +SRSASN_CODE rlc_cfg_c::unpack(cbit_ref& bref) { - static const uint8_t options[] = {1, 2}; - return map_enum_number(options, 2, value, "codebook_params_s::type1_s_::multi_panel_s_::modes_e_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::am: + HANDLE_CODE(c.get().ul_am_rlc.unpack(bref)); + HANDLE_CODE(c.get().dl_am_rlc.unpack(bref)); + break; + case types::um_bi_dir: + HANDLE_CODE(c.get().ul_um_rlc.unpack(bref)); + HANDLE_CODE(c.get().dl_um_rlc.unpack(bref)); + break; + case types::um_uni_dir_ul: + HANDLE_CODE(c.get().ul_um_rlc.unpack(bref)); + break; + case types::um_uni_dir_dl: + HANDLE_CODE(c.get().dl_um_rlc.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -std::string codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_opts::to_string() const -{ - 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 +std::string rlc_cfg_c::types_opts::to_string() const { - 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_"); + 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 codebook_params_s::type2_s_::amplitude_scaling_type_opts::to_string() const +// RLF-TimersAndConstants ::= SEQUENCE +SRSASN_CODE rlf_timers_and_consts_s::pack(bit_ref& bref) const { - static const char* options[] = {"wideband", "widebandAndSubband"}; - return convert_enum_idx(options, 2, value, "codebook_params_s::type2_s_::amplitude_scaling_type_e_"); -} + bref.pack(ext, 1); + HANDLE_CODE(t310.pack(bref)); + HANDLE_CODE(n310.pack(bref)); + HANDLE_CODE(n311.pack(bref)); -std::string codebook_params_s::type2_port_sel_s_::amplitude_scaling_type_opts::to_string() const -{ - static const char* options[] = {"wideband", "widebandAndSubband"}; - return convert_enum_idx(options, 2, value, "codebook_params_s::type2_port_sel_s_::amplitude_scaling_type_e_"); -} + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= t311; + group_flags.pack(bref); -// DummyG ::= SEQUENCE -SRSASN_CODE dummy_g_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(max_num_ssb_csi_rs_res_one_tx.pack(bref)); - HANDLE_CODE(max_num_ssb_csi_rs_res_two_tx.pack(bref)); - HANDLE_CODE(supported_csi_rs_density.pack(bref)); + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(t311.pack(bref)); + } + } return SRSASN_SUCCESS; } -SRSASN_CODE dummy_g_s::unpack(cbit_ref& bref) +SRSASN_CODE rlf_timers_and_consts_s::unpack(cbit_ref& bref) { - HANDLE_CODE(max_num_ssb_csi_rs_res_one_tx.unpack(bref)); - HANDLE_CODE(max_num_ssb_csi_rs_res_two_tx.unpack(bref)); - HANDLE_CODE(supported_csi_rs_density.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(t310.unpack(bref)); + HANDLE_CODE(n310.unpack(bref)); + HANDLE_CODE(n311.unpack(bref)); + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(t311.unpack(bref)); + } + } return SRSASN_SUCCESS; } -void dummy_g_s::to_json(json_writer& j) const +void rlf_timers_and_consts_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("maxNumberSSB-CSI-RS-ResourceOneTx", max_num_ssb_csi_rs_res_one_tx.to_string()); - j.write_str("maxNumberSSB-CSI-RS-ResourceTwoTx", max_num_ssb_csi_rs_res_two_tx.to_string()); - j.write_str("supportedCSI-RS-Density", supported_csi_rs_density.to_string()); + j.write_str("t310", t310.to_string()); + j.write_str("n310", n310.to_string()); + j.write_str("n311", n311.to_string()); + if (ext) { + j.write_str("t311", t311.to_string()); + } j.end_obj(); } -std::string dummy_g_s::max_num_ssb_csi_rs_res_one_tx_opts::to_string() const +std::string rlf_timers_and_consts_s::t310_opts::to_string() const { - 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_"); + 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_"); } -uint8_t dummy_g_s::max_num_ssb_csi_rs_res_one_tx_opts::to_number() const +uint16_t rlf_timers_and_consts_s::t310_opts::to_number() const { - 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_"); + 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 dummy_g_s::max_num_ssb_csi_rs_res_two_tx_opts::to_string() const +std::string rlf_timers_and_consts_s::n310_opts::to_string() const { - 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_"); + 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 dummy_g_s::max_num_ssb_csi_rs_res_two_tx_opts::to_number() const +uint8_t rlf_timers_and_consts_s::n310_opts::to_number() const { - 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_"); + 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 dummy_g_s::supported_csi_rs_density_opts::to_string() const +std::string rlf_timers_and_consts_s::n311_opts::to_string() const { - static const char* options[] = {"one", "three", "oneAndThree"}; - return convert_enum_idx(options, 3, value, "dummy_g_s::supported_csi_rs_density_e_"); + 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_"); } - -// DummyH ::= SEQUENCE -SRSASN_CODE dummy_h_s::pack(bit_ref& bref) const +uint8_t rlf_timers_and_consts_s::n311_opts::to_number() const { - HANDLE_CODE(pack_integer(bref, burst_len, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(pack_integer(bref, max_simul_res_sets_per_cc, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pack_integer(bref, max_cfgured_res_sets_per_cc, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(pack_integer(bref, max_cfgured_res_sets_all_cc, (uint8_t)1u, (uint8_t)128u)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE dummy_h_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(burst_len, bref, (uint8_t)1u, (uint8_t)2u)); - HANDLE_CODE(unpack_integer(max_simul_res_sets_per_cc, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(unpack_integer(max_cfgured_res_sets_per_cc, bref, (uint8_t)1u, (uint8_t)64u)); - HANDLE_CODE(unpack_integer(max_cfgured_res_sets_all_cc, bref, (uint8_t)1u, (uint8_t)128u)); - return SRSASN_SUCCESS; +std::string rlf_timers_and_consts_s::t311_opts::to_string() const +{ + static const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; + return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_s::t311_e_"); } -void dummy_h_s::to_json(json_writer& j) const +uint16_t rlf_timers_and_consts_s::t311_opts::to_number() const { - j.start_obj(); - j.write_int("burstLength", burst_len); - j.write_int("maxSimultaneousResourceSetsPerCC", max_simul_res_sets_per_cc); - j.write_int("maxConfiguredResourceSetsPerCC", max_cfgured_res_sets_per_cc); - j.write_int("maxConfiguredResourceSetsAllCC", max_cfgured_res_sets_all_cc); - j.end_obj(); + 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_e_"); } -// PTRS-DensityRecommendationDL ::= SEQUENCE -SRSASN_CODE ptrs_density_recommendation_dl_s::pack(bit_ref& bref) const +// ReconfigurationWithSync ::= SEQUENCE +SRSASN_CODE recfg_with_sync_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, freq_density1, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, freq_density2, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, time_density1, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(pack_integer(bref, time_density2, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(pack_integer(bref, time_density3, (uint8_t)0u, (uint8_t)29u)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sp_cell_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(rach_cfg_ded_present, 1)); + if (sp_cell_cfg_common_present) { + HANDLE_CODE(sp_cell_cfg_common.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, new_ue_id, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(t304.pack(bref)); + if (rach_cfg_ded_present) { + HANDLE_CODE(rach_cfg_ded.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= smtc.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(smtc.is_present(), 1)); + if (smtc.is_present()) { + HANDLE_CODE(smtc->pack(bref)); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE ptrs_density_recommendation_dl_s::unpack(cbit_ref& bref) +SRSASN_CODE recfg_with_sync_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(freq_density1, bref, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(freq_density2, bref, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(time_density1, bref, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(unpack_integer(time_density2, bref, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(unpack_integer(time_density3, bref, (uint8_t)0u, (uint8_t)29u)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sp_cell_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(rach_cfg_ded_present, 1)); + + if (sp_cell_cfg_common_present) { + HANDLE_CODE(sp_cell_cfg_common.unpack(bref)); + } + HANDLE_CODE(unpack_integer(new_ue_id, bref, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(t304.unpack(bref)); + if (rach_cfg_ded_present) { + HANDLE_CODE(rach_cfg_ded.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + bool smtc_present; + HANDLE_CODE(bref.unpack(smtc_present, 1)); + smtc.set_present(smtc_present); + if (smtc.is_present()) { + HANDLE_CODE(smtc->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } -void ptrs_density_recommendation_dl_s::to_json(json_writer& j) const +void recfg_with_sync_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("frequencyDensity1", freq_density1); - j.write_int("frequencyDensity2", freq_density2); - j.write_int("timeDensity1", time_density1); - j.write_int("timeDensity2", time_density2); - j.write_int("timeDensity3", time_density3); + if (sp_cell_cfg_common_present) { + j.write_fieldname("spCellConfigCommon"); + sp_cell_cfg_common.to_json(j); + } + j.write_int("newUE-Identity", new_ue_id); + j.write_str("t304", t304.to_string()); + if (rach_cfg_ded_present) { + j.write_fieldname("rach-ConfigDedicated"); + rach_cfg_ded.to_json(j); + } + if (ext) { + if (smtc.is_present()) { + j.write_fieldname("smtc"); + smtc->to_json(j); + } + } j.end_obj(); } -// PTRS-DensityRecommendationUL ::= SEQUENCE -SRSASN_CODE ptrs_density_recommendation_ul_s::pack(bit_ref& bref) const +std::string recfg_with_sync_s::t304_opts::to_string() const { - HANDLE_CODE(pack_integer(bref, freq_density1, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, freq_density2, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, time_density1, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(pack_integer(bref, time_density2, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(pack_integer(bref, time_density3, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(pack_integer(bref, sample_density1, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, sample_density2, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, sample_density3, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, sample_density4, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, sample_density5, (uint16_t)1u, (uint16_t)276u)); - - return SRSASN_SUCCESS; + 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_"); } -SRSASN_CODE ptrs_density_recommendation_ul_s::unpack(cbit_ref& bref) +uint16_t recfg_with_sync_s::t304_opts::to_number() const { - HANDLE_CODE(unpack_integer(freq_density1, bref, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(freq_density2, bref, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(time_density1, bref, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(unpack_integer(time_density2, bref, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(unpack_integer(time_density3, bref, (uint8_t)0u, (uint8_t)29u)); - HANDLE_CODE(unpack_integer(sample_density1, bref, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(sample_density2, bref, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(sample_density3, bref, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(sample_density4, bref, (uint16_t)1u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(sample_density5, bref, (uint16_t)1u, (uint16_t)276u)); + 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_"); +} - return SRSASN_SUCCESS; +void recfg_with_sync_s::rach_cfg_ded_c_::destroy_() +{ + switch (type_) { + case types::ul: + c.destroy(); + break; + case types::supplementary_ul: + c.destroy(); + break; + default: + break; + } } -void ptrs_density_recommendation_ul_s::to_json(json_writer& j) const +void recfg_with_sync_s::rach_cfg_ded_c_::set(types::options e) { - j.start_obj(); - j.write_int("frequencyDensity1", freq_density1); - j.write_int("frequencyDensity2", freq_density2); - j.write_int("timeDensity1", time_density1); - j.write_int("timeDensity2", time_density2); - j.write_int("timeDensity3", time_density3); - j.write_int("sampleDensity1", sample_density1); - j.write_int("sampleDensity2", sample_density2); - j.write_int("sampleDensity3", sample_density3); - j.write_int("sampleDensity4", sample_density4); - j.write_int("sampleDensity5", sample_density5); - j.end_obj(); + destroy_(); + type_ = e; + switch (type_) { + case types::ul: + c.init(); + break; + case types::supplementary_ul: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + } } - -// SpatialRelations ::= SEQUENCE -SRSASN_CODE spatial_relations_s::pack(bit_ref& bref) const +recfg_with_sync_s::rach_cfg_ded_c_::rach_cfg_ded_c_(const recfg_with_sync_s::rach_cfg_ded_c_& other) { - HANDLE_CODE(bref.pack(add_active_spatial_relation_pucch_present, 1)); - - HANDLE_CODE(max_num_cfgured_spatial_relations.pack(bref)); - HANDLE_CODE(max_num_active_spatial_relations.pack(bref)); - HANDLE_CODE(max_num_dl_rs_qcl_type_d.pack(bref)); - - return SRSASN_SUCCESS; + type_ = other.type(); + switch (type_) { + case types::ul: + c.init(other.c.get()); + break; + case types::supplementary_ul: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + } } -SRSASN_CODE spatial_relations_s::unpack(cbit_ref& bref) +recfg_with_sync_s::rach_cfg_ded_c_& +recfg_with_sync_s::rach_cfg_ded_c_::operator=(const recfg_with_sync_s::rach_cfg_ded_c_& other) { - HANDLE_CODE(bref.unpack(add_active_spatial_relation_pucch_present, 1)); - - HANDLE_CODE(max_num_cfgured_spatial_relations.unpack(bref)); - HANDLE_CODE(max_num_active_spatial_relations.unpack(bref)); - HANDLE_CODE(max_num_dl_rs_qcl_type_d.unpack(bref)); + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ul: + c.set(other.c.get()); + break; + case types::supplementary_ul: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + } - return SRSASN_SUCCESS; + return *this; } -void spatial_relations_s::to_json(json_writer& j) const +void recfg_with_sync_s::rach_cfg_ded_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_str("maxNumberConfiguredSpatialRelations", max_num_cfgured_spatial_relations.to_string()); - j.write_str("maxNumberActiveSpatialRelations", max_num_active_spatial_relations.to_string()); - if (add_active_spatial_relation_pucch_present) { - j.write_str("additionalActiveSpatialRelationPUCCH", "supported"); + switch (type_) { + case types::ul: + j.write_fieldname("uplink"); + c.get().to_json(j); + break; + case types::supplementary_ul: + j.write_fieldname("supplementaryUplink"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); } - j.write_str("maxNumberDL-RS-QCL-TypeD", max_num_dl_rs_qcl_type_d.to_string()); j.end_obj(); } - -std::string spatial_relations_s::max_num_cfgured_spatial_relations_opts::to_string() const +SRSASN_CODE recfg_with_sync_s::rach_cfg_ded_c_::pack(bit_ref& bref) const { - 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_"); + type_.pack(bref); + switch (type_) { + case types::ul: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::supplementary_ul: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -uint8_t spatial_relations_s::max_num_cfgured_spatial_relations_opts::to_number() const +SRSASN_CODE recfg_with_sync_s::rach_cfg_ded_c_::unpack(cbit_ref& bref) { - 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_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ul: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::supplementary_ul: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "recfg_with_sync_s::rach_cfg_ded_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -std::string spatial_relations_s::max_num_active_spatial_relations_opts::to_string() const +std::string recfg_with_sync_s::rach_cfg_ded_c_::types_opts::to_string() const { - 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_"); + static const char* options[] = {"uplink", "supplementaryUplink"}; + return convert_enum_idx(options, 2, value, "recfg_with_sync_s::rach_cfg_ded_c_::types"); } -uint8_t spatial_relations_s::max_num_active_spatial_relations_opts::to_number() const + +// SchedulingRequestConfig ::= SEQUENCE +SRSASN_CODE sched_request_cfg_s::pack(bit_ref& bref) const { - 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_"); + HANDLE_CODE(bref.pack(sched_request_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(sched_request_to_release_list_present, 1)); + + if (sched_request_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_to_add_mod_list, 1, 8)); + } + if (sched_request_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_to_release_list, 1, 8, integer_packer(0, 7))); + } + + return SRSASN_SUCCESS; } +SRSASN_CODE sched_request_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sched_request_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(sched_request_to_release_list_present, 1)); + + if (sched_request_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(sched_request_to_add_mod_list, bref, 1, 8)); + } + if (sched_request_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(sched_request_to_release_list, bref, 1, 8, integer_packer(0, 7))); + } -std::string spatial_relations_s::max_num_dl_rs_qcl_type_d_opts::to_string() const -{ - 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_"); + return SRSASN_SUCCESS; } -uint8_t spatial_relations_s::max_num_dl_rs_qcl_type_d_opts::to_number() const +void sched_request_cfg_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + if (sched_request_to_add_mod_list_present) { + j.start_array("schedulingRequestToAddModList"); + 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 (const auto& e1 : sched_request_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); } -// MIMO-ParametersPerBand ::= SEQUENCE -SRSASN_CODE mimo_params_per_band_s::pack(bit_ref& bref) const +// ServingCellConfig ::= SEQUENCE +SRSASN_CODE serving_cell_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(tci_state_pdsch_present, 1)); - HANDLE_CODE(bref.pack(add_active_tci_state_pdcch_present, 1)); - HANDLE_CODE(bref.pack(pusch_trans_coherence_present, 1)); - HANDLE_CODE(bref.pack(beam_correspondence_without_ul_beam_sweeping_present, 1)); - HANDLE_CODE(bref.pack(periodic_beam_report_present, 1)); - HANDLE_CODE(bref.pack(aperiodic_beam_report_present, 1)); - HANDLE_CODE(bref.pack(sp_beam_report_pucch_present, 1)); - HANDLE_CODE(bref.pack(sp_beam_report_pusch_present, 1)); - HANDLE_CODE(bref.pack(dummy1_present, 1)); - HANDLE_CODE(bref.pack(max_num_rx_beam_present, 1)); - HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl_present, 1)); - HANDLE_CODE(bref.pack(max_num_non_group_beam_report_present, 1)); - HANDLE_CODE(bref.pack(group_beam_report_present, 1)); - HANDLE_CODE(bref.pack(ul_beam_management_present, 1)); - HANDLE_CODE(bref.pack(max_num_csi_rs_bfd_present, 1)); - HANDLE_CODE(bref.pack(max_num_ssb_bfd_present, 1)); - HANDLE_CODE(bref.pack(max_num_csi_rs_ssb_cbd_present, 1)); - HANDLE_CODE(bref.pack(dummy2_present, 1)); - HANDLE_CODE(bref.pack(two_ports_ptrs_ul_present, 1)); - HANDLE_CODE(bref.pack(dummy5_present, 1)); - HANDLE_CODE(bref.pack(dummy3_present, 1)); - HANDLE_CODE(bref.pack(beam_report_timing_present, 1)); - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl_present, 1)); - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul_present, 1)); - HANDLE_CODE(bref.pack(dummy4_present, 1)); - HANDLE_CODE(bref.pack(aperiodic_trs_present, 1)); + HANDLE_CODE(bref.pack(tdd_ul_dl_cfg_ded_present, 1)); + HANDLE_CODE(bref.pack(init_dl_bwp_present, 1)); + HANDLE_CODE(bref.pack(dl_bwp_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(dl_bwp_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(first_active_dl_bwp_id_present, 1)); + HANDLE_CODE(bref.pack(bwp_inactivity_timer_present, 1)); + HANDLE_CODE(bref.pack(default_dl_bwp_id_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_present, 1)); + HANDLE_CODE(bref.pack(supplementary_ul_present, 1)); + HANDLE_CODE(bref.pack(pdcch_serving_cell_cfg_present, 1)); + HANDLE_CODE(bref.pack(pdsch_serving_cell_cfg_present, 1)); + HANDLE_CODE(bref.pack(csi_meas_cfg_present, 1)); + HANDLE_CODE(bref.pack(scell_deactivation_timer_present, 1)); + HANDLE_CODE(bref.pack(cross_carrier_sched_cfg_present, 1)); + HANDLE_CODE(bref.pack(dummy_present, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_linking_present, 1)); + HANDLE_CODE(bref.pack(serving_cell_mo_present, 1)); - if (tci_state_pdsch_present) { - HANDLE_CODE(bref.pack(tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present, 1)); - HANDLE_CODE(bref.pack(tci_state_pdsch.max_num_active_tci_per_bwp_present, 1)); - if (tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present) { - HANDLE_CODE(tci_state_pdsch.max_num_cfgured_tcistates_per_cc.pack(bref)); - } - if (tci_state_pdsch.max_num_active_tci_per_bwp_present) { - HANDLE_CODE(tci_state_pdsch.max_num_active_tci_per_bwp.pack(bref)); - } + if (tdd_ul_dl_cfg_ded_present) { + HANDLE_CODE(tdd_ul_dl_cfg_ded.pack(bref)); } - if (pusch_trans_coherence_present) { - HANDLE_CODE(pusch_trans_coherence.pack(bref)); + if (init_dl_bwp_present) { + HANDLE_CODE(init_dl_bwp.pack(bref)); } - if (dummy1_present) { - HANDLE_CODE(dummy1.pack(bref)); + if (dl_bwp_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, dl_bwp_to_release_list, 1, 4, integer_packer(0, 4))); } - if (max_num_rx_beam_present) { - HANDLE_CODE(pack_integer(bref, max_num_rx_beam, (uint8_t)2u, (uint8_t)8u)); + if (dl_bwp_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, dl_bwp_to_add_mod_list, 1, 4)); } - if (max_num_rx_tx_beam_switch_dl_present) { - HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present, 1)); - HANDLE_CODE(bref.pack(max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present, 1)); - if (max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus15k_hz.pack(bref)); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus30k_hz.pack(bref)); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus60k_hz.pack(bref)); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus120k_hz.pack(bref)); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus240k_hz.pack(bref)); - } + if (first_active_dl_bwp_id_present) { + HANDLE_CODE(pack_integer(bref, first_active_dl_bwp_id, (uint8_t)0u, (uint8_t)4u)); } - if (max_num_non_group_beam_report_present) { - HANDLE_CODE(max_num_non_group_beam_report.pack(bref)); + if (bwp_inactivity_timer_present) { + HANDLE_CODE(bwp_inactivity_timer.pack(bref)); } - if (ul_beam_management_present) { - HANDLE_CODE(ul_beam_management.max_num_srs_res_per_set_bm.pack(bref)); - HANDLE_CODE(pack_integer(bref, ul_beam_management.max_num_srs_res_set, (uint8_t)1u, (uint8_t)8u)); + if (default_dl_bwp_id_present) { + HANDLE_CODE(pack_integer(bref, default_dl_bwp_id, (uint8_t)0u, (uint8_t)4u)); } - if (max_num_csi_rs_bfd_present) { - HANDLE_CODE(pack_integer(bref, max_num_csi_rs_bfd, (uint8_t)1u, (uint8_t)64u)); + if (ul_cfg_present) { + HANDLE_CODE(ul_cfg.pack(bref)); } - if (max_num_ssb_bfd_present) { - HANDLE_CODE(pack_integer(bref, max_num_ssb_bfd, (uint8_t)1u, (uint8_t)64u)); + if (supplementary_ul_present) { + HANDLE_CODE(supplementary_ul.pack(bref)); } - if (max_num_csi_rs_ssb_cbd_present) { - HANDLE_CODE(pack_integer(bref, max_num_csi_rs_ssb_cbd, (uint16_t)1u, (uint16_t)256u)); + if (pdcch_serving_cell_cfg_present) { + HANDLE_CODE(pdcch_serving_cell_cfg.pack(bref)); } - if (dummy5_present) { - HANDLE_CODE(dummy5.pack(bref)); + if (pdsch_serving_cell_cfg_present) { + HANDLE_CODE(pdsch_serving_cell_cfg.pack(bref)); } - if (dummy3_present) { - HANDLE_CODE(pack_integer(bref, dummy3, (uint8_t)1u, (uint8_t)4u)); + if (csi_meas_cfg_present) { + HANDLE_CODE(csi_meas_cfg.pack(bref)); } - if (beam_report_timing_present) { - HANDLE_CODE(bref.pack(beam_report_timing.scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.pack(beam_report_timing.scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.pack(beam_report_timing.scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.pack(beam_report_timing.scs_minus120k_hz_present, 1)); - if (beam_report_timing.scs_minus15k_hz_present) { - HANDLE_CODE(beam_report_timing.scs_minus15k_hz.pack(bref)); - } - if (beam_report_timing.scs_minus30k_hz_present) { - HANDLE_CODE(beam_report_timing.scs_minus30k_hz.pack(bref)); - } - if (beam_report_timing.scs_minus60k_hz_present) { - HANDLE_CODE(beam_report_timing.scs_minus60k_hz.pack(bref)); - } - if (beam_report_timing.scs_minus120k_hz_present) { - HANDLE_CODE(beam_report_timing.scs_minus120k_hz.pack(bref)); - } + if (scell_deactivation_timer_present) { + HANDLE_CODE(scell_deactivation_timer.pack(bref)); } - if (ptrs_density_recommendation_set_dl_present) { - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl.scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl.scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl.scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_dl.scs_minus120k_hz_present, 1)); - if (ptrs_density_recommendation_set_dl.scs_minus15k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus15k_hz.pack(bref)); - } - if (ptrs_density_recommendation_set_dl.scs_minus30k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus30k_hz.pack(bref)); - } - if (ptrs_density_recommendation_set_dl.scs_minus60k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus60k_hz.pack(bref)); - } - if (ptrs_density_recommendation_set_dl.scs_minus120k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus120k_hz.pack(bref)); - } + if (cross_carrier_sched_cfg_present) { + HANDLE_CODE(cross_carrier_sched_cfg.pack(bref)); } - if (ptrs_density_recommendation_set_ul_present) { - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul.scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul.scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul.scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.pack(ptrs_density_recommendation_set_ul.scs_minus120k_hz_present, 1)); - if (ptrs_density_recommendation_set_ul.scs_minus15k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus15k_hz.pack(bref)); - } - if (ptrs_density_recommendation_set_ul.scs_minus30k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus30k_hz.pack(bref)); - } - if (ptrs_density_recommendation_set_ul.scs_minus60k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus60k_hz.pack(bref)); - } - if (ptrs_density_recommendation_set_ul.scs_minus120k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus120k_hz.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, tag_id, (uint8_t)0u, (uint8_t)3u)); + if (pathloss_ref_linking_present) { + HANDLE_CODE(pathloss_ref_linking.pack(bref)); } - if (dummy4_present) { - HANDLE_CODE(dummy4.pack(bref)); + if (serving_cell_mo_present) { + HANDLE_CODE(pack_integer(bref, serving_cell_mo, (uint8_t)1u, (uint8_t)64u)); } if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= beam_correspondence_ca_present; - group_flags[0] |= beam_management_ssb_csi_rs.is_present(); - group_flags[0] |= beam_switch_timing.is_present(); - group_flags[0] |= codebook_params.is_present(); - group_flags[0] |= csi_rs_im_reception_for_feedback.is_present(); - group_flags[0] |= csi_rs_proc_framework_for_srs.is_present(); - group_flags[0] |= csi_report_framework.is_present(); - group_flags[0] |= csi_rs_for_tracking.is_present(); - group_flags[0] |= srs_assoc_csi_rs.is_present(); - group_flags[0] |= spatial_relations.is_present(); + group_flags[0] |= lte_crs_to_match_around.is_present(); + group_flags[0] |= rate_match_pattern_to_add_mod_list.is_present(); + group_flags[0] |= rate_match_pattern_to_release_list.is_present(); + group_flags[0] |= dl_ch_bw_per_scs_list.is_present(); group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(beam_correspondence_ca_present, 1)); - HANDLE_CODE(bref.pack(beam_management_ssb_csi_rs.is_present(), 1)); - HANDLE_CODE(bref.pack(beam_switch_timing.is_present(), 1)); - HANDLE_CODE(bref.pack(codebook_params.is_present(), 1)); - HANDLE_CODE(bref.pack(csi_rs_im_reception_for_feedback.is_present(), 1)); - HANDLE_CODE(bref.pack(csi_rs_proc_framework_for_srs.is_present(), 1)); - HANDLE_CODE(bref.pack(csi_report_framework.is_present(), 1)); - HANDLE_CODE(bref.pack(csi_rs_for_tracking.is_present(), 1)); - HANDLE_CODE(bref.pack(srs_assoc_csi_rs.is_present(), 1)); - HANDLE_CODE(bref.pack(spatial_relations.is_present(), 1)); - if (beam_management_ssb_csi_rs.is_present()) { - HANDLE_CODE(beam_management_ssb_csi_rs->pack(bref)); - } - if (beam_switch_timing.is_present()) { - HANDLE_CODE(bref.pack(beam_switch_timing->scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.pack(beam_switch_timing->scs_minus120k_hz_present, 1)); - if (beam_switch_timing->scs_minus60k_hz_present) { - HANDLE_CODE(beam_switch_timing->scs_minus60k_hz.pack(bref)); - } - if (beam_switch_timing->scs_minus120k_hz_present) { - HANDLE_CODE(beam_switch_timing->scs_minus120k_hz.pack(bref)); - } - } - if (codebook_params.is_present()) { - HANDLE_CODE(codebook_params->pack(bref)); - } - if (csi_rs_im_reception_for_feedback.is_present()) { - HANDLE_CODE(csi_rs_im_reception_for_feedback->pack(bref)); - } - if (csi_rs_proc_framework_for_srs.is_present()) { - HANDLE_CODE(csi_rs_proc_framework_for_srs->pack(bref)); - } - if (csi_report_framework.is_present()) { - HANDLE_CODE(csi_report_framework->pack(bref)); + HANDLE_CODE(bref.pack(lte_crs_to_match_around.is_present(), 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_to_add_mod_list.is_present(), 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_to_release_list.is_present(), 1)); + HANDLE_CODE(bref.pack(dl_ch_bw_per_scs_list.is_present(), 1)); + if (lte_crs_to_match_around.is_present()) { + HANDLE_CODE(lte_crs_to_match_around->pack(bref)); } - if (csi_rs_for_tracking.is_present()) { - HANDLE_CODE(csi_rs_for_tracking->pack(bref)); + if (rate_match_pattern_to_add_mod_list.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *rate_match_pattern_to_add_mod_list, 1, 4)); } - if (srs_assoc_csi_rs.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *srs_assoc_csi_rs, 1, 7)); + if (rate_match_pattern_to_release_list.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *rate_match_pattern_to_release_list, 1, 4, integer_packer(0, 3))); } - if (spatial_relations.is_present()) { - HANDLE_CODE(spatial_relations->pack(bref)); + if (dl_ch_bw_per_scs_list.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *dl_ch_bw_per_scs_list, 1, 5)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE mimo_params_per_band_s::unpack(cbit_ref& bref) +SRSASN_CODE serving_cell_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(tci_state_pdsch_present, 1)); - HANDLE_CODE(bref.unpack(add_active_tci_state_pdcch_present, 1)); - HANDLE_CODE(bref.unpack(pusch_trans_coherence_present, 1)); - HANDLE_CODE(bref.unpack(beam_correspondence_without_ul_beam_sweeping_present, 1)); - HANDLE_CODE(bref.unpack(periodic_beam_report_present, 1)); - HANDLE_CODE(bref.unpack(aperiodic_beam_report_present, 1)); - HANDLE_CODE(bref.unpack(sp_beam_report_pucch_present, 1)); - HANDLE_CODE(bref.unpack(sp_beam_report_pusch_present, 1)); - HANDLE_CODE(bref.unpack(dummy1_present, 1)); - HANDLE_CODE(bref.unpack(max_num_rx_beam_present, 1)); - HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl_present, 1)); - HANDLE_CODE(bref.unpack(max_num_non_group_beam_report_present, 1)); - HANDLE_CODE(bref.unpack(group_beam_report_present, 1)); - HANDLE_CODE(bref.unpack(ul_beam_management_present, 1)); - HANDLE_CODE(bref.unpack(max_num_csi_rs_bfd_present, 1)); - HANDLE_CODE(bref.unpack(max_num_ssb_bfd_present, 1)); - HANDLE_CODE(bref.unpack(max_num_csi_rs_ssb_cbd_present, 1)); - HANDLE_CODE(bref.unpack(dummy2_present, 1)); - HANDLE_CODE(bref.unpack(two_ports_ptrs_ul_present, 1)); - HANDLE_CODE(bref.unpack(dummy5_present, 1)); - HANDLE_CODE(bref.unpack(dummy3_present, 1)); - HANDLE_CODE(bref.unpack(beam_report_timing_present, 1)); - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl_present, 1)); - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul_present, 1)); - HANDLE_CODE(bref.unpack(dummy4_present, 1)); - HANDLE_CODE(bref.unpack(aperiodic_trs_present, 1)); + HANDLE_CODE(bref.unpack(tdd_ul_dl_cfg_ded_present, 1)); + HANDLE_CODE(bref.unpack(init_dl_bwp_present, 1)); + HANDLE_CODE(bref.unpack(dl_bwp_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(dl_bwp_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(first_active_dl_bwp_id_present, 1)); + HANDLE_CODE(bref.unpack(bwp_inactivity_timer_present, 1)); + HANDLE_CODE(bref.unpack(default_dl_bwp_id_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_present, 1)); + HANDLE_CODE(bref.unpack(supplementary_ul_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_serving_cell_cfg_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_serving_cell_cfg_present, 1)); + HANDLE_CODE(bref.unpack(csi_meas_cfg_present, 1)); + HANDLE_CODE(bref.unpack(scell_deactivation_timer_present, 1)); + HANDLE_CODE(bref.unpack(cross_carrier_sched_cfg_present, 1)); + HANDLE_CODE(bref.unpack(dummy_present, 1)); + HANDLE_CODE(bref.unpack(pathloss_ref_linking_present, 1)); + HANDLE_CODE(bref.unpack(serving_cell_mo_present, 1)); - if (tci_state_pdsch_present) { - HANDLE_CODE(bref.unpack(tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present, 1)); - HANDLE_CODE(bref.unpack(tci_state_pdsch.max_num_active_tci_per_bwp_present, 1)); - if (tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present) { - HANDLE_CODE(tci_state_pdsch.max_num_cfgured_tcistates_per_cc.unpack(bref)); - } - if (tci_state_pdsch.max_num_active_tci_per_bwp_present) { - HANDLE_CODE(tci_state_pdsch.max_num_active_tci_per_bwp.unpack(bref)); - } + if (tdd_ul_dl_cfg_ded_present) { + HANDLE_CODE(tdd_ul_dl_cfg_ded.unpack(bref)); } - if (pusch_trans_coherence_present) { - HANDLE_CODE(pusch_trans_coherence.unpack(bref)); + if (init_dl_bwp_present) { + HANDLE_CODE(init_dl_bwp.unpack(bref)); } - if (dummy1_present) { - HANDLE_CODE(dummy1.unpack(bref)); + if (dl_bwp_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(dl_bwp_to_release_list, bref, 1, 4, integer_packer(0, 4))); } - if (max_num_rx_beam_present) { - HANDLE_CODE(unpack_integer(max_num_rx_beam, bref, (uint8_t)2u, (uint8_t)8u)); + if (dl_bwp_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(dl_bwp_to_add_mod_list, bref, 1, 4)); } - if (max_num_rx_tx_beam_switch_dl_present) { - HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present, 1)); - HANDLE_CODE(bref.unpack(max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present, 1)); - if (max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus15k_hz.unpack(bref)); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus30k_hz.unpack(bref)); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus60k_hz.unpack(bref)); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus120k_hz.unpack(bref)); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present) { - HANDLE_CODE(max_num_rx_tx_beam_switch_dl.scs_minus240k_hz.unpack(bref)); - } + if (first_active_dl_bwp_id_present) { + HANDLE_CODE(unpack_integer(first_active_dl_bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); } - if (max_num_non_group_beam_report_present) { - HANDLE_CODE(max_num_non_group_beam_report.unpack(bref)); + if (bwp_inactivity_timer_present) { + HANDLE_CODE(bwp_inactivity_timer.unpack(bref)); } - if (ul_beam_management_present) { - HANDLE_CODE(ul_beam_management.max_num_srs_res_per_set_bm.unpack(bref)); - HANDLE_CODE(unpack_integer(ul_beam_management.max_num_srs_res_set, bref, (uint8_t)1u, (uint8_t)8u)); + if (default_dl_bwp_id_present) { + HANDLE_CODE(unpack_integer(default_dl_bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); } - if (max_num_csi_rs_bfd_present) { - HANDLE_CODE(unpack_integer(max_num_csi_rs_bfd, bref, (uint8_t)1u, (uint8_t)64u)); + if (ul_cfg_present) { + HANDLE_CODE(ul_cfg.unpack(bref)); } - if (max_num_ssb_bfd_present) { - HANDLE_CODE(unpack_integer(max_num_ssb_bfd, bref, (uint8_t)1u, (uint8_t)64u)); + if (supplementary_ul_present) { + HANDLE_CODE(supplementary_ul.unpack(bref)); } - if (max_num_csi_rs_ssb_cbd_present) { - HANDLE_CODE(unpack_integer(max_num_csi_rs_ssb_cbd, bref, (uint16_t)1u, (uint16_t)256u)); + if (pdcch_serving_cell_cfg_present) { + HANDLE_CODE(pdcch_serving_cell_cfg.unpack(bref)); } - if (dummy5_present) { - HANDLE_CODE(dummy5.unpack(bref)); + if (pdsch_serving_cell_cfg_present) { + HANDLE_CODE(pdsch_serving_cell_cfg.unpack(bref)); } - if (dummy3_present) { - HANDLE_CODE(unpack_integer(dummy3, bref, (uint8_t)1u, (uint8_t)4u)); + if (csi_meas_cfg_present) { + HANDLE_CODE(csi_meas_cfg.unpack(bref)); } - if (beam_report_timing_present) { - HANDLE_CODE(bref.unpack(beam_report_timing.scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.unpack(beam_report_timing.scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.unpack(beam_report_timing.scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.unpack(beam_report_timing.scs_minus120k_hz_present, 1)); - if (beam_report_timing.scs_minus15k_hz_present) { - HANDLE_CODE(beam_report_timing.scs_minus15k_hz.unpack(bref)); - } - if (beam_report_timing.scs_minus30k_hz_present) { - HANDLE_CODE(beam_report_timing.scs_minus30k_hz.unpack(bref)); - } - if (beam_report_timing.scs_minus60k_hz_present) { - HANDLE_CODE(beam_report_timing.scs_minus60k_hz.unpack(bref)); - } - if (beam_report_timing.scs_minus120k_hz_present) { - HANDLE_CODE(beam_report_timing.scs_minus120k_hz.unpack(bref)); - } + if (scell_deactivation_timer_present) { + HANDLE_CODE(scell_deactivation_timer.unpack(bref)); } - if (ptrs_density_recommendation_set_dl_present) { - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl.scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl.scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl.scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_dl.scs_minus120k_hz_present, 1)); - if (ptrs_density_recommendation_set_dl.scs_minus15k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus15k_hz.unpack(bref)); - } - if (ptrs_density_recommendation_set_dl.scs_minus30k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus30k_hz.unpack(bref)); - } - if (ptrs_density_recommendation_set_dl.scs_minus60k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus60k_hz.unpack(bref)); - } - if (ptrs_density_recommendation_set_dl.scs_minus120k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_dl.scs_minus120k_hz.unpack(bref)); - } + if (cross_carrier_sched_cfg_present) { + HANDLE_CODE(cross_carrier_sched_cfg.unpack(bref)); } - if (ptrs_density_recommendation_set_ul_present) { - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul.scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul.scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul.scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.unpack(ptrs_density_recommendation_set_ul.scs_minus120k_hz_present, 1)); - if (ptrs_density_recommendation_set_ul.scs_minus15k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus15k_hz.unpack(bref)); - } - if (ptrs_density_recommendation_set_ul.scs_minus30k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus30k_hz.unpack(bref)); - } - if (ptrs_density_recommendation_set_ul.scs_minus60k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus60k_hz.unpack(bref)); - } - if (ptrs_density_recommendation_set_ul.scs_minus120k_hz_present) { - HANDLE_CODE(ptrs_density_recommendation_set_ul.scs_minus120k_hz.unpack(bref)); - } + HANDLE_CODE(unpack_integer(tag_id, bref, (uint8_t)0u, (uint8_t)3u)); + if (pathloss_ref_linking_present) { + HANDLE_CODE(pathloss_ref_linking.unpack(bref)); } - if (dummy4_present) { - HANDLE_CODE(dummy4.unpack(bref)); + if (serving_cell_mo_present) { + HANDLE_CODE(unpack_integer(serving_cell_mo, bref, (uint8_t)1u, (uint8_t)64u)); } if (ext) { @@ -44284,1058 +47010,1032 @@ SRSASN_CODE mimo_params_per_band_s::unpack(cbit_ref& bref) if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(beam_correspondence_ca_present, 1)); - bool beam_management_ssb_csi_rs_present; - HANDLE_CODE(bref.unpack(beam_management_ssb_csi_rs_present, 1)); - beam_management_ssb_csi_rs.set_present(beam_management_ssb_csi_rs_present); - bool beam_switch_timing_present; - HANDLE_CODE(bref.unpack(beam_switch_timing_present, 1)); - beam_switch_timing.set_present(beam_switch_timing_present); - bool codebook_params_present; - HANDLE_CODE(bref.unpack(codebook_params_present, 1)); - codebook_params.set_present(codebook_params_present); - bool csi_rs_im_reception_for_feedback_present; - HANDLE_CODE(bref.unpack(csi_rs_im_reception_for_feedback_present, 1)); - csi_rs_im_reception_for_feedback.set_present(csi_rs_im_reception_for_feedback_present); - bool csi_rs_proc_framework_for_srs_present; - HANDLE_CODE(bref.unpack(csi_rs_proc_framework_for_srs_present, 1)); - csi_rs_proc_framework_for_srs.set_present(csi_rs_proc_framework_for_srs_present); - bool csi_report_framework_present; - HANDLE_CODE(bref.unpack(csi_report_framework_present, 1)); - csi_report_framework.set_present(csi_report_framework_present); - bool csi_rs_for_tracking_present; - HANDLE_CODE(bref.unpack(csi_rs_for_tracking_present, 1)); - csi_rs_for_tracking.set_present(csi_rs_for_tracking_present); - bool srs_assoc_csi_rs_present; - HANDLE_CODE(bref.unpack(srs_assoc_csi_rs_present, 1)); - srs_assoc_csi_rs.set_present(srs_assoc_csi_rs_present); - bool spatial_relations_present; - HANDLE_CODE(bref.unpack(spatial_relations_present, 1)); - spatial_relations.set_present(spatial_relations_present); - if (beam_management_ssb_csi_rs.is_present()) { - HANDLE_CODE(beam_management_ssb_csi_rs->unpack(bref)); - } - if (beam_switch_timing.is_present()) { - HANDLE_CODE(bref.unpack(beam_switch_timing->scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.unpack(beam_switch_timing->scs_minus120k_hz_present, 1)); - if (beam_switch_timing->scs_minus60k_hz_present) { - HANDLE_CODE(beam_switch_timing->scs_minus60k_hz.unpack(bref)); - } - if (beam_switch_timing->scs_minus120k_hz_present) { - HANDLE_CODE(beam_switch_timing->scs_minus120k_hz.unpack(bref)); - } - } - if (codebook_params.is_present()) { - HANDLE_CODE(codebook_params->unpack(bref)); - } - if (csi_rs_im_reception_for_feedback.is_present()) { - HANDLE_CODE(csi_rs_im_reception_for_feedback->unpack(bref)); - } - if (csi_rs_proc_framework_for_srs.is_present()) { - HANDLE_CODE(csi_rs_proc_framework_for_srs->unpack(bref)); - } - if (csi_report_framework.is_present()) { - HANDLE_CODE(csi_report_framework->unpack(bref)); + bool lte_crs_to_match_around_present; + HANDLE_CODE(bref.unpack(lte_crs_to_match_around_present, 1)); + lte_crs_to_match_around.set_present(lte_crs_to_match_around_present); + bool rate_match_pattern_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_present, 1)); + rate_match_pattern_to_add_mod_list.set_present(rate_match_pattern_to_add_mod_list_present); + bool rate_match_pattern_to_release_list_present; + HANDLE_CODE(bref.unpack(rate_match_pattern_to_release_list_present, 1)); + rate_match_pattern_to_release_list.set_present(rate_match_pattern_to_release_list_present); + bool dl_ch_bw_per_scs_list_present; + HANDLE_CODE(bref.unpack(dl_ch_bw_per_scs_list_present, 1)); + dl_ch_bw_per_scs_list.set_present(dl_ch_bw_per_scs_list_present); + if (lte_crs_to_match_around.is_present()) { + HANDLE_CODE(lte_crs_to_match_around->unpack(bref)); } - if (csi_rs_for_tracking.is_present()) { - HANDLE_CODE(csi_rs_for_tracking->unpack(bref)); + if (rate_match_pattern_to_add_mod_list.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*rate_match_pattern_to_add_mod_list, bref, 1, 4)); } - if (srs_assoc_csi_rs.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*srs_assoc_csi_rs, bref, 1, 7)); + if (rate_match_pattern_to_release_list.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*rate_match_pattern_to_release_list, bref, 1, 4, integer_packer(0, 3))); } - if (spatial_relations.is_present()) { - HANDLE_CODE(spatial_relations->unpack(bref)); + if (dl_ch_bw_per_scs_list.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*dl_ch_bw_per_scs_list, bref, 1, 5)); } } } return SRSASN_SUCCESS; } -void mimo_params_per_band_s::to_json(json_writer& j) const +void serving_cell_cfg_s::to_json(json_writer& j) const { j.start_obj(); - if (tci_state_pdsch_present) { - j.write_fieldname("tci-StatePDSCH"); - j.start_obj(); - if (tci_state_pdsch.max_num_cfgured_tcistates_per_cc_present) { - j.write_str("maxNumberConfiguredTCIstatesPerCC", tci_state_pdsch.max_num_cfgured_tcistates_per_cc.to_string()); - } - if (tci_state_pdsch.max_num_active_tci_per_bwp_present) { - j.write_str("maxNumberActiveTCI-PerBWP", tci_state_pdsch.max_num_active_tci_per_bwp.to_string()); - } - j.end_obj(); - } - if (add_active_tci_state_pdcch_present) { - j.write_str("additionalActiveTCI-StatePDCCH", "supported"); - } - if (pusch_trans_coherence_present) { - j.write_str("pusch-TransCoherence", pusch_trans_coherence.to_string()); - } - if (beam_correspondence_without_ul_beam_sweeping_present) { - j.write_str("beamCorrespondenceWithoutUL-BeamSweeping", "supported"); - } - if (periodic_beam_report_present) { - j.write_str("periodicBeamReport", "supported"); - } - if (aperiodic_beam_report_present) { - j.write_str("aperiodicBeamReport", "supported"); - } - if (sp_beam_report_pucch_present) { - j.write_str("sp-BeamReportPUCCH", "supported"); - } - if (sp_beam_report_pusch_present) { - j.write_str("sp-BeamReportPUSCH", "supported"); - } - if (dummy1_present) { - j.write_fieldname("dummy1"); - dummy1.to_json(j); + if (tdd_ul_dl_cfg_ded_present) { + j.write_fieldname("tdd-UL-DL-ConfigurationDedicated"); + tdd_ul_dl_cfg_ded.to_json(j); } - if (max_num_rx_beam_present) { - j.write_int("maxNumberRxBeam", max_num_rx_beam); + if (init_dl_bwp_present) { + j.write_fieldname("initialDownlinkBWP"); + init_dl_bwp.to_json(j); } - if (max_num_rx_tx_beam_switch_dl_present) { - j.write_fieldname("maxNumberRxTxBeamSwitchDL"); - j.start_obj(); - if (max_num_rx_tx_beam_switch_dl.scs_minus15k_hz_present) { - j.write_str("scs-15kHz", max_num_rx_tx_beam_switch_dl.scs_minus15k_hz.to_string()); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus30k_hz_present) { - j.write_str("scs-30kHz", max_num_rx_tx_beam_switch_dl.scs_minus30k_hz.to_string()); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus60k_hz_present) { - j.write_str("scs-60kHz", max_num_rx_tx_beam_switch_dl.scs_minus60k_hz.to_string()); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus120k_hz_present) { - j.write_str("scs-120kHz", max_num_rx_tx_beam_switch_dl.scs_minus120k_hz.to_string()); - } - if (max_num_rx_tx_beam_switch_dl.scs_minus240k_hz_present) { - j.write_str("scs-240kHz", max_num_rx_tx_beam_switch_dl.scs_minus240k_hz.to_string()); + if (dl_bwp_to_release_list_present) { + j.start_array("downlinkBWP-ToReleaseList"); + for (const auto& e1 : dl_bwp_to_release_list) { + j.write_int(e1); } - j.end_obj(); - } - if (max_num_non_group_beam_report_present) { - j.write_str("maxNumberNonGroupBeamReporting", max_num_non_group_beam_report.to_string()); + j.end_array(); } - if (group_beam_report_present) { - j.write_str("groupBeamReporting", "supported"); + if (dl_bwp_to_add_mod_list_present) { + j.start_array("downlinkBWP-ToAddModList"); + for (const auto& e1 : dl_bwp_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); } - if (ul_beam_management_present) { - j.write_fieldname("uplinkBeamManagement"); - j.start_obj(); - j.write_str("maxNumberSRS-ResourcePerSet-BM", ul_beam_management.max_num_srs_res_per_set_bm.to_string()); - j.write_int("maxNumberSRS-ResourceSet", ul_beam_management.max_num_srs_res_set); - j.end_obj(); + if (first_active_dl_bwp_id_present) { + j.write_int("firstActiveDownlinkBWP-Id", first_active_dl_bwp_id); } - if (max_num_csi_rs_bfd_present) { - j.write_int("maxNumberCSI-RS-BFD", max_num_csi_rs_bfd); + if (bwp_inactivity_timer_present) { + j.write_str("bwp-InactivityTimer", bwp_inactivity_timer.to_string()); } - if (max_num_ssb_bfd_present) { - j.write_int("maxNumberSSB-BFD", max_num_ssb_bfd); + if (default_dl_bwp_id_present) { + j.write_int("defaultDownlinkBWP-Id", default_dl_bwp_id); } - if (max_num_csi_rs_ssb_cbd_present) { - j.write_int("maxNumberCSI-RS-SSB-CBD", max_num_csi_rs_ssb_cbd); + if (ul_cfg_present) { + j.write_fieldname("uplinkConfig"); + ul_cfg.to_json(j); } - if (dummy2_present) { - j.write_str("dummy2", "supported"); + if (supplementary_ul_present) { + j.write_fieldname("supplementaryUplink"); + supplementary_ul.to_json(j); } - if (two_ports_ptrs_ul_present) { - j.write_str("twoPortsPTRS-UL", "supported"); + if (pdcch_serving_cell_cfg_present) { + j.write_fieldname("pdcch-ServingCellConfig"); + pdcch_serving_cell_cfg.to_json(j); } - if (dummy5_present) { - j.write_fieldname("dummy5"); - dummy5.to_json(j); + if (pdsch_serving_cell_cfg_present) { + j.write_fieldname("pdsch-ServingCellConfig"); + pdsch_serving_cell_cfg.to_json(j); } - if (dummy3_present) { - j.write_int("dummy3", dummy3); + if (csi_meas_cfg_present) { + j.write_fieldname("csi-MeasConfig"); + csi_meas_cfg.to_json(j); } - if (beam_report_timing_present) { - j.write_fieldname("beamReportTiming"); - j.start_obj(); - if (beam_report_timing.scs_minus15k_hz_present) { - j.write_str("scs-15kHz", beam_report_timing.scs_minus15k_hz.to_string()); - } - if (beam_report_timing.scs_minus30k_hz_present) { - j.write_str("scs-30kHz", beam_report_timing.scs_minus30k_hz.to_string()); - } - if (beam_report_timing.scs_minus60k_hz_present) { - j.write_str("scs-60kHz", beam_report_timing.scs_minus60k_hz.to_string()); - } - if (beam_report_timing.scs_minus120k_hz_present) { - j.write_str("scs-120kHz", beam_report_timing.scs_minus120k_hz.to_string()); - } - j.end_obj(); + if (scell_deactivation_timer_present) { + j.write_str("sCellDeactivationTimer", scell_deactivation_timer.to_string()); } - if (ptrs_density_recommendation_set_dl_present) { - j.write_fieldname("ptrs-DensityRecommendationSetDL"); - j.start_obj(); - if (ptrs_density_recommendation_set_dl.scs_minus15k_hz_present) { - j.write_fieldname("scs-15kHz"); - ptrs_density_recommendation_set_dl.scs_minus15k_hz.to_json(j); - } - if (ptrs_density_recommendation_set_dl.scs_minus30k_hz_present) { - j.write_fieldname("scs-30kHz"); - ptrs_density_recommendation_set_dl.scs_minus30k_hz.to_json(j); - } - if (ptrs_density_recommendation_set_dl.scs_minus60k_hz_present) { - j.write_fieldname("scs-60kHz"); - ptrs_density_recommendation_set_dl.scs_minus60k_hz.to_json(j); - } - if (ptrs_density_recommendation_set_dl.scs_minus120k_hz_present) { - j.write_fieldname("scs-120kHz"); - ptrs_density_recommendation_set_dl.scs_minus120k_hz.to_json(j); - } - j.end_obj(); + if (cross_carrier_sched_cfg_present) { + j.write_fieldname("crossCarrierSchedulingConfig"); + cross_carrier_sched_cfg.to_json(j); } - if (ptrs_density_recommendation_set_ul_present) { - j.write_fieldname("ptrs-DensityRecommendationSetUL"); - j.start_obj(); - if (ptrs_density_recommendation_set_ul.scs_minus15k_hz_present) { - j.write_fieldname("scs-15kHz"); - ptrs_density_recommendation_set_ul.scs_minus15k_hz.to_json(j); - } - if (ptrs_density_recommendation_set_ul.scs_minus30k_hz_present) { - j.write_fieldname("scs-30kHz"); - ptrs_density_recommendation_set_ul.scs_minus30k_hz.to_json(j); - } - if (ptrs_density_recommendation_set_ul.scs_minus60k_hz_present) { - j.write_fieldname("scs-60kHz"); - ptrs_density_recommendation_set_ul.scs_minus60k_hz.to_json(j); - } - if (ptrs_density_recommendation_set_ul.scs_minus120k_hz_present) { - j.write_fieldname("scs-120kHz"); - ptrs_density_recommendation_set_ul.scs_minus120k_hz.to_json(j); - } - j.end_obj(); + j.write_int("tag-Id", tag_id); + if (dummy_present) { + j.write_str("dummy", "enabled"); } - if (dummy4_present) { - j.write_fieldname("dummy4"); - dummy4.to_json(j); + if (pathloss_ref_linking_present) { + j.write_str("pathlossReferenceLinking", pathloss_ref_linking.to_string()); } - if (aperiodic_trs_present) { - j.write_str("aperiodicTRS", "supported"); + if (serving_cell_mo_present) { + j.write_int("servingCellMO", serving_cell_mo); } if (ext) { - if (beam_correspondence_ca_present) { - j.write_str("beamCorrespondenceCA", "true"); - } - if (beam_management_ssb_csi_rs.is_present()) { - j.write_fieldname("beamManagementSSB-CSI-RS"); - beam_management_ssb_csi_rs->to_json(j); + if (lte_crs_to_match_around.is_present()) { + j.write_fieldname("lte-CRS-ToMatchAround"); + lte_crs_to_match_around->to_json(j); } - if (beam_switch_timing.is_present()) { - j.write_fieldname("beamSwitchTiming"); - j.start_obj(); - if (beam_switch_timing->scs_minus60k_hz_present) { - j.write_str("scs-60kHz", beam_switch_timing->scs_minus60k_hz.to_string()); - } - if (beam_switch_timing->scs_minus120k_hz_present) { - j.write_str("scs-120kHz", beam_switch_timing->scs_minus120k_hz.to_string()); + if (rate_match_pattern_to_add_mod_list.is_present()) { + j.start_array("rateMatchPatternToAddModList"); + for (const auto& e1 : *rate_match_pattern_to_add_mod_list) { + e1.to_json(j); } - j.end_obj(); - } - if (codebook_params.is_present()) { - j.write_fieldname("codebookParameters"); - codebook_params->to_json(j); - } - if (csi_rs_im_reception_for_feedback.is_present()) { - j.write_fieldname("csi-RS-IM-ReceptionForFeedback"); - csi_rs_im_reception_for_feedback->to_json(j); - } - if (csi_rs_proc_framework_for_srs.is_present()) { - j.write_fieldname("csi-RS-ProcFrameworkForSRS"); - csi_rs_proc_framework_for_srs->to_json(j); - } - if (csi_report_framework.is_present()) { - j.write_fieldname("csi-ReportFramework"); - csi_report_framework->to_json(j); + j.end_array(); } - if (csi_rs_for_tracking.is_present()) { - j.write_fieldname("csi-RS-ForTracking"); - csi_rs_for_tracking->to_json(j); + if (rate_match_pattern_to_release_list.is_present()) { + j.start_array("rateMatchPatternToReleaseList"); + for (const auto& e1 : *rate_match_pattern_to_release_list) { + j.write_int(e1); + } + j.end_array(); } - if (srs_assoc_csi_rs.is_present()) { - j.start_array("srs-AssocCSI-RS"); - for (const auto& e1 : *srs_assoc_csi_rs) { + if (dl_ch_bw_per_scs_list.is_present()) { + j.start_array("downlinkChannelBW-PerSCS-List"); + for (const auto& e1 : *dl_ch_bw_per_scs_list) { e1.to_json(j); } j.end_array(); } - if (spatial_relations.is_present()) { - j.write_fieldname("spatialRelations"); - spatial_relations->to_json(j); - } } j.end_obj(); } -std::string mimo_params_per_band_s::tci_state_pdsch_s_::max_num_cfgured_tcistates_per_cc_opts::to_string() const -{ - 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 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 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 +std::string serving_cell_cfg_s::bwp_inactivity_timer_opts::to_string() const { - 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_"); + 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_"); } - -std::string mimo_params_per_band_s::pusch_trans_coherence_opts::to_string() const +uint16_t serving_cell_cfg_s::bwp_inactivity_timer_opts::to_number() const { - static const char* options[] = {"nonCoherent", "partialCoherent", "fullCoherent"}; - return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::pusch_trans_coherence_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 mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus15k_hz_opts::to_string() const +std::string serving_cell_cfg_s::scell_deactivation_timer_opts::to_string() const { - 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_"); + 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_"); } -uint8_t mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus15k_hz_opts::to_number() const +uint16_t serving_cell_cfg_s::scell_deactivation_timer_opts::to_number() const { - 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_"); + 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 mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus30k_hz_opts::to_string() const -{ - 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 +std::string serving_cell_cfg_s::pathloss_ref_linking_opts::to_string() const { - 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_"); + static const char* options[] = {"spCell", "sCell"}; + return convert_enum_idx(options, 2, value, "serving_cell_cfg_s::pathloss_ref_linking_e_"); } -std::string mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus60k_hz_opts::to_string() const -{ - 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 +// TAG-Config ::= SEQUENCE +SRSASN_CODE tag_cfg_s::pack(bit_ref& bref) const { - 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_"); -} + HANDLE_CODE(bref.pack(tag_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(tag_to_add_mod_list_present, 1)); -std::string mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus120k_hz_opts::to_string() const -{ - 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 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_"); -} + if (tag_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, tag_to_release_list, 1, 4, integer_packer(0, 3))); + } + if (tag_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, tag_to_add_mod_list, 1, 4)); + } -std::string mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus240k_hz_opts::to_string() const -{ - 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_"); + return SRSASN_SUCCESS; } -uint8_t mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus240k_hz_opts::to_number() const +SRSASN_CODE tag_cfg_s::unpack(cbit_ref& bref) { - 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_"); -} + HANDLE_CODE(bref.unpack(tag_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(tag_to_add_mod_list_present, 1)); -std::string mimo_params_per_band_s::max_num_non_group_beam_report_opts::to_string() const -{ - 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 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_"); -} + if (tag_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(tag_to_release_list, bref, 1, 4, integer_packer(0, 3))); + } + if (tag_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(tag_to_add_mod_list, bref, 1, 4)); + } -std::string mimo_params_per_band_s::ul_beam_management_s_::max_num_srs_res_per_set_bm_opts::to_string() const -{ - 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_"); + return SRSASN_SUCCESS; } -uint8_t mimo_params_per_band_s::ul_beam_management_s_::max_num_srs_res_per_set_bm_opts::to_number() const +void tag_cfg_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + if (tag_to_release_list_present) { + j.start_array("tag-ToReleaseList"); + 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 (const auto& e1 : tag_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); } -std::string mimo_params_per_band_s::beam_report_timing_s_::scs_minus15k_hz_opts::to_string() const -{ - 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 +// MAC-CellGroupConfig ::= SEQUENCE +SRSASN_CODE mac_cell_group_cfg_s::pack(bit_ref& bref) const { - 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_"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(drx_cfg_present, 1)); + HANDLE_CODE(bref.pack(sched_request_cfg_present, 1)); + HANDLE_CODE(bref.pack(bsr_cfg_present, 1)); + HANDLE_CODE(bref.pack(tag_cfg_present, 1)); + HANDLE_CODE(bref.pack(phr_cfg_present, 1)); -std::string mimo_params_per_band_s::beam_report_timing_s_::scs_minus30k_hz_opts::to_string() const -{ - 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 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_"); -} + if (drx_cfg_present) { + HANDLE_CODE(drx_cfg.pack(bref)); + } + if (sched_request_cfg_present) { + HANDLE_CODE(sched_request_cfg.pack(bref)); + } + if (bsr_cfg_present) { + HANDLE_CODE(bsr_cfg.pack(bref)); + } + if (tag_cfg_present) { + HANDLE_CODE(tag_cfg.pack(bref)); + } + if (phr_cfg_present) { + HANDLE_CODE(phr_cfg.pack(bref)); + } + HANDLE_CODE(bref.pack(skip_ul_tx_dynamic, 1)); -std::string mimo_params_per_band_s::beam_report_timing_s_::scs_minus60k_hz_opts::to_string() const -{ - 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 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_"); -} + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= csi_mask_present; + group_flags[0] |= data_inactivity_timer.is_present(); + group_flags.pack(bref); -std::string mimo_params_per_band_s::beam_report_timing_s_::scs_minus120k_hz_opts::to_string() const -{ - 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 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_"); -} + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); -std::string mimo_params_per_band_s::beam_switch_timing_s_::scs_minus60k_hz_opts::to_string() const -{ - 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_"); + HANDLE_CODE(bref.pack(csi_mask_present, 1)); + HANDLE_CODE(bref.pack(data_inactivity_timer.is_present(), 1)); + if (csi_mask_present) { + HANDLE_CODE(bref.pack(csi_mask, 1)); + } + if (data_inactivity_timer.is_present()) { + HANDLE_CODE(data_inactivity_timer->pack(bref)); + } + } + } + return SRSASN_SUCCESS; } -uint16_t mimo_params_per_band_s::beam_switch_timing_s_::scs_minus60k_hz_opts::to_number() const +SRSASN_CODE mac_cell_group_cfg_s::unpack(cbit_ref& bref) { - 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_"); -} + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(drx_cfg_present, 1)); + HANDLE_CODE(bref.unpack(sched_request_cfg_present, 1)); + HANDLE_CODE(bref.unpack(bsr_cfg_present, 1)); + HANDLE_CODE(bref.unpack(tag_cfg_present, 1)); + HANDLE_CODE(bref.unpack(phr_cfg_present, 1)); -std::string mimo_params_per_band_s::beam_switch_timing_s_::scs_minus120k_hz_opts::to_string() const -{ - 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_"); + if (drx_cfg_present) { + HANDLE_CODE(drx_cfg.unpack(bref)); + } + if (sched_request_cfg_present) { + HANDLE_CODE(sched_request_cfg.unpack(bref)); + } + if (bsr_cfg_present) { + HANDLE_CODE(bsr_cfg.unpack(bref)); + } + if (tag_cfg_present) { + HANDLE_CODE(tag_cfg.unpack(bref)); + } + if (phr_cfg_present) { + HANDLE_CODE(phr_cfg.unpack(bref)); + } + HANDLE_CODE(bref.unpack(skip_ul_tx_dynamic, 1)); + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(csi_mask_present, 1)); + bool data_inactivity_timer_present; + HANDLE_CODE(bref.unpack(data_inactivity_timer_present, 1)); + data_inactivity_timer.set_present(data_inactivity_timer_present); + if (csi_mask_present) { + HANDLE_CODE(bref.unpack(csi_mask, 1)); + } + if (data_inactivity_timer.is_present()) { + HANDLE_CODE(data_inactivity_timer->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; } -uint16_t mimo_params_per_band_s::beam_switch_timing_s_::scs_minus120k_hz_opts::to_number() const +void mac_cell_group_cfg_s::to_json(json_writer& j) const { - 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_"); + j.start_obj(); + if (drx_cfg_present) { + j.write_fieldname("drx-Config"); + drx_cfg.to_json(j); + } + if (sched_request_cfg_present) { + j.write_fieldname("schedulingRequestConfig"); + sched_request_cfg.to_json(j); + } + if (bsr_cfg_present) { + j.write_fieldname("bsr-Config"); + bsr_cfg.to_json(j); + } + if (tag_cfg_present) { + j.write_fieldname("tag-Config"); + tag_cfg.to_json(j); + } + if (phr_cfg_present) { + j.write_fieldname("phr-Config"); + phr_cfg.to_json(j); + } + j.write_bool("skipUplinkTxDynamic", skip_ul_tx_dynamic); + if (ext) { + if (csi_mask_present) { + j.write_bool("csi-Mask", csi_mask); + } + if (data_inactivity_timer.is_present()) { + j.write_fieldname("dataInactivityTimer"); + data_inactivity_timer->to_json(j); + } + } + j.end_obj(); } -// BandNR ::= SEQUENCE -SRSASN_CODE band_nr_s::pack(bit_ref& bref) const +// PhysicalCellGroupConfig ::= SEQUENCE +SRSASN_CODE phys_cell_group_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(modified_mpr_behaviour_present, 1)); - HANDLE_CODE(bref.pack(mimo_params_per_band_present, 1)); - HANDLE_CODE(bref.pack(extended_cp_present, 1)); - HANDLE_CODE(bref.pack(multiple_tci_present, 1)); - HANDLE_CODE(bref.pack(bwp_without_restrict_present, 1)); - HANDLE_CODE(bref.pack(bwp_same_numerology_present, 1)); - HANDLE_CODE(bref.pack(bwp_diff_numerology_present, 1)); - HANDLE_CODE(bref.pack(cross_carrier_sched_same_scs_present, 1)); - HANDLE_CODE(bref.pack(pdsch_minus256_qam_fr2_present, 1)); - HANDLE_CODE(bref.pack(pusch_minus256_qam_present, 1)); - HANDLE_CODE(bref.pack(ue_pwr_class_present, 1)); - HANDLE_CODE(bref.pack(rate_matching_lte_crs_present, 1)); - HANDLE_CODE(bref.pack(ch_bws_dl_v1530_present, 1)); - HANDLE_CODE(bref.pack(ch_bws_ul_v1530_present, 1)); + HANDLE_CODE(bref.pack(harq_ack_spatial_bundling_pucch_present, 1)); + HANDLE_CODE(bref.pack(harq_ack_spatial_bundling_pusch_present, 1)); + HANDLE_CODE(bref.pack(p_nr_fr1_present, 1)); + HANDLE_CODE(bref.pack(tpc_srs_rnti_present, 1)); + HANDLE_CODE(bref.pack(tpc_pucch_rnti_present, 1)); + HANDLE_CODE(bref.pack(tpc_pusch_rnti_present, 1)); + HANDLE_CODE(bref.pack(sp_csi_rnti_present, 1)); + HANDLE_CODE(bref.pack(cs_rnti_present, 1)); - HANDLE_CODE(pack_integer(bref, band_nr, (uint16_t)1u, (uint16_t)1024u)); - if (modified_mpr_behaviour_present) { - HANDLE_CODE(modified_mpr_behaviour.pack(bref)); + if (p_nr_fr1_present) { + HANDLE_CODE(pack_integer(bref, p_nr_fr1, (int8_t)-30, (int8_t)33)); } - if (mimo_params_per_band_present) { - HANDLE_CODE(mimo_params_per_band.pack(bref)); + HANDLE_CODE(pdsch_harq_ack_codebook.pack(bref)); + if (tpc_srs_rnti_present) { + HANDLE_CODE(pack_integer(bref, tpc_srs_rnti, (uint32_t)0u, (uint32_t)65535u)); } - if (bwp_same_numerology_present) { - HANDLE_CODE(bwp_same_numerology.pack(bref)); + if (tpc_pucch_rnti_present) { + HANDLE_CODE(pack_integer(bref, tpc_pucch_rnti, (uint32_t)0u, (uint32_t)65535u)); } - if (ue_pwr_class_present) { - HANDLE_CODE(ue_pwr_class.pack(bref)); + if (tpc_pusch_rnti_present) { + HANDLE_CODE(pack_integer(bref, tpc_pusch_rnti, (uint32_t)0u, (uint32_t)65535u)); } - if (ch_bws_dl_v1530_present) { - HANDLE_CODE(ch_bws_dl_v1530.pack(bref)); + if (sp_csi_rnti_present) { + HANDLE_CODE(pack_integer(bref, sp_csi_rnti, (uint32_t)0u, (uint32_t)65535u)); } - if (ch_bws_ul_v1530_present) { - HANDLE_CODE(ch_bws_ul_v1530.pack(bref)); + if (cs_rnti_present) { + HANDLE_CODE(cs_rnti.pack(bref)); } if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= max_ul_duty_cycle_pc2_fr1_present; - group_flags[1] |= pucch_spatial_rel_info_mac_ce_present; - group_flags[1] |= pwr_boosting_pi2_bpsk_present; + group_flags[0] |= mcs_c_rnti_present; + group_flags[0] |= p_ue_fr1_present; + group_flags[1] |= xscale_present; + group_flags[2] |= pdcch_blind_detection.is_present(); group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(max_ul_duty_cycle_pc2_fr1_present, 1)); - if (max_ul_duty_cycle_pc2_fr1_present) { - HANDLE_CODE(max_ul_duty_cycle_pc2_fr1.pack(bref)); + HANDLE_CODE(bref.pack(mcs_c_rnti_present, 1)); + HANDLE_CODE(bref.pack(p_ue_fr1_present, 1)); + if (mcs_c_rnti_present) { + HANDLE_CODE(pack_integer(bref, mcs_c_rnti, (uint32_t)0u, (uint32_t)65535u)); + } + if (p_ue_fr1_present) { + HANDLE_CODE(pack_integer(bref, p_ue_fr1, (int8_t)-30, (int8_t)33)); } } if (group_flags[1]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(pucch_spatial_rel_info_mac_ce_present, 1)); - HANDLE_CODE(bref.pack(pwr_boosting_pi2_bpsk_present, 1)); + HANDLE_CODE(bref.pack(xscale_present, 1)); + if (xscale_present) { + HANDLE_CODE(xscale.pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pdcch_blind_detection.is_present(), 1)); + if (pdcch_blind_detection.is_present()) { + HANDLE_CODE(pdcch_blind_detection->pack(bref)); + } } } return SRSASN_SUCCESS; } -SRSASN_CODE band_nr_s::unpack(cbit_ref& bref) +SRSASN_CODE phys_cell_group_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(modified_mpr_behaviour_present, 1)); - HANDLE_CODE(bref.unpack(mimo_params_per_band_present, 1)); - HANDLE_CODE(bref.unpack(extended_cp_present, 1)); - HANDLE_CODE(bref.unpack(multiple_tci_present, 1)); - HANDLE_CODE(bref.unpack(bwp_without_restrict_present, 1)); - HANDLE_CODE(bref.unpack(bwp_same_numerology_present, 1)); - HANDLE_CODE(bref.unpack(bwp_diff_numerology_present, 1)); - HANDLE_CODE(bref.unpack(cross_carrier_sched_same_scs_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_minus256_qam_fr2_present, 1)); - HANDLE_CODE(bref.unpack(pusch_minus256_qam_present, 1)); - HANDLE_CODE(bref.unpack(ue_pwr_class_present, 1)); - HANDLE_CODE(bref.unpack(rate_matching_lte_crs_present, 1)); - HANDLE_CODE(bref.unpack(ch_bws_dl_v1530_present, 1)); - HANDLE_CODE(bref.unpack(ch_bws_ul_v1530_present, 1)); + HANDLE_CODE(bref.unpack(harq_ack_spatial_bundling_pucch_present, 1)); + HANDLE_CODE(bref.unpack(harq_ack_spatial_bundling_pusch_present, 1)); + HANDLE_CODE(bref.unpack(p_nr_fr1_present, 1)); + HANDLE_CODE(bref.unpack(tpc_srs_rnti_present, 1)); + HANDLE_CODE(bref.unpack(tpc_pucch_rnti_present, 1)); + HANDLE_CODE(bref.unpack(tpc_pusch_rnti_present, 1)); + HANDLE_CODE(bref.unpack(sp_csi_rnti_present, 1)); + HANDLE_CODE(bref.unpack(cs_rnti_present, 1)); - HANDLE_CODE(unpack_integer(band_nr, bref, (uint16_t)1u, (uint16_t)1024u)); - if (modified_mpr_behaviour_present) { - HANDLE_CODE(modified_mpr_behaviour.unpack(bref)); + if (p_nr_fr1_present) { + HANDLE_CODE(unpack_integer(p_nr_fr1, bref, (int8_t)-30, (int8_t)33)); } - if (mimo_params_per_band_present) { - HANDLE_CODE(mimo_params_per_band.unpack(bref)); + HANDLE_CODE(pdsch_harq_ack_codebook.unpack(bref)); + if (tpc_srs_rnti_present) { + HANDLE_CODE(unpack_integer(tpc_srs_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); } - if (bwp_same_numerology_present) { - HANDLE_CODE(bwp_same_numerology.unpack(bref)); + if (tpc_pucch_rnti_present) { + HANDLE_CODE(unpack_integer(tpc_pucch_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); } - if (ue_pwr_class_present) { - HANDLE_CODE(ue_pwr_class.unpack(bref)); + if (tpc_pusch_rnti_present) { + HANDLE_CODE(unpack_integer(tpc_pusch_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); } - if (ch_bws_dl_v1530_present) { - HANDLE_CODE(ch_bws_dl_v1530.unpack(bref)); + if (sp_csi_rnti_present) { + HANDLE_CODE(unpack_integer(sp_csi_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); } - if (ch_bws_ul_v1530_present) { - HANDLE_CODE(ch_bws_ul_v1530.unpack(bref)); + if (cs_rnti_present) { + HANDLE_CODE(cs_rnti.unpack(bref)); } if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(3); group_flags.unpack(bref); if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(max_ul_duty_cycle_pc2_fr1_present, 1)); - if (max_ul_duty_cycle_pc2_fr1_present) { - HANDLE_CODE(max_ul_duty_cycle_pc2_fr1.unpack(bref)); + HANDLE_CODE(bref.unpack(mcs_c_rnti_present, 1)); + HANDLE_CODE(bref.unpack(p_ue_fr1_present, 1)); + if (mcs_c_rnti_present) { + HANDLE_CODE(unpack_integer(mcs_c_rnti, bref, (uint32_t)0u, (uint32_t)65535u)); + } + if (p_ue_fr1_present) { + HANDLE_CODE(unpack_integer(p_ue_fr1, bref, (int8_t)-30, (int8_t)33)); } } if (group_flags[1]) { varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(pucch_spatial_rel_info_mac_ce_present, 1)); - HANDLE_CODE(bref.unpack(pwr_boosting_pi2_bpsk_present, 1)); + HANDLE_CODE(bref.unpack(xscale_present, 1)); + if (xscale_present) { + HANDLE_CODE(xscale.unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool pdcch_blind_detection_present; + HANDLE_CODE(bref.unpack(pdcch_blind_detection_present, 1)); + pdcch_blind_detection.set_present(pdcch_blind_detection_present); + if (pdcch_blind_detection.is_present()) { + HANDLE_CODE(pdcch_blind_detection->unpack(bref)); + } } } return SRSASN_SUCCESS; } -void band_nr_s::to_json(json_writer& j) const +void phys_cell_group_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("bandNR", band_nr); - if (modified_mpr_behaviour_present) { - j.write_str("modifiedMPR-Behaviour", modified_mpr_behaviour.to_string()); - } - if (mimo_params_per_band_present) { - j.write_fieldname("mimo-ParametersPerBand"); - mimo_params_per_band.to_json(j); - } - if (extended_cp_present) { - j.write_str("extendedCP", "supported"); - } - if (multiple_tci_present) { - j.write_str("multipleTCI", "supported"); - } - if (bwp_without_restrict_present) { - j.write_str("bwp-WithoutRestriction", "supported"); - } - if (bwp_same_numerology_present) { - j.write_str("bwp-SameNumerology", bwp_same_numerology.to_string()); - } - if (bwp_diff_numerology_present) { - j.write_str("bwp-DiffNumerology", "upto4"); + if (harq_ack_spatial_bundling_pucch_present) { + j.write_str("harq-ACK-SpatialBundlingPUCCH", "true"); } - if (cross_carrier_sched_same_scs_present) { - j.write_str("crossCarrierScheduling-SameSCS", "supported"); + if (harq_ack_spatial_bundling_pusch_present) { + j.write_str("harq-ACK-SpatialBundlingPUSCH", "true"); } - if (pdsch_minus256_qam_fr2_present) { - j.write_str("pdsch-256QAM-FR2", "supported"); + if (p_nr_fr1_present) { + j.write_int("p-NR-FR1", p_nr_fr1); } - if (pusch_minus256_qam_present) { - j.write_str("pusch-256QAM", "supported"); + j.write_str("pdsch-HARQ-ACK-Codebook", pdsch_harq_ack_codebook.to_string()); + if (tpc_srs_rnti_present) { + j.write_int("tpc-SRS-RNTI", tpc_srs_rnti); } - if (ue_pwr_class_present) { - j.write_str("ue-PowerClass", ue_pwr_class.to_string()); + if (tpc_pucch_rnti_present) { + j.write_int("tpc-PUCCH-RNTI", tpc_pucch_rnti); } - if (rate_matching_lte_crs_present) { - j.write_str("rateMatchingLTE-CRS", "supported"); + if (tpc_pusch_rnti_present) { + j.write_int("tpc-PUSCH-RNTI", tpc_pusch_rnti); } - if (ch_bws_dl_v1530_present) { - j.write_fieldname("channelBWs-DL-v1530"); - ch_bws_dl_v1530.to_json(j); + if (sp_csi_rnti_present) { + j.write_int("sp-CSI-RNTI", sp_csi_rnti); } - if (ch_bws_ul_v1530_present) { - j.write_fieldname("channelBWs-UL-v1530"); - ch_bws_ul_v1530.to_json(j); + if (cs_rnti_present) { + j.write_fieldname("cs-RNTI"); + cs_rnti.to_json(j); } if (ext) { - if (max_ul_duty_cycle_pc2_fr1_present) { - j.write_str("maxUplinkDutyCycle-PC2-FR1", max_ul_duty_cycle_pc2_fr1.to_string()); + if (mcs_c_rnti_present) { + j.write_int("mcs-C-RNTI", mcs_c_rnti); } - if (pucch_spatial_rel_info_mac_ce_present) { - j.write_str("pucch-SpatialRelInfoMAC-CE", "supported"); + if (p_ue_fr1_present) { + j.write_int("p-UE-FR1", p_ue_fr1); } - if (pwr_boosting_pi2_bpsk_present) { - j.write_str("powerBoosting-pi2BPSK", "supported"); + if (xscale_present) { + j.write_str("xScale", xscale.to_string()); + } + if (pdcch_blind_detection.is_present()) { + j.write_fieldname("pdcch-BlindDetection"); + pdcch_blind_detection->to_json(j); } } j.end_obj(); } -std::string band_nr_s::bwp_same_numerology_opts::to_string() const -{ - 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 +std::string phys_cell_group_cfg_s::pdsch_harq_ack_codebook_opts::to_string() const { - static const uint8_t options[] = {2, 4}; - return map_enum_number(options, 2, value, "band_nr_s::bwp_same_numerology_e_"); + 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 band_nr_s::ue_pwr_class_opts::to_string() const +std::string phys_cell_group_cfg_s::xscale_opts::to_string() const { - static const char* options[] = {"pc1", "pc2", "pc3", "pc4"}; - return convert_enum_idx(options, 4, value, "band_nr_s::ue_pwr_class_e_"); + static const char* options[] = {"dB0", "dB6", "spare2", "spare1"}; + return convert_enum_idx(options, 4, value, "phys_cell_group_cfg_s::xscale_e_"); } -uint8_t band_nr_s::ue_pwr_class_opts::to_number() const +uint8_t phys_cell_group_cfg_s::xscale_opts::to_number() const { - static const uint8_t options[] = {1, 2, 3, 4}; - return map_enum_number(options, 4, value, "band_nr_s::ue_pwr_class_e_"); + static const uint8_t options[] = {0, 6}; + return map_enum_number(options, 2, value, "phys_cell_group_cfg_s::xscale_e_"); } -void band_nr_s::ch_bws_dl_v1530_c_::destroy_() +// RLC-BearerConfig ::= SEQUENCE +SRSASN_CODE rlc_bearer_cfg_s::pack(bit_ref& bref) const { - switch (type_) { - case types::fr1: - c.destroy(); - break; - case types::fr2: - c.destroy(); - break; - default: - break; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(served_radio_bearer_present, 1)); + HANDLE_CODE(bref.pack(reestablish_rlc_present, 1)); + HANDLE_CODE(bref.pack(rlc_cfg_present, 1)); + HANDLE_CODE(bref.pack(mac_lc_ch_cfg_present, 1)); + + HANDLE_CODE(pack_integer(bref, lc_ch_id, (uint8_t)1u, (uint8_t)32u)); + if (served_radio_bearer_present) { + HANDLE_CODE(served_radio_bearer.pack(bref)); } -} -void band_nr_s::ch_bws_dl_v1530_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::fr1: - c.init(); - break; - case types::fr2: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1530_c_"); + if (rlc_cfg_present) { + HANDLE_CODE(rlc_cfg.pack(bref)); } -} -band_nr_s::ch_bws_dl_v1530_c_::ch_bws_dl_v1530_c_(const band_nr_s::ch_bws_dl_v1530_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::fr1: - c.init(other.c.get()); - break; - case types::fr2: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1530_c_"); + if (mac_lc_ch_cfg_present) { + HANDLE_CODE(mac_lc_ch_cfg.pack(bref)); } + + return SRSASN_SUCCESS; } -band_nr_s::ch_bws_dl_v1530_c_& band_nr_s::ch_bws_dl_v1530_c_::operator=(const band_nr_s::ch_bws_dl_v1530_c_& other) +SRSASN_CODE rlc_bearer_cfg_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(served_radio_bearer_present, 1)); + HANDLE_CODE(bref.unpack(reestablish_rlc_present, 1)); + HANDLE_CODE(bref.unpack(rlc_cfg_present, 1)); + HANDLE_CODE(bref.unpack(mac_lc_ch_cfg_present, 1)); + + HANDLE_CODE(unpack_integer(lc_ch_id, bref, (uint8_t)1u, (uint8_t)32u)); + if (served_radio_bearer_present) { + HANDLE_CODE(served_radio_bearer.unpack(bref)); } - set(other.type()); - switch (type_) { - case types::fr1: - c.set(other.c.get()); - break; - case types::fr2: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1530_c_"); + if (rlc_cfg_present) { + HANDLE_CODE(rlc_cfg.unpack(bref)); + } + if (mac_lc_ch_cfg_present) { + HANDLE_CODE(mac_lc_ch_cfg.unpack(bref)); } - return *this; + return SRSASN_SUCCESS; } -void band_nr_s::ch_bws_dl_v1530_c_::to_json(json_writer& j) const +void rlc_bearer_cfg_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::fr1: - j.write_fieldname("fr1"); - j.start_obj(); - if (c.get().scs_minus15k_hz_present) { - j.write_str("scs-15kHz", c.get().scs_minus15k_hz.to_string()); - } - if (c.get().scs_minus30k_hz_present) { - j.write_str("scs-30kHz", c.get().scs_minus30k_hz.to_string()); - } - if (c.get().scs_minus60k_hz_present) { - j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); - } - j.end_obj(); - break; - case types::fr2: - j.write_fieldname("fr2"); - j.start_obj(); - if (c.get().scs_minus60k_hz_present) { - j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); - } - if (c.get().scs_minus120k_hz_present) { - j.write_str("scs-120kHz", c.get().scs_minus120k_hz.to_string()); - } - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1530_c_"); + j.write_int("logicalChannelIdentity", lc_ch_id); + if (served_radio_bearer_present) { + j.write_fieldname("servedRadioBearer"); + served_radio_bearer.to_json(j); } - j.end_obj(); -} -SRSASN_CODE band_nr_s::ch_bws_dl_v1530_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::fr1: - HANDLE_CODE(bref.pack(c.get().scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.pack(c.get().scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); - if (c.get().scs_minus15k_hz_present) { - HANDLE_CODE(c.get().scs_minus15k_hz.pack(bref)); - } - if (c.get().scs_minus30k_hz_present) { - HANDLE_CODE(c.get().scs_minus30k_hz.pack(bref)); - } - if (c.get().scs_minus60k_hz_present) { - HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); - } - break; - case types::fr2: - HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.pack(c.get().scs_minus120k_hz_present, 1)); - if (c.get().scs_minus60k_hz_present) { - HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); - } - if (c.get().scs_minus120k_hz_present) { - HANDLE_CODE(c.get().scs_minus120k_hz.pack(bref)); - } - break; - default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1530_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (reestablish_rlc_present) { + j.write_str("reestablishRLC", "true"); } - return SRSASN_SUCCESS; -} -SRSASN_CODE band_nr_s::ch_bws_dl_v1530_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::fr1: - HANDLE_CODE(bref.unpack(c.get().scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.unpack(c.get().scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); - if (c.get().scs_minus15k_hz_present) { - HANDLE_CODE(c.get().scs_minus15k_hz.unpack(bref)); - } - if (c.get().scs_minus30k_hz_present) { - HANDLE_CODE(c.get().scs_minus30k_hz.unpack(bref)); - } - if (c.get().scs_minus60k_hz_present) { - HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); - } - break; - case types::fr2: - HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.unpack(c.get().scs_minus120k_hz_present, 1)); - if (c.get().scs_minus60k_hz_present) { - HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); - } - if (c.get().scs_minus120k_hz_present) { - HANDLE_CODE(c.get().scs_minus120k_hz.unpack(bref)); - } - break; - default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_dl_v1530_c_"); - return SRSASN_ERROR_DECODE_FAIL; + if (rlc_cfg_present) { + j.write_fieldname("rlc-Config"); + rlc_cfg.to_json(j); } - return SRSASN_SUCCESS; -} - -std::string band_nr_s::ch_bws_dl_v1530_c_::types_opts::to_string() const -{ - 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 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_() -{ - switch (type_) { - case types::fr1: - c.destroy(); - break; - case types::fr2: - c.destroy(); - break; - default: - break; + if (mac_lc_ch_cfg_present) { + j.write_fieldname("mac-LogicalChannelConfig"); + mac_lc_ch_cfg.to_json(j); } + j.end_obj(); } -void band_nr_s::ch_bws_ul_v1530_c_::set(types::options e) + +void rlc_bearer_cfg_s::served_radio_bearer_c_::destroy_() {} +void rlc_bearer_cfg_s::served_radio_bearer_c_::set(types::options e) { destroy_(); type_ = e; - switch (type_) { - case types::fr1: - c.init(); - break; - case types::fr2: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1530_c_"); - } } -band_nr_s::ch_bws_ul_v1530_c_::ch_bws_ul_v1530_c_(const band_nr_s::ch_bws_ul_v1530_c_& other) +rlc_bearer_cfg_s::served_radio_bearer_c_::served_radio_bearer_c_(const rlc_bearer_cfg_s::served_radio_bearer_c_& other) { type_ = other.type(); switch (type_) { - case types::fr1: - c.init(other.c.get()); + case types::srb_id: + c.init(other.c.get()); break; - case types::fr2: - c.init(other.c.get()); + case types::drb_id: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1530_c_"); + log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); } } -band_nr_s::ch_bws_ul_v1530_c_& band_nr_s::ch_bws_ul_v1530_c_::operator=(const band_nr_s::ch_bws_ul_v1530_c_& other) +rlc_bearer_cfg_s::served_radio_bearer_c_& +rlc_bearer_cfg_s::served_radio_bearer_c_::operator=(const rlc_bearer_cfg_s::served_radio_bearer_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::fr1: - c.set(other.c.get()); + case types::srb_id: + c.set(other.c.get()); break; - case types::fr2: - c.set(other.c.get()); + case types::drb_id: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1530_c_"); + log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); } return *this; } -void band_nr_s::ch_bws_ul_v1530_c_::to_json(json_writer& j) const +void rlc_bearer_cfg_s::served_radio_bearer_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::fr1: - j.write_fieldname("fr1"); - j.start_obj(); - if (c.get().scs_minus15k_hz_present) { - j.write_str("scs-15kHz", c.get().scs_minus15k_hz.to_string()); - } - if (c.get().scs_minus30k_hz_present) { - j.write_str("scs-30kHz", c.get().scs_minus30k_hz.to_string()); - } - if (c.get().scs_minus60k_hz_present) { - j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); - } - j.end_obj(); + case types::srb_id: + j.write_int("srb-Identity", c.get()); break; - case types::fr2: - j.write_fieldname("fr2"); - j.start_obj(); - if (c.get().scs_minus60k_hz_present) { - j.write_str("scs-60kHz", c.get().scs_minus60k_hz.to_string()); - } - if (c.get().scs_minus120k_hz_present) { - j.write_str("scs-120kHz", c.get().scs_minus120k_hz.to_string()); - } - j.end_obj(); + case types::drb_id: + j.write_int("drb-Identity", c.get()); break; default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1530_c_"); + log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); } j.end_obj(); } -SRSASN_CODE band_nr_s::ch_bws_ul_v1530_c_::pack(bit_ref& bref) const +SRSASN_CODE rlc_bearer_cfg_s::served_radio_bearer_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::fr1: - HANDLE_CODE(bref.pack(c.get().scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.pack(c.get().scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); - if (c.get().scs_minus15k_hz_present) { - HANDLE_CODE(c.get().scs_minus15k_hz.pack(bref)); - } - if (c.get().scs_minus30k_hz_present) { - HANDLE_CODE(c.get().scs_minus30k_hz.pack(bref)); - } - if (c.get().scs_minus60k_hz_present) { - HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); - } + case types::srb_id: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)3u)); break; - case types::fr2: - HANDLE_CODE(bref.pack(c.get().scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.pack(c.get().scs_minus120k_hz_present, 1)); - if (c.get().scs_minus60k_hz_present) { - HANDLE_CODE(c.get().scs_minus60k_hz.pack(bref)); - } - if (c.get().scs_minus120k_hz_present) { - HANDLE_CODE(c.get().scs_minus120k_hz.pack(bref)); - } + case types::drb_id: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)32u)); break; default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1530_c_"); + log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE band_nr_s::ch_bws_ul_v1530_c_::unpack(cbit_ref& bref) +SRSASN_CODE rlc_bearer_cfg_s::served_radio_bearer_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::fr1: - HANDLE_CODE(bref.unpack(c.get().scs_minus15k_hz_present, 1)); - HANDLE_CODE(bref.unpack(c.get().scs_minus30k_hz_present, 1)); - HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); - if (c.get().scs_minus15k_hz_present) { - HANDLE_CODE(c.get().scs_minus15k_hz.unpack(bref)); - } - if (c.get().scs_minus30k_hz_present) { - HANDLE_CODE(c.get().scs_minus30k_hz.unpack(bref)); - } - if (c.get().scs_minus60k_hz_present) { - HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); - } + case types::srb_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)3u)); break; - case types::fr2: - HANDLE_CODE(bref.unpack(c.get().scs_minus60k_hz_present, 1)); - HANDLE_CODE(bref.unpack(c.get().scs_minus120k_hz_present, 1)); - if (c.get().scs_minus60k_hz_present) { - HANDLE_CODE(c.get().scs_minus60k_hz.unpack(bref)); - } - if (c.get().scs_minus120k_hz_present) { - HANDLE_CODE(c.get().scs_minus120k_hz.unpack(bref)); - } + case types::drb_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)32u)); break; default: - log_invalid_choice_id(type_, "band_nr_s::ch_bws_ul_v1530_c_"); + log_invalid_choice_id(type_, "rlc_bearer_cfg_s::served_radio_bearer_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string band_nr_s::ch_bws_ul_v1530_c_::types_opts::to_string() const +std::string rlc_bearer_cfg_s::served_radio_bearer_c_::types_opts::to_string() const { - static const char* options[] = {"fr1", "fr2"}; - return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_ul_v1530_c_::types"); + static const char* options[] = {"srb-Identity", "drb-Identity"}; + return convert_enum_idx(options, 2, value, "rlc_bearer_cfg_s::served_radio_bearer_c_::types"); +} + +// SCellConfig ::= SEQUENCE +SRSASN_CODE scell_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(scell_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(scell_cfg_ded_present, 1)); + + HANDLE_CODE(pack_integer(bref, scell_idx, (uint8_t)1u, (uint8_t)31u)); + if (scell_cfg_common_present) { + HANDLE_CODE(scell_cfg_common.pack(bref)); + } + if (scell_cfg_ded_present) { + HANDLE_CODE(scell_cfg_ded.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= smtc.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(smtc.is_present(), 1)); + if (smtc.is_present()) { + HANDLE_CODE(smtc->pack(bref)); + } + } + } + return SRSASN_SUCCESS; } -uint8_t band_nr_s::ch_bws_ul_v1530_c_::types_opts::to_number() const +SRSASN_CODE scell_cfg_s::unpack(cbit_ref& bref) { - static const uint8_t options[] = {1, 2}; - return map_enum_number(options, 2, value, "band_nr_s::ch_bws_ul_v1530_c_::types"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(scell_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(scell_cfg_ded_present, 1)); + + HANDLE_CODE(unpack_integer(scell_idx, bref, (uint8_t)1u, (uint8_t)31u)); + if (scell_cfg_common_present) { + HANDLE_CODE(scell_cfg_common.unpack(bref)); + } + if (scell_cfg_ded_present) { + HANDLE_CODE(scell_cfg_ded.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool smtc_present; + HANDLE_CODE(bref.unpack(smtc_present, 1)); + smtc.set_present(smtc_present); + if (smtc.is_present()) { + HANDLE_CODE(smtc->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void scell_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sCellIndex", scell_idx); + if (scell_cfg_common_present) { + j.write_fieldname("sCellConfigCommon"); + scell_cfg_common.to_json(j); + } + if (scell_cfg_ded_present) { + j.write_fieldname("sCellConfigDedicated"); + scell_cfg_ded.to_json(j); + } + if (ext) { + if (smtc.is_present()) { + j.write_fieldname("smtc"); + smtc->to_json(j); + } + } + j.end_obj(); } -std::string band_nr_s::max_ul_duty_cycle_pc2_fr1_opts::to_string() const +// SpCellConfig ::= SEQUENCE +SRSASN_CODE sp_cell_cfg_s::pack(bit_ref& bref) const { - 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_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(serv_cell_idx_present, 1)); + HANDLE_CODE(bref.pack(recfg_with_sync_present, 1)); + HANDLE_CODE(bref.pack(rlf_timers_and_consts_present, 1)); + HANDLE_CODE(bref.pack(rlm_in_sync_out_of_sync_thres_present, 1)); + HANDLE_CODE(bref.pack(sp_cell_cfg_ded_present, 1)); + + if (serv_cell_idx_present) { + HANDLE_CODE(pack_integer(bref, serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); + } + if (recfg_with_sync_present) { + HANDLE_CODE(recfg_with_sync.pack(bref)); + } + if (rlf_timers_and_consts_present) { + HANDLE_CODE(rlf_timers_and_consts.pack(bref)); + } + if (sp_cell_cfg_ded_present) { + HANDLE_CODE(sp_cell_cfg_ded.pack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t band_nr_s::max_ul_duty_cycle_pc2_fr1_opts::to_number() const +SRSASN_CODE sp_cell_cfg_s::unpack(cbit_ref& bref) { - 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_"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(serv_cell_idx_present, 1)); + HANDLE_CODE(bref.unpack(recfg_with_sync_present, 1)); + HANDLE_CODE(bref.unpack(rlf_timers_and_consts_present, 1)); + HANDLE_CODE(bref.unpack(rlm_in_sync_out_of_sync_thres_present, 1)); + HANDLE_CODE(bref.unpack(sp_cell_cfg_ded_present, 1)); + + if (serv_cell_idx_present) { + HANDLE_CODE(unpack_integer(serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (recfg_with_sync_present) { + HANDLE_CODE(recfg_with_sync.unpack(bref)); + } + if (rlf_timers_and_consts_present) { + HANDLE_CODE(rlf_timers_and_consts.unpack(bref)); + } + if (sp_cell_cfg_ded_present) { + HANDLE_CODE(sp_cell_cfg_ded.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sp_cell_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (serv_cell_idx_present) { + j.write_int("servCellIndex", serv_cell_idx); + } + if (recfg_with_sync_present) { + j.write_fieldname("reconfigurationWithSync"); + recfg_with_sync.to_json(j); + } + if (rlf_timers_and_consts_present) { + j.write_fieldname("rlf-TimersAndConstants"); + rlf_timers_and_consts.to_json(j); + } + if (rlm_in_sync_out_of_sync_thres_present) { + j.write_str("rlmInSyncOutOfSyncThreshold", "n1"); + } + if (sp_cell_cfg_ded_present) { + j.write_fieldname("spCellConfigDedicated"); + sp_cell_cfg_ded.to_json(j); + } + j.end_obj(); +} + +// CellGroupConfig ::= SEQUENCE +SRSASN_CODE cell_group_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rlc_bearer_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(rlc_bearer_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(mac_cell_group_cfg_present, 1)); + HANDLE_CODE(bref.pack(phys_cell_group_cfg_present, 1)); + HANDLE_CODE(bref.pack(sp_cell_cfg_present, 1)); + HANDLE_CODE(bref.pack(scell_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(scell_to_release_list_present, 1)); + + HANDLE_CODE(pack_integer(bref, cell_group_id, (uint8_t)0u, (uint8_t)3u)); + if (rlc_bearer_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rlc_bearer_to_add_mod_list, 1, 32)); + } + if (rlc_bearer_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rlc_bearer_to_release_list, 1, 32, integer_packer(1, 32))); + } + if (mac_cell_group_cfg_present) { + HANDLE_CODE(mac_cell_group_cfg.pack(bref)); + } + if (phys_cell_group_cfg_present) { + HANDLE_CODE(phys_cell_group_cfg.pack(bref)); + } + if (sp_cell_cfg_present) { + HANDLE_CODE(sp_cell_cfg.pack(bref)); + } + if (scell_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, scell_to_add_mod_list, 1, 31)); + } + if (scell_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, scell_to_release_list, 1, 31, integer_packer(1, 31))); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= report_ul_tx_direct_current_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(report_ul_tx_direct_current_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_group_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rlc_bearer_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(rlc_bearer_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(mac_cell_group_cfg_present, 1)); + HANDLE_CODE(bref.unpack(phys_cell_group_cfg_present, 1)); + HANDLE_CODE(bref.unpack(sp_cell_cfg_present, 1)); + HANDLE_CODE(bref.unpack(scell_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(scell_to_release_list_present, 1)); + + HANDLE_CODE(unpack_integer(cell_group_id, bref, (uint8_t)0u, (uint8_t)3u)); + if (rlc_bearer_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(rlc_bearer_to_add_mod_list, bref, 1, 32)); + } + if (rlc_bearer_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(rlc_bearer_to_release_list, bref, 1, 32, integer_packer(1, 32))); + } + if (mac_cell_group_cfg_present) { + HANDLE_CODE(mac_cell_group_cfg.unpack(bref)); + } + if (phys_cell_group_cfg_present) { + HANDLE_CODE(phys_cell_group_cfg.unpack(bref)); + } + if (sp_cell_cfg_present) { + HANDLE_CODE(sp_cell_cfg.unpack(bref)); + } + if (scell_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(scell_to_add_mod_list, bref, 1, 31)); + } + if (scell_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(scell_to_release_list, bref, 1, 31, integer_packer(1, 31))); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(report_ul_tx_direct_current_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void cell_group_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellGroupId", cell_group_id); + if (rlc_bearer_to_add_mod_list_present) { + j.start_array("rlc-BearerToAddModList"); + 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 (const auto& e1 : rlc_bearer_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (mac_cell_group_cfg_present) { + j.write_fieldname("mac-CellGroupConfig"); + mac_cell_group_cfg.to_json(j); + } + if (phys_cell_group_cfg_present) { + j.write_fieldname("physicalCellGroupConfig"); + phys_cell_group_cfg.to_json(j); + } + if (sp_cell_cfg_present) { + j.write_fieldname("spCellConfig"); + sp_cell_cfg.to_json(j); + } + if (scell_to_add_mod_list_present) { + j.start_array("sCellToAddModList"); + 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 (const auto& e1 : scell_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (ext) { + if (report_ul_tx_direct_current_present) { + j.write_str("reportUplinkTxDirectCurrent", "true"); + } + } + j.end_obj(); } // EUTRA-ParametersCommon ::= SEQUENCE @@ -45351,6 +48051,17 @@ SRSASN_CODE eutra_params_common_s::pack(bit_ref& bref) const HANDLE_CODE(modified_mpr_behavior_eutra.pack(bref)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ne_dc_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ne_dc_present, 1)); + } + } return SRSASN_SUCCESS; } SRSASN_CODE eutra_params_common_s::unpack(cbit_ref& bref) @@ -45365,6 +48076,16 @@ SRSASN_CODE eutra_params_common_s::unpack(cbit_ref& bref) HANDLE_CODE(modified_mpr_behavior_eutra.unpack(bref)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ne_dc_present, 1)); + } + } return SRSASN_SUCCESS; } void eutra_params_common_s::to_json(json_writer& j) const @@ -45382,6 +48103,11 @@ void eutra_params_common_s::to_json(json_writer& j) const if (rs_sinr_meas_eutra_present) { j.write_str("rs-SINR-MeasEUTRA", "supported"); } + if (ext) { + if (ne_dc_present) { + j.write_str("ne-DC", "supported"); + } + } j.end_obj(); } @@ -46613,6 +49339,37 @@ feature_set_dl_v1540_s::pdsch_processing_type2_limited_s_::different_tb_per_slot "feature_set_dl_v1540_s::pdsch_processing_type2_limited_s_::different_tb_per_slot_scs_minus30k_hz_e_"); } +// FeatureSetDownlink-v15a0 ::= SEQUENCE +SRSASN_CODE feature_set_dl_v15a0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_srs_res_present, 1)); + + if (supported_srs_res_present) { + HANDLE_CODE(supported_srs_res.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_set_dl_v15a0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_srs_res_present, 1)); + + if (supported_srs_res_present) { + HANDLE_CODE(supported_srs_res.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void feature_set_dl_v15a0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_srs_res_present) { + j.write_fieldname("supportedSRS-Resources"); + supported_srs_res.to_json(j); + } + j.end_obj(); +} + // ModulationOrder ::= ENUMERATED std::string mod_order_opts::to_string() const { @@ -47333,6 +50090,7 @@ SRSASN_CODE feature_sets_s::pack(bit_ref& bref) const group_flags[0] |= feature_sets_dl_v1540.is_present(); group_flags[0] |= feature_sets_ul_v1540.is_present(); group_flags[0] |= feature_sets_ul_per_cc_v1540.is_present(); + group_flags[1] |= feature_sets_dl_v15a0.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -47351,6 +50109,14 @@ SRSASN_CODE feature_sets_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, *feature_sets_ul_per_cc_v1540, 1, 1024)); } } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(feature_sets_dl_v15a0.is_present(), 1)); + if (feature_sets_dl_v15a0.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *feature_sets_dl_v15a0, 1, 1024)); + } + } } return SRSASN_SUCCESS; } @@ -47376,7 +50142,7 @@ SRSASN_CODE feature_sets_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(1); + ext_groups_unpacker_guard group_flags(2); group_flags.unpack(bref); if (group_flags[0]) { @@ -47401,6 +50167,16 @@ SRSASN_CODE feature_sets_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(*feature_sets_ul_per_cc_v1540, bref, 1, 1024)); } } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool feature_sets_dl_v15a0_present; + HANDLE_CODE(bref.unpack(feature_sets_dl_v15a0_present, 1)); + feature_sets_dl_v15a0.set_present(feature_sets_dl_v15a0_present); + if (feature_sets_dl_v15a0.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*feature_sets_dl_v15a0, bref, 1, 1024)); + } + } } return SRSASN_SUCCESS; } @@ -47457,6 +50233,13 @@ void feature_sets_s::to_json(json_writer& j) const } j.end_array(); } + if (feature_sets_dl_v15a0.is_present()) { + j.start_array("featureSetsDownlink-v15a0"); + for (const auto& e1 : *feature_sets_dl_v15a0) { + e1.to_json(j); + } + j.end_array(); + } } j.end_obj(); } @@ -47730,6 +50513,17 @@ SRSASN_CODE ims_params_common_s::pack(bit_ref& bref) const bref.pack(ext, 1); HANDLE_CODE(bref.pack(voice_over_eutra_minus5_gc_present, 1)); + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= voice_over_scg_bearer_eutra_minus5_gc_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(voice_over_scg_bearer_eutra_minus5_gc_present, 1)); + } + } return SRSASN_SUCCESS; } SRSASN_CODE ims_params_common_s::unpack(cbit_ref& bref) @@ -47737,6 +50531,16 @@ SRSASN_CODE ims_params_common_s::unpack(cbit_ref& bref) bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(voice_over_eutra_minus5_gc_present, 1)); + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(voice_over_scg_bearer_eutra_minus5_gc_present, 1)); + } + } return SRSASN_SUCCESS; } void ims_params_common_s::to_json(json_writer& j) const @@ -47745,6 +50549,11 @@ void ims_params_common_s::to_json(json_writer& j) const if (voice_over_eutra_minus5_gc_present) { j.write_str("voiceOverEUTRA-5GC", "supported"); } + if (ext) { + if (voice_over_scg_bearer_eutra_minus5_gc_present) { + j.write_str("voiceOverSCG-BearerEUTRA-5GC", "supported"); + } + } j.end_obj(); } @@ -48031,6 +50840,10 @@ SRSASN_CODE meas_and_mob_params_common_s::pack(bit_ref& bref) const group_flags[1] |= ho_fr1_fr2_present; group_flags[1] |= max_num_csi_rs_rrm_rs_sinr_present; group_flags[2] |= nr_cgi_report_endc_present; + group_flags[3] |= eutra_cgi_report_nedc_present; + group_flags[3] |= eutra_cgi_report_nrdc_present; + group_flags[3] |= nr_cgi_report_nedc_present; + group_flags[3] |= nr_cgi_report_nrdc_present; group_flags.pack(bref); if (group_flags[0]) { @@ -48057,6 +50870,14 @@ SRSASN_CODE meas_and_mob_params_common_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(nr_cgi_report_endc_present, 1)); } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(eutra_cgi_report_nedc_present, 1)); + HANDLE_CODE(bref.pack(eutra_cgi_report_nrdc_present, 1)); + HANDLE_CODE(bref.pack(nr_cgi_report_nedc_present, 1)); + HANDLE_CODE(bref.pack(nr_cgi_report_nrdc_present, 1)); + } } return SRSASN_SUCCESS; } @@ -48072,7 +50893,7 @@ SRSASN_CODE meas_and_mob_params_common_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(3); + ext_groups_unpacker_guard group_flags(4); group_flags.unpack(bref); if (group_flags[0]) { @@ -48099,6 +50920,14 @@ SRSASN_CODE meas_and_mob_params_common_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(nr_cgi_report_endc_present, 1)); } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(eutra_cgi_report_nedc_present, 1)); + HANDLE_CODE(bref.unpack(eutra_cgi_report_nrdc_present, 1)); + HANDLE_CODE(bref.unpack(nr_cgi_report_nedc_present, 1)); + HANDLE_CODE(bref.unpack(nr_cgi_report_nrdc_present, 1)); + } } return SRSASN_SUCCESS; } @@ -48142,6 +50971,18 @@ void meas_and_mob_params_common_s::to_json(json_writer& j) const if (nr_cgi_report_endc_present) { j.write_str("nr-CGI-Reporting-ENDC", "supported"); } + if (eutra_cgi_report_nedc_present) { + j.write_str("eutra-CGI-Reporting-NEDC", "supported"); + } + if (eutra_cgi_report_nrdc_present) { + j.write_str("eutra-CGI-Reporting-NRDC", "supported"); + } + if (nr_cgi_report_nedc_present) { + j.write_str("nr-CGI-Reporting-NEDC", "supported"); + } + if (nr_cgi_report_nrdc_present) { + j.write_str("nr-CGI-Reporting-NRDC", "supported"); + } } j.end_obj(); } @@ -48170,8 +51011,8 @@ SRSASN_CODE meas_and_mob_params_frx_diff_s::pack(bit_ref& bref) const if (ext) { ext_groups_packer_guard group_flags; group_flags[0] |= ho_inter_f_present; - group_flags[0] |= ho_lte_present; - group_flags[0] |= ho_e_lte_present; + group_flags[0] |= ho_lte_epc_present; + group_flags[0] |= ho_lte_minus5_gc_present; group_flags[1] |= max_num_res_csi_rs_rlm_present; group_flags[2] |= simul_rx_data_ssb_diff_numerology_present; group_flags.pack(bref); @@ -48180,8 +51021,8 @@ SRSASN_CODE meas_and_mob_params_frx_diff_s::pack(bit_ref& bref) const varlength_field_pack_guard varlen_scope(bref, false); HANDLE_CODE(bref.pack(ho_inter_f_present, 1)); - HANDLE_CODE(bref.pack(ho_lte_present, 1)); - HANDLE_CODE(bref.pack(ho_e_lte_present, 1)); + HANDLE_CODE(bref.pack(ho_lte_epc_present, 1)); + HANDLE_CODE(bref.pack(ho_lte_minus5_gc_present, 1)); } if (group_flags[1]) { varlength_field_pack_guard varlen_scope(bref, false); @@ -48216,8 +51057,8 @@ SRSASN_CODE meas_and_mob_params_frx_diff_s::unpack(cbit_ref& bref) varlength_field_unpack_guard varlen_scope(bref, false); HANDLE_CODE(bref.unpack(ho_inter_f_present, 1)); - HANDLE_CODE(bref.unpack(ho_lte_present, 1)); - HANDLE_CODE(bref.unpack(ho_e_lte_present, 1)); + HANDLE_CODE(bref.unpack(ho_lte_epc_present, 1)); + HANDLE_CODE(bref.unpack(ho_lte_minus5_gc_present, 1)); } if (group_flags[1]) { varlength_field_unpack_guard varlen_scope(bref, false); @@ -48257,11 +51098,11 @@ void meas_and_mob_params_frx_diff_s::to_json(json_writer& j) const if (ho_inter_f_present) { j.write_str("handoverInterF", "supported"); } - if (ho_lte_present) { - j.write_str("handoverLTE", "supported"); + if (ho_lte_epc_present) { + j.write_str("handoverLTE-EPC", "supported"); } - if (ho_e_lte_present) { - j.write_str("handover-eLTE", "supported"); + if (ho_lte_minus5_gc_present) { + j.write_str("handoverLTE-5GC", "supported"); } if (max_num_res_csi_rs_rlm_present) { j.write_str("maxNumberResource-CSI-RS-RLM", max_num_res_csi_rs_rlm.to_string()); @@ -48294,16 +51135,24 @@ SRSASN_CODE meas_and_mob_params_xdd_diff_s::pack(bit_ref& bref) const if (ext) { ext_groups_packer_guard group_flags; group_flags[0] |= ho_inter_f_present; - group_flags[0] |= ho_lte_present; - group_flags[0] |= ho_e_lte_present; + group_flags[0] |= ho_lte_epc_present; + group_flags[0] |= ho_lte_minus5_gc_present; + group_flags[1] |= sftd_meas_nr_neigh_present; + group_flags[1] |= sftd_meas_nr_neigh_drx_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); HANDLE_CODE(bref.pack(ho_inter_f_present, 1)); - HANDLE_CODE(bref.pack(ho_lte_present, 1)); - HANDLE_CODE(bref.pack(ho_e_lte_present, 1)); + HANDLE_CODE(bref.pack(ho_lte_epc_present, 1)); + HANDLE_CODE(bref.pack(ho_lte_minus5_gc_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sftd_meas_nr_neigh_present, 1)); + HANDLE_CODE(bref.pack(sftd_meas_nr_neigh_drx_present, 1)); } } return SRSASN_SUCCESS; @@ -48315,15 +51164,21 @@ SRSASN_CODE meas_and_mob_params_xdd_diff_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(event_a_meas_and_report_present, 1)); if (ext) { - ext_groups_unpacker_guard group_flags(1); + ext_groups_unpacker_guard group_flags(2); group_flags.unpack(bref); if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); HANDLE_CODE(bref.unpack(ho_inter_f_present, 1)); - HANDLE_CODE(bref.unpack(ho_lte_present, 1)); - HANDLE_CODE(bref.unpack(ho_e_lte_present, 1)); + HANDLE_CODE(bref.unpack(ho_lte_epc_present, 1)); + HANDLE_CODE(bref.unpack(ho_lte_minus5_gc_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(sftd_meas_nr_neigh_present, 1)); + HANDLE_CODE(bref.unpack(sftd_meas_nr_neigh_drx_present, 1)); } } return SRSASN_SUCCESS; @@ -48341,11 +51196,17 @@ void meas_and_mob_params_xdd_diff_s::to_json(json_writer& j) const if (ho_inter_f_present) { j.write_str("handoverInterF", "supported"); } - if (ho_lte_present) { - j.write_str("handoverLTE", "supported"); + if (ho_lte_epc_present) { + j.write_str("handoverLTE-EPC", "supported"); } - if (ho_e_lte_present) { - j.write_str("handover-eLTE", "supported"); + if (ho_lte_minus5_gc_present) { + j.write_str("handoverLTE-5GC", "supported"); + } + if (sftd_meas_nr_neigh_present) { + j.write_str("sftd-MeasNR-Neigh", "supported"); + } + if (sftd_meas_nr_neigh_drx_present) { + j.write_str("sftd-MeasNR-Neigh-DRX", "supported"); } } j.end_obj(); @@ -48532,138 +51393,356 @@ void meas_and_mob_params_mrdc_s::to_json(json_writer& j) const j.end_obj(); } -// MeasResult2NR ::= SEQUENCE -SRSASN_CODE meas_result2_nr_s::pack(bit_ref& bref) const +// MeasAndMobParametersMRDC-XDD-Diff-v1560 ::= SEQUENCE +SRSASN_CODE meas_and_mob_params_mrdc_xdd_diff_v1560_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ssb_freq_present, 1)); - HANDLE_CODE(bref.pack(ref_freq_csi_rs_present, 1)); - HANDLE_CODE(bref.pack(meas_result_serving_cell_present, 1)); - HANDLE_CODE(bref.pack(meas_result_neigh_cell_list_nr_present, 1)); + HANDLE_CODE(bref.pack(sftd_meas_ps_cell_nedc_present, 1)); - if (ssb_freq_present) { - HANDLE_CODE(pack_integer(bref, ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_and_mob_params_mrdc_xdd_diff_v1560_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sftd_meas_ps_cell_nedc_present, 1)); + + return SRSASN_SUCCESS; +} +void meas_and_mob_params_mrdc_xdd_diff_v1560_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sftd_meas_ps_cell_nedc_present) { + j.write_str("sftd-MeasPSCell-NEDC", "supported"); } - if (ref_freq_csi_rs_present) { - HANDLE_CODE(pack_integer(bref, ref_freq_csi_rs, (uint32_t)0u, (uint32_t)3279165u)); + j.end_obj(); +} + +// MeasAndMobParametersMRDC-v1560 ::= SEQUENCE +SRSASN_CODE meas_and_mob_params_mrdc_v1560_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_xdd_diff_v1560_present, 1)); + + if (meas_and_mob_params_mrdc_xdd_diff_v1560_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_xdd_diff_v1560.pack(bref)); } - if (meas_result_serving_cell_present) { - HANDLE_CODE(meas_result_serving_cell.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_and_mob_params_mrdc_v1560_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_xdd_diff_v1560_present, 1)); + + if (meas_and_mob_params_mrdc_xdd_diff_v1560_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_xdd_diff_v1560.unpack(bref)); } - if (meas_result_neigh_cell_list_nr_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cell_list_nr, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_and_mob_params_mrdc_v1560_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_and_mob_params_mrdc_xdd_diff_v1560_present) { + j.write_fieldname("measAndMobParametersMRDC-XDD-Diff-v1560"); + meas_and_mob_params_mrdc_xdd_diff_v1560.to_json(j); + } + j.end_obj(); +} + +// MeasResultSCG-Failure ::= SEQUENCE +SRSASN_CODE meas_result_scg_fail_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_per_mo_list, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_scg_fail_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_per_mo_list, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result_scg_fail_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("measResultPerMOList"); + for (const auto& e1 : meas_result_per_mo_list) { + e1.to_json(j); } + j.end_array(); + j.end_obj(); +} + +// GeneralParametersMRDC-XDD-Diff ::= SEQUENCE +SRSASN_CODE general_params_mrdc_xdd_diff_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(split_srb_with_one_ul_path_present, 1)); + HANDLE_CODE(bref.pack(split_drb_with_ul_both_mcg_scg_present, 1)); + HANDLE_CODE(bref.pack(srb3_present, 1)); + HANDLE_CODE(bref.pack(v2x_eutra_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_result2_nr_s::unpack(cbit_ref& bref) +SRSASN_CODE general_params_mrdc_xdd_diff_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ssb_freq_present, 1)); - HANDLE_CODE(bref.unpack(ref_freq_csi_rs_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_serving_cell_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_nr_present, 1)); + HANDLE_CODE(bref.unpack(split_srb_with_one_ul_path_present, 1)); + HANDLE_CODE(bref.unpack(split_drb_with_ul_both_mcg_scg_present, 1)); + HANDLE_CODE(bref.unpack(srb3_present, 1)); + HANDLE_CODE(bref.unpack(v2x_eutra_present, 1)); - if (ssb_freq_present) { - HANDLE_CODE(unpack_integer(ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + return SRSASN_SUCCESS; +} +void general_params_mrdc_xdd_diff_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (split_srb_with_one_ul_path_present) { + j.write_str("splitSRB-WithOneUL-Path", "supported"); } - if (ref_freq_csi_rs_present) { - HANDLE_CODE(unpack_integer(ref_freq_csi_rs, bref, (uint32_t)0u, (uint32_t)3279165u)); + if (split_drb_with_ul_both_mcg_scg_present) { + j.write_str("splitDRB-withUL-Both-MCG-SCG", "supported"); } - if (meas_result_serving_cell_present) { - HANDLE_CODE(meas_result_serving_cell.unpack(bref)); + if (srb3_present) { + j.write_str("srb3", "supported"); } - if (meas_result_neigh_cell_list_nr_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cell_list_nr, bref, 1, 8)); + if (v2x_eutra_present) { + j.write_str("v2x-EUTRA", "supported"); } + j.end_obj(); +} + +// UE-MRDC-CapabilityAddFRX-Mode ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_add_frx_mode_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(meas_and_mob_params_mrdc_frx_diff.pack(bref)); return SRSASN_SUCCESS; } -void meas_result2_nr_s::to_json(json_writer& j) const +SRSASN_CODE ue_mrdc_cap_add_frx_mode_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(meas_and_mob_params_mrdc_frx_diff.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_mrdc_cap_add_frx_mode_s::to_json(json_writer& j) const { j.start_obj(); - if (ssb_freq_present) { - j.write_int("ssbFrequency", ssb_freq); + j.write_fieldname("measAndMobParametersMRDC-FRX-Diff"); + meas_and_mob_params_mrdc_frx_diff.to_json(j); + j.end_obj(); +} + +// UE-MRDC-CapabilityAddXDD-Mode ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_add_xdd_mode_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_xdd_diff_present, 1)); + HANDLE_CODE(bref.pack(general_params_mrdc_xdd_diff_present, 1)); + + if (meas_and_mob_params_mrdc_xdd_diff_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_xdd_diff.pack(bref)); } - if (ref_freq_csi_rs_present) { - j.write_int("refFreqCSI-RS", ref_freq_csi_rs); + if (general_params_mrdc_xdd_diff_present) { + HANDLE_CODE(general_params_mrdc_xdd_diff.pack(bref)); } - if (meas_result_serving_cell_present) { - j.write_fieldname("measResultServingCell"); - meas_result_serving_cell.to_json(j); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_mrdc_cap_add_xdd_mode_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_xdd_diff_present, 1)); + HANDLE_CODE(bref.unpack(general_params_mrdc_xdd_diff_present, 1)); + + if (meas_and_mob_params_mrdc_xdd_diff_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_xdd_diff.unpack(bref)); } - if (meas_result_neigh_cell_list_nr_present) { - j.start_array("measResultNeighCellListNR"); - for (const auto& e1 : meas_result_neigh_cell_list_nr) { - e1.to_json(j); - } - j.end_array(); + if (general_params_mrdc_xdd_diff_present) { + HANDLE_CODE(general_params_mrdc_xdd_diff.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_mrdc_cap_add_xdd_mode_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_and_mob_params_mrdc_xdd_diff_present) { + j.write_fieldname("measAndMobParametersMRDC-XDD-Diff"); + meas_and_mob_params_mrdc_xdd_diff.to_json(j); + } + if (general_params_mrdc_xdd_diff_present) { + j.write_fieldname("generalParametersMRDC-XDD-Diff"); + general_params_mrdc_xdd_diff.to_json(j); } j.end_obj(); } -// MeasResultCellSFTD ::= SEQUENCE -SRSASN_CODE meas_result_cell_sftd_s::pack(bit_ref& bref) const +// NRDC-Parameters ::= SEQUENCE +SRSASN_CODE nrdc_params_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(rsrp_result_present, 1)); + HANDLE_CODE(bref.pack(meas_and_mob_params_nrdc_present, 1)); + HANDLE_CODE(bref.pack(general_params_nrdc_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_nrdc_cap_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_nrdc_cap_present, 1)); + HANDLE_CODE(bref.pack(fr1_add_ue_nrdc_cap_present, 1)); + HANDLE_CODE(bref.pack(fr2_add_ue_nrdc_cap_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(dummy_present, 1)); - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(pack_integer(bref, sfn_offset_result, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(pack_integer(bref, frame_boundary_offset_result, (int16_t)-30720, (int16_t)30719)); - if (rsrp_result_present) { - HANDLE_CODE(pack_integer(bref, rsrp_result, (uint8_t)0u, (uint8_t)127u)); + if (meas_and_mob_params_nrdc_present) { + HANDLE_CODE(meas_and_mob_params_nrdc.pack(bref)); + } + if (general_params_nrdc_present) { + HANDLE_CODE(general_params_nrdc.pack(bref)); + } + if (fdd_add_ue_nrdc_cap_present) { + HANDLE_CODE(fdd_add_ue_nrdc_cap.pack(bref)); + } + if (tdd_add_ue_nrdc_cap_present) { + HANDLE_CODE(tdd_add_ue_nrdc_cap.pack(bref)); + } + if (fr1_add_ue_nrdc_cap_present) { + HANDLE_CODE(fr1_add_ue_nrdc_cap.pack(bref)); + } + if (fr2_add_ue_nrdc_cap_present) { + HANDLE_CODE(fr2_add_ue_nrdc_cap.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE meas_result_cell_sftd_s::unpack(cbit_ref& bref) +SRSASN_CODE nrdc_params_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(rsrp_result_present, 1)); + HANDLE_CODE(bref.unpack(meas_and_mob_params_nrdc_present, 1)); + HANDLE_CODE(bref.unpack(general_params_nrdc_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_nrdc_cap_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_nrdc_cap_present, 1)); + HANDLE_CODE(bref.unpack(fr1_add_ue_nrdc_cap_present, 1)); + HANDLE_CODE(bref.unpack(fr2_add_ue_nrdc_cap_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(dummy_present, 1)); - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(unpack_integer(sfn_offset_result, bref, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(unpack_integer(frame_boundary_offset_result, bref, (int16_t)-30720, (int16_t)30719)); - if (rsrp_result_present) { - HANDLE_CODE(unpack_integer(rsrp_result, bref, (uint8_t)0u, (uint8_t)127u)); + if (meas_and_mob_params_nrdc_present) { + HANDLE_CODE(meas_and_mob_params_nrdc.unpack(bref)); + } + if (general_params_nrdc_present) { + HANDLE_CODE(general_params_nrdc.unpack(bref)); + } + if (fdd_add_ue_nrdc_cap_present) { + HANDLE_CODE(fdd_add_ue_nrdc_cap.unpack(bref)); + } + if (tdd_add_ue_nrdc_cap_present) { + HANDLE_CODE(tdd_add_ue_nrdc_cap.unpack(bref)); + } + if (fr1_add_ue_nrdc_cap_present) { + HANDLE_CODE(fr1_add_ue_nrdc_cap.unpack(bref)); + } + if (fr2_add_ue_nrdc_cap_present) { + HANDLE_CODE(fr2_add_ue_nrdc_cap.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void meas_result_cell_sftd_s::to_json(json_writer& j) const +void nrdc_params_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("physCellId", pci); - j.write_int("sfn-OffsetResult", sfn_offset_result); - j.write_int("frameBoundaryOffsetResult", frame_boundary_offset_result); - if (rsrp_result_present) { - j.write_int("rsrp-Result", rsrp_result); + if (meas_and_mob_params_nrdc_present) { + j.write_fieldname("measAndMobParametersNRDC"); + meas_and_mob_params_nrdc.to_json(j); + } + if (general_params_nrdc_present) { + j.write_fieldname("generalParametersNRDC"); + general_params_nrdc.to_json(j); + } + if (fdd_add_ue_nrdc_cap_present) { + j.write_fieldname("fdd-Add-UE-NRDC-Capabilities"); + fdd_add_ue_nrdc_cap.to_json(j); + } + if (tdd_add_ue_nrdc_cap_present) { + j.write_fieldname("tdd-Add-UE-NRDC-Capabilities"); + tdd_add_ue_nrdc_cap.to_json(j); + } + if (fr1_add_ue_nrdc_cap_present) { + j.write_fieldname("fr1-Add-UE-NRDC-Capabilities"); + fr1_add_ue_nrdc_cap.to_json(j); + } + if (fr2_add_ue_nrdc_cap_present) { + j.write_fieldname("fr2-Add-UE-NRDC-Capabilities"); + fr2_add_ue_nrdc_cap.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (dummy_present) { + j.write_fieldname("dummy"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -// MeasResultSCG-Failure ::= SEQUENCE -SRSASN_CODE meas_result_scg_fail_s::pack(bit_ref& bref) const +// CarrierAggregationVariant ::= SEQUENCE +SRSASN_CODE carrier_aggregation_variant_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_per_mo_list, 1, 8)); + HANDLE_CODE(bref.pack(fr1fdd_fr1_tdd_ca_sp_cell_on_fr1_fdd_present, 1)); + HANDLE_CODE(bref.pack(fr1fdd_fr1_tdd_ca_sp_cell_on_fr1_tdd_present, 1)); + HANDLE_CODE(bref.pack(fr1fdd_fr2_tdd_ca_sp_cell_on_fr1_fdd_present, 1)); + HANDLE_CODE(bref.pack(fr1fdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present, 1)); + HANDLE_CODE(bref.pack(fr1tdd_fr2_tdd_ca_sp_cell_on_fr1_tdd_present, 1)); + HANDLE_CODE(bref.pack(fr1tdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present, 1)); + HANDLE_CODE(bref.pack(fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr1_fdd_present, 1)); + HANDLE_CODE(bref.pack(fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr1_tdd_present, 1)); + HANDLE_CODE(bref.pack(fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_result_scg_fail_s::unpack(cbit_ref& bref) +SRSASN_CODE carrier_aggregation_variant_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(meas_result_per_mo_list, bref, 1, 8)); + HANDLE_CODE(bref.unpack(fr1fdd_fr1_tdd_ca_sp_cell_on_fr1_fdd_present, 1)); + HANDLE_CODE(bref.unpack(fr1fdd_fr1_tdd_ca_sp_cell_on_fr1_tdd_present, 1)); + HANDLE_CODE(bref.unpack(fr1fdd_fr2_tdd_ca_sp_cell_on_fr1_fdd_present, 1)); + HANDLE_CODE(bref.unpack(fr1fdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present, 1)); + HANDLE_CODE(bref.unpack(fr1tdd_fr2_tdd_ca_sp_cell_on_fr1_tdd_present, 1)); + HANDLE_CODE(bref.unpack(fr1tdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present, 1)); + HANDLE_CODE(bref.unpack(fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr1_fdd_present, 1)); + HANDLE_CODE(bref.unpack(fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr1_tdd_present, 1)); + HANDLE_CODE(bref.unpack(fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present, 1)); return SRSASN_SUCCESS; } -void meas_result_scg_fail_s::to_json(json_writer& j) const +void carrier_aggregation_variant_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("measResultPerMOList"); - for (const auto& e1 : meas_result_per_mo_list) { - e1.to_json(j); + if (fr1fdd_fr1_tdd_ca_sp_cell_on_fr1_fdd_present) { + j.write_str("fr1fdd-FR1TDD-CA-SpCellOnFR1FDD", "supported"); + } + if (fr1fdd_fr1_tdd_ca_sp_cell_on_fr1_tdd_present) { + j.write_str("fr1fdd-FR1TDD-CA-SpCellOnFR1TDD", "supported"); + } + if (fr1fdd_fr2_tdd_ca_sp_cell_on_fr1_fdd_present) { + j.write_str("fr1fdd-FR2TDD-CA-SpCellOnFR1FDD", "supported"); + } + if (fr1fdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present) { + j.write_str("fr1fdd-FR2TDD-CA-SpCellOnFR2TDD", "supported"); + } + if (fr1tdd_fr2_tdd_ca_sp_cell_on_fr1_tdd_present) { + j.write_str("fr1tdd-FR2TDD-CA-SpCellOnFR1TDD", "supported"); + } + if (fr1tdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present) { + j.write_str("fr1tdd-FR2TDD-CA-SpCellOnFR2TDD", "supported"); + } + if (fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr1_fdd_present) { + j.write_str("fr1fdd-FR1TDD-FR2TDD-CA-SpCellOnFR1FDD", "supported"); + } + if (fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr1_tdd_present) { + j.write_str("fr1fdd-FR1TDD-FR2TDD-CA-SpCellOnFR1TDD", "supported"); + } + if (fr1fdd_fr1_tdd_fr2_tdd_ca_sp_cell_on_fr2_tdd_present) { + j.write_str("fr1fdd-FR1TDD-FR2TDD-CA-SpCellOnFR2TDD", "supported"); } - j.end_array(); j.end_obj(); } @@ -48716,6 +51795,7 @@ SRSASN_CODE phy_params_common_s::pack(bit_ref& bref) const group_flags[1] |= max_num_search_spaces_present; group_flags[1] |= rate_matching_ctrl_resrc_set_dynamic_present; group_flags[1] |= max_layers_mimo_ind_present; + group_flags[2] |= sp_cell_placement.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -48730,6 +51810,14 @@ SRSASN_CODE phy_params_common_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(rate_matching_ctrl_resrc_set_dynamic_present, 1)); HANDLE_CODE(bref.pack(max_layers_mimo_ind_present, 1)); } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sp_cell_placement.is_present(), 1)); + if (sp_cell_placement.is_present()) { + HANDLE_CODE(sp_cell_placement->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -48776,7 +51864,7 @@ SRSASN_CODE phy_params_common_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(3); group_flags.unpack(bref); if (group_flags[0]) { @@ -48791,6 +51879,16 @@ SRSASN_CODE phy_params_common_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(rate_matching_ctrl_resrc_set_dynamic_present, 1)); HANDLE_CODE(bref.unpack(max_layers_mimo_ind_present, 1)); } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool sp_cell_placement_present; + HANDLE_CODE(bref.unpack(sp_cell_placement_present, 1)); + sp_cell_placement.set_present(sp_cell_placement_present); + if (sp_cell_placement.is_present()) { + HANDLE_CODE(sp_cell_placement->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -48912,6 +52010,10 @@ void phy_params_common_s::to_json(json_writer& j) const if (max_layers_mimo_ind_present) { j.write_str("maxLayersMIMO-Indication", "supported"); } + if (sp_cell_placement.is_present()) { + j.write_fieldname("spCellPlacement"); + sp_cell_placement->to_json(j); + } } j.end_obj(); } @@ -48987,7 +52089,7 @@ void phy_params_fr1_s::to_json(json_writer& j) const { j.start_obj(); if (pdcch_monitoring_single_occasion_present) { - j.write_str("pdcchMonitoringSingleOccasion", "supported"); + j.write_str("pdcch-MonitoringSingleOccasion", "supported"); } if (scs_minus60k_hz_present) { j.write_str("scs-60kHz", "supported"); @@ -49174,8 +52276,8 @@ SRSASN_CODE phy_params_frx_diff_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(pucch_f2_with_fh_present, 1)); HANDLE_CODE(bref.pack(pucch_f3_with_fh_present, 1)); HANDLE_CODE(bref.pack(pucch_f4_with_fh_present, 1)); - HANDLE_CODE(bref.pack(freq_hop_pucch_f0_minus2_present, 1)); - HANDLE_CODE(bref.pack(freq_hop_pucch_f1_minus3_minus4_present, 1)); + HANDLE_CODE(bref.pack(pucch_f0_minus2_without_fh_present, 1)); + HANDLE_CODE(bref.pack(pucch_f1_minus3_minus4_without_fh_present, 1)); HANDLE_CODE(bref.pack(mux_sr_harq_ack_csi_pucch_multi_per_slot_present, 1)); HANDLE_CODE(bref.pack(uci_code_block_segmentation_present, 1)); HANDLE_CODE(bref.pack(one_pucch_long_and_short_format_present, 1)); @@ -49239,6 +52341,8 @@ SRSASN_CODE phy_params_frx_diff_s::pack(bit_ref& bref) const group_flags[0] |= one_fl_dmrs_two_add_dmrs_ul_present; group_flags[0] |= two_fl_dmrs_two_add_dmrs_ul_present; group_flags[0] |= one_fl_dmrs_three_add_dmrs_ul_present; + group_flags[1] |= pdcch_blind_detection_nrdc.is_present(); + group_flags[1] |= mux_harq_ack_pusch_diff_symbol_present; group_flags.pack(bref); if (group_flags[0]) { @@ -49273,6 +52377,18 @@ SRSASN_CODE phy_params_frx_diff_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(mux_sr_harq_ack_csi_pucch_once_per_slot->diff_symbol_present, 1)); } } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pdcch_blind_detection_nrdc.is_present(), 1)); + HANDLE_CODE(bref.pack(mux_harq_ack_pusch_diff_symbol_present, 1)); + if (pdcch_blind_detection_nrdc.is_present()) { + HANDLE_CODE( + pack_integer(bref, pdcch_blind_detection_nrdc->pdcch_blind_detection_mcg_ue, (uint8_t)1u, (uint8_t)15u)); + HANDLE_CODE( + pack_integer(bref, pdcch_blind_detection_nrdc->pdcch_blind_detection_scg_ue, (uint8_t)1u, (uint8_t)15u)); + } + } } return SRSASN_SUCCESS; } @@ -49294,8 +52410,8 @@ SRSASN_CODE phy_params_frx_diff_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(pucch_f2_with_fh_present, 1)); HANDLE_CODE(bref.unpack(pucch_f3_with_fh_present, 1)); HANDLE_CODE(bref.unpack(pucch_f4_with_fh_present, 1)); - HANDLE_CODE(bref.unpack(freq_hop_pucch_f0_minus2_present, 1)); - HANDLE_CODE(bref.unpack(freq_hop_pucch_f1_minus3_minus4_present, 1)); + HANDLE_CODE(bref.unpack(pucch_f0_minus2_without_fh_present, 1)); + HANDLE_CODE(bref.unpack(pucch_f1_minus3_minus4_without_fh_present, 1)); HANDLE_CODE(bref.unpack(mux_sr_harq_ack_csi_pucch_multi_per_slot_present, 1)); HANDLE_CODE(bref.unpack(uci_code_block_segmentation_present, 1)); HANDLE_CODE(bref.unpack(one_pucch_long_and_short_format_present, 1)); @@ -49343,7 +52459,7 @@ SRSASN_CODE phy_params_frx_diff_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(1); + ext_groups_unpacker_guard group_flags(2); group_flags.unpack(bref); if (group_flags[0]) { @@ -49386,6 +52502,20 @@ SRSASN_CODE phy_params_frx_diff_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(mux_sr_harq_ack_csi_pucch_once_per_slot->diff_symbol_present, 1)); } } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool pdcch_blind_detection_nrdc_present; + HANDLE_CODE(bref.unpack(pdcch_blind_detection_nrdc_present, 1)); + pdcch_blind_detection_nrdc.set_present(pdcch_blind_detection_nrdc_present); + HANDLE_CODE(bref.unpack(mux_harq_ack_pusch_diff_symbol_present, 1)); + if (pdcch_blind_detection_nrdc.is_present()) { + HANDLE_CODE( + unpack_integer(pdcch_blind_detection_nrdc->pdcch_blind_detection_mcg_ue, bref, (uint8_t)1u, (uint8_t)15u)); + HANDLE_CODE( + unpack_integer(pdcch_blind_detection_nrdc->pdcch_blind_detection_scg_ue, bref, (uint8_t)1u, (uint8_t)15u)); + } + } } return SRSASN_SUCCESS; } @@ -49437,11 +52567,11 @@ void phy_params_frx_diff_s::to_json(json_writer& j) const if (pucch_f4_with_fh_present) { j.write_str("pucch-F4-WithFH", "supported"); } - if (freq_hop_pucch_f0_minus2_present) { - j.write_str("freqHoppingPUCCH-F0-2", "notSupported"); + if (pucch_f0_minus2_without_fh_present) { + j.write_str("pucch-F0-2WithoutFH", "notSupported"); } - if (freq_hop_pucch_f1_minus3_minus4_present) { - j.write_str("freqHoppingPUCCH-F1-3-4", "notSupported"); + if (pucch_f1_minus3_minus4_without_fh_present) { + j.write_str("pucch-F1-3-4WithoutFH", "notSupported"); } if (mux_sr_harq_ack_csi_pucch_multi_per_slot_present) { j.write_str("mux-SR-HARQ-ACK-CSI-PUCCH-MultiPerSlot", "supported"); @@ -49560,6 +52690,16 @@ void phy_params_frx_diff_s::to_json(json_writer& j) const if (one_fl_dmrs_three_add_dmrs_ul_present) { j.write_str("oneFL-DMRS-ThreeAdditionalDMRS-UL", "supported"); } + if (pdcch_blind_detection_nrdc.is_present()) { + j.write_fieldname("pdcch-BlindDetectionNRDC"); + j.start_obj(); + j.write_int("pdcch-BlindDetectionMCG-UE", pdcch_blind_detection_nrdc->pdcch_blind_detection_mcg_ue); + j.write_int("pdcch-BlindDetectionSCG-UE", pdcch_blind_detection_nrdc->pdcch_blind_detection_scg_ue); + j.end_obj(); + } + if (mux_harq_ack_pusch_diff_symbol_present) { + j.write_str("mux-HARQ-ACK-PUSCH-DiffSymbol", "supported"); + } } j.end_obj(); } @@ -49793,6 +52933,20 @@ SRSASN_CODE phy_params_mrdc_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, naics_cap_list, 1, 8)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sp_cell_placement.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sp_cell_placement.is_present(), 1)); + if (sp_cell_placement.is_present()) { + HANDLE_CODE(sp_cell_placement->pack(bref)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE phy_params_mrdc_s::unpack(cbit_ref& bref) @@ -49804,6 +52958,21 @@ SRSASN_CODE phy_params_mrdc_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(naics_cap_list, bref, 1, 8)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool sp_cell_placement_present; + HANDLE_CODE(bref.unpack(sp_cell_placement_present, 1)); + sp_cell_placement.set_present(sp_cell_placement_present); + if (sp_cell_placement.is_present()) { + HANDLE_CODE(sp_cell_placement->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } void phy_params_mrdc_s::to_json(json_writer& j) const @@ -49816,6 +52985,12 @@ void phy_params_mrdc_s::to_json(json_writer& j) const } j.end_array(); } + if (ext) { + if (sp_cell_placement.is_present()) { + j.write_fieldname("spCellPlacement"); + sp_cell_placement->to_json(j); + } + } j.end_obj(); } @@ -49839,6 +53014,7 @@ SRSASN_CODE rf_params_s::pack(bit_ref& bref) const group_flags[0] |= supported_band_combination_list_v1540.is_present(); group_flags[0] |= srs_switching_time_requested_present; group_flags[1] |= supported_band_combination_list_v1550.is_present(); + group_flags[2] |= supported_band_combination_list_v1560.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -49858,6 +53034,14 @@ SRSASN_CODE rf_params_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1550, 1, 65536)); } } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1560.is_present(), 1)); + if (supported_band_combination_list_v1560.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1560, 1, 65536)); + } + } } return SRSASN_SUCCESS; } @@ -49876,7 +53060,7 @@ SRSASN_CODE rf_params_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(3); group_flags.unpack(bref); if (group_flags[0]) { @@ -49900,6 +53084,16 @@ SRSASN_CODE rf_params_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1550, bref, 1, 65536)); } } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool supported_band_combination_list_v1560_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1560_present, 1)); + supported_band_combination_list_v1560.set_present(supported_band_combination_list_v1560_present); + if (supported_band_combination_list_v1560.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1560, bref, 1, 65536)); + } + } } return SRSASN_SUCCESS; } @@ -49943,6 +53137,13 @@ void rf_params_s::to_json(json_writer& j) const } j.end_array(); } + if (supported_band_combination_list_v1560.is_present()) { + j.start_array("supportedBandCombinationList-v1560"); + for (const auto& e1 : *supported_band_combination_list_v1560) { + e1.to_json(j); + } + j.end_array(); + } } j.end_obj(); } @@ -49966,6 +53167,12 @@ SRSASN_CODE rf_params_mrdc_s::pack(bit_ref& bref) const group_flags[0] |= srs_switching_time_requested_present; group_flags[0] |= supported_band_combination_list_v1540.is_present(); group_flags[1] |= supported_band_combination_list_v1550.is_present(); + group_flags[2] |= supported_band_combination_list_v1560.is_present(); + group_flags[2] |= supported_band_combination_list_nedc_only.is_present(); + group_flags[3] |= supported_band_combination_list_v1570.is_present(); + group_flags[4] |= supported_band_combination_list_v1580.is_present(); + group_flags[5] |= supported_band_combination_list_v1590.is_present(); + group_flags[6] |= supported_band_combination_list_nedc_only_v15a0.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -49985,6 +53192,79 @@ SRSASN_CODE rf_params_mrdc_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1550, 1, 65536)); } } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1560.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only.is_present(), 1)); + if (supported_band_combination_list_v1560.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1560, 1, 65536)); + } + if (supported_band_combination_list_nedc_only.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only, 1, 65536)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1570.is_present(), 1)); + if (supported_band_combination_list_v1570.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1570, 1, 65536)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1580.is_present(), 1)); + if (supported_band_combination_list_v1580.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1580, 1, 65536)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1590.is_present(), 1)); + if (supported_band_combination_list_v1590.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1590, 1, 65536)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v15a0.is_present(), 1)); + if (supported_band_combination_list_nedc_only_v15a0.is_present()) { + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540_present, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560_present, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570_present, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580_present, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590_present, 1)); + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590, 1, 65536)); + } + } + } } return SRSASN_SUCCESS; } @@ -50002,7 +53282,7 @@ SRSASN_CODE rf_params_mrdc_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(7); group_flags.unpack(bref); if (group_flags[0]) { @@ -50026,6 +53306,92 @@ SRSASN_CODE rf_params_mrdc_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1550, bref, 1, 65536)); } } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool supported_band_combination_list_v1560_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1560_present, 1)); + supported_band_combination_list_v1560.set_present(supported_band_combination_list_v1560_present); + bool supported_band_combination_list_nedc_only_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_nedc_only_present, 1)); + supported_band_combination_list_nedc_only.set_present(supported_band_combination_list_nedc_only_present); + if (supported_band_combination_list_v1560.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1560, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only, bref, 1, 65536)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool supported_band_combination_list_v1570_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1570_present, 1)); + supported_band_combination_list_v1570.set_present(supported_band_combination_list_v1570_present); + if (supported_band_combination_list_v1570.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1570, bref, 1, 65536)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool supported_band_combination_list_v1580_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1580_present, 1)); + supported_band_combination_list_v1580.set_present(supported_band_combination_list_v1580_present); + if (supported_band_combination_list_v1580.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1580, bref, 1, 65536)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool supported_band_combination_list_v1590_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1590_present, 1)); + supported_band_combination_list_v1590.set_present(supported_band_combination_list_v1590_present); + if (supported_band_combination_list_v1590.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1590, bref, 1, 65536)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool supported_band_combination_list_nedc_only_v15a0_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_nedc_only_v15a0_present, 1)); + supported_band_combination_list_nedc_only_v15a0.set_present( + supported_band_combination_list_nedc_only_v15a0_present); + if (supported_band_combination_list_nedc_only_v15a0.is_present()) { + HANDLE_CODE(bref.unpack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540_present, 1)); + HANDLE_CODE(bref.unpack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560_present, 1)); + HANDLE_CODE(bref.unpack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570_present, 1)); + HANDLE_CODE(bref.unpack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580_present, 1)); + HANDLE_CODE(bref.unpack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590_present, 1)); + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540_present) { + HANDLE_CODE(unpack_dyn_seq_of( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560_present) { + HANDLE_CODE(unpack_dyn_seq_of( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570_present) { + HANDLE_CODE(unpack_dyn_seq_of( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580_present) { + HANDLE_CODE(unpack_dyn_seq_of( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590_present) { + HANDLE_CODE(unpack_dyn_seq_of( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590, bref, 1, 65536)); + } + } + } } return SRSASN_SUCCESS; } @@ -50064,6 +53430,81 @@ void rf_params_mrdc_s::to_json(json_writer& j) const } j.end_array(); } + if (supported_band_combination_list_v1560.is_present()) { + j.start_array("supportedBandCombinationList-v1560"); + for (const auto& e1 : *supported_band_combination_list_v1560) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only.is_present()) { + j.start_array("supportedBandCombinationListNEDC-Only"); + for (const auto& e1 : *supported_band_combination_list_nedc_only) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1570.is_present()) { + j.start_array("supportedBandCombinationList-v1570"); + for (const auto& e1 : *supported_band_combination_list_v1570) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1580.is_present()) { + j.start_array("supportedBandCombinationList-v1580"); + for (const auto& e1 : *supported_band_combination_list_v1580) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1590.is_present()) { + j.start_array("supportedBandCombinationList-v1590"); + for (const auto& e1 : *supported_band_combination_list_v1590) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v15a0.is_present()) { + j.write_fieldname("supportedBandCombinationListNEDC-Only-v15a0"); + j.start_obj(); + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540_present) { + j.start_array("supportedBandCombinationList-v1540"); + for (const auto& e1 : supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560_present) { + j.start_array("supportedBandCombinationList-v1560"); + for (const auto& e1 : supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570_present) { + j.start_array("supportedBandCombinationList-v1570"); + for (const auto& e1 : supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580_present) { + j.start_array("supportedBandCombinationList-v1580"); + for (const auto& e1 : supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590_present) { + j.start_array("supportedBandCombinationList-v1590"); + for (const auto& e1 : supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + } } j.end_obj(); } @@ -50143,41 +53584,33 @@ void ue_cap_request_filt_nr_s::to_json(json_writer& j) const j.end_obj(); } -// GeneralParametersMRDC-XDD-Diff ::= SEQUENCE -SRSASN_CODE general_params_mrdc_xdd_diff_s::pack(bit_ref& bref) const +// UE-MRDC-CapabilityAddXDD-Mode-v1560 ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_add_xdd_mode_v1560_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(split_srb_with_one_ul_path_present, 1)); - HANDLE_CODE(bref.pack(split_drb_with_ul_both_mcg_scg_present, 1)); - HANDLE_CODE(bref.pack(srb3_present, 1)); - HANDLE_CODE(bref.pack(v2x_eutra_v1530_present, 1)); + HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_xdd_diff_v1560_present, 1)); + + if (meas_and_mob_params_mrdc_xdd_diff_v1560_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_xdd_diff_v1560.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE general_params_mrdc_xdd_diff_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_mrdc_cap_add_xdd_mode_v1560_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(split_srb_with_one_ul_path_present, 1)); - HANDLE_CODE(bref.unpack(split_drb_with_ul_both_mcg_scg_present, 1)); - HANDLE_CODE(bref.unpack(srb3_present, 1)); - HANDLE_CODE(bref.unpack(v2x_eutra_v1530_present, 1)); + HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_xdd_diff_v1560_present, 1)); + + if (meas_and_mob_params_mrdc_xdd_diff_v1560_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_xdd_diff_v1560.unpack(bref)); + } return SRSASN_SUCCESS; } -void general_params_mrdc_xdd_diff_s::to_json(json_writer& j) const +void ue_mrdc_cap_add_xdd_mode_v1560_s::to_json(json_writer& j) const { j.start_obj(); - if (split_srb_with_one_ul_path_present) { - j.write_str("splitSRB-WithOneUL-Path", "supported"); - } - if (split_drb_with_ul_both_mcg_scg_present) { - j.write_str("splitDRB-withUL-Both-MCG-SCG", "supported"); - } - if (srb3_present) { - j.write_str("srb3", "supported"); - } - if (v2x_eutra_v1530_present) { - j.write_str("v2x-EUTRA-v1530", "supported"); + if (meas_and_mob_params_mrdc_xdd_diff_v1560_present) { + j.write_fieldname("measAndMobParametersMRDC-XDD-Diff-v1560"); + meas_and_mob_params_mrdc_xdd_diff_v1560.to_json(j); } j.end_obj(); } @@ -50209,66 +53642,75 @@ void pdcp_params_mrdc_s::to_json(json_writer& j) const j.end_obj(); } -// UE-MRDC-CapabilityAddFRX-Mode ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_add_frx_mode_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(meas_and_mob_params_mrdc_frx_diff.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_mrdc_cap_add_frx_mode_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(meas_and_mob_params_mrdc_frx_diff.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ue_mrdc_cap_add_frx_mode_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measAndMobParametersMRDC-FRX-Diff"); - meas_and_mob_params_mrdc_frx_diff.to_json(j); - j.end_obj(); -} - -// UE-MRDC-CapabilityAddXDD-Mode ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_add_xdd_mode_s::pack(bit_ref& bref) const +// UE-MRDC-Capability-v1560 ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_v1560_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_xdd_diff_present, 1)); - HANDLE_CODE(bref.pack(general_params_mrdc_xdd_diff_present, 1)); + HANDLE_CODE(bref.pack(rx_filts_present, 1)); + HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_v1560_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_mrdc_cap_v1560_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_mrdc_cap_v1560_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (meas_and_mob_params_mrdc_xdd_diff_present) { - HANDLE_CODE(meas_and_mob_params_mrdc_xdd_diff.pack(bref)); + if (rx_filts_present) { + HANDLE_CODE(rx_filts.pack(bref)); } - if (general_params_mrdc_xdd_diff_present) { - HANDLE_CODE(general_params_mrdc_xdd_diff.pack(bref)); + if (meas_and_mob_params_mrdc_v1560_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_v1560.pack(bref)); + } + if (fdd_add_ue_mrdc_cap_v1560_present) { + HANDLE_CODE(fdd_add_ue_mrdc_cap_v1560.pack(bref)); + } + if (tdd_add_ue_mrdc_cap_v1560_present) { + HANDLE_CODE(tdd_add_ue_mrdc_cap_v1560.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE ue_mrdc_cap_add_xdd_mode_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_mrdc_cap_v1560_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_xdd_diff_present, 1)); - HANDLE_CODE(bref.unpack(general_params_mrdc_xdd_diff_present, 1)); + HANDLE_CODE(bref.unpack(rx_filts_present, 1)); + HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_v1560_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_mrdc_cap_v1560_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_mrdc_cap_v1560_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (meas_and_mob_params_mrdc_xdd_diff_present) { - HANDLE_CODE(meas_and_mob_params_mrdc_xdd_diff.unpack(bref)); + if (rx_filts_present) { + HANDLE_CODE(rx_filts.unpack(bref)); } - if (general_params_mrdc_xdd_diff_present) { - HANDLE_CODE(general_params_mrdc_xdd_diff.unpack(bref)); + if (meas_and_mob_params_mrdc_v1560_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_v1560.unpack(bref)); + } + if (fdd_add_ue_mrdc_cap_v1560_present) { + HANDLE_CODE(fdd_add_ue_mrdc_cap_v1560.unpack(bref)); + } + if (tdd_add_ue_mrdc_cap_v1560_present) { + HANDLE_CODE(tdd_add_ue_mrdc_cap_v1560.unpack(bref)); } return SRSASN_SUCCESS; } -void ue_mrdc_cap_add_xdd_mode_s::to_json(json_writer& j) const +void ue_mrdc_cap_v1560_s::to_json(json_writer& j) const { j.start_obj(); - if (meas_and_mob_params_mrdc_xdd_diff_present) { - j.write_fieldname("measAndMobParametersMRDC-XDD-Diff"); - meas_and_mob_params_mrdc_xdd_diff.to_json(j); + if (rx_filts_present) { + j.write_str("receivedFilters", rx_filts.to_string()); } - if (general_params_mrdc_xdd_diff_present) { - j.write_fieldname("generalParametersMRDC-XDD-Diff"); - general_params_mrdc_xdd_diff.to_json(j); + if (meas_and_mob_params_mrdc_v1560_present) { + j.write_fieldname("measAndMobParametersMRDC-v1560"); + meas_and_mob_params_mrdc_v1560.to_json(j); + } + if (fdd_add_ue_mrdc_cap_v1560_present) { + j.write_fieldname("fdd-Add-UE-MRDC-Capabilities-v1560"); + fdd_add_ue_mrdc_cap_v1560.to_json(j); + } + if (tdd_add_ue_mrdc_cap_v1560_present) { + j.write_fieldname("tdd-Add-UE-MRDC-Capabilities-v1560"); + tdd_add_ue_mrdc_cap_v1560.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } @@ -50323,6 +53765,9 @@ SRSASN_CODE ue_mrdc_cap_s::pack(bit_ref& bref) const if (late_non_crit_ext_present) { HANDLE_CODE(late_non_crit_ext.pack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -50375,6 +53820,9 @@ SRSASN_CODE ue_mrdc_cap_s::unpack(cbit_ref& bref) if (late_non_crit_ext_present) { HANDLE_CODE(late_non_crit_ext.unpack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -50433,6 +53881,65 @@ void ue_mrdc_cap_s::to_json(json_writer& j) const if (late_non_crit_ext_present) { j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// NRDC-Parameters-v1570 ::= SEQUENCE +SRSASN_CODE nrdc_params_v1570_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sfn_sync_nrdc_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE nrdc_params_v1570_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sfn_sync_nrdc_present, 1)); + + return SRSASN_SUCCESS; +} +void nrdc_params_v1570_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sfn_sync_nrdc_present) { + j.write_str("sfn-SyncNRDC", "supported"); + } + j.end_obj(); +} + +// UE-NR-Capability-v1570 ::= SEQUENCE +SRSASN_CODE ue_nr_cap_v1570_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nrdc_params_v1570_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (nrdc_params_v1570_present) { + HANDLE_CODE(nrdc_params_v1570.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_nr_cap_v1570_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nrdc_params_v1570_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (nrdc_params_v1570_present) { + HANDLE_CODE(nrdc_params_v1570.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_nr_cap_v1570_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (nrdc_params_v1570_present) { + j.write_fieldname("nrdc-Parameters-v1570"); + nrdc_params_v1570.to_json(j); + } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); j.start_obj(); @@ -50441,6 +53948,60 @@ void ue_mrdc_cap_s::to_json(json_writer& j) const j.end_obj(); } +// UE-NR-Capability-v1560 ::= SEQUENCE +SRSASN_CODE ue_nr_cap_v1560_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nrdc_params_present, 1)); + HANDLE_CODE(bref.pack(rx_filts_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (nrdc_params_present) { + HANDLE_CODE(nrdc_params.pack(bref)); + } + if (rx_filts_present) { + HANDLE_CODE(rx_filts.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_nr_cap_v1560_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nrdc_params_present, 1)); + HANDLE_CODE(bref.unpack(rx_filts_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (nrdc_params_present) { + HANDLE_CODE(nrdc_params.unpack(bref)); + } + if (rx_filts_present) { + HANDLE_CODE(rx_filts.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_nr_cap_v1560_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (nrdc_params_present) { + j.write_fieldname("nrdc-Parameters"); + nrdc_params.to_json(j); + } + if (rx_filts_present) { + j.write_str("receivedFilters", rx_filts.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + // SDAP-Parameters ::= SEQUENCE SRSASN_CODE sdap_params_s::pack(bit_ref& bref) const { @@ -50471,6 +54032,10 @@ SRSASN_CODE ue_nr_cap_v1550_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(reduced_cp_latency_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + return SRSASN_SUCCESS; } SRSASN_CODE ue_nr_cap_v1550_s::unpack(cbit_ref& bref) @@ -50478,6 +54043,10 @@ SRSASN_CODE ue_nr_cap_v1550_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(reduced_cp_latency_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + return SRSASN_SUCCESS; } void ue_nr_cap_v1550_s::to_json(json_writer& j) const @@ -50488,8 +54057,7 @@ void ue_nr_cap_v1550_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -51165,12 +54733,127 @@ void ue_nr_cap_s::to_json(json_writer& j) const j.end_obj(); } +// UE-CapabilityRequestFilterCommon ::= SEQUENCE +SRSASN_CODE ue_cap_request_filt_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(mrdc_request_present, 1)); + + if (mrdc_request_present) { + HANDLE_CODE(bref.pack(mrdc_request.omit_en_dc_present, 1)); + HANDLE_CODE(bref.pack(mrdc_request.include_nr_dc_present, 1)); + HANDLE_CODE(bref.pack(mrdc_request.include_ne_dc_present, 1)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_request_filt_common_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(mrdc_request_present, 1)); + + if (mrdc_request_present) { + HANDLE_CODE(bref.unpack(mrdc_request.omit_en_dc_present, 1)); + HANDLE_CODE(bref.unpack(mrdc_request.include_nr_dc_present, 1)); + HANDLE_CODE(bref.unpack(mrdc_request.include_ne_dc_present, 1)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_request_filt_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mrdc_request_present) { + j.write_fieldname("mrdc-Request"); + j.start_obj(); + if (mrdc_request.omit_en_dc_present) { + j.write_str("omitEN-DC", "true"); + } + if (mrdc_request.include_nr_dc_present) { + j.write_str("includeNR-DC", "true"); + } + if (mrdc_request.include_ne_dc_present) { + j.write_str("includeNE-DC", "true"); + } + j.end_obj(); + } + j.end_obj(); +} + +// UECapabilityEnquiry-v1560-IEs ::= SEQUENCE +SRSASN_CODE ue_cap_enquiry_v1560_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cap_request_filt_common_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (cap_request_filt_common_present) { + HANDLE_CODE(cap_request_filt_common.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v1560_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cap_request_filt_common_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (cap_request_filt_common_present) { + HANDLE_CODE(cap_request_filt_common.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v1560_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cap_request_filt_common_present) { + j.write_fieldname("capabilityRequestFilterCommon"); + cap_request_filt_common.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // AS-Config ::= SEQUENCE SRSASN_CODE as_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(rrc_recfg.pack(bref)); + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= source_rb_sn_cfg_present; + group_flags[0] |= source_scg_nr_cfg_present; + group_flags[0] |= source_scg_eutra_cfg_present; + group_flags[1] |= source_scg_cfgured_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(source_rb_sn_cfg_present, 1)); + HANDLE_CODE(bref.pack(source_scg_nr_cfg_present, 1)); + HANDLE_CODE(bref.pack(source_scg_eutra_cfg_present, 1)); + if (source_rb_sn_cfg_present) { + HANDLE_CODE(source_rb_sn_cfg.pack(bref)); + } + if (source_scg_nr_cfg_present) { + HANDLE_CODE(source_scg_nr_cfg.pack(bref)); + } + if (source_scg_eutra_cfg_present) { + HANDLE_CODE(source_scg_eutra_cfg.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(source_scg_cfgured_present, 1)); + } + } return SRSASN_SUCCESS; } SRSASN_CODE as_cfg_s::unpack(cbit_ref& bref) @@ -51178,12 +54861,52 @@ SRSASN_CODE as_cfg_s::unpack(cbit_ref& bref) bref.unpack(ext, 1); HANDLE_CODE(rrc_recfg.unpack(bref)); + if (ext) { + ext_groups_unpacker_guard group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(source_rb_sn_cfg_present, 1)); + HANDLE_CODE(bref.unpack(source_scg_nr_cfg_present, 1)); + HANDLE_CODE(bref.unpack(source_scg_eutra_cfg_present, 1)); + if (source_rb_sn_cfg_present) { + HANDLE_CODE(source_rb_sn_cfg.unpack(bref)); + } + if (source_scg_nr_cfg_present) { + HANDLE_CODE(source_scg_nr_cfg.unpack(bref)); + } + if (source_scg_eutra_cfg_present) { + HANDLE_CODE(source_scg_eutra_cfg.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(source_scg_cfgured_present, 1)); + } + } return SRSASN_SUCCESS; } void as_cfg_s::to_json(json_writer& j) const { j.start_obj(); j.write_str("rrcReconfiguration", rrc_recfg.to_string()); + if (ext) { + if (source_rb_sn_cfg_present) { + j.write_str("sourceRB-SN-Config", source_rb_sn_cfg.to_string()); + } + if (source_scg_nr_cfg_present) { + j.write_str("sourceSCG-NR-Config", source_scg_nr_cfg.to_string()); + } + if (source_scg_eutra_cfg_present) { + j.write_str("sourceSCG-EUTRA-Config", source_scg_eutra_cfg.to_string()); + } + if (source_scg_cfgured_present) { + j.write_str("sourceSCG-Configured", "true"); + } + } j.end_obj(); } @@ -51240,6 +54963,29 @@ void reestab_ncell_info_s::to_json(json_writer& j) const j.end_obj(); } +// BandCombinationInfoSN ::= SEQUENCE +SRSASN_CODE band_combination_info_sn_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, band_combination_idx, (uint32_t)1u, (uint32_t)65536u)); + HANDLE_CODE(pack_integer(bref, requested_feature_sets, (uint8_t)1u, (uint8_t)128u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_info_sn_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(band_combination_idx, bref, (uint32_t)1u, (uint32_t)65536u)); + HANDLE_CODE(unpack_integer(requested_feature_sets, bref, (uint8_t)1u, (uint8_t)128u)); + + return SRSASN_SUCCESS; +} +void band_combination_info_sn_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandCombinationIndex", band_combination_idx); + j.write_int("requestedFeatureSets", requested_feature_sets); + j.end_obj(); +} + // ConfigRestrictInfoSCG ::= SEQUENCE SRSASN_CODE cfg_restrict_info_scg_s::pack(bit_ref& bref) const { @@ -51247,8 +54993,8 @@ SRSASN_CODE cfg_restrict_info_scg_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(allowed_bc_list_mrdc_present, 1)); HANDLE_CODE(bref.pack(pwr_coordination_fr1_present, 1)); HANDLE_CODE(bref.pack(serv_cell_idx_range_scg_present, 1)); - HANDLE_CODE(bref.pack(max_meas_freqs_scg_nr_present, 1)); - HANDLE_CODE(bref.pack(max_meas_identities_scg_nr_present, 1)); + HANDLE_CODE(bref.pack(max_meas_freqs_scg_present, 1)); + HANDLE_CODE(bref.pack(dummy_present, 1)); if (allowed_bc_list_mrdc_present) { HANDLE_CODE(pack_dyn_seq_of(bref, allowed_bc_list_mrdc, 1, 65536)); @@ -51271,13 +55017,55 @@ SRSASN_CODE cfg_restrict_info_scg_s::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, serv_cell_idx_range_scg.low_bound, (uint8_t)0u, (uint8_t)31u)); HANDLE_CODE(pack_integer(bref, serv_cell_idx_range_scg.up_bound, (uint8_t)0u, (uint8_t)31u)); } - if (max_meas_freqs_scg_nr_present) { - HANDLE_CODE(pack_integer(bref, max_meas_freqs_scg_nr, (uint8_t)1u, (uint8_t)32u)); + if (max_meas_freqs_scg_present) { + HANDLE_CODE(pack_integer(bref, max_meas_freqs_scg, (uint8_t)1u, (uint8_t)32u)); } - if (max_meas_identities_scg_nr_present) { - HANDLE_CODE(pack_integer(bref, max_meas_identities_scg_nr, (uint8_t)1u, (uint8_t)62u)); + if (dummy_present) { + HANDLE_CODE(pack_integer(bref, dummy, (uint8_t)1u, (uint8_t)62u)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sel_band_entries_mn_list.is_present(); + group_flags[0] |= pdcch_blind_detection_scg_present; + group_flags[0] |= max_num_rohc_context_sessions_sn_present; + group_flags[1] |= max_intra_freq_meas_identities_scg_present; + group_flags[1] |= max_inter_freq_meas_identities_scg_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sel_band_entries_mn_list.is_present(), 1)); + HANDLE_CODE(bref.pack(pdcch_blind_detection_scg_present, 1)); + HANDLE_CODE(bref.pack(max_num_rohc_context_sessions_sn_present, 1)); + if (sel_band_entries_mn_list.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, + *sel_band_entries_mn_list, + 1, + 65536, + SeqOfPacker >(1, 32, integer_packer(0, 32)))); + } + if (pdcch_blind_detection_scg_present) { + HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_scg, (uint8_t)1u, (uint8_t)15u)); + } + if (max_num_rohc_context_sessions_sn_present) { + HANDLE_CODE(pack_integer(bref, max_num_rohc_context_sessions_sn, (uint16_t)0u, (uint16_t)16384u)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(max_intra_freq_meas_identities_scg_present, 1)); + HANDLE_CODE(bref.pack(max_inter_freq_meas_identities_scg_present, 1)); + if (max_intra_freq_meas_identities_scg_present) { + HANDLE_CODE(pack_integer(bref, max_intra_freq_meas_identities_scg, (uint8_t)1u, (uint8_t)62u)); + } + if (max_inter_freq_meas_identities_scg_present) { + HANDLE_CODE(pack_integer(bref, max_inter_freq_meas_identities_scg, (uint8_t)1u, (uint8_t)62u)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE cfg_restrict_info_scg_s::unpack(cbit_ref& bref) @@ -51286,8 +55074,8 @@ SRSASN_CODE cfg_restrict_info_scg_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(allowed_bc_list_mrdc_present, 1)); HANDLE_CODE(bref.unpack(pwr_coordination_fr1_present, 1)); HANDLE_CODE(bref.unpack(serv_cell_idx_range_scg_present, 1)); - HANDLE_CODE(bref.unpack(max_meas_freqs_scg_nr_present, 1)); - HANDLE_CODE(bref.unpack(max_meas_identities_scg_nr_present, 1)); + HANDLE_CODE(bref.unpack(max_meas_freqs_scg_present, 1)); + HANDLE_CODE(bref.unpack(dummy_present, 1)); if (allowed_bc_list_mrdc_present) { HANDLE_CODE(unpack_dyn_seq_of(allowed_bc_list_mrdc, bref, 1, 65536)); @@ -51310,13 +55098,52 @@ SRSASN_CODE cfg_restrict_info_scg_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(serv_cell_idx_range_scg.low_bound, bref, (uint8_t)0u, (uint8_t)31u)); HANDLE_CODE(unpack_integer(serv_cell_idx_range_scg.up_bound, bref, (uint8_t)0u, (uint8_t)31u)); } - if (max_meas_freqs_scg_nr_present) { - HANDLE_CODE(unpack_integer(max_meas_freqs_scg_nr, bref, (uint8_t)1u, (uint8_t)32u)); + if (max_meas_freqs_scg_present) { + HANDLE_CODE(unpack_integer(max_meas_freqs_scg, bref, (uint8_t)1u, (uint8_t)32u)); } - if (max_meas_identities_scg_nr_present) { - HANDLE_CODE(unpack_integer(max_meas_identities_scg_nr, bref, (uint8_t)1u, (uint8_t)62u)); + if (dummy_present) { + HANDLE_CODE(unpack_integer(dummy, bref, (uint8_t)1u, (uint8_t)62u)); } + if (ext) { + ext_groups_unpacker_guard group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool sel_band_entries_mn_list_present; + HANDLE_CODE(bref.unpack(sel_band_entries_mn_list_present, 1)); + sel_band_entries_mn_list.set_present(sel_band_entries_mn_list_present); + HANDLE_CODE(bref.unpack(pdcch_blind_detection_scg_present, 1)); + HANDLE_CODE(bref.unpack(max_num_rohc_context_sessions_sn_present, 1)); + if (sel_band_entries_mn_list.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*sel_band_entries_mn_list, + bref, + 1, + 65536, + SeqOfPacker >(1, 32, integer_packer(0, 32)))); + } + if (pdcch_blind_detection_scg_present) { + HANDLE_CODE(unpack_integer(pdcch_blind_detection_scg, bref, (uint8_t)1u, (uint8_t)15u)); + } + if (max_num_rohc_context_sessions_sn_present) { + HANDLE_CODE(unpack_integer(max_num_rohc_context_sessions_sn, bref, (uint16_t)0u, (uint16_t)16384u)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(max_intra_freq_meas_identities_scg_present, 1)); + HANDLE_CODE(bref.unpack(max_inter_freq_meas_identities_scg_present, 1)); + if (max_intra_freq_meas_identities_scg_present) { + HANDLE_CODE(unpack_integer(max_intra_freq_meas_identities_scg, bref, (uint8_t)1u, (uint8_t)62u)); + } + if (max_inter_freq_meas_identities_scg_present) { + HANDLE_CODE(unpack_integer(max_inter_freq_meas_identities_scg, bref, (uint8_t)1u, (uint8_t)62u)); + } + } + } return SRSASN_SUCCESS; } void cfg_restrict_info_scg_s::to_json(json_writer& j) const @@ -51350,11 +55177,36 @@ void cfg_restrict_info_scg_s::to_json(json_writer& j) const j.write_int("upBound", serv_cell_idx_range_scg.up_bound); j.end_obj(); } - if (max_meas_freqs_scg_nr_present) { - j.write_int("maxMeasFreqsSCG-NR", max_meas_freqs_scg_nr); + if (max_meas_freqs_scg_present) { + j.write_int("maxMeasFreqsSCG", max_meas_freqs_scg); } - if (max_meas_identities_scg_nr_present) { - j.write_int("maxMeasIdentitiesSCG-NR", max_meas_identities_scg_nr); + if (dummy_present) { + j.write_int("dummy", dummy); + } + if (ext) { + if (sel_band_entries_mn_list.is_present()) { + j.start_array("selectedBandEntriesMNList"); + for (const auto& e1 : *sel_band_entries_mn_list) { + j.start_array(); + for (const auto& e2 : e1) { + j.write_int(e2); + } + j.end_array(); + } + j.end_array(); + } + if (pdcch_blind_detection_scg_present) { + j.write_int("pdcch-BlindDetectionSCG", pdcch_blind_detection_scg); + } + if (max_num_rohc_context_sessions_sn_present) { + j.write_int("maxNumberROHC-ContextSessionsSN", max_num_rohc_context_sessions_sn); + } + if (max_intra_freq_meas_identities_scg_present) { + j.write_int("maxIntraFreqMeasIdentitiesSCG", max_intra_freq_meas_identities_scg); + } + if (max_inter_freq_meas_identities_scg_present) { + j.write_int("maxInterFreqMeasIdentitiesSCG", max_inter_freq_meas_identities_scg); + } } j.end_obj(); } @@ -51417,6 +55269,7 @@ SRSASN_CODE as_context_s::pack(bit_ref& bref) const ext_groups_packer_guard group_flags; group_flags[0] |= ran_notif_area_info.is_present(); group_flags[1] |= ue_assist_info_present; + group_flags[2] |= sel_band_combination_sn.is_present(); group_flags.pack(bref); if (group_flags[0]) { @@ -51435,6 +55288,14 @@ SRSASN_CODE as_context_s::pack(bit_ref& bref) const HANDLE_CODE(ue_assist_info.pack(bref)); } } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sel_band_combination_sn.is_present(), 1)); + if (sel_band_combination_sn.is_present()) { + HANDLE_CODE(sel_band_combination_sn->pack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -51452,7 +55313,7 @@ SRSASN_CODE as_context_s::unpack(cbit_ref& bref) } if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(3); group_flags.unpack(bref); if (group_flags[0]) { @@ -51473,6 +55334,16 @@ SRSASN_CODE as_context_s::unpack(cbit_ref& bref) HANDLE_CODE(ue_assist_info.unpack(bref)); } } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool sel_band_combination_sn_present; + HANDLE_CODE(bref.unpack(sel_band_combination_sn_present, 1)); + sel_band_combination_sn.set_present(sel_band_combination_sn_present); + if (sel_band_combination_sn.is_present()) { + HANDLE_CODE(sel_band_combination_sn->unpack(bref)); + } + } } return SRSASN_SUCCESS; } @@ -51495,6 +55366,10 @@ void as_context_s::to_json(json_writer& j) const if (ue_assist_info_present) { j.write_str("ueAssistanceInformation", ue_assist_info.to_string()); } + if (sel_band_combination_sn.is_present()) { + j.write_fieldname("selectedBandCombinationSN"); + sel_band_combination_sn->to_json(j); + } } j.end_obj(); } @@ -51627,29 +55502,6 @@ std::string affected_carrier_freq_comb_info_mrdc_s::interference_direction_mrdc_ return convert_enum_idx(options, 8, value, "affected_carrier_freq_comb_info_mrdc_s::interference_direction_mrdc_e_"); } -// BandCombinationInfoSN ::= SEQUENCE -SRSASN_CODE band_combination_info_sn_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, band_combination_idx, (uint32_t)1u, (uint32_t)65536u)); - HANDLE_CODE(pack_integer(bref, requested_feature_sets, (uint8_t)1u, (uint8_t)128u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE band_combination_info_sn_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(band_combination_idx, bref, (uint32_t)1u, (uint32_t)65536u)); - HANDLE_CODE(unpack_integer(requested_feature_sets, bref, (uint8_t)1u, (uint8_t)128u)); - - return SRSASN_SUCCESS; -} -void band_combination_info_sn_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("bandCombinationIndex", band_combination_idx); - j.write_int("requestedFeatureSets", requested_feature_sets); - j.end_obj(); -} - // PH-UplinkCarrierSCG ::= SEQUENCE SRSASN_CODE ph_ul_carrier_scg_s::pack(bit_ref& bref) const { @@ -51683,6 +55535,62 @@ uint8_t ph_ul_carrier_scg_s::ph_type1or3_opts::to_number() const return map_enum_number(options, 2, value, "ph_ul_carrier_scg_s::ph_type1or3_e_"); } +// CG-Config-v1590-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scell_frequencies_sn_nr_present, 1)); + HANDLE_CODE(bref.pack(scell_frequencies_sn_eutra_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (scell_frequencies_sn_nr_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, scell_frequencies_sn_nr, 1, 31, integer_packer(0, 3279165))); + } + if (scell_frequencies_sn_eutra_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, scell_frequencies_sn_eutra, 1, 31, integer_packer(0, 262143))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_v1590_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scell_frequencies_sn_nr_present, 1)); + HANDLE_CODE(bref.unpack(scell_frequencies_sn_eutra_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (scell_frequencies_sn_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(scell_frequencies_sn_nr, bref, 1, 31, integer_packer(0, 3279165))); + } + if (scell_frequencies_sn_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(scell_frequencies_sn_eutra, bref, 1, 31, integer_packer(0, 262143))); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (scell_frequencies_sn_nr_present) { + j.start_array("scellFrequenciesSN-NR"); + for (const auto& e1 : scell_frequencies_sn_nr) { + j.write_int(e1); + } + j.end_array(); + } + if (scell_frequencies_sn_eutra_present) { + j.start_array("scellFrequenciesSN-EUTRA"); + for (const auto& e1 : scell_frequencies_sn_eutra) { + j.write_int(e1); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // PH-InfoSCG ::= SEQUENCE SRSASN_CODE ph_info_scg_s::pack(bit_ref& bref) const { @@ -51723,6 +55631,139 @@ void ph_info_scg_s::to_json(json_writer& j) const j.end_obj(); } +// CG-Config-v1560-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1560_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pscell_freq_eutra_present, 1)); + HANDLE_CODE(bref.pack(scg_cell_group_cfg_eutra_present, 1)); + HANDLE_CODE(bref.pack(candidate_cell_info_list_sn_eutra_present, 1)); + HANDLE_CODE(bref.pack(candidate_serving_freq_list_eutra_present, 1)); + HANDLE_CODE(bref.pack(need_for_gaps_present, 1)); + HANDLE_CODE(bref.pack(drx_cfg_scg_present, 1)); + HANDLE_CODE(bref.pack(report_cgi_request_eutra_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (pscell_freq_eutra_present) { + HANDLE_CODE(pack_integer(bref, pscell_freq_eutra, (uint32_t)0u, (uint32_t)262143u)); + } + if (scg_cell_group_cfg_eutra_present) { + HANDLE_CODE(scg_cell_group_cfg_eutra.pack(bref)); + } + if (candidate_cell_info_list_sn_eutra_present) { + HANDLE_CODE(candidate_cell_info_list_sn_eutra.pack(bref)); + } + if (candidate_serving_freq_list_eutra_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_serving_freq_list_eutra, 1, 32, integer_packer(0, 262143))); + } + if (drx_cfg_scg_present) { + HANDLE_CODE(drx_cfg_scg.pack(bref)); + } + if (report_cgi_request_eutra_present) { + HANDLE_CODE(bref.pack(report_cgi_request_eutra.requested_cell_info_eutra_present, 1)); + if (report_cgi_request_eutra.requested_cell_info_eutra_present) { + HANDLE_CODE(pack_integer( + bref, report_cgi_request_eutra.requested_cell_info_eutra.eutra_freq, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(pack_integer(bref, + report_cgi_request_eutra.requested_cell_info_eutra.cell_for_which_to_report_cgi_eutra, + (uint16_t)0u, + (uint16_t)503u)); + } + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_v1560_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pscell_freq_eutra_present, 1)); + HANDLE_CODE(bref.unpack(scg_cell_group_cfg_eutra_present, 1)); + HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_eutra_present, 1)); + HANDLE_CODE(bref.unpack(candidate_serving_freq_list_eutra_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gaps_present, 1)); + HANDLE_CODE(bref.unpack(drx_cfg_scg_present, 1)); + HANDLE_CODE(bref.unpack(report_cgi_request_eutra_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (pscell_freq_eutra_present) { + HANDLE_CODE(unpack_integer(pscell_freq_eutra, bref, (uint32_t)0u, (uint32_t)262143u)); + } + if (scg_cell_group_cfg_eutra_present) { + HANDLE_CODE(scg_cell_group_cfg_eutra.unpack(bref)); + } + if (candidate_cell_info_list_sn_eutra_present) { + HANDLE_CODE(candidate_cell_info_list_sn_eutra.unpack(bref)); + } + if (candidate_serving_freq_list_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(candidate_serving_freq_list_eutra, bref, 1, 32, integer_packer(0, 262143))); + } + if (drx_cfg_scg_present) { + HANDLE_CODE(drx_cfg_scg.unpack(bref)); + } + if (report_cgi_request_eutra_present) { + HANDLE_CODE(bref.unpack(report_cgi_request_eutra.requested_cell_info_eutra_present, 1)); + if (report_cgi_request_eutra.requested_cell_info_eutra_present) { + HANDLE_CODE(unpack_integer( + report_cgi_request_eutra.requested_cell_info_eutra.eutra_freq, bref, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(unpack_integer(report_cgi_request_eutra.requested_cell_info_eutra.cell_for_which_to_report_cgi_eutra, + bref, + (uint16_t)0u, + (uint16_t)503u)); + } + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_v1560_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pscell_freq_eutra_present) { + j.write_int("pSCellFrequencyEUTRA", pscell_freq_eutra); + } + if (scg_cell_group_cfg_eutra_present) { + j.write_str("scg-CellGroupConfigEUTRA", scg_cell_group_cfg_eutra.to_string()); + } + if (candidate_cell_info_list_sn_eutra_present) { + j.write_str("candidateCellInfoListSN-EUTRA", candidate_cell_info_list_sn_eutra.to_string()); + } + if (candidate_serving_freq_list_eutra_present) { + j.start_array("candidateServingFreqListEUTRA"); + for (const auto& e1 : candidate_serving_freq_list_eutra) { + j.write_int(e1); + } + j.end_array(); + } + if (need_for_gaps_present) { + j.write_str("needForGaps", "true"); + } + if (drx_cfg_scg_present) { + j.write_fieldname("drx-ConfigSCG"); + drx_cfg_scg.to_json(j); + } + if (report_cgi_request_eutra_present) { + j.write_fieldname("reportCGI-RequestEUTRA"); + j.start_obj(); + if (report_cgi_request_eutra.requested_cell_info_eutra_present) { + j.write_fieldname("requestedCellInfoEUTRA"); + j.start_obj(); + j.write_int("eutraFrequency", report_cgi_request_eutra.requested_cell_info_eutra.eutra_freq); + j.write_int("cellForWhichToReportCGI-EUTRA", + report_cgi_request_eutra.requested_cell_info_eutra.cell_for_which_to_report_cgi_eutra); + j.end_obj(); + } + j.end_obj(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + // FR-Info ::= SEQUENCE SRSASN_CODE fr_info_s::pack(bit_ref& bref) const { @@ -51793,50 +55834,56 @@ void nr_freq_info_s::to_json(json_writer& j) const SRSASN_CODE cg_cfg_v1540_ies_s::pack(bit_ref& bref) const { HANDLE_CODE(bref.pack(pscell_freq_present, 1)); - HANDLE_CODE(bref.pack(report_cgi_request_present, 1)); + HANDLE_CODE(bref.pack(report_cgi_request_nr_present, 1)); HANDLE_CODE(bref.pack(ph_info_scg_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); if (pscell_freq_present) { HANDLE_CODE(pack_integer(bref, pscell_freq, (uint32_t)0u, (uint32_t)3279165u)); } - if (report_cgi_request_present) { - HANDLE_CODE(bref.pack(report_cgi_request.requested_cell_info_present, 1)); - if (report_cgi_request.requested_cell_info_present) { + if (report_cgi_request_nr_present) { + HANDLE_CODE(bref.pack(report_cgi_request_nr.requested_cell_info_present, 1)); + if (report_cgi_request_nr.requested_cell_info_present) { HANDLE_CODE( - pack_integer(bref, report_cgi_request.requested_cell_info.ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); + pack_integer(bref, report_cgi_request_nr.requested_cell_info.ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); HANDLE_CODE(pack_integer( - bref, report_cgi_request.requested_cell_info.cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)1007u)); + bref, report_cgi_request_nr.requested_cell_info.cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)1007u)); } } if (ph_info_scg_present) { HANDLE_CODE(pack_dyn_seq_of(bref, ph_info_scg, 1, 32)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } SRSASN_CODE cg_cfg_v1540_ies_s::unpack(cbit_ref& bref) { HANDLE_CODE(bref.unpack(pscell_freq_present, 1)); - HANDLE_CODE(bref.unpack(report_cgi_request_present, 1)); + HANDLE_CODE(bref.unpack(report_cgi_request_nr_present, 1)); HANDLE_CODE(bref.unpack(ph_info_scg_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); if (pscell_freq_present) { HANDLE_CODE(unpack_integer(pscell_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); } - if (report_cgi_request_present) { - HANDLE_CODE(bref.unpack(report_cgi_request.requested_cell_info_present, 1)); - if (report_cgi_request.requested_cell_info_present) { + if (report_cgi_request_nr_present) { + HANDLE_CODE(bref.unpack(report_cgi_request_nr.requested_cell_info_present, 1)); + if (report_cgi_request_nr.requested_cell_info_present) { HANDLE_CODE( - unpack_integer(report_cgi_request.requested_cell_info.ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + unpack_integer(report_cgi_request_nr.requested_cell_info.ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); HANDLE_CODE(unpack_integer( - report_cgi_request.requested_cell_info.cell_for_which_to_report_cgi, bref, (uint16_t)0u, (uint16_t)1007u)); + report_cgi_request_nr.requested_cell_info.cell_for_which_to_report_cgi, bref, (uint16_t)0u, (uint16_t)1007u)); } } if (ph_info_scg_present) { HANDLE_CODE(unpack_dyn_seq_of(ph_info_scg, bref, 1, 32)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -51846,14 +55893,14 @@ void cg_cfg_v1540_ies_s::to_json(json_writer& j) const if (pscell_freq_present) { j.write_int("pSCellFrequency", pscell_freq); } - if (report_cgi_request_present) { - j.write_fieldname("reportCGI-Request"); + if (report_cgi_request_nr_present) { + j.write_fieldname("reportCGI-RequestNR"); j.start_obj(); - if (report_cgi_request.requested_cell_info_present) { + if (report_cgi_request_nr.requested_cell_info_present) { j.write_fieldname("requestedCellInfo"); j.start_obj(); - j.write_int("ssbFrequency", report_cgi_request.requested_cell_info.ssb_freq); - j.write_int("cellForWhichToReportCGI", report_cgi_request.requested_cell_info.cell_for_which_to_report_cgi); + j.write_int("ssbFrequency", report_cgi_request_nr.requested_cell_info.ssb_freq); + j.write_int("cellForWhichToReportCGI", report_cgi_request_nr.requested_cell_info.cell_for_which_to_report_cgi); j.end_obj(); } j.end_obj(); @@ -51867,8 +55914,7 @@ void cg_cfg_v1540_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -51887,6 +55933,25 @@ SRSASN_CODE cfg_restrict_mod_req_scg_s::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, requested_p_max_fr1, (int8_t)-30, (int8_t)33)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= requested_pdcch_blind_detection_scg_present; + group_flags[0] |= requested_p_max_eutra_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(requested_pdcch_blind_detection_scg_present, 1)); + HANDLE_CODE(bref.pack(requested_p_max_eutra_present, 1)); + if (requested_pdcch_blind_detection_scg_present) { + HANDLE_CODE(pack_integer(bref, requested_pdcch_blind_detection_scg, (uint8_t)1u, (uint8_t)15u)); + } + if (requested_p_max_eutra_present) { + HANDLE_CODE(pack_integer(bref, requested_p_max_eutra, (int8_t)-30, (int8_t)33)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE cfg_restrict_mod_req_scg_s::unpack(cbit_ref& bref) @@ -51902,6 +55967,23 @@ SRSASN_CODE cfg_restrict_mod_req_scg_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(requested_p_max_fr1, bref, (int8_t)-30, (int8_t)33)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(requested_pdcch_blind_detection_scg_present, 1)); + HANDLE_CODE(bref.unpack(requested_p_max_eutra_present, 1)); + if (requested_pdcch_blind_detection_scg_present) { + HANDLE_CODE(unpack_integer(requested_pdcch_blind_detection_scg, bref, (uint8_t)1u, (uint8_t)15u)); + } + if (requested_p_max_eutra_present) { + HANDLE_CODE(unpack_integer(requested_p_max_eutra, bref, (int8_t)-30, (int8_t)33)); + } + } + } return SRSASN_SUCCESS; } void cfg_restrict_mod_req_scg_s::to_json(json_writer& j) const @@ -51914,6 +55996,14 @@ void cfg_restrict_mod_req_scg_s::to_json(json_writer& j) const if (requested_p_max_fr1_present) { j.write_int("requestedP-MaxFR1", requested_p_max_fr1); } + if (ext) { + if (requested_pdcch_blind_detection_scg_present) { + j.write_int("requestedPDCCH-BlindDetectionSCG", requested_pdcch_blind_detection_scg); + } + if (requested_p_max_eutra_present) { + j.write_int("requestedP-MaxEUTRA", requested_p_max_eutra); + } + } j.end_obj(); } @@ -52034,8 +56124,8 @@ drx_info_s::drx_long_cycle_start_offset_c_::drx_long_cycle_start_offset_c_( log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); } } -drx_info_s::drx_long_cycle_start_offset_c_& drx_info_s::drx_long_cycle_start_offset_c_:: - operator=(const drx_info_s::drx_long_cycle_start_offset_c_& other) +drx_info_s::drx_long_cycle_start_offset_c_& +drx_info_s::drx_long_cycle_start_offset_c_::operator=(const drx_info_s::drx_long_cycle_start_offset_c_& other) { if (this == &other) { return *this; @@ -52396,7 +56486,7 @@ SRSASN_CODE cg_cfg_ies_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(drx_info_scg_present, 1)); HANDLE_CODE(bref.pack(candidate_cell_info_list_sn_present, 1)); HANDLE_CODE(bref.pack(meas_cfg_sn_present, 1)); - HANDLE_CODE(bref.pack(sel_band_combination_nr_present, 1)); + HANDLE_CODE(bref.pack(sel_band_combination_present, 1)); HANDLE_CODE(bref.pack(fr_info_list_scg_present, 1)); HANDLE_CODE(bref.pack(candidate_serving_freq_list_nr_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); @@ -52419,8 +56509,8 @@ SRSASN_CODE cg_cfg_ies_s::pack(bit_ref& bref) const if (meas_cfg_sn_present) { HANDLE_CODE(meas_cfg_sn.pack(bref)); } - if (sel_band_combination_nr_present) { - HANDLE_CODE(sel_band_combination_nr.pack(bref)); + if (sel_band_combination_present) { + HANDLE_CODE(sel_band_combination.pack(bref)); } if (fr_info_list_scg_present) { HANDLE_CODE(pack_dyn_seq_of(bref, fr_info_list_scg, 1, 31)); @@ -52442,7 +56532,7 @@ SRSASN_CODE cg_cfg_ies_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(drx_info_scg_present, 1)); HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_present, 1)); HANDLE_CODE(bref.unpack(meas_cfg_sn_present, 1)); - HANDLE_CODE(bref.unpack(sel_band_combination_nr_present, 1)); + HANDLE_CODE(bref.unpack(sel_band_combination_present, 1)); HANDLE_CODE(bref.unpack(fr_info_list_scg_present, 1)); HANDLE_CODE(bref.unpack(candidate_serving_freq_list_nr_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); @@ -52465,8 +56555,8 @@ SRSASN_CODE cg_cfg_ies_s::unpack(cbit_ref& bref) if (meas_cfg_sn_present) { HANDLE_CODE(meas_cfg_sn.unpack(bref)); } - if (sel_band_combination_nr_present) { - HANDLE_CODE(sel_band_combination_nr.unpack(bref)); + if (sel_band_combination_present) { + HANDLE_CODE(sel_band_combination.unpack(bref)); } if (fr_info_list_scg_present) { HANDLE_CODE(unpack_dyn_seq_of(fr_info_list_scg, bref, 1, 31)); @@ -52504,9 +56594,9 @@ void cg_cfg_ies_s::to_json(json_writer& j) const j.write_fieldname("measConfigSN"); meas_cfg_sn.to_json(j); } - if (sel_band_combination_nr_present) { - j.write_fieldname("selectedBandCombinationNR"); - sel_band_combination_nr.to_json(j); + if (sel_band_combination_present) { + j.write_fieldname("selectedBandCombination"); + sel_band_combination.to_json(j); } if (fr_info_list_scg_present) { j.start_array("fr-InfoListSCG"); @@ -52740,6 +56830,47 @@ uint8_t cg_cfg_s::crit_exts_c_::types_opts::to_number() const return map_enum_number(options, 1, value, "cg_cfg_s::crit_exts_c_::types"); } +// CG-ConfigInfo-v1590-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(serv_frequencies_mn_nr_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (serv_frequencies_mn_nr_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, serv_frequencies_mn_nr, 1, 31, integer_packer(0, 3279165))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1590_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(serv_frequencies_mn_nr_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (serv_frequencies_mn_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(serv_frequencies_mn_nr, bref, 1, 31, integer_packer(0, 3279165))); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (serv_frequencies_mn_nr_present) { + j.start_array("servFrequenciesMN-NR"); + for (const auto& e1 : serv_frequencies_mn_nr) { + j.write_int(e1); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // PH-UplinkCarrierMCG ::= SEQUENCE SRSASN_CODE ph_ul_carrier_mcg_s::pack(bit_ref& bref) const { @@ -52773,6 +56904,67 @@ uint8_t ph_ul_carrier_mcg_s::ph_type1or3_opts::to_number() const return map_enum_number(options, 2, value, "ph_ul_carrier_mcg_s::ph_type1or3_e_"); } +// CG-ConfigInfo-v1570-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_v1570_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sftd_freq_list_nr_present, 1)); + HANDLE_CODE(bref.pack(sftd_freq_list_eutra_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sftd_freq_list_nr_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sftd_freq_list_nr, 1, 3, integer_packer(0, 3279165))); + } + if (sftd_freq_list_eutra_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sftd_freq_list_eutra, 1, 3, integer_packer(0, 262143))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1570_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sftd_freq_list_nr_present, 1)); + HANDLE_CODE(bref.unpack(sftd_freq_list_eutra_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sftd_freq_list_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(sftd_freq_list_nr, bref, 1, 3, integer_packer(0, 3279165))); + } + if (sftd_freq_list_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(sftd_freq_list_eutra, bref, 1, 3, integer_packer(0, 262143))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1570_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sftd_freq_list_nr_present) { + j.start_array("sftdFrequencyList-NR"); + for (const auto& e1 : sftd_freq_list_nr) { + j.write_int(e1); + } + j.end_array(); + } + if (sftd_freq_list_eutra_present) { + j.start_array("sftdFrequencyList-EUTRA"); + for (const auto& e1 : sftd_freq_list_eutra) { + j.write_int(e1); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + // PH-InfoMCG ::= SEQUENCE SRSASN_CODE ph_info_mcg_s::pack(bit_ref& bref) const { @@ -52813,6 +57005,163 @@ void ph_info_mcg_s::to_json(json_writer& j) const j.end_obj(); } +// CG-ConfigInfo-v1560-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_v1560_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(candidate_cell_info_list_mn_eutra_present, 1)); + HANDLE_CODE(bref.pack(candidate_cell_info_list_sn_eutra_present, 1)); + HANDLE_CODE(bref.pack(source_cfg_scg_eutra_present, 1)); + HANDLE_CODE(bref.pack(scg_fail_info_eutra_present, 1)); + HANDLE_CODE(bref.pack(drx_cfg_mcg_present, 1)); + HANDLE_CODE(bref.pack(meas_result_report_cgi_eutra_present, 1)); + HANDLE_CODE(bref.pack(meas_result_cell_list_sftd_eutra_present, 1)); + HANDLE_CODE(bref.pack(fr_info_list_mcg_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (candidate_cell_info_list_mn_eutra_present) { + HANDLE_CODE(candidate_cell_info_list_mn_eutra.pack(bref)); + } + if (candidate_cell_info_list_sn_eutra_present) { + HANDLE_CODE(candidate_cell_info_list_sn_eutra.pack(bref)); + } + if (source_cfg_scg_eutra_present) { + HANDLE_CODE(source_cfg_scg_eutra.pack(bref)); + } + if (scg_fail_info_eutra_present) { + HANDLE_CODE(scg_fail_info_eutra.fail_type_eutra.pack(bref)); + HANDLE_CODE(scg_fail_info_eutra.meas_result_scg_eutra.pack(bref)); + } + if (drx_cfg_mcg_present) { + HANDLE_CODE(drx_cfg_mcg.pack(bref)); + } + if (meas_result_report_cgi_eutra_present) { + HANDLE_CODE(pack_integer(bref, meas_result_report_cgi_eutra.eutra_freq, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(pack_integer( + bref, meas_result_report_cgi_eutra.cell_for_which_to_report_cgi_eutra, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(meas_result_report_cgi_eutra.cgi_info_eutra.pack(bref)); + } + if (meas_result_cell_list_sftd_eutra_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_cell_list_sftd_eutra, 1, 3)); + } + if (fr_info_list_mcg_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, fr_info_list_mcg, 1, 31)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1560_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(candidate_cell_info_list_mn_eutra_present, 1)); + HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_eutra_present, 1)); + HANDLE_CODE(bref.unpack(source_cfg_scg_eutra_present, 1)); + HANDLE_CODE(bref.unpack(scg_fail_info_eutra_present, 1)); + HANDLE_CODE(bref.unpack(drx_cfg_mcg_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_report_cgi_eutra_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_cell_list_sftd_eutra_present, 1)); + HANDLE_CODE(bref.unpack(fr_info_list_mcg_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (candidate_cell_info_list_mn_eutra_present) { + HANDLE_CODE(candidate_cell_info_list_mn_eutra.unpack(bref)); + } + if (candidate_cell_info_list_sn_eutra_present) { + HANDLE_CODE(candidate_cell_info_list_sn_eutra.unpack(bref)); + } + if (source_cfg_scg_eutra_present) { + HANDLE_CODE(source_cfg_scg_eutra.unpack(bref)); + } + if (scg_fail_info_eutra_present) { + HANDLE_CODE(scg_fail_info_eutra.fail_type_eutra.unpack(bref)); + HANDLE_CODE(scg_fail_info_eutra.meas_result_scg_eutra.unpack(bref)); + } + if (drx_cfg_mcg_present) { + HANDLE_CODE(drx_cfg_mcg.unpack(bref)); + } + if (meas_result_report_cgi_eutra_present) { + HANDLE_CODE(unpack_integer(meas_result_report_cgi_eutra.eutra_freq, bref, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(unpack_integer( + meas_result_report_cgi_eutra.cell_for_which_to_report_cgi_eutra, bref, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(meas_result_report_cgi_eutra.cgi_info_eutra.unpack(bref)); + } + if (meas_result_cell_list_sftd_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_cell_list_sftd_eutra, bref, 1, 3)); + } + if (fr_info_list_mcg_present) { + HANDLE_CODE(unpack_dyn_seq_of(fr_info_list_mcg, bref, 1, 31)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1560_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (candidate_cell_info_list_mn_eutra_present) { + j.write_str("candidateCellInfoListMN-EUTRA", candidate_cell_info_list_mn_eutra.to_string()); + } + if (candidate_cell_info_list_sn_eutra_present) { + j.write_str("candidateCellInfoListSN-EUTRA", candidate_cell_info_list_sn_eutra.to_string()); + } + if (source_cfg_scg_eutra_present) { + j.write_str("sourceConfigSCG-EUTRA", source_cfg_scg_eutra.to_string()); + } + if (scg_fail_info_eutra_present) { + j.write_fieldname("scgFailureInfoEUTRA"); + j.start_obj(); + j.write_str("failureTypeEUTRA", scg_fail_info_eutra.fail_type_eutra.to_string()); + j.write_str("measResultSCG-EUTRA", scg_fail_info_eutra.meas_result_scg_eutra.to_string()); + j.end_obj(); + } + if (drx_cfg_mcg_present) { + j.write_fieldname("drx-ConfigMCG"); + drx_cfg_mcg.to_json(j); + } + if (meas_result_report_cgi_eutra_present) { + j.write_fieldname("measResultReportCGI-EUTRA"); + j.start_obj(); + j.write_int("eutraFrequency", meas_result_report_cgi_eutra.eutra_freq); + j.write_int("cellForWhichToReportCGI-EUTRA", meas_result_report_cgi_eutra.cell_for_which_to_report_cgi_eutra); + j.write_fieldname("cgi-InfoEUTRA"); + meas_result_report_cgi_eutra.cgi_info_eutra.to_json(j); + j.end_obj(); + } + if (meas_result_cell_list_sftd_eutra_present) { + j.start_array("measResultCellListSFTD-EUTRA"); + for (const auto& e1 : meas_result_cell_list_sftd_eutra) { + e1.to_json(j); + } + j.end_array(); + } + if (fr_info_list_mcg_present) { + j.start_array("fr-InfoListMCG"); + for (const auto& e1 : fr_info_list_mcg) { + e1.to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +std::string cg_cfg_info_v1560_ies_s::scg_fail_info_eutra_s_::fail_type_eutra_opts::to_string() const +{ + static const char* options[] = {"t313-Expiry", "randomAccessProblem", "rlc-MaxNumRetx", "scg-ChangeFailure"}; + return convert_enum_idx(options, 4, value, "cg_cfg_info_v1560_ies_s::scg_fail_info_eutra_s_::fail_type_eutra_e_"); +} +uint16_t cg_cfg_info_v1560_ies_s::scg_fail_info_eutra_s_::fail_type_eutra_opts::to_number() const +{ + static const uint16_t options[] = {313}; + return map_enum_number(options, 1, value, "cg_cfg_info_v1560_ies_s::scg_fail_info_eutra_s_::fail_type_eutra_e_"); +} + // CG-ConfigInfo-v1540-IEs ::= SEQUENCE SRSASN_CODE cg_cfg_info_v1540_ies_s::pack(bit_ref& bref) const { @@ -52828,6 +57177,9 @@ SRSASN_CODE cg_cfg_info_v1540_ies_s::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, meas_result_report_cgi.cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)1007u)); HANDLE_CODE(meas_result_report_cgi.cgi_info.pack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } @@ -52846,6 +57198,9 @@ SRSASN_CODE cg_cfg_info_v1540_ies_s::unpack(cbit_ref& bref) unpack_integer(meas_result_report_cgi.cell_for_which_to_report_cgi, bref, (uint16_t)0u, (uint16_t)1007u)); HANDLE_CODE(meas_result_report_cgi.cgi_info.unpack(bref)); } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } @@ -52870,8 +57225,7 @@ void cg_cfg_info_v1540_ies_s::to_json(json_writer& j) const } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + non_crit_ext.to_json(j); } j.end_obj(); } @@ -52920,6 +57274,20 @@ SRSASN_CODE meas_cfg_mn_s::pack(bit_ref& bref) const HANDLE_CODE(gap_purpose.pack(bref)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= meas_gap_cfg_fr2.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(meas_gap_cfg_fr2.is_present(), 1)); + if (meas_gap_cfg_fr2.is_present()) { + HANDLE_CODE(meas_gap_cfg_fr2->pack(bref)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE meas_cfg_mn_s::unpack(cbit_ref& bref) @@ -52939,6 +57307,21 @@ SRSASN_CODE meas_cfg_mn_s::unpack(cbit_ref& bref) HANDLE_CODE(gap_purpose.unpack(bref)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool meas_gap_cfg_fr2_present; + HANDLE_CODE(bref.unpack(meas_gap_cfg_fr2_present, 1)); + meas_gap_cfg_fr2.set_present(meas_gap_cfg_fr2_present); + if (meas_gap_cfg_fr2.is_present()) { + HANDLE_CODE(meas_gap_cfg_fr2->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } void meas_cfg_mn_s::to_json(json_writer& j) const @@ -52958,6 +57341,12 @@ void meas_cfg_mn_s::to_json(json_writer& j) const if (gap_purpose_present) { j.write_str("gapPurpose", gap_purpose.to_string()); } + if (ext) { + if (meas_gap_cfg_fr2.is_present()) { + j.write_fieldname("measGapConfigFR2"); + meas_gap_cfg_fr2->to_json(j); + } + } j.end_obj(); } @@ -52981,7 +57370,7 @@ SRSASN_CODE cg_cfg_info_ies_s::pack(bit_ref& bref) const HANDLE_CODE(bref.pack(ue_cap_info_present, 1)); HANDLE_CODE(bref.pack(candidate_cell_info_list_mn_present, 1)); HANDLE_CODE(bref.pack(candidate_cell_info_list_sn_present, 1)); - HANDLE_CODE(bref.pack(meas_result_cell_list_sftd_present, 1)); + HANDLE_CODE(bref.pack(meas_result_cell_list_sftd_nr_present, 1)); HANDLE_CODE(bref.pack(scg_fail_info_present, 1)); HANDLE_CODE(bref.pack(cfg_restrict_info_present, 1)); HANDLE_CODE(bref.pack(drx_info_mcg_present, 1)); @@ -53001,8 +57390,8 @@ SRSASN_CODE cg_cfg_info_ies_s::pack(bit_ref& bref) const if (candidate_cell_info_list_sn_present) { HANDLE_CODE(candidate_cell_info_list_sn.pack(bref)); } - if (meas_result_cell_list_sftd_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_cell_list_sftd, 1, 3)); + if (meas_result_cell_list_sftd_nr_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_cell_list_sftd_nr, 1, 3)); } if (scg_fail_info_present) { HANDLE_CODE(scg_fail_info.fail_type.pack(bref)); @@ -53040,7 +57429,7 @@ SRSASN_CODE cg_cfg_info_ies_s::unpack(cbit_ref& bref) HANDLE_CODE(bref.unpack(ue_cap_info_present, 1)); HANDLE_CODE(bref.unpack(candidate_cell_info_list_mn_present, 1)); HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_cell_list_sftd_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_cell_list_sftd_nr_present, 1)); HANDLE_CODE(bref.unpack(scg_fail_info_present, 1)); HANDLE_CODE(bref.unpack(cfg_restrict_info_present, 1)); HANDLE_CODE(bref.unpack(drx_info_mcg_present, 1)); @@ -53060,8 +57449,8 @@ SRSASN_CODE cg_cfg_info_ies_s::unpack(cbit_ref& bref) if (candidate_cell_info_list_sn_present) { HANDLE_CODE(candidate_cell_info_list_sn.unpack(bref)); } - if (meas_result_cell_list_sftd_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_cell_list_sftd, bref, 1, 3)); + if (meas_result_cell_list_sftd_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_cell_list_sftd_nr, bref, 1, 3)); } if (scg_fail_info_present) { HANDLE_CODE(scg_fail_info.fail_type.unpack(bref)); @@ -53110,9 +57499,9 @@ void cg_cfg_info_ies_s::to_json(json_writer& j) const if (candidate_cell_info_list_sn_present) { j.write_str("candidateCellInfoListSN", candidate_cell_info_list_sn.to_string()); } - if (meas_result_cell_list_sftd_present) { - j.start_array("measResultCellListSFTD"); - for (const auto& e1 : meas_result_cell_list_sftd) { + if (meas_result_cell_list_sftd_nr_present) { + j.start_array("measResultCellListSFTD-NR"); + for (const auto& e1 : meas_result_cell_list_sftd_nr) { e1.to_json(j); } j.end_array(); @@ -53743,6 +58132,20 @@ SRSASN_CODE rrm_cfg_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_info_list, 1, 8)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= candidate_cell_info_list_sn_eutra.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(candidate_cell_info_list_sn_eutra.is_present(), 1)); + if (candidate_cell_info_list_sn_eutra.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *candidate_cell_info_list_sn_eutra, 1, 32)); + } + } + } return SRSASN_SUCCESS; } SRSASN_CODE rrm_cfg_s::unpack(cbit_ref& bref) @@ -53758,6 +58161,21 @@ SRSASN_CODE rrm_cfg_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_info_list, bref, 1, 8)); } + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool candidate_cell_info_list_sn_eutra_present; + HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_eutra_present, 1)); + candidate_cell_info_list_sn_eutra.set_present(candidate_cell_info_list_sn_eutra_present); + if (candidate_cell_info_list_sn_eutra.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*candidate_cell_info_list_sn_eutra, bref, 1, 32)); + } + } + } return SRSASN_SUCCESS; } void rrm_cfg_s::to_json(json_writer& j) const @@ -53773,6 +58191,15 @@ void rrm_cfg_s::to_json(json_writer& j) const } j.end_array(); } + if (ext) { + if (candidate_cell_info_list_sn_eutra.is_present()) { + j.start_array("candidateCellInfoListSN-EUTRA"); + for (const auto& e1 : *candidate_cell_info_list_sn_eutra) { + e1.to_json(j); + } + j.end_array(); + } + } j.end_obj(); } @@ -54087,17 +58514,17 @@ SRSASN_CODE meas_timing_s::pack(bit_ref& bref) const if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= ssb_to_measure_v1540.is_present(); + group_flags[0] |= ssb_to_measure.is_present(); group_flags[0] |= pci_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(ssb_to_measure_v1540.is_present(), 1)); + HANDLE_CODE(bref.pack(ssb_to_measure.is_present(), 1)); HANDLE_CODE(bref.pack(pci_present, 1)); - if (ssb_to_measure_v1540.is_present()) { - HANDLE_CODE(ssb_to_measure_v1540->pack(bref)); + if (ssb_to_measure.is_present()) { + HANDLE_CODE(ssb_to_measure->pack(bref)); } if (pci_present) { HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); @@ -54128,12 +58555,12 @@ SRSASN_CODE meas_timing_s::unpack(cbit_ref& bref) if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - bool ssb_to_measure_v1540_present; - HANDLE_CODE(bref.unpack(ssb_to_measure_v1540_present, 1)); - ssb_to_measure_v1540.set_present(ssb_to_measure_v1540_present); + bool ssb_to_measure_present; + HANDLE_CODE(bref.unpack(ssb_to_measure_present, 1)); + ssb_to_measure.set_present(ssb_to_measure_present); HANDLE_CODE(bref.unpack(pci_present, 1)); - if (ssb_to_measure_v1540.is_present()) { - HANDLE_CODE(ssb_to_measure_v1540->unpack(bref)); + if (ssb_to_measure.is_present()) { + HANDLE_CODE(ssb_to_measure->unpack(bref)); } if (pci_present) { HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); @@ -54159,9 +58586,9 @@ void meas_timing_s::to_json(json_writer& j) const j.end_obj(); } if (ext) { - if (ssb_to_measure_v1540.is_present()) { - j.write_fieldname("ssb-ToMeasure-v1540"); - ssb_to_measure_v1540->to_json(j); + if (ssb_to_measure.is_present()) { + j.write_fieldname("ssb-ToMeasure"); + ssb_to_measure->to_json(j); } if (pci_present) { j.write_int("physCellId", pci); @@ -54310,8 +58737,8 @@ meas_timing_cfg_s::crit_exts_c_::crit_exts_c_(const meas_timing_cfg_s::crit_exts log_invalid_choice_id(type_, "meas_timing_cfg_s::crit_exts_c_"); } } -meas_timing_cfg_s::crit_exts_c_& meas_timing_cfg_s::crit_exts_c_:: - operator=(const meas_timing_cfg_s::crit_exts_c_& other) +meas_timing_cfg_s::crit_exts_c_& +meas_timing_cfg_s::crit_exts_c_::operator=(const meas_timing_cfg_s::crit_exts_c_& other) { if (this == &other) { return *this; @@ -54551,8 +58978,8 @@ ue_radio_access_cap_info_s::crit_exts_c_::crit_exts_c_(const ue_radio_access_cap log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_"); } } -ue_radio_access_cap_info_s::crit_exts_c_& ue_radio_access_cap_info_s::crit_exts_c_:: - operator=(const ue_radio_access_cap_info_s::crit_exts_c_& other) +ue_radio_access_cap_info_s::crit_exts_c_& +ue_radio_access_cap_info_s::crit_exts_c_::operator=(const ue_radio_access_cap_info_s::crit_exts_c_& other) { if (this == &other) { return *this; @@ -54829,8 +59256,8 @@ ue_radio_paging_info_s::crit_exts_c_::crit_exts_c_(const ue_radio_paging_info_s: log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_"); } } -ue_radio_paging_info_s::crit_exts_c_& ue_radio_paging_info_s::crit_exts_c_:: - operator=(const ue_radio_paging_info_s::crit_exts_c_& other) +ue_radio_paging_info_s::crit_exts_c_& +ue_radio_paging_info_s::crit_exts_c_::operator=(const ue_radio_paging_info_s::crit_exts_c_& other) { if (this == &other) { return *this; @@ -55114,8 +59541,8 @@ var_meas_cfg_s::s_measure_cfg_c_::s_measure_cfg_c_(const var_meas_cfg_s::s_measu log_invalid_choice_id(type_, "var_meas_cfg_s::s_measure_cfg_c_"); } } -var_meas_cfg_s::s_measure_cfg_c_& var_meas_cfg_s::s_measure_cfg_c_:: - operator=(const var_meas_cfg_s::s_measure_cfg_c_& other) +var_meas_cfg_s::s_measure_cfg_c_& +var_meas_cfg_s::s_measure_cfg_c_::operator=(const var_meas_cfg_s::s_measure_cfg_c_& other) { if (this == &other) { return *this; diff --git a/lib/test/asn1/CMakeLists.txt b/lib/test/asn1/CMakeLists.txt index a0d30ca64..ca33b7377 100644 --- a/lib/test/asn1/CMakeLists.txt +++ b/lib/test/asn1/CMakeLists.txt @@ -47,6 +47,10 @@ target_link_libraries(rrc_asn1_test rrc_asn1 asn1_utils srslte_common) add_test(rrc_asn1_test rrc_asn1_test) if (ENABLE_5GNR) + add_executable(rrc_nr_asn1_test rrc_nr_test.cc) + target_link_libraries(rrc_nr_asn1_test rrc_nr_asn1 asn1_utils srslte_common) + add_test(rrc_nr_asn1_test rrc_nr_asn1_test) + add_executable(ngap_asn1_test ngap_test.cc) target_link_libraries(ngap_asn1_test ngap_nr_asn1 srslte_common) add_test(ngap_asn1_test ngap_asn1_test) diff --git a/lib/test/asn1/rrc_nr_test.cc b/lib/test/asn1/rrc_nr_test.cc new file mode 100644 index 000000000..c29559905 --- /dev/null +++ b/lib/test/asn1/rrc_nr_test.cc @@ -0,0 +1,154 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2020 Software Radio Systems Limited + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the distribution. + * + */ + +#include "srslte/asn1/rrc_nr.h" +#include "srslte/common/test_common.h" +#include + +using namespace asn1; +using namespace asn1::rrc_nr; + +int test_eutra_nr_capabilities() +{ + struct ue_mrdc_cap_s mrdc_cap; + band_combination_s band_combination; + struct band_params_c band_param_eutra; + band_param_eutra.set_eutra(); + band_param_eutra.eutra().ca_bw_class_dl_eutra_present = true; + band_param_eutra.eutra().ca_bw_class_ul_eutra_present = true; + band_param_eutra.eutra().band_eutra = 1; + band_param_eutra.eutra().ca_bw_class_dl_eutra = asn1::rrc_nr::ca_bw_class_eutra_opts::options::a; + band_param_eutra.eutra().ca_bw_class_ul_eutra = asn1::rrc_nr::ca_bw_class_eutra_opts::options::a; + band_combination.band_list.push_back(band_param_eutra); + struct band_params_c band_param_nr; + band_param_nr.set_nr(); + band_param_nr.nr().ca_bw_class_dl_nr_present = true; + band_param_nr.nr().ca_bw_class_ul_nr_present = true; + band_param_nr.nr().band_nr = 78; + band_param_nr.nr().ca_bw_class_dl_nr = asn1::rrc_nr::ca_bw_class_nr_opts::options::a; + band_param_nr.nr().ca_bw_class_ul_nr = asn1::rrc_nr::ca_bw_class_nr_opts::options::a; + band_combination.band_list.push_back(band_param_nr); + + mrdc_cap.rf_params_mrdc.supported_band_combination_list.push_back(band_combination); + mrdc_cap.rf_params_mrdc.supported_band_combination_list_present = true; + + mrdc_cap.rf_params_mrdc.ext = true; + + // RF Params MRDC applied_freq_band_list_filt + freq_band_info_c band_info_eutra; + band_info_eutra.set_band_info_eutra(); + band_info_eutra.band_info_eutra().ca_bw_class_dl_eutra_present = false; + band_info_eutra.band_info_eutra().ca_bw_class_ul_eutra_present = false; + band_info_eutra.band_info_eutra().band_eutra = 1; + mrdc_cap.rf_params_mrdc.applied_freq_band_list_filt.push_back(band_info_eutra); + + freq_band_info_c band_info_nr; + band_info_nr.set_band_info_nr(); + band_info_nr.band_info_nr().band_nr = 78; + mrdc_cap.rf_params_mrdc.applied_freq_band_list_filt.push_back(band_info_nr); + + mrdc_cap.rf_params_mrdc.applied_freq_band_list_filt_present = true; + + // rf_params_mrdc supported band combination list v1540 + + band_combination_list_v1540_l* band_combination_list_v1450 = new band_combination_list_v1540_l(); + band_combination_v1540_s band_combination_v1540; + + band_params_v1540_s band_params_a; + band_params_a.srs_tx_switch_present = true; + band_params_a.srs_carrier_switch_present = false; + band_params_a.srs_tx_switch.supported_srs_tx_port_switch = + band_params_v1540_s::srs_tx_switch_s_::supported_srs_tx_port_switch_opts::not_supported; + band_combination_v1540.band_list_v1540.push_back(band_params_a); + + band_params_v1540_s band_params_b; + band_params_b.srs_tx_switch_present = true; + band_params_b.srs_tx_switch.supported_srs_tx_port_switch = + band_params_v1540_s::srs_tx_switch_s_::supported_srs_tx_port_switch_opts::t1r2; + band_params_b.srs_carrier_switch_present = false; + band_combination_v1540.band_list_v1540.push_back(band_params_b); + + // clang-format off + band_combination_v1540.ca_params_nr_v1540_present = false; + band_combination_v1540.ca_params_nr_v1540.simul_csi_reports_all_cc_present = true; + band_combination_v1540.ca_params_nr_v1540.csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc_present = true; + band_combination_v1540.ca_params_nr_v1540.csi_rs_im_reception_for_feedback_per_band_comb.max_num_simul_nzp_csi_rs_act_bwp_all_cc = 5; + band_combination_v1540.ca_params_nr_v1540.csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc_present = true; + band_combination_v1540.ca_params_nr_v1540.csi_rs_im_reception_for_feedback_per_band_comb.total_num_ports_simul_nzp_csi_rs_act_bwp_all_cc = 32; + // clang-format on + band_combination_list_v1450->push_back(band_combination_v1540); + mrdc_cap.rf_params_mrdc.supported_band_combination_list_v1540.reset(band_combination_list_v1450); + + feature_set_combination_l feature_set_combination; + + feature_sets_per_band_l feature_sets_per_band; + + feature_set_c feature_set_eutra; + feature_set_eutra.set_eutra(); + feature_set_eutra.eutra().dl_set_eutra = 1; + feature_set_eutra.eutra().ul_set_eutra = 1; + feature_sets_per_band.push_back(feature_set_eutra); + + feature_set_combination.push_back(feature_sets_per_band); + + feature_set_c feature_set_nr; + feature_set_nr.set_nr(); + feature_set_nr.nr().dl_set_nr = 1; + feature_set_nr.nr().ul_set_nr = 1; + feature_sets_per_band.push_back(feature_set_nr); + + feature_set_combination.push_back(feature_sets_per_band); + + mrdc_cap.feature_set_combinations.push_back(feature_set_combination); + + mrdc_cap.feature_set_combinations_present = true; + + // Pack mrdc_cap + uint8_t buffer[1024]; + asn1::bit_ref bref(buffer, sizeof(buffer)); + mrdc_cap.pack(bref); + + TESTASSERT(test_pack_unpack_consistency(mrdc_cap) == SRSASN_SUCCESS); + + srslte::logmap::get("RRC")->info_hex( + buffer, bref.distance_bytes(), "Packed cap struct (%d bytes):\n", bref.distance_bytes()); + + return SRSLTE_SUCCESS; +} + +int test_ue_mrdc_capabilities() +{ + uint8_t msg[] = {0x01, 0x1c, 0x04, 0x81, 0x60, 0x00, 0x1c, 0x4d, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x40, 0x04, 0x04, 0xd0, 0x10, 0x74, 0x06, 0x14, 0xe8, 0x1b, 0x10, + 0x78, 0x00, 0x00, 0x20, 0x00, 0x10, 0x08, 0x08, 0x01, 0x00, 0x20}; + // 011c048160001c4d0000000400400404d010740614e81b107800002000100808010020 + + asn1::cbit_ref bref{msg, sizeof(msg)}; + ue_mrdc_cap_s mrdc_cap; + + TESTASSERT(mrdc_cap.unpack(bref) == SRSASN_SUCCESS); + + TESTASSERT(test_pack_unpack_consistency(mrdc_cap) == SRSASN_SUCCESS); + + return SRSLTE_SUCCESS; +} + +int main() +{ + srslte::logmap::set_default_log_level(srslte::LOG_LEVEL_DEBUG); + + TESTASSERT(test_eutra_nr_capabilities() == 0); + TESTASSERT(test_ue_mrdc_capabilities() == 0); + + printf("Success\n"); + return 0; +} diff --git a/srsenb/src/stack/rrc/rrc_nr.cc b/srsenb/src/stack/rrc/rrc_nr.cc index 7e05edfce..916060561 100644 --- a/srsenb/src/stack/rrc/rrc_nr.cc +++ b/srsenb/src/stack/rrc/rrc_nr.cc @@ -231,8 +231,8 @@ uint32_t rrc_nr::generate_sibs() for (uint32_t sched_info_elem = 0; sched_info_elem < nof_messages; sched_info_elem++) { uint32_t msg_index = sched_info_elem + 1; // first msg is SIB1, therefore start with second - msg[msg_index].msg.set_c1().set_sys_info().crit_exts.set_sys_info_r15(); - auto& sib_list = msg[msg_index].msg.c1().sys_info().crit_exts.sys_info_r15().sib_type_and_info; + msg[msg_index].msg.set_c1().set_sys_info().crit_exts.set_sys_info(); + auto& sib_list = msg[msg_index].msg.c1().sys_info().crit_exts.sys_info().sib_type_and_info; for (uint32_t mapping = 0; mapping < sched_info[sched_info_elem].sib_map_info.size(); ++mapping) { uint32_t sibidx = sched_info[sched_info_elem].sib_map_info[mapping].type; // SIB2 == 0 From 1d0e5d725f467e75f965d877006ac14ad0538eb2 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 17 Dec 2020 18:59:03 +0100 Subject: [PATCH 54/59] Do not hide symbols in debug mode so backtraces can display function info --- CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47fa96445..86e1bea7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -337,9 +337,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif(HAVE_AVX) endif (HAVE_AVX2) - if(NOT WIN32) + # Do not hide symbols in debug mode so backtraces can display function info. + if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") + if(NOT WIN32) ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_CXX) - endif(NOT WIN32) + endif(NOT WIN32) + endif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") if(FORCE_32BIT) ADD_C_COMPILER_FLAG_IF_AVAILABLE("-m32" HAVE_WNO_UNUSED_BUT_SET_VARIABLE) @@ -427,9 +430,12 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") message(FATAL_ERROR "no SIMD instructions found") endif(NOT HAVE_SSE AND NOT HAVE_NEON AND NOT DISABLE_SIMD) - if(NOT WIN32) + # Do not hide symbols in debug mode so backtraces can display function info. + if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") + if(NOT WIN32) ADD_C_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_C) - endif(NOT WIN32) + endif(NOT WIN32) + endif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") if (ENABLE_ASAN AND ENABLE_MSAN) message(FATAL_ERROR "ASAN and MSAN cannot be enabled at the same time.") @@ -464,7 +470,7 @@ if("Ninja" STREQUAL ${CMAKE_GENERATOR}) endif() # Add -Werror to C/C++ flags for newer compilers -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) +if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") endif() From d3964c70ea29d48746ece11a4aa9388b45ef5e99 Mon Sep 17 00:00:00 2001 From: faluco Date: Wed, 16 Dec 2020 18:43:20 +0100 Subject: [PATCH 55/59] Dump to the json reporter the missing bearer metrics. --- srsenb/src/metrics_json.cc | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/srsenb/src/metrics_json.cc b/srsenb/src/metrics_json.cc index 94cc09515..2d67b8f21 100644 --- a/srsenb/src/metrics_json.cc +++ b/srsenb/src/metrics_json.cc @@ -25,7 +25,22 @@ namespace { /// Bearer container metrics. DECLARE_METRIC("bearer_id", metric_bearer_id, uint32_t, ""); DECLARE_METRIC("qci", metric_qci, uint32_t, ""); -DECLARE_METRIC_SET("bearer_container", mset_bearer_container, metric_bearer_id, metric_qci); +DECLARE_METRIC("dl_total_bytes", metric_dl_total_bytes, uint64_t, ""); +DECLARE_METRIC("ul_total_bytes", metric_ul_total_bytes, uint64_t, ""); +DECLARE_METRIC("dl_latency", metric_dl_latency, float, ""); +DECLARE_METRIC("ul_latency", metric_ul_latency, float, ""); +DECLARE_METRIC("dl_buffered_bytes", metric_dl_buffered_bytes, uint32_t, ""); +DECLARE_METRIC("ul_buffered_bytes", metric_ul_buffered_bytes, uint32_t, ""); +DECLARE_METRIC_SET("bearer_container", + mset_bearer_container, + metric_bearer_id, + metric_qci, + metric_dl_total_bytes, + metric_ul_total_bytes, + metric_dl_latency, + metric_ul_latency, + metric_dl_buffered_bytes, + metric_ul_buffered_bytes); /// UE container metrics. DECLARE_METRIC("ue_rnti", metric_ue_rnti, uint32_t, ""); @@ -108,6 +123,14 @@ static void fill_ue_metrics(mset_ue_container& ue, const enb_metrics_t& m, unsig auto& bearer_container = bearer_list.back(); bearer_container.write(drb.first); bearer_container.write(drb.second); + // RLC bearer metrics. + if (drb.first >= SRSLTE_N_RADIO_BEARERS) { + continue; + } + const auto& rlc_bearer = m.stack.rlc.ues[i].bearer; + bearer_container.write(rlc_bearer[drb.first].num_tx_sdu_bytes); + bearer_container.write(rlc_bearer[drb.first].num_rx_sdu_bytes); + bearer_container.write(rlc_bearer[drb.first].sdu_tx_latency_us / 1e6); } } @@ -120,6 +143,9 @@ static bool has_valid_metric_ranges(const enb_metrics_t& m, unsigned index) if (index >= m.stack.mac.ues.size()) { return false; } + if (index >= m.stack.rlc.ues.size()) { + return false; + } return true; } From 88611fe0ab33fd439bef7a1b319d01fec47d377d Mon Sep 17 00:00:00 2001 From: faluco Date: Fri, 18 Dec 2020 13:27:21 +0100 Subject: [PATCH 56/59] Added the latency and buffered bytes bearer metrics. --- srsenb/src/metrics_json.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srsenb/src/metrics_json.cc b/srsenb/src/metrics_json.cc index 2d67b8f21..5e9065d4e 100644 --- a/srsenb/src/metrics_json.cc +++ b/srsenb/src/metrics_json.cc @@ -130,7 +130,8 @@ static void fill_ue_metrics(mset_ue_container& ue, const enb_metrics_t& m, unsig const auto& rlc_bearer = m.stack.rlc.ues[i].bearer; bearer_container.write(rlc_bearer[drb.first].num_tx_sdu_bytes); bearer_container.write(rlc_bearer[drb.first].num_rx_sdu_bytes); - bearer_container.write(rlc_bearer[drb.first].sdu_tx_latency_us / 1e6); + bearer_container.write(rlc_bearer[drb.first].rx_latency_ms / 1e3); + bearer_container.write(rlc_bearer[drb.first].rx_buffered_bytes); } } From 92b11c1adb0bebcc6a3ce513c858a46bb257c0d1 Mon Sep 17 00:00:00 2001 From: faluco Date: Fri, 18 Dec 2020 14:02:50 +0100 Subject: [PATCH 57/59] Backport misc changes from the fapi repo. --- lib/src/common/threads.c | 2 +- lib/src/upper/rlc_tm.cc | 4 ++-- lib/src/upper/rlc_um_lte.cc | 8 ++++---- srsenb/hdr/stack/enb_stack_lte.h | 1 - srsenb/test/upper/test_helpers.cc | 19 +++++++++++++++++++ srsenb/test/upper/test_helpers.h | 1 + 6 files changed, 27 insertions(+), 8 deletions(-) diff --git a/lib/src/common/threads.c b/lib/src/common/threads.c index e31592f3e..8d37a6406 100644 --- a/lib/src/common/threads.c +++ b/lib/src/common/threads.c @@ -80,7 +80,7 @@ bool threads_new_rt_cpu(pthread_t* thread, void* (*start_routine)(void*), void* #else // All threads have normal priority except prio_offset=0,1,2,3,4 if (prio_offset >= 0 && prio_offset < 5) { - param.sched_priority = 50 - prio_offset; + param.sched_priority = sched_get_priority_max(SCHED_FIFO) - prio_offset; if (pthread_attr_init(&attr)) { perror("pthread_attr_init"); } else { diff --git a/lib/src/upper/rlc_tm.cc b/lib/src/upper/rlc_tm.cc index 5b5de2976..9a40ae19b 100644 --- a/lib/src/upper/rlc_tm.cc +++ b/lib/src/upper/rlc_tm.cc @@ -140,9 +140,9 @@ int rlc_tm::read_pdu(uint8_t* payload, uint32_t nof_bytes) if (ul_queue.try_read(&buf)) { pdu_size = buf->N_bytes; memcpy(payload, buf->msg, buf->N_bytes); - log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", + log->debug("%s Complete SDU scheduled for tx. Stack latency: %" PRIu64 " us\n", rrc->get_rb_name(lcid).c_str(), - buf->get_latency_us().count()); + (uint64_t)buf->get_latency_us().count()); log->info_hex(payload, pdu_size, "%s Tx %s PDU, queue size=%d, bytes=%d", diff --git a/lib/src/upper/rlc_um_lte.cc b/lib/src/upper/rlc_um_lte.cc index 0211df507..75addfecd 100644 --- a/lib/src/upper/rlc_um_lte.cc +++ b/lib/src/upper/rlc_um_lte.cc @@ -148,9 +148,9 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* #ifdef ENABLE_TIMESTAMP auto latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); - log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", + log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %" PRIu64 "/%ld us\n", rb_name.c_str(), - latency_us, + (uint64_t)latency_us, (long)mean_pdu_latency_us.value()); #else log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); @@ -187,9 +187,9 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* #ifdef ENABLE_TIMESTAMP auto latency_us = tx_sdu->get_latency_us().count(); mean_pdu_latency_us.push(latency_us); - log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n", + log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %" PRIu64 "/%ld us\n", rb_name.c_str(), - latency_us, + (uint64_t)latency_us, (long)mean_pdu_latency_us.value()); #else log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); diff --git a/srsenb/hdr/stack/enb_stack_lte.h b/srsenb/hdr/stack/enb_stack_lte.h index cd0c88cf6..8929bbfc6 100644 --- a/srsenb/hdr/stack/enb_stack_lte.h +++ b/srsenb/hdr/stack/enb_stack_lte.h @@ -27,7 +27,6 @@ #include "upper/s1ap.h" #include "enb_stack_base.h" -#include "srsenb/hdr/enb.h" #include "srslte/interfaces/enb_interfaces.h" #include "srslte/interfaces/enb_rrc_interface_types.h" diff --git a/srsenb/test/upper/test_helpers.cc b/srsenb/test/upper/test_helpers.cc index eacfc21e0..70012ee38 100644 --- a/srsenb/test/upper/test_helpers.cc +++ b/srsenb/test/upper/test_helpers.cc @@ -23,6 +23,25 @@ srslte::LOG_LEVEL_ENUM log_level; namespace test_helpers { +int parse_default_cfg_phy(rrc_cfg_t* rrc_cfg, phy_cfg_t* phy_cfg, srsenb::all_args_t& args) +{ + *rrc_cfg = {}; + args.enb_files.sib_config = argparse::repository_dir + "/sib.conf.example"; + args.enb_files.rr_config = argparse::repository_dir + "/rr.conf.example"; + args.enb_files.drb_config = argparse::repository_dir + "/drb.conf.example"; + srslte::logmap::get("TEST")->debug("sib file path=%s\n", args.enb_files.sib_config.c_str()); + + args.enb.enb_id = 0x19B; + TESTASSERT(srslte::string_to_mcc("001", &args.stack.s1ap.mcc)); + TESTASSERT(srslte::string_to_mnc("01", &args.stack.s1ap.mnc)); + args.general.eia_pref_list = "EIA2, EIA1, EIA0"; + args.general.eea_pref_list = "EEA0, EEA2, EEA1"; + + args.general.rrc_inactivity_timer = 60000; + + return enb_conf_sections::parse_cfg_files(&args, rrc_cfg, phy_cfg); +} + int parse_default_cfg(rrc_cfg_t* rrc_cfg, srsenb::all_args_t& args) { args = {}; diff --git a/srsenb/test/upper/test_helpers.h b/srsenb/test/upper/test_helpers.h index 1ccc7f18f..d9b1e8014 100644 --- a/srsenb/test/upper/test_helpers.h +++ b/srsenb/test/upper/test_helpers.h @@ -209,6 +209,7 @@ public: namespace test_helpers { int parse_default_cfg(rrc_cfg_t* rrc_cfg, srsenb::all_args_t& args); +int parse_default_cfg_phy(rrc_cfg_t* rrc_cfg, phy_cfg_t* phy_cfg, srsenb::all_args_t& args); template bool unpack_asn1(ASN1Type& asn1obj, srslte::const_byte_span pdu) From 9de318c7e68b791e07014036dfa2416f5f347df6 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 21 Dec 2020 15:26:19 +0000 Subject: [PATCH 58/59] avoid allocating DL harqs when respective acks are still pending, when there is a reordering of ttis in the phy --- srsenb/hdr/stack/mac/sched_harq.h | 7 +++++-- srsenb/hdr/stack/mac/sched_ue.h | 1 + srsenb/src/stack/mac/sched_harq.cc | 13 ++++++++++++- srsenb/src/stack/mac/sched_ue.cc | 7 +++++-- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/srsenb/hdr/stack/mac/sched_harq.h b/srsenb/hdr/stack/mac/sched_harq.h index 6a4337320..8df598ec2 100644 --- a/srsenb/hdr/stack/mac/sched_harq.h +++ b/srsenb/hdr/stack/mac/sched_harq.h @@ -70,9 +70,10 @@ public: uint32_t n_cce_, uint32_t max_retx); void new_retx(const rbgmask_t& new_mask, uint32_t tb_idx, tti_point tti_tx_dl, int* mcs, int* tbs, uint32_t n_cce_); - int set_ack(uint32_t tb_idx, bool ack); + int set_ack(uint32_t tb_idx, bool ack); rbgmask_t get_rbgmask() const; bool has_pending_retx(uint32_t tb_idx, tti_point tti_tx_dl) const; + bool has_pending_retx(tti_point tti_tx_dl) const; int get_tbs(uint32_t tb_idx) const; uint32_t get_n_cce() const; void reset_pending_data(); @@ -111,6 +112,7 @@ public: harq_entity(size_t nof_dl_harqs, size_t nof_ul_harqs); void reset(); + void new_tti(tti_point tti_rx); size_t nof_dl_harqs() const { return dl_harqs.size(); } size_t nof_ul_harqs() const { return ul_harqs.size(); } @@ -154,7 +156,8 @@ public: private: dl_harq_proc* get_oldest_dl_harq(tti_point tti_tx_dl); - srslte::log_ref log_h; + srslte::log_ref log_h; + std::array last_ttis; std::vector dl_harqs; std::vector ul_harqs; diff --git a/srsenb/hdr/stack/mac/sched_ue.h b/srsenb/hdr/stack/mac/sched_ue.h index 242ed63c9..f208a53c1 100644 --- a/srsenb/hdr/stack/mac/sched_ue.h +++ b/srsenb/hdr/stack/mac/sched_ue.h @@ -258,6 +258,7 @@ private: bool phy_config_dedicated_enabled = false; tti_point current_tti; + std::array last_ttis; std::vector carriers; ///< map of UE CellIndex to carrier configuration std::vector enb_ue_cc_idx_map; }; diff --git a/srsenb/src/stack/mac/sched_harq.cc b/srsenb/src/stack/mac/sched_harq.cc index 0c4e6e710..a93bc67d2 100644 --- a/srsenb/src/stack/mac/sched_harq.cc +++ b/srsenb/src/stack/mac/sched_harq.cc @@ -206,6 +206,11 @@ bool dl_harq_proc::has_pending_retx(uint32_t tb_idx, tti_point tti_tx_dl) const return (tti_tx_dl >= to_tx_dl_ack(tti)) and has_pending_retx_common(tb_idx); } +bool dl_harq_proc::has_pending_retx(tti_point tti_tx_dl) const +{ + return has_pending_retx(0, tti_tx_dl) or has_pending_retx(1, tti_tx_dl); +} + int dl_harq_proc::get_tbs(uint32_t tb_idx) const { return last_tbs[tb_idx]; @@ -314,6 +319,11 @@ void harq_entity::reset() } } +void harq_entity::new_tti(tti_point tti_rx) +{ + last_ttis[tti_rx.to_uint() % last_ttis.size()] = tti_rx; +} + dl_harq_proc* harq_entity::get_empty_dl_harq(tti_point tti_tx_dl) { if (not is_async) { @@ -382,7 +392,8 @@ dl_harq_proc* harq_entity::get_oldest_dl_harq(tti_point tti_tx_dl) int oldest_idx = -1; uint32_t oldest_tti = 0; for (const dl_harq_proc& h : dl_harqs) { - if (h.has_pending_retx(0, tti_tx_dl) or h.has_pending_retx(1, tti_tx_dl)) { + tti_point ack_tti_rx = h.get_tti() + FDD_HARQ_DELAY_DL_MS; + if (h.has_pending_retx(tti_tx_dl) and (last_ttis[ack_tti_rx.to_uint() % last_ttis.size()] == ack_tti_rx)) { uint32_t x = tti_tx_dl - h.get_tti(); if (x > oldest_tti) { oldest_idx = h.get_id(); diff --git a/srsenb/src/stack/mac/sched_ue.cc b/srsenb/src/stack/mac/sched_ue.cc index 9644798e4..70a1f82fd 100644 --- a/srsenb/src/stack/mac/sched_ue.cc +++ b/srsenb/src/stack/mac/sched_ue.cc @@ -227,6 +227,9 @@ void sched_ue::new_subframe(tti_point tti_rx, uint32_t enb_cc_idx) if (current_tti != tti_rx) { current_tti = tti_rx; lch_handler.new_tti(); + for (auto& cc : carriers) { + cc.harq_ent.new_tti(tti_rx); + } } int ue_cc_idx = enb_ue_cc_idx_map[enb_cc_idx]; if (ue_cc_idx >= 0) { @@ -1501,7 +1504,7 @@ int cc_sched_ue::get_required_prb_dl(uint32_t req_bytes, uint32_t nof_ctrl_symbo { auto compute_tbs_approx = [this, nof_ctrl_symbols](uint32_t nof_prb) { uint32_t nof_re = srslte_ra_dl_approx_nof_re(&cell_params->cfg.cell, nof_prb, nof_ctrl_symbols); - int mcs, tbs; + int mcs; if (fixed_mcs_dl < 0 or not dl_cqi_rx) { return alloc_tbs_dl(nof_prb, nof_re, 0, &mcs); } @@ -1523,7 +1526,7 @@ uint32_t cc_sched_ue::get_required_prb_ul(uint32_t req_bytes) auto compute_tbs_approx = [this](uint32_t nof_prb) { const uint32_t N_srs = 0; uint32_t nof_re = (2 * (SRSLTE_CP_NSYMB(cell_params->cfg.cell.cp) - 1) - N_srs) * nof_prb * SRSLTE_NRE; - int mcs, tbs; + int mcs; if (fixed_mcs_ul < 0) { return alloc_tbs_ul(nof_prb, nof_re, 0, &mcs); } From 74ffe393c65ba1937b0e4e39450599211394b4cb Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 21 Dec 2020 22:38:48 +0000 Subject: [PATCH 59/59] asn1 update: s1ap asn1 is now v16.1 (2020-03) --- lib/include/srslte/asn1/s1ap.h | 4348 ++++++++--- lib/src/asn1/s1ap.cc | 12225 +++++++++++++++++++++++++------ lib/test/asn1/CMakeLists.txt | 6 +- 3 files changed, 13430 insertions(+), 3149 deletions(-) diff --git a/lib/include/srslte/asn1/s1ap.h b/lib/include/srslte/asn1/s1ap.h index 0912fd5bf..c306d3bb3 100644 --- a/lib/include/srslte/asn1/s1ap.h +++ b/lib/include/srslte/asn1/s1ap.h @@ -12,7 +12,7 @@ /******************************************************************************* * - * 3GPP TS ASN1 S1AP v15.7.1 (2019-10) + * 3GPP TS ASN1 S1AP v16.1.0 (2020-03) * ******************************************************************************/ @@ -92,6 +92,7 @@ namespace s1ap { #define ASN1_S1AP_ID_UE_INFO_TRANSFER 59 #define ASN1_S1AP_ID_ENBCP_RELOCATION_IND 60 #define ASN1_S1AP_ID_MMECP_RELOCATION_IND 61 +#define ASN1_S1AP_ID_SECONDARY_RAT_DATA_USAGE_REPORT 62 #define ASN1_S1AP_MAX_PRIVATE_IES 65535 #define ASN1_S1AP_MAX_PROTOCOL_EXTS 65535 #define ASN1_S1AP_MAX_PROTOCOL_IES 65535 @@ -107,7 +108,7 @@ namespace s1ap { #define ASN1_S1AP_MAXNOOF_FORB_LACS 4096 #define ASN1_S1AP_MAXNOOF_FORB_TACS 4096 #define ASN1_S1AP_MAXNOOF_INDIVIDUAL_S1_CONNS_TO_RESET 256 -#define ASN1_S1AP_MAXNOOF_CELLS 16 +#define ASN1_S1AP_MAXNOOF_CELLSIN_UE_HISTORY_INFO 16 #define ASN1_S1AP_MAXNOOF_CELLSINENB 256 #define ASN1_S1AP_MAXNOOF_TA_IFOR_WARNING 65535 #define ASN1_S1AP_MAXNOOF_CELL_ID 65535 @@ -131,6 +132,13 @@ namespace s1ap { #define ASN1_S1AP_MAXNOOF_MBSFN_AREA_MDT 8 #define ASN1_S1AP_MAXNOOF_RECOMMENDED_CELLS 16 #define ASN1_S1AP_MAXNOOF_RECOMMENDED_ENBS 16 +#define ASN1_S1AP_MAXNOOFTIMEPERIODS 2 +#define ASN1_S1AP_MAXNOOF_CELL_IDFOR_QMC 32 +#define ASN1_S1AP_MAXNOOF_TAFOR_QMC 8 +#define ASN1_S1AP_MAXNOOF_PLM_NFOR_QMC 16 +#define ASN1_S1AP_MAXNOOF_BLUETOOTH_NAME 4 +#define ASN1_S1AP_MAXNOOF_WLAN_NAME 4 +#define ASN1_S1AP_MAXNOOF_CONNECTEDENG_NBS 256 #define ASN1_S1AP_ID_MME_UE_S1AP_ID 0 #define ASN1_S1AP_ID_HANDOV_TYPE 1 #define ASN1_S1AP_ID_CAUSE 2 @@ -368,8 +376,50 @@ namespace s1ap { #define ASN1_S1AP_ID_UE_LEVEL_QOS_PARAMS 252 #define ASN1_S1AP_ID_DL_CP_SECURITY_INFO 253 #define ASN1_S1AP_ID_UL_CP_SECURITY_INFO 254 +#define ASN1_S1AP_ID_EXTENDED_ERAB_MAXIMUM_BITRATE_DL 255 +#define ASN1_S1AP_ID_EXTENDED_ERAB_MAXIMUM_BITRATE_UL 256 +#define ASN1_S1AP_ID_EXTENDED_ERAB_GUARANTEED_BITRATE_DL 257 +#define ASN1_S1AP_ID_EXTENDED_ERAB_GUARANTEED_BITRATE_UL 258 +#define ASN1_S1AP_ID_EXTENDED_U_EAGGREGATE_MAXIMUM_BIT_RATE_DL 259 +#define ASN1_S1AP_ID_EXTENDED_U_EAGGREGATE_MAXIMUM_BIT_RATE_UL 260 +#define ASN1_S1AP_ID_NRRESTRICTIN_EP_SAS_SECONDARY_RAT 261 +#define ASN1_S1AP_ID_UE_APP_LAYER_MEAS_CFG 262 +#define ASN1_S1AP_ID_UE_APPLICATION_LAYER_MEAS_CAP 263 +#define ASN1_S1AP_ID_SECONDARY_RAT_DATA_USAGE_REPORT_LIST 264 +#define ASN1_S1AP_ID_SECONDARY_RAT_DATA_USAGE_REPORT_ITEM 265 +#define ASN1_S1AP_ID_HO_FLAG 266 +#define ASN1_S1AP_ID_ERABUSAGE_REPORT_ITEM 267 +#define ASN1_S1AP_ID_SECONDARY_RAT_DATA_USAGE_REQUEST 268 +#define ASN1_S1AP_ID_NRUE_SECURITY_CAP 269 +#define ASN1_S1AP_ID_UNLICENSED_SPEC_RESTRICT 270 #define ASN1_S1AP_ID_CE_MODE_BRESTRICTED 271 +#define ASN1_S1AP_ID_LTE_M_IND 272 +#define ASN1_S1AP_ID_DL_PACKET_LOSS_RATE 273 +#define ASN1_S1AP_ID_UL_PACKET_LOSS_RATE 274 +#define ASN1_S1AP_ID_UE_CAP_INFO_REQUEST 275 +#define ASN1_S1AP_ID_SERVICE_TYPE 276 +#define ASN1_S1AP_ID_AERIAL_UESUBSCRIPTION_INFO 277 +#define ASN1_S1AP_ID_SUBSCRIPTION_BASED_UE_DIFFERENTIATION_INFO 278 +#define ASN1_S1AP_ID_END_IND 280 +#define ASN1_S1AP_ID_EDT_SESSION 281 +#define ASN1_S1AP_ID_CN_TYPE_RESTRICTS 282 #define ASN1_S1AP_ID_PENDING_DATA_IND 283 +#define ASN1_S1AP_ID_BLUETOOTH_MEAS_CFG 284 +#define ASN1_S1AP_ID_WLAN_MEAS_CFG 285 +#define ASN1_S1AP_ID_WARNING_AREA_COORDINATES 286 +#define ASN1_S1AP_ID_NRRESTRICTIN5_GS 287 +#define ASN1_S1AP_ID_PS_CELL_INFO 288 +#define ASN1_S1AP_ID_LAST_NG_RANPLMN_ID 290 +#define ASN1_S1AP_ID_CONNECTEDENG_NB_LIST 291 +#define ASN1_S1AP_ID_CONNECTEDENG_NB_TO_ADD_LIST 292 +#define ASN1_S1AP_ID_CONNECTEDENG_NB_TO_REM_LIST 293 +#define ASN1_S1AP_ID_EN_DCSON_CFG_TRANSFER_ECT 294 +#define ASN1_S1AP_ID_EN_DCSON_CFG_TRANSFER_MCT 295 +#define ASN1_S1AP_ID_IM_SVOICE_EP_SFALLBACKFROM5_G 296 +#define ASN1_S1AP_ID_TIME_SINCE_SECONDARY_NODE_RELEASE 297 +#define ASN1_S1AP_ID_REQUEST_TYPE_ADD_INFO 298 +#define ASN1_S1AP_ID_ADD_RRM_PRIO_IDX 299 +#define ASN1_S1AP_ID_CONTEXTAT_SOURCE 300 #define ASN1_S1AP_MAXNOOF_IRAT_REPORT_CELLS 128 #define ASN1_S1AP_MAXNOOFCANDIDATE_CELLS 16 #define ASN1_S1AP_MAXNOOF_CELLINENB 256 @@ -562,6 +612,9 @@ struct s1ap_protocol_ext_empty_o { // GUMMEI-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o gummei_ext_ies_o; +// PLMNidentity ::= OCTET STRING +typedef fixed_octstring<3, true> plm_nid; + // Additional-GUTI-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o add_guti_ext_ies_o; @@ -838,6 +891,182 @@ private: void destroy_(); }; +// CellBasedQMC-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o cell_based_qmc_ext_ies_o; + +// CellIdListforQMC ::= SEQUENCE (SIZE (1..32)) OF EUTRAN-CGI +using cell_id_listfor_qmc_l = dyn_array; + +// PLMNAreaBasedQMC-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o plmn_area_based_qmc_ext_ies_o; + +// PLMNListforQMC ::= SEQUENCE (SIZE (1..16)) OF OCTET STRING (SIZE (3)) +using plmn_listfor_qmc_l = bounded_array, 16>; + +// TABasedQMC-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o ta_based_qmc_ext_ies_o; + +// TAIBasedQMC-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o tai_based_qmc_ext_ies_o; + +// TAIListforQMC ::= SEQUENCE (SIZE (1..8)) OF TAI +using tai_listfor_qmc_l = dyn_array; + +// TAListforQMC ::= SEQUENCE (SIZE (1..8)) OF OCTET STRING (SIZE (2)) +using ta_listfor_qmc_l = bounded_array, 8>; + +typedef protocol_ext_container_empty_l cell_based_qmc_ext_ies_container; + +// CellBasedQMC ::= SEQUENCE +struct cell_based_qmc_s { + bool ext = false; + bool ie_exts_present = false; + cell_id_listfor_qmc_l cell_id_listfor_qmc; + cell_based_qmc_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l plmn_area_based_qmc_ext_ies_container; + +// PLMNAreaBasedQMC ::= SEQUENCE +struct plmn_area_based_qmc_s { + bool ext = false; + bool ie_exts_present = false; + plmn_listfor_qmc_l plmn_listfor_qmc; + plmn_area_based_qmc_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l ta_based_qmc_ext_ies_container; + +// TABasedQMC ::= SEQUENCE +struct ta_based_qmc_s { + bool ext = false; + bool ie_exts_present = false; + ta_listfor_qmc_l talistfor_qmc; + ta_based_qmc_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l tai_based_qmc_ext_ies_container; + +// TAIBasedQMC ::= SEQUENCE +struct tai_based_qmc_s { + bool ext = false; + bool ie_exts_present = false; + tai_listfor_qmc_l tai_listfor_qmc; + tai_based_qmc_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AreaScopeOfQMC ::= CHOICE +struct area_scope_of_qmc_c { + struct types_opts { + enum options { cell_based, tabased, tai_based, plmn_area_based, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + area_scope_of_qmc_c() = default; + area_scope_of_qmc_c(const area_scope_of_qmc_c& other); + area_scope_of_qmc_c& operator=(const area_scope_of_qmc_c& other); + ~area_scope_of_qmc_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 + cell_based_qmc_s& cell_based() + { + assert_choice_type("cellBased", type_.to_string(), "AreaScopeOfQMC"); + return c.get(); + } + ta_based_qmc_s& tabased() + { + assert_choice_type("tABased", type_.to_string(), "AreaScopeOfQMC"); + return c.get(); + } + tai_based_qmc_s& tai_based() + { + assert_choice_type("tAIBased", type_.to_string(), "AreaScopeOfQMC"); + return c.get(); + } + plmn_area_based_qmc_s& plmn_area_based() + { + assert_choice_type("pLMNAreaBased", type_.to_string(), "AreaScopeOfQMC"); + return c.get(); + } + const cell_based_qmc_s& cell_based() const + { + assert_choice_type("cellBased", type_.to_string(), "AreaScopeOfQMC"); + return c.get(); + } + const ta_based_qmc_s& tabased() const + { + assert_choice_type("tABased", type_.to_string(), "AreaScopeOfQMC"); + return c.get(); + } + const tai_based_qmc_s& tai_based() const + { + assert_choice_type("tAIBased", type_.to_string(), "AreaScopeOfQMC"); + return c.get(); + } + const plmn_area_based_qmc_s& plmn_area_based() const + { + assert_choice_type("pLMNAreaBased", type_.to_string(), "AreaScopeOfQMC"); + return c.get(); + } + cell_based_qmc_s& set_cell_based() + { + set(types::cell_based); + return c.get(); + } + ta_based_qmc_s& set_tabased() + { + set(types::tabased); + return c.get(); + } + tai_based_qmc_s& set_tai_based() + { + set(types::tai_based); + return c.get(); + } + plmn_area_based_qmc_s& set_plmn_area_based() + { + set(types::plmn_area_based); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + // CellIdentifierAndCELevelForCECapableUEs-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o cell_id_and_ce_level_for_ce_capable_ues_ext_ies_o; @@ -1230,6 +1459,48 @@ struct bearers_subject_to_status_transfer_item_ies_o { using bearers_subject_to_status_transfer_list_l = dyn_array >; +// BluetoothMeasConfigNameList ::= SEQUENCE (SIZE (1..4)) OF OCTET STRING (SIZE (1..248)) +using bluetooth_meas_cfg_name_list_l = bounded_array, 4>; + +// BluetoothMeasConfig ::= ENUMERATED +struct bluetooth_meas_cfg_opts { + enum options { setup, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated bluetooth_meas_cfg_e; + +// BluetoothMeasurementConfiguration-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o bluetooth_meas_cfg_ext_ies_o; + +typedef protocol_ext_container_empty_l bluetooth_meas_cfg_ext_ies_container; + +// BluetoothMeasurementConfiguration ::= SEQUENCE +struct bluetooth_meas_cfg_s { + struct bt_rssi_opts { + enum options { true_value, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated bt_rssi_e_; + + // member variables + bool ext = false; + bool bluetooth_meas_cfg_name_list_present = false; + bool bt_rssi_present = false; + bool ie_exts_present = false; + bluetooth_meas_cfg_e bluetooth_meas_cfg; + bluetooth_meas_cfg_name_list_l bluetooth_meas_cfg_name_list; + bt_rssi_e_ bt_rssi; + bluetooth_meas_cfg_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // CancelledCellinEAI-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o cancelled_cellin_eai_item_ext_ies_o; @@ -1626,6 +1897,39 @@ struct cgi_s { void to_json(json_writer& j) const; }; +// CNType ::= ENUMERATED +struct cn_type_opts { + enum options { five_gc_forbidden, /*...*/ epc_forbiddden, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated cn_type_e; + +// CNTypeRestrictions-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o cn_type_restricts_item_ext_ies_o; + +typedef protocol_ext_container_empty_l cn_type_restricts_item_ext_ies_container; + +// CNTypeRestrictions-Item ::= SEQUENCE +struct cn_type_restricts_item_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<3, true> plmn_id; + cn_type_e cntype; + cn_type_restricts_item_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CNTypeRestrictions ::= SEQUENCE (SIZE (1..16)) OF CNTypeRestrictions-Item +using cn_type_restricts_l = dyn_array; + // CSG-IdList-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o csg_id_list_item_ext_ies_o; @@ -2371,25 +2675,53 @@ struct cell_type_s { void to_json(json_writer& j) const; }; -// DL-CP-SecurityInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o dl_cp_security_info_ext_ies_o; - -// CE-ModeBRestricted ::= ENUMERATED -struct ce_mode_brestricted_opts { - enum options { restricted, not_restricted, /*...*/ nulltype } value; +// RAT-Type ::= ENUMERATED +struct rat_type_opts { + enum options { nbiot, /*...*/ nulltype } value; std::string to_string() const; }; -typedef enumerated ce_mode_brestricted_e; +typedef enumerated rat_type_e; -typedef protocol_ext_container_empty_l dl_cp_security_info_ext_ies_container; +// SupportedTAs-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +struct supported_tas_item_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { rat_type, nulltype } value; -// DL-CP-SecurityInformation ::= SEQUENCE -struct dl_cp_security_info_s { - bool ext = false; - bool ie_exts_present = false; - fixed_bitstring<16, false, true> dl_nas_mac; - dl_cp_security_info_ext_ies_container ie_exts; + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::rat_type; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + rat_type_e& rat_type() { return c; } + const rat_type_e& rat_type() const { return c; } + + private: + rat_type_e c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +// SupportedTAs-Item ::= SEQUENCE +struct supported_tas_item_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<2, true> tac; + bplmns_l broadcast_plmns; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -2398,26 +2730,42 @@ struct dl_cp_security_info_s { void to_json(json_writer& j) const; }; -// EnhancedCoverageRestricted ::= ENUMERATED -struct enhanced_coverage_restricted_opts { - enum options { restricted, /*...*/ nulltype } value; +// ConnectedengNBItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o connectedeng_nb_item_ext_ies_o; - std::string to_string() const; +// SupportedTAs ::= SEQUENCE (SIZE (1..256)) OF SupportedTAs-Item +using supported_tas_l = dyn_array; + +typedef protocol_ext_container_empty_l connectedeng_nb_item_ext_ies_container; + +// ConnectedengNBItem ::= SEQUENCE +struct connectedeng_nb_item_s { + bool ext = false; + bool ie_exts_present = false; + bounded_bitstring<22, 32, true, true> en_g_nb_id; + supported_tas_l supported_tas; + connectedeng_nb_item_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -typedef enumerated enhanced_coverage_restricted_e; -// ConnectionEstablishmentIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -struct conn_establishment_ind_ies_o { - // Value ::= OPEN TYPE - struct value_c { +// ConnectedengNBList ::= SEQUENCE (SIZE (1..256)) OF ConnectedengNBItem +using connectedeng_nb_list_l = dyn_array; + +// GBR-QosInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +struct gbr_qos_info_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { struct types_opts { enum options { - mme_ue_s1ap_id, - enb_ue_s1ap_id, - ue_radio_cap, - enhanced_coverage_restricted, - dl_cp_security_info, - ce_mode_brestricted, + extended_erab_maximum_bitrate_dl, + extended_erab_maximum_bitrate_ul, + extended_erab_guaranteed_bitrate_dl, + extended_erab_guaranteed_bitrate_ul, nulltype } value; @@ -2426,32 +2774,28 @@ struct conn_establishment_ind_ies_o { typedef enumerated types; // choice methods - value_c() = default; - value_c(const value_c& other); - value_c& operator=(const value_c& other); - ~value_c() { destroy_(); } + ext_c() = default; + ext_c(const ext_c& other); + ext_c& operator=(const ext_c& other); + ~ext_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 - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - unbounded_octstring& ue_radio_cap(); - enhanced_coverage_restricted_e& enhanced_coverage_restricted(); - dl_cp_security_info_s& dl_cp_security_info(); - ce_mode_brestricted_e& ce_mode_brestricted(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const unbounded_octstring& ue_radio_cap() const; - const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; - const dl_cp_security_info_s& dl_cp_security_info() const; - const ce_mode_brestricted_e& ce_mode_brestricted() const; + uint64_t& extended_erab_maximum_bitrate_dl(); + uint64_t& extended_erab_maximum_bitrate_ul(); + uint64_t& extended_erab_guaranteed_bitrate_dl(); + uint64_t& extended_erab_guaranteed_bitrate_ul(); + const uint64_t& extended_erab_maximum_bitrate_dl() const; + const uint64_t& extended_erab_maximum_bitrate_ul() const; + const uint64_t& extended_erab_guaranteed_bitrate_dl() const; + const uint64_t& extended_erab_guaranteed_bitrate_ul() const; private: - types type_; - choice_buffer_t > c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; @@ -2460,37 +2804,88 @@ struct conn_establishment_ind_ies_o { static uint32_t idx_to_id(uint32_t idx); static bool is_id_valid(const uint32_t& id); static crit_e get_crit(const uint32_t& id); - static value_c get_value(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); static presence_e get_presence(const uint32_t& id); }; -struct conn_establishment_ind_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; +// ScheduledCommunicationTime-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o sched_communication_time_ext_ies_o; - // member variables - bool ue_radio_cap_present = false; - bool enhanced_coverage_restricted_present = false; - bool dl_cp_security_info_present = false; - bool ce_mode_brestricted_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > ue_radio_cap; - ie_field_s enhanced_coverage_restricted; - ie_field_s dl_cp_security_info; - ie_field_s ce_mode_brestricted; +// DL-CP-SecurityInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o dl_cp_security_info_ext_ies_o; - // sequence methods - conn_establishment_ind_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; +// E-RABQoSParameters-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +struct erab_qos_params_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { dl_packet_loss_rate, ul_packet_loss_rate, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + ext_c() = default; + ext_c(const ext_c& other); + ext_c& operator=(const ext_c& other); + ~ext_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 + uint16_t& dl_packet_loss_rate(); + uint16_t& ul_packet_loss_rate(); + const uint16_t& dl_packet_loss_rate() const; + const uint16_t& ul_packet_loss_rate() const; + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +struct gbr_qos_info_ext_ies_container { + template + using ie_field_s = protocol_ext_container_item_s; + + // member variables + bool extended_erab_maximum_bitrate_dl_present = false; + bool extended_erab_maximum_bitrate_ul_present = false; + bool extended_erab_guaranteed_bitrate_dl_present = false; + bool extended_erab_guaranteed_bitrate_ul_present = false; + ie_field_s > extended_erab_maximum_bitrate_dl; + ie_field_s > extended_erab_maximum_bitrate_ul; + ie_field_s > extended_erab_guaranteed_bitrate_dl; + ie_field_s > extended_erab_guaranteed_bitrate_ul; + + // sequence methods + gbr_qos_info_ext_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; }; -// ConnectionEstablishmentIndication ::= SEQUENCE -struct conn_establishment_ind_s { - bool ext = false; - conn_establishment_ind_ies_container protocol_ies; +// GBR-QosInformation ::= SEQUENCE +struct gbr_qos_info_s { + bool ext = false; + bool ie_exts_present = false; + uint64_t erab_maximum_bitrate_dl = 0; + uint64_t erab_maximum_bitrate_ul = 0; + uint64_t erab_guaranteed_bitrate_dl = 0; + uint64_t erab_guaranteed_bitrate_ul = 0; + gbr_qos_info_ext_ies_container ie_exts; // ... // sequence methods @@ -2499,27 +2894,46 @@ struct conn_establishment_ind_s { void to_json(json_writer& j) const; }; -// CriticalityDiagnostics-IE-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o crit_diagnostics_ie_item_ext_ies_o; +typedef protocol_ext_container_empty_l sched_communication_time_ext_ies_container; -// TypeOfError ::= ENUMERATED -struct type_of_error_opts { - enum options { not_understood, missing, /*...*/ nulltype } value; +// ScheduledCommunicationTime ::= SEQUENCE +struct sched_communication_time_s { + bool ext = false; + bool dayof_week_present = false; + bool timeof_day_start_present = false; + bool timeof_day_end_present = false; + bool ie_exts_present = false; + fixed_bitstring<7, false, true> dayof_week; + uint32_t timeof_day_start = 0; + uint32_t timeof_day_end = 0; + sched_communication_time_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Subscription-Based-UE-DifferentiationInfo-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o subscription_based_ue_differentiation_info_ext_ies_o; + +// CE-ModeBRestricted ::= ENUMERATED +struct ce_mode_brestricted_opts { + enum options { restricted, not_restricted, /*...*/ nulltype } value; std::string to_string() const; }; -typedef enumerated type_of_error_e; +typedef enumerated ce_mode_brestricted_e; -typedef protocol_ext_container_empty_l crit_diagnostics_ie_item_ext_ies_container; +typedef protocol_ext_container_empty_l dl_cp_security_info_ext_ies_container; -// CriticalityDiagnostics-IE-Item ::= SEQUENCE -struct crit_diagnostics_ie_item_s { - bool ext = false; - bool ie_exts_present = false; - crit_e iecrit; - uint32_t ie_id = 0; - type_of_error_e type_of_error; - crit_diagnostics_ie_item_ext_ies_container ie_exts; +// DL-CP-SecurityInformation ::= SEQUENCE +struct dl_cp_security_info_s { + bool ext = false; + bool ie_exts_present = false; + fixed_bitstring<16, false, true> dl_nas_mac; + dl_cp_security_info_ext_ies_container ie_exts; // ... // sequence methods @@ -2528,35 +2942,106 @@ struct crit_diagnostics_ie_item_s { void to_json(json_writer& j) const; }; -// CriticalityDiagnostics-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o crit_diagnostics_ext_ies_o; +struct erab_qos_params_ext_ies_container { + template + using ie_field_s = protocol_ext_container_item_s; -// CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1..256)) OF CriticalityDiagnostics-IE-Item -using crit_diagnostics_ie_list_l = dyn_array; + // member variables + bool dl_packet_loss_rate_present = false; + bool ul_packet_loss_rate_present = false; + ie_field_s > dl_packet_loss_rate; + ie_field_s > ul_packet_loss_rate; -// TriggeringMessage ::= ENUMERATED -struct trigger_msg_opts { - enum options { init_msg, successful_outcome, unsuccessfull_outcome, nulltype } value; + // sequence methods + erab_qos_params_ext_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// E-RABLevelQoSParameters ::= SEQUENCE +struct erab_level_qos_params_s { + bool ext = false; + bool gbr_qos_info_present = false; + bool ie_exts_present = false; + uint16_t qci = 0; + alloc_and_retention_prio_s alloc_retention_prio; + gbr_qos_info_s gbr_qos_info; + erab_qos_params_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EndIndication ::= ENUMERATED +struct end_ind_opts { + enum options { no_further_data, further_data_exists, /*...*/ nulltype } value; std::string to_string() const; }; -typedef enumerated trigger_msg_e; +typedef enumerated end_ind_e; -typedef protocol_ext_container_empty_l crit_diagnostics_ext_ies_container; +// EnhancedCoverageRestricted ::= ENUMERATED +struct enhanced_coverage_restricted_opts { + enum options { restricted, /*...*/ nulltype } value; -// CriticalityDiagnostics ::= SEQUENCE -struct crit_diagnostics_s { - bool ext = false; - bool proc_code_present = false; - bool trigger_msg_present = false; - bool proc_crit_present = false; - bool ies_crit_diagnostics_present = false; - bool ie_exts_present = false; - uint16_t proc_code = 0; - trigger_msg_e trigger_msg; - crit_e proc_crit; - crit_diagnostics_ie_list_l ies_crit_diagnostics; - crit_diagnostics_ext_ies_container ie_exts; + std::string to_string() const; +}; +typedef enumerated enhanced_coverage_restricted_e; + +typedef protocol_ext_container_empty_l subscription_based_ue_differentiation_info_ext_ies_container; + +// Subscription-Based-UE-DifferentiationInfo ::= SEQUENCE +struct subscription_based_ue_differentiation_info_s { + struct periodic_communication_ind_opts { + enum options { periodically, ondemand, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated periodic_communication_ind_e_; + struct stationary_ind_opts { + enum options { stationary, mobile, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated stationary_ind_e_; + struct traffic_profile_opts { + enum options { single_packet, dual_packets, multiple_packets, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated traffic_profile_e_; + struct battery_ind_opts { + enum options { + battery_pwred, + battery_pwred_not_rechargeable_or_replaceable, + not_battery_pwred, + /*...*/ nulltype + } value; + + std::string to_string() const; + }; + typedef enumerated battery_ind_e_; + + // member variables + bool ext = false; + bool periodic_communication_ind_present = false; + bool periodic_time_present = false; + bool sched_communication_time_present = false; + bool stationary_ind_present = false; + bool traffic_profile_present = false; + bool battery_ind_present = false; + bool ie_exts_present = false; + periodic_communication_ind_e_ periodic_communication_ind; + uint16_t periodic_time = 1; + sched_communication_time_s sched_communication_time; + stationary_ind_e_ stationary_ind; + traffic_profile_e_ traffic_profile; + battery_ind_e_ battery_ind; + subscription_based_ue_differentiation_info_ext_ies_container ie_exts; // ... // sequence methods @@ -2565,12 +3050,23 @@ struct crit_diagnostics_s { void to_json(json_writer& j) const; }; -// DeactivateTraceIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -struct deactiv_trace_ies_o { +// ConnectionEstablishmentIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct conn_establishment_ind_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, e_utran_trace_id, nulltype } value; + enum options { + mme_ue_s1ap_id, + enb_ue_s1ap_id, + ue_radio_cap, + enhanced_coverage_restricted, + dl_cp_security_info, + ce_mode_brestricted, + end_ind, + subscription_based_ue_differentiation_info, + ue_level_qos_params, + nulltype + } value; std::string to_string() const; }; @@ -2587,16 +3083,32 @@ struct deactiv_trace_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - fixed_octstring<8, true>& e_utran_trace_id(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const fixed_octstring<8, true>& e_utran_trace_id() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + unbounded_octstring& ue_radio_cap(); + enhanced_coverage_restricted_e& enhanced_coverage_restricted(); + dl_cp_security_info_s& dl_cp_security_info(); + ce_mode_brestricted_e& ce_mode_brestricted(); + end_ind_e& end_ind(); + subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info(); + erab_level_qos_params_s& ue_level_qos_params(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const unbounded_octstring& ue_radio_cap() const; + const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; + const dl_cp_security_info_s& dl_cp_security_info() const; + const ce_mode_brestricted_e& ce_mode_brestricted() const; + const end_ind_e& end_ind() const; + const subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info() const; + const erab_level_qos_params_s& ue_level_qos_params() const; private: - types type_; - choice_buffer_t > c; + types type_; + choice_buffer_t > + c; void destroy_(); }; @@ -2609,26 +3121,39 @@ struct deactiv_trace_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct deactiv_trace_ies_container { +struct conn_establishment_ind_ies_container { template using ie_field_s = protocol_ie_container_item_s; // member variables + bool ue_radio_cap_present = false; + bool enhanced_coverage_restricted_present = false; + bool dl_cp_security_info_present = false; + bool ce_mode_brestricted_present = false; + bool end_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool ue_level_qos_params_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; - ie_field_s > e_utran_trace_id; + ie_field_s > ue_radio_cap; + ie_field_s enhanced_coverage_restricted; + ie_field_s dl_cp_security_info; + ie_field_s ce_mode_brestricted; + ie_field_s end_ind; + ie_field_s subscription_based_ue_differentiation_info; + ie_field_s ue_level_qos_params; // sequence methods - deactiv_trace_ies_container(); + conn_establishment_ind_ies_container(); SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; }; -// DeactivateTrace ::= SEQUENCE -struct deactiv_trace_s { - bool ext = false; - deactiv_trace_ies_container protocol_ies; +// ConnectionEstablishmentIndication ::= SEQUENCE +struct conn_establishment_ind_s { + bool ext = false; + conn_establishment_ind_ies_container protocol_ies; // ... // sequence methods @@ -2637,52 +3162,482 @@ struct deactiv_trace_s { void to_json(json_writer& j) const; }; -// ForbiddenLACs ::= SEQUENCE (SIZE (1..4096)) OF OCTET STRING (SIZE (2)) -using forbidden_lacs_l = dyn_array >; - -// ForbiddenLAs-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o forbidden_las_item_ext_ies_o; - -// ForbiddenTACs ::= SEQUENCE (SIZE (1..4096)) OF OCTET STRING (SIZE (2)) -using forbidden_tacs_l = dyn_array >; - -// ForbiddenTAs-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o forbidden_tas_item_ext_ies_o; - -typedef protocol_ext_container_empty_l forbidden_las_item_ext_ies_container; +// ENB-ID ::= CHOICE +struct enb_id_c { + struct types_opts { + enum options { macro_enb_id, home_enb_id, /*...*/ short_macro_enb_id, long_macro_enb_id, nulltype } value; -// ForbiddenLAs-Item ::= SEQUENCE -struct forbidden_las_item_s { - bool ext = false; - bool ie_exts_present = false; - fixed_octstring<3, true> plmn_id; - forbidden_lacs_l forbidden_lacs; - forbidden_las_item_ext_ies_container ie_exts; - // ... + std::string to_string() const; + }; + typedef enumerated types; - // sequence methods + // choice methods + enb_id_c() = default; + enb_id_c(const enb_id_c& other); + enb_id_c& operator=(const enb_id_c& other); + ~enb_id_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; -}; - -typedef protocol_ext_container_empty_l forbidden_tas_item_ext_ies_container; - -// ForbiddenTAs-Item ::= SEQUENCE -struct forbidden_tas_item_s { - bool ext = false; - bool ie_exts_present = false; - fixed_octstring<3, true> plmn_id; - forbidden_tacs_l forbidden_tacs; - forbidden_tas_item_ext_ies_container ie_exts; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; + // getters + fixed_bitstring<20, false, true>& macro_enb_id() + { + assert_choice_type("macroENB-ID", type_.to_string(), "ENB-ID"); + return c.get >(); + } + fixed_bitstring<28, false, true>& home_enb_id() + { + assert_choice_type("homeENB-ID", type_.to_string(), "ENB-ID"); + return c.get >(); + } + fixed_bitstring<18, false, true>& short_macro_enb_id() + { + assert_choice_type("short-macroENB-ID", type_.to_string(), "ENB-ID"); + return c.get >(); + } + fixed_bitstring<21, false, true>& long_macro_enb_id() + { + assert_choice_type("long-macroENB-ID", type_.to_string(), "ENB-ID"); + return c.get >(); + } + const fixed_bitstring<20, false, true>& macro_enb_id() const + { + assert_choice_type("macroENB-ID", type_.to_string(), "ENB-ID"); + return c.get >(); + } + const fixed_bitstring<28, false, true>& home_enb_id() const + { + assert_choice_type("homeENB-ID", type_.to_string(), "ENB-ID"); + return c.get >(); + } + const fixed_bitstring<18, false, true>& short_macro_enb_id() const + { + assert_choice_type("short-macroENB-ID", type_.to_string(), "ENB-ID"); + return c.get >(); + } + const fixed_bitstring<21, false, true>& long_macro_enb_id() const + { + assert_choice_type("long-macroENB-ID", type_.to_string(), "ENB-ID"); + return c.get >(); + } + fixed_bitstring<20, false, true>& set_macro_enb_id() + { + set(types::macro_enb_id); + return c.get >(); + } + fixed_bitstring<28, false, true>& set_home_enb_id() + { + set(types::home_enb_id); + return c.get >(); + } + fixed_bitstring<18, false, true>& set_short_macro_enb_id() + { + set(types::short_macro_enb_id); + return c.get >(); + } + fixed_bitstring<21, false, true>& set_long_macro_enb_id() + { + set(types::long_macro_enb_id); + return c.get >(); + } + +private: + types type_; + choice_buffer_t > c; + + void destroy_(); +}; + +// GNB-Identity ::= CHOICE +struct gnb_id_c { + struct types_opts { + enum options { gnb_id, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::gnb_id; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + bounded_bitstring<22, 32, false, true>& gnb_id() { return c; } + const bounded_bitstring<22, 32, false, true>& gnb_id() const { return c; } + +private: + bounded_bitstring<22, 32, false, true> c; +}; + +// Global-GNB-ID-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o global_gnb_id_ext_ies_o; + +// GlobalENB-ID-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o global_enb_id_ext_ies_o; + +// GNB-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o gnb_ext_ies_o; + +typedef protocol_ext_container_empty_l global_enb_id_ext_ies_container; + +// Global-ENB-ID ::= SEQUENCE +struct global_enb_id_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<3, true> plm_nid; + enb_id_c enb_id; + global_enb_id_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l global_gnb_id_ext_ies_container; + +// Global-GNB-ID ::= SEQUENCE +struct global_gnb_id_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<3, true> plmn_id; + gnb_id_c gnb_id; + global_gnb_id_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NG-eNB-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o ng_enb_ext_ies_o; + +typedef protocol_ext_container_empty_l gnb_ext_ies_container; + +// GNB ::= SEQUENCE +struct gnb_s { + bool ext = false; + bool ie_exts_present = false; + global_gnb_id_s global_g_nb_id; + gnb_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l ng_enb_ext_ies_container; + +// NG-eNB ::= SEQUENCE +struct ng_enb_s { + bool ext = false; + bool ie_exts_present = false; + global_enb_id_s global_ng_enb_id; + ng_enb_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ContextatSource-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o contextat_source_ext_ies_o; + +// Global-RAN-NODE-ID ::= CHOICE +struct global_ran_node_id_c { + struct types_opts { + enum options { gnb, ng_enb, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + global_ran_node_id_c() = default; + global_ran_node_id_c(const global_ran_node_id_c& other); + global_ran_node_id_c& operator=(const global_ran_node_id_c& other); + ~global_ran_node_id_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 + gnb_s& gnb() + { + assert_choice_type("gNB", type_.to_string(), "Global-RAN-NODE-ID"); + return c.get(); + } + ng_enb_s& ng_enb() + { + assert_choice_type("ng-eNB", type_.to_string(), "Global-RAN-NODE-ID"); + return c.get(); + } + const gnb_s& gnb() const + { + assert_choice_type("gNB", type_.to_string(), "Global-RAN-NODE-ID"); + return c.get(); + } + const ng_enb_s& ng_enb() const + { + assert_choice_type("ng-eNB", type_.to_string(), "Global-RAN-NODE-ID"); + return c.get(); + } + gnb_s& set_gnb() + { + set(types::gnb); + return c.get(); + } + ng_enb_s& set_ng_enb() + { + set(types::ng_enb); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +typedef protocol_ext_container_empty_l contextat_source_ext_ies_container; + +// ContextatSource ::= SEQUENCE +struct contextat_source_s { + bool ext = false; + bool ie_exts_present = false; + global_ran_node_id_c source_ng_ran_node_id; + uint64_t ran_ue_ngap_id = 0; + contextat_source_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CriticalityDiagnostics-IE-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o crit_diagnostics_ie_item_ext_ies_o; + +// TypeOfError ::= ENUMERATED +struct type_of_error_opts { + enum options { not_understood, missing, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated type_of_error_e; + +typedef protocol_ext_container_empty_l crit_diagnostics_ie_item_ext_ies_container; + +// CriticalityDiagnostics-IE-Item ::= SEQUENCE +struct crit_diagnostics_ie_item_s { + bool ext = false; + bool ie_exts_present = false; + crit_e iecrit; + uint32_t ie_id = 0; + type_of_error_e type_of_error; + crit_diagnostics_ie_item_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CriticalityDiagnostics-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o crit_diagnostics_ext_ies_o; + +// CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1..256)) OF CriticalityDiagnostics-IE-Item +using crit_diagnostics_ie_list_l = dyn_array; + +// TriggeringMessage ::= ENUMERATED +struct trigger_msg_opts { + enum options { init_msg, successful_outcome, unsuccessfull_outcome, nulltype } value; + + std::string to_string() const; +}; +typedef enumerated trigger_msg_e; + +typedef protocol_ext_container_empty_l crit_diagnostics_ext_ies_container; + +// CriticalityDiagnostics ::= SEQUENCE +struct crit_diagnostics_s { + bool ext = false; + bool proc_code_present = false; + bool trigger_msg_present = false; + bool proc_crit_present = false; + bool ies_crit_diagnostics_present = false; + bool ie_exts_present = false; + uint16_t proc_code = 0; + trigger_msg_e trigger_msg; + crit_e proc_crit; + crit_diagnostics_ie_list_l ies_crit_diagnostics; + crit_diagnostics_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DeactivateTraceIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct deactiv_trace_ies_o { + // Value ::= OPEN TYPE + struct value_c { + struct types_opts { + enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, e_utran_trace_id, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + value_c() = default; + value_c(const value_c& other); + value_c& operator=(const value_c& other); + ~value_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 + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + fixed_octstring<8, true>& e_utran_trace_id(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const fixed_octstring<8, true>& e_utran_trace_id() const; + + private: + types type_; + choice_buffer_t > c; + + void destroy_(); + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static value_c get_value(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +struct deactiv_trace_ies_container { + template + using ie_field_s = protocol_ie_container_item_s; + + // member variables + ie_field_s > mme_ue_s1ap_id; + ie_field_s > enb_ue_s1ap_id; + ie_field_s > e_utran_trace_id; + + // sequence methods + deactiv_trace_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; }; +// DeactivateTrace ::= SEQUENCE +struct deactiv_trace_s { + bool ext = false; + deactiv_trace_ies_container protocol_ies; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ForbiddenLACs ::= SEQUENCE (SIZE (1..4096)) OF OCTET STRING (SIZE (2)) +using forbidden_lacs_l = dyn_array >; + +// ForbiddenLAs-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o forbidden_las_item_ext_ies_o; + +// ForbiddenTACs ::= SEQUENCE (SIZE (1..4096)) OF OCTET STRING (SIZE (2)) +using forbidden_tacs_l = dyn_array >; + +// ForbiddenTAs-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o forbidden_tas_item_ext_ies_o; + +typedef protocol_ext_container_empty_l forbidden_las_item_ext_ies_container; + +// ForbiddenLAs-Item ::= SEQUENCE +struct forbidden_las_item_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<3, true> plmn_id; + forbidden_lacs_l forbidden_lacs; + forbidden_las_item_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l forbidden_tas_item_ext_ies_container; + +// ForbiddenTAs-Item ::= SEQUENCE +struct forbidden_tas_item_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<3, true> plmn_id; + forbidden_tacs_l forbidden_tacs; + forbidden_tas_item_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NRrestrictionin5GS ::= ENUMERATED +struct nrrestrictin5_gs_opts { + enum options { nrrestrictedin5_gs, /*...*/ nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated nrrestrictin5_gs_e; + +// NRrestrictioninEPSasSecondaryRAT ::= ENUMERATED +struct nrrestrictin_ep_sas_secondary_rat_opts { + enum options { nrrestrictedin_ep_sas_secondary_rat, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated nrrestrictin_ep_sas_secondary_rat_e; + +// UnlicensedSpectrumRestriction ::= ENUMERATED +struct unlicensed_spec_restrict_opts { + enum options { unlicensed_restricted, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated unlicensed_spec_restrict_e; + // EPLMNs ::= SEQUENCE (SIZE (1..15)) OF OCTET STRING (SIZE (3)) using eplmns_l = bounded_array, 15>; @@ -2701,7 +3656,64 @@ using forbidden_las_l = dyn_array; using forbidden_tas_l = dyn_array; // HandoverRestrictionList-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o ho_restrict_list_ext_ies_o; +struct ho_restrict_list_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { + nrrestrictin_ep_sas_secondary_rat, + unlicensed_spec_restrict, + cn_type_restricts, + nrrestrictin5_gs, + last_ng_ranplmn_id, + nulltype + } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; + }; + typedef enumerated types; + + // choice methods + ext_c() = default; + ext_c(const ext_c& other); + ext_c& operator=(const ext_c& other); + ~ext_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 + nrrestrictin_ep_sas_secondary_rat_e& nrrestrictin_ep_sas_secondary_rat(); + unlicensed_spec_restrict_e& unlicensed_spec_restrict(); + cn_type_restricts_l& cn_type_restricts(); + nrrestrictin5_gs_e& nrrestrictin5_gs(); + plm_nid& last_ng_ranplmn_id(); + const nrrestrictin_ep_sas_secondary_rat_e& nrrestrictin_ep_sas_secondary_rat() const; + const unlicensed_spec_restrict_e& unlicensed_spec_restrict() const; + const cn_type_restricts_l& cn_type_restricts() const; + const nrrestrictin5_gs_e& nrrestrictin5_gs() const; + const plm_nid& last_ng_ranplmn_id() const; + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +// NRUESecurityCapabilities-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o nrue_security_cap_ext_ies_o; // DLNASPDUDeliveryAckRequest ::= ENUMERATED struct dlnaspdu_delivery_ack_request_opts { @@ -2711,7 +3723,28 @@ struct dlnaspdu_delivery_ack_request_opts { }; typedef enumerated dlnaspdu_delivery_ack_request_e; -typedef protocol_ext_container_empty_l ho_restrict_list_ext_ies_container; +struct ho_restrict_list_ext_ies_container { + template + using ie_field_s = protocol_ext_container_item_s; + + // member variables + bool nrrestrictin_ep_sas_secondary_rat_present = false; + bool unlicensed_spec_restrict_present = false; + bool cn_type_restricts_present = false; + bool nrrestrictin5_gs_present = false; + bool last_ng_ranplmn_id_present = false; + ie_field_s nrrestrictin_ep_sas_secondary_rat; + ie_field_s unlicensed_spec_restrict; + ie_field_s > cn_type_restricts; + ie_field_s nrrestrictin5_gs; + ie_field_s last_ng_ranplmn_id; + + // sequence methods + ho_restrict_list_ext_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; // HandoverRestrictionList ::= SEQUENCE struct ho_restrict_list_s { @@ -2735,6 +3768,23 @@ struct ho_restrict_list_s { void to_json(json_writer& j) const; }; +typedef protocol_ext_container_empty_l nrue_security_cap_ext_ies_container; + +// NRUESecurityCapabilities ::= SEQUENCE +struct nrue_security_cap_s { + bool ext = false; + bool ie_exts_present = false; + fixed_bitstring<16, true, true> nrencryption_algorithms; + fixed_bitstring<16, true, true> nrintegrity_protection_algorithms; + nrue_security_cap_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // PendingDataIndication ::= ENUMERATED struct pending_data_ind_opts { enum options { true_value, /*...*/ nulltype } value; @@ -2751,6 +3801,14 @@ struct srvcc_operation_possible_opts { }; typedef enumerated srvcc_operation_possible_e; +// UECapabilityInfoRequest ::= ENUMERATED +struct ue_cap_info_request_opts { + enum options { requested, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated ue_cap_info_request_e; + // DownlinkNASTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES struct dl_nas_transport_ies_o { // Value ::= OPEN TYPE @@ -2766,8 +3824,13 @@ struct dl_nas_transport_ies_o { ue_radio_cap, dlnaspdu_delivery_ack_request, enhanced_coverage_restricted, + nrue_security_cap, ce_mode_brestricted, + ue_cap_info_request, + end_ind, pending_data_ind, + subscription_based_ue_differentiation_info, + add_rrm_prio_idx, nulltype } value; @@ -2786,32 +3849,47 @@ struct dl_nas_transport_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - unbounded_octstring& nas_pdu(); - ho_restrict_list_s& ho_restrict_list(); - uint16_t& subscriber_profile_idfor_rfp(); - srvcc_operation_possible_e& srvcc_operation_possible(); - unbounded_octstring& ue_radio_cap(); - dlnaspdu_delivery_ack_request_e& dlnaspdu_delivery_ack_request(); - enhanced_coverage_restricted_e& enhanced_coverage_restricted(); - ce_mode_brestricted_e& ce_mode_brestricted(); - pending_data_ind_e& pending_data_ind(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const unbounded_octstring& nas_pdu() const; - const ho_restrict_list_s& ho_restrict_list() const; - const uint16_t& subscriber_profile_idfor_rfp() const; - const srvcc_operation_possible_e& srvcc_operation_possible() const; - const unbounded_octstring& ue_radio_cap() const; - const dlnaspdu_delivery_ack_request_e& dlnaspdu_delivery_ack_request() const; - const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; - const ce_mode_brestricted_e& ce_mode_brestricted() const; - const pending_data_ind_e& pending_data_ind() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + unbounded_octstring& nas_pdu(); + ho_restrict_list_s& ho_restrict_list(); + uint16_t& subscriber_profile_idfor_rfp(); + srvcc_operation_possible_e& srvcc_operation_possible(); + unbounded_octstring& ue_radio_cap(); + dlnaspdu_delivery_ack_request_e& dlnaspdu_delivery_ack_request(); + enhanced_coverage_restricted_e& enhanced_coverage_restricted(); + nrue_security_cap_s& nrue_security_cap(); + ce_mode_brestricted_e& ce_mode_brestricted(); + ue_cap_info_request_e& ue_cap_info_request(); + end_ind_e& end_ind(); + pending_data_ind_e& pending_data_ind(); + subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info(); + fixed_bitstring<32, false, true>& add_rrm_prio_idx(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const unbounded_octstring& nas_pdu() const; + const ho_restrict_list_s& ho_restrict_list() const; + const uint16_t& subscriber_profile_idfor_rfp() const; + const srvcc_operation_possible_e& srvcc_operation_possible() const; + const unbounded_octstring& ue_radio_cap() const; + const dlnaspdu_delivery_ack_request_e& dlnaspdu_delivery_ack_request() const; + const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; + const nrue_security_cap_s& nrue_security_cap() const; + const ce_mode_brestricted_e& ce_mode_brestricted() const; + const ue_cap_info_request_e& ue_cap_info_request() const; + const end_ind_e& end_ind() const; + const pending_data_ind_e& pending_data_ind() const; + const subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info() const; + const fixed_bitstring<32, false, true>& add_rrm_prio_idx() const; private: - types type_; - choice_buffer_t > c; + types type_; + choice_buffer_t, + ho_restrict_list_s, + nrue_security_cap_s, + subscription_based_ue_differentiation_info_s, + unbounded_octstring > + c; void destroy_(); }; @@ -2829,14 +3907,19 @@ struct dl_nas_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ho_restrict_list_present = false; - bool subscriber_profile_idfor_rfp_present = false; - bool srvcc_operation_possible_present = false; - bool ue_radio_cap_present = false; - bool dlnaspdu_delivery_ack_request_present = false; - bool enhanced_coverage_restricted_present = false; - bool ce_mode_brestricted_present = false; - bool pending_data_ind_present = false; + bool ho_restrict_list_present = false; + bool subscriber_profile_idfor_rfp_present = false; + bool srvcc_operation_possible_present = false; + bool ue_radio_cap_present = false; + bool dlnaspdu_delivery_ack_request_present = false; + bool enhanced_coverage_restricted_present = false; + bool nrue_security_cap_present = false; + bool ce_mode_brestricted_present = false; + bool ue_cap_info_request_present = false; + bool end_ind_present = false; + bool pending_data_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool add_rrm_prio_idx_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s > nas_pdu; @@ -2846,8 +3929,13 @@ struct dl_nas_transport_ies_container { ie_field_s > ue_radio_cap; ie_field_s dlnaspdu_delivery_ack_request; ie_field_s enhanced_coverage_restricted; + ie_field_s nrue_security_cap; ie_field_s ce_mode_brestricted; + ie_field_s ue_cap_info_request; + ie_field_s end_ind; ie_field_s pending_data_ind; + ie_field_s subscription_based_ue_differentiation_info; + ie_field_s > add_rrm_prio_idx; // sequence methods dl_nas_transport_ies_container(); @@ -3534,50 +4622,6 @@ struct erab_item_ies_o { static presence_e get_presence(const uint32_t& id); }; -// GBR-QosInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o gbr_qos_info_ext_ies_o; - -// E-RABQoSParameters-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o erab_qos_params_ext_ies_o; - -typedef protocol_ext_container_empty_l gbr_qos_info_ext_ies_container; - -// GBR-QosInformation ::= SEQUENCE -struct gbr_qos_info_s { - bool ext = false; - bool ie_exts_present = false; - uint64_t erab_maximum_bitrate_dl = 0; - uint64_t erab_maximum_bitrate_ul = 0; - uint64_t erab_guaranteed_bitrate_dl = 0; - uint64_t erab_guaranteed_bitrate_ul = 0; - gbr_qos_info_ext_ies_container ie_exts; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -typedef protocol_ext_container_empty_l erab_qos_params_ext_ies_container; - -// E-RABLevelQoSParameters ::= SEQUENCE -struct erab_level_qos_params_s { - bool ext = false; - bool gbr_qos_info_present = false; - bool ie_exts_present = false; - uint16_t qci = 0; - alloc_and_retention_prio_s alloc_retention_prio; - gbr_qos_info_s gbr_qos_info; - erab_qos_params_ext_ies_container ie_exts; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // E-RABList ::= SEQUENCE (SIZE (1..256)) OF ProtocolIE-SingleContainer{S1AP-PROTOCOL-IES : IEsSetParam} using erab_list_l = dyn_array >; @@ -3738,12 +4782,103 @@ struct erab_mod_confirm_s { void to_json(json_writer& j) const; }; +// E-RABUsageReportItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o erabusage_report_item_ext_ies_o; + +typedef protocol_ext_container_empty_l erabusage_report_item_ext_ies_container; + +// E-RABUsageReportItem ::= SEQUENCE +struct erabusage_report_item_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<4, true> start_timestamp; + fixed_octstring<4, true> end_timestamp; + uint64_t usage_count_ul = 0; + uint64_t usage_count_dl = 0; + erabusage_report_item_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// E-RABUsageReportItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct erabusage_report_item_ies_o { + // Value ::= OPEN TYPE + struct value_c { + struct types_opts { + enum options { erabusage_report_item, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::erabusage_report_item; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + erabusage_report_item_s& erabusage_report_item() { return c; } + const erabusage_report_item_s& erabusage_report_item() const { return c; } + + private: + erabusage_report_item_s c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static value_c get_value(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +// NR-CGI-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o nr_cgi_ext_ies_o; + // E-RABNotToBeModifiedItemBearerModInd-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o erab_not_to_be_modified_item_bearer_mod_ind_ext_ies_o; // E-RABToBeModifiedItemBearerModInd-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o erab_to_be_modified_item_bearer_mod_ind_ext_ies_o; +// E-RABUsageReportList ::= SEQUENCE (SIZE (1..2)) OF ProtocolIE-SingleContainer{S1AP-PROTOCOL-IES : IEsSetParam} +using erabusage_report_list_l = bounded_array, 2>; + +typedef protocol_ext_container_empty_l nr_cgi_ext_ies_container; + +// NR-CGI ::= SEQUENCE +struct nr_cgi_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<3, true> plmn_id; + fixed_bitstring<36, false, true> nrcell_id; + nr_cgi_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PSCellInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o ps_cell_info_ext_ies_o; + +// SecondaryRATDataUsageReportItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o secondary_rat_data_usage_report_item_ext_ies_o; + +// SecondaryRATType ::= ENUMERATED +struct secondary_rat_type_opts { + enum options { nr, /*...*/ unlicensed, nulltype } value; + + std::string to_string() const; +}; +typedef enumerated secondary_rat_type_e; + typedef protocol_ext_container_empty_l erab_not_to_be_modified_item_bearer_mod_ind_ext_ies_container; // E-RABNotToBeModifiedItemBearerModInd ::= SEQUENCE @@ -3780,31 +4915,129 @@ struct erab_to_be_modified_item_bearer_mod_ind_s { void to_json(json_writer& j) const; }; -// E-RABNotToBeModifiedItemBearerModIndIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -struct erab_not_to_be_modified_item_bearer_mod_ind_ies_o { +typedef protocol_ext_container_empty_l ps_cell_info_ext_ies_container; + +// PSCellInformation ::= SEQUENCE +struct ps_cell_info_s { + bool ext = false; + bool ie_exts_present = false; + nr_cgi_s ncgi; + ps_cell_info_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l secondary_rat_data_usage_report_item_ext_ies_container; + +// SecondaryRATDataUsageReportItem ::= SEQUENCE +struct secondary_rat_data_usage_report_item_s { + bool ext = false; + bool ie_exts_present = false; + uint8_t erab_id = 0; + secondary_rat_type_e secondary_rat_type; + erabusage_report_list_l erabusage_report_list; + secondary_rat_data_usage_report_item_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// E-RABNotToBeModifiedItemBearerModIndIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct erab_not_to_be_modified_item_bearer_mod_ind_ies_o { + // Value ::= OPEN TYPE + struct value_c { + struct types_opts { + enum options { erab_not_to_be_modified_item_bearer_mod_ind, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::erab_not_to_be_modified_item_bearer_mod_ind; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + erab_not_to_be_modified_item_bearer_mod_ind_s& erab_not_to_be_modified_item_bearer_mod_ind() { return c; } + const erab_not_to_be_modified_item_bearer_mod_ind_s& erab_not_to_be_modified_item_bearer_mod_ind() const + { + return c; + } + + private: + erab_not_to_be_modified_item_bearer_mod_ind_s c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static value_c get_value(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +// E-RABToBeModifiedItemBearerModIndIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct erab_to_be_modified_item_bearer_mod_ind_ies_o { + // Value ::= OPEN TYPE + struct value_c { + struct types_opts { + enum options { erab_to_be_modified_item_bearer_mod_ind, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::erab_to_be_modified_item_bearer_mod_ind; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + erab_to_be_modified_item_bearer_mod_ind_s& erab_to_be_modified_item_bearer_mod_ind() { return c; } + const erab_to_be_modified_item_bearer_mod_ind_s& erab_to_be_modified_item_bearer_mod_ind() const { return c; } + + private: + erab_to_be_modified_item_bearer_mod_ind_s c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static value_c get_value(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +// SecondaryRATDataUsageReportItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct secondary_rat_data_usage_report_item_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { erab_not_to_be_modified_item_bearer_mod_ind, nulltype } value; + enum options { secondary_rat_data_usage_report_item, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - types type() const { return types::erab_not_to_be_modified_item_bearer_mod_ind; } + types type() const { return types::secondary_rat_data_usage_report_item; } SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - erab_not_to_be_modified_item_bearer_mod_ind_s& erab_not_to_be_modified_item_bearer_mod_ind() { return c; } - const erab_not_to_be_modified_item_bearer_mod_ind_s& erab_not_to_be_modified_item_bearer_mod_ind() const - { - return c; - } + secondary_rat_data_usage_report_item_s& secondary_rat_data_usage_report_item() { return c; } + const secondary_rat_data_usage_report_item_s& secondary_rat_data_usage_report_item() const { return c; } private: - erab_not_to_be_modified_item_bearer_mod_ind_s c; + secondary_rat_data_usage_report_item_s c; }; // members lookup methods @@ -3815,40 +5048,45 @@ struct erab_not_to_be_modified_item_bearer_mod_ind_ies_o { static presence_e get_presence(const uint32_t& id); }; -// E-RABToBeModifiedItemBearerModIndIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -struct erab_to_be_modified_item_bearer_mod_ind_ies_o { - // Value ::= OPEN TYPE - struct value_c { +// Tunnel-Information-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o tunnel_info_ext_ies_o; + +// UserLocationInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +struct user_location_info_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { struct types_opts { - enum options { erab_to_be_modified_item_bearer_mod_ind, nulltype } value; + enum options { ps_cell_info, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - types type() const { return types::erab_to_be_modified_item_bearer_mod_ind; } + types type() const { return types::ps_cell_info; } SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - erab_to_be_modified_item_bearer_mod_ind_s& erab_to_be_modified_item_bearer_mod_ind() { return c; } - const erab_to_be_modified_item_bearer_mod_ind_s& erab_to_be_modified_item_bearer_mod_ind() const { return c; } + ps_cell_info_s& ps_cell_info() { return c; } + const ps_cell_info_s& ps_cell_info() const { return c; } private: - erab_to_be_modified_item_bearer_mod_ind_s c; + ps_cell_info_s c; }; // members lookup methods static uint32_t idx_to_id(uint32_t idx); static bool is_id_valid(const uint32_t& id); static crit_e get_crit(const uint32_t& id); - static value_c get_value(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); static presence_e get_presence(const uint32_t& id); }; -// Tunnel-Information-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o tunnel_info_ext_ies_o; +// SecondaryRATDataUsageReportList ::= SEQUENCE (SIZE (1..256)) OF ProtocolIE-SingleContainer{S1AP-PROTOCOL-IES : +// IEsSetParam} +using secondary_rat_data_usage_report_list_l = + dyn_array >; typedef protocol_ext_container_empty_l tunnel_info_ext_ies_container; @@ -3868,6 +5106,21 @@ struct tunnel_info_s { void to_json(json_writer& j) const; }; +// UserLocationInformation ::= SEQUENCE +struct user_location_info_s { + bool ext = false; + bool ie_exts_present = false; + eutran_cgi_s eutran_cgi; + tai_s tai; + protocol_ext_container_l ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // E-RABModificationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES struct erab_mod_ind_ies_o { // Value ::= OPEN TYPE @@ -3880,6 +5133,8 @@ struct erab_mod_ind_ies_o { erab_not_to_be_modified_list_bearer_mod_ind, csg_membership_info, tunnel_info_for_bbf, + secondary_rat_data_usage_report_list, + user_location_info, nulltype } value; @@ -3902,24 +5157,30 @@ struct erab_mod_ind_ies_o { uint32_t& enb_ue_s1ap_id(); erab_ie_container_list_l& erab_to_be_modified_list_bearer_mod_ind(); erab_ie_container_list_l& - erab_not_to_be_modified_list_bearer_mod_ind(); - csg_membership_info_s& csg_membership_info(); - tunnel_info_s& tunnel_info_for_bbf(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; + erab_not_to_be_modified_list_bearer_mod_ind(); + csg_membership_info_s& csg_membership_info(); + tunnel_info_s& tunnel_info_for_bbf(); + secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list(); + user_location_info_s& user_location_info(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; const erab_ie_container_list_l& erab_to_be_modified_list_bearer_mod_ind() const; const erab_ie_container_list_l& - erab_not_to_be_modified_list_bearer_mod_ind() const; - const csg_membership_info_s& csg_membership_info() const; - const tunnel_info_s& tunnel_info_for_bbf() const; + erab_not_to_be_modified_list_bearer_mod_ind() const; + const csg_membership_info_s& csg_membership_info() const; + const tunnel_info_s& tunnel_info_for_bbf() const; + const secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list() const; + const user_location_info_s& user_location_info() const; private: types type_; choice_buffer_t, erab_ie_container_list_l, - tunnel_info_s> + secondary_rat_data_usage_report_list_l, + tunnel_info_s, + user_location_info_s> c; void destroy_(); @@ -3941,6 +5202,8 @@ struct erab_mod_ind_ies_container { bool erab_not_to_be_modified_list_bearer_mod_ind_present = false; bool csg_membership_info_present = false; bool tunnel_info_for_bbf_present = false; + bool secondary_rat_data_usage_report_list_present = false; + bool user_location_info_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s > @@ -3949,6 +5212,9 @@ struct erab_mod_ind_ies_container { erab_not_to_be_modified_list_bearer_mod_ind; ie_field_s csg_membership_info; ie_field_s tunnel_info_for_bbf; + ie_field_s, 1, 256, true> > + secondary_rat_data_usage_report_list; + ie_field_s user_location_info; // sequence methods erab_mod_ind_ies_container(); @@ -4119,14 +5385,80 @@ struct erab_to_be_modified_item_bearer_mod_req_ies_o { }; // UEAggregate-MaximumBitrates-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o ue_aggregate_maximum_bitrates_ext_ies_o; +struct ue_aggregate_maximum_bitrates_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { + extended_u_eaggregate_maximum_bit_rate_dl, + extended_u_eaggregate_maximum_bit_rate_ul, + nulltype + } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + ext_c() = default; + ext_c(const ext_c& other); + ext_c& operator=(const ext_c& other); + ~ext_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 + uint64_t& extended_u_eaggregate_maximum_bit_rate_dl(); + uint64_t& extended_u_eaggregate_maximum_bit_rate_ul(); + const uint64_t& extended_u_eaggregate_maximum_bit_rate_dl() const; + const uint64_t& extended_u_eaggregate_maximum_bit_rate_ul() const; + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; // E-RABToBeModifiedListBearerModReq ::= SEQUENCE (SIZE (1..256)) OF ProtocolIE-SingleContainer{S1AP-PROTOCOL-IES : // IEsSetParam} using erab_to_be_modified_list_bearer_mod_req_l = dyn_array >; -typedef protocol_ext_container_empty_l ue_aggregate_maximum_bitrates_ext_ies_container; +// SecondaryRATDataUsageRequest ::= ENUMERATED +struct secondary_rat_data_usage_request_opts { + enum options { requested, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated secondary_rat_data_usage_request_e; + +struct ue_aggregate_maximum_bitrates_ext_ies_container { + template + using ie_field_s = protocol_ext_container_item_s; + + // member variables + bool extended_u_eaggregate_maximum_bit_rate_dl_present = false; + bool extended_u_eaggregate_maximum_bit_rate_ul_present = false; + ie_field_s > extended_u_eaggregate_maximum_bit_rate_dl; + ie_field_s > extended_u_eaggregate_maximum_bit_rate_ul; + + // sequence methods + ue_aggregate_maximum_bitrates_ext_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; // UEAggregateMaximumBitrate ::= SEQUENCE struct ue_aggregate_maximum_bitrate_s { @@ -4153,6 +5485,7 @@ struct erab_modify_request_ies_o { enb_ue_s1ap_id, ueaggregate_maximum_bitrate, erab_to_be_modified_list_bearer_mod_req, + secondary_rat_data_usage_request, nulltype } value; @@ -4175,10 +5508,12 @@ struct erab_modify_request_ies_o { uint32_t& enb_ue_s1ap_id(); ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate(); erab_to_be_modified_list_bearer_mod_req_l& erab_to_be_modified_list_bearer_mod_req(); + secondary_rat_data_usage_request_e& secondary_rat_data_usage_request(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate() const; const erab_to_be_modified_list_bearer_mod_req_l& erab_to_be_modified_list_bearer_mod_req() const; + const secondary_rat_data_usage_request_e& secondary_rat_data_usage_request() const; private: types type_; @@ -4200,12 +5535,14 @@ struct erab_modify_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ueaggregate_maximum_bitrate_present = false; + bool ueaggregate_maximum_bitrate_present = false; + bool secondary_rat_data_usage_request_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s ueaggregate_maximum_bitrate; ie_field_s, 1, 256, true> > - erab_to_be_modified_list_bearer_mod_req; + erab_to_be_modified_list_bearer_mod_req; + ie_field_s secondary_rat_data_usage_request; // sequence methods erab_modify_request_ies_container(); @@ -4237,6 +5574,7 @@ struct erab_modify_resp_ies_o { erab_modify_list_bearer_mod_res, erab_failed_to_modify_list, crit_diagnostics, + secondary_rat_data_usage_report_list, nulltype } value; @@ -4255,20 +5593,26 @@ struct erab_modify_resp_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - erab_modify_list_bearer_mod_res_l& erab_modify_list_bearer_mod_res(); - erab_list_l& erab_failed_to_modify_list(); - crit_diagnostics_s& crit_diagnostics(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const erab_modify_list_bearer_mod_res_l& erab_modify_list_bearer_mod_res() const; - const erab_list_l& erab_failed_to_modify_list() const; - const crit_diagnostics_s& crit_diagnostics() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + erab_modify_list_bearer_mod_res_l& erab_modify_list_bearer_mod_res(); + erab_list_l& erab_failed_to_modify_list(); + crit_diagnostics_s& crit_diagnostics(); + secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const erab_modify_list_bearer_mod_res_l& erab_modify_list_bearer_mod_res() const; + const erab_list_l& erab_failed_to_modify_list() const; + const crit_diagnostics_s& crit_diagnostics() const; + const secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t + c; void destroy_(); }; @@ -4286,15 +5630,18 @@ struct erab_modify_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_modify_list_bearer_mod_res_present = false; - bool erab_failed_to_modify_list_present = false; - bool crit_diagnostics_present = false; + bool erab_modify_list_bearer_mod_res_present = false; + bool erab_failed_to_modify_list_present = false; + bool crit_diagnostics_present = false; + bool secondary_rat_data_usage_report_list_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s, 1, 256, true> > erab_modify_list_bearer_mod_res; ie_field_s, 1, 256, true> > erab_failed_to_modify_list; ie_field_s crit_diagnostics; + ie_field_s, 1, 256, true> > + secondary_rat_data_usage_report_list; // sequence methods erab_modify_resp_ies_container(); @@ -4402,32 +5749,19 @@ struct erab_release_cmd_s { void to_json(json_writer& j) const; }; -// UserLocationInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o user_location_info_ext_ies_o; - -typedef protocol_ext_container_empty_l user_location_info_ext_ies_container; - -// UserLocationInformation ::= SEQUENCE -struct user_location_info_s { - bool ext = false; - bool ie_exts_present = false; - eutran_cgi_s eutran_cgi; - tai_s tai; - user_location_info_ext_ies_container ie_exts; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // E-RABReleaseIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES struct erab_release_ind_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, erab_released_list, user_location_info, nulltype } value; + enum options { + mme_ue_s1ap_id, + enb_ue_s1ap_id, + erab_released_list, + user_location_info, + secondary_rat_data_usage_report_list, + nulltype + } value; std::string to_string() const; }; @@ -4444,18 +5778,20 @@ struct erab_release_ind_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - erab_list_l& erab_released_list(); - user_location_info_s& user_location_info(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const erab_list_l& erab_released_list() const; - const user_location_info_s& user_location_info() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + erab_list_l& erab_released_list(); + user_location_info_s& user_location_info(); + secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const erab_list_l& erab_released_list() const; + const user_location_info_s& user_location_info() const; + const secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; @@ -4473,11 +5809,14 @@ struct erab_release_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool user_location_info_present = false; + bool user_location_info_present = false; + bool secondary_rat_data_usage_report_list_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s, 1, 256, true> > erab_released_list; ie_field_s user_location_info; + ie_field_s, 1, 256, true> > + secondary_rat_data_usage_report_list; // sequence methods erab_release_ind_ies_container(); @@ -4566,6 +5905,7 @@ struct erab_release_resp_ies_o { erab_failed_to_release_list, crit_diagnostics, user_location_info, + secondary_rat_data_usage_report_list, nulltype } value; @@ -4584,22 +5924,29 @@ struct erab_release_resp_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - erab_release_list_bearer_rel_comp_l& erab_release_list_bearer_rel_comp(); - erab_list_l& erab_failed_to_release_list(); - crit_diagnostics_s& crit_diagnostics(); - user_location_info_s& user_location_info(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const erab_release_list_bearer_rel_comp_l& erab_release_list_bearer_rel_comp() const; - const erab_list_l& erab_failed_to_release_list() const; - const crit_diagnostics_s& crit_diagnostics() const; - const user_location_info_s& user_location_info() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + erab_release_list_bearer_rel_comp_l& erab_release_list_bearer_rel_comp(); + erab_list_l& erab_failed_to_release_list(); + crit_diagnostics_s& crit_diagnostics(); + user_location_info_s& user_location_info(); + secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const erab_release_list_bearer_rel_comp_l& erab_release_list_bearer_rel_comp() const; + const erab_list_l& erab_failed_to_release_list() const; + const crit_diagnostics_s& crit_diagnostics() const; + const user_location_info_s& user_location_info() const; + const secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t + c; void destroy_(); }; @@ -4617,10 +5964,11 @@ struct erab_release_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_release_list_bearer_rel_comp_present = false; - bool erab_failed_to_release_list_present = false; - bool crit_diagnostics_present = false; - bool user_location_info_present = false; + bool erab_release_list_bearer_rel_comp_present = false; + bool erab_failed_to_release_list_present = false; + bool crit_diagnostics_present = false; + bool user_location_info_present = false; + bool secondary_rat_data_usage_report_list_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s, 1, 256, true> > @@ -4628,6 +5976,8 @@ struct erab_release_resp_ies_container { ie_field_s, 1, 256, true> > erab_failed_to_release_list; ie_field_s crit_diagnostics; ie_field_s user_location_info; + ie_field_s, 1, 256, true> > + secondary_rat_data_usage_report_list; // sequence methods erab_release_resp_ies_container(); @@ -5343,133 +6693,23 @@ struct erab_to_be_switched_dl_item_ies_o { static uint32_t idx_to_id(uint32_t idx); static bool is_id_valid(const uint32_t& id); static crit_e get_crit(const uint32_t& id); - static value_c get_value(const uint32_t& id); - static presence_e get_presence(const uint32_t& id); -}; - -// E-RABToBeSwitchedULItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o erab_to_be_switched_ul_item_ext_ies_o; - -typedef protocol_ext_container_empty_l erab_to_be_switched_ul_item_ext_ies_container; - -// E-RABToBeSwitchedULItem ::= SEQUENCE -struct erab_to_be_switched_ul_item_s { - bool ext = false; - bool ie_exts_present = false; - uint8_t erab_id = 0; - bounded_bitstring<1, 160, true, true> transport_layer_address; - fixed_octstring<4, true> gtp_teid; - erab_to_be_switched_ul_item_ext_ies_container ie_exts; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// E-RABToBeSwitchedULItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -struct erab_to_be_switched_ul_item_ies_o { - // Value ::= OPEN TYPE - struct value_c { - struct types_opts { - enum options { erab_to_be_switched_ul_item, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - types type() const { return types::erab_to_be_switched_ul_item; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - erab_to_be_switched_ul_item_s& erab_to_be_switched_ul_item() { return c; } - const erab_to_be_switched_ul_item_s& erab_to_be_switched_ul_item() const { return c; } - - private: - erab_to_be_switched_ul_item_s c; - }; - - // members lookup methods - static uint32_t idx_to_id(uint32_t idx); - static bool is_id_valid(const uint32_t& id); - static crit_e get_crit(const uint32_t& id); - static value_c get_value(const uint32_t& id); - static presence_e get_presence(const uint32_t& id); -}; - -// ECGI-List ::= SEQUENCE (SIZE (1..256)) OF EUTRAN-CGI -using ecgi_list_l = dyn_array; - -// ECGIListForRestart ::= SEQUENCE (SIZE (1..256)) OF EUTRAN-CGI -using ecgi_list_for_restart_l = dyn_array; - -// EHRPDMultiSectorLoadReportingResponseItem ::= SEQUENCE -struct ehrpd_multi_sector_load_report_resp_item_s { - bool ext = false; - fixed_octstring<16, true> ehrpd_sector_id; - ehrpd_sector_load_report_resp_s ehrpd_sector_load_report_resp; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ENB-StatusTransfer-TransparentContainer-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o enb_status_transfer_transparent_container_ext_ies_o; - -typedef protocol_ext_container_empty_l enb_status_transfer_transparent_container_ext_ies_container; - -// ENB-StatusTransfer-TransparentContainer ::= SEQUENCE -struct enb_status_transfer_transparent_container_s { - bool ext = false; - bool ie_exts_present = false; - bearers_subject_to_status_transfer_list_l bearers_subject_to_status_transfer_list; - enb_status_transfer_transparent_container_ext_ies_container ie_exts; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// S-TMSI-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o s_tmsi_ext_ies_o; - -// UL-CP-SecurityInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o ul_cp_security_info_ext_ies_o; - -typedef protocol_ext_container_empty_l s_tmsi_ext_ies_container; - -// S-TMSI ::= SEQUENCE -struct s_tmsi_s { - bool ext = false; - bool ie_exts_present = false; - fixed_octstring<1, true> mmec; - fixed_octstring<4, true> m_tmsi; - s_tmsi_ext_ies_container ie_exts; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; + static value_c get_value(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); }; -typedef protocol_ext_container_empty_l ul_cp_security_info_ext_ies_container; +// E-RABToBeSwitchedULItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o erab_to_be_switched_ul_item_ext_ies_o; -// UL-CP-SecurityInformation ::= SEQUENCE -struct ul_cp_security_info_s { - bool ext = false; - bool ie_exts_present = false; - fixed_bitstring<16, false, true> ul_nas_mac; - fixed_bitstring<5, false, true> ul_nas_count; - ul_cp_security_info_ext_ies_container ie_exts; +typedef protocol_ext_container_empty_l erab_to_be_switched_ul_item_ext_ies_container; + +// E-RABToBeSwitchedULItem ::= SEQUENCE +struct erab_to_be_switched_ul_item_s { + bool ext = false; + bool ie_exts_present = false; + uint8_t erab_id = 0; + bounded_bitstring<1, 160, true, true> transport_layer_address; + fixed_octstring<4, true> gtp_teid; + erab_to_be_switched_ul_item_ext_ies_container ie_exts; // ... // sequence methods @@ -5478,46 +6718,28 @@ struct ul_cp_security_info_s { void to_json(json_writer& j) const; }; -// ENBCPRelocationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -struct enbcp_relocation_ind_ies_o { +// E-RABToBeSwitchedULItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct erab_to_be_switched_ul_item_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { enb_ue_s1ap_id, s_tmsi, eutran_cgi, tai, ul_cp_security_info, nulltype } value; - typedef uint8_t number_type; + enum options { erab_to_be_switched_ul_item, nulltype } value; std::string to_string() const; - uint8_t to_number() const; }; typedef enumerated types; // choice methods - value_c() = default; - value_c(const value_c& other); - value_c& operator=(const value_c& other); - ~value_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } + types type() const { return types::erab_to_be_switched_ul_item; } SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint32_t& enb_ue_s1ap_id(); - s_tmsi_s& s_tmsi(); - eutran_cgi_s& eutran_cgi(); - tai_s& tai(); - ul_cp_security_info_s& ul_cp_security_info(); - const uint32_t& enb_ue_s1ap_id() const; - const s_tmsi_s& s_tmsi() const; - const eutran_cgi_s& eutran_cgi() const; - const tai_s& tai() const; - const ul_cp_security_info_s& ul_cp_security_info() const; + erab_to_be_switched_ul_item_s& erab_to_be_switched_ul_item() { return c; } + const erab_to_be_switched_ul_item_s& erab_to_be_switched_ul_item() const { return c; } private: - types type_; - choice_buffer_t c; - - void destroy_(); + erab_to_be_switched_ul_item_s c; }; // members lookup methods @@ -5528,28 +6750,17 @@ struct enbcp_relocation_ind_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct enbcp_relocation_ind_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - ie_field_s > enb_ue_s1ap_id; - ie_field_s s_tmsi; - ie_field_s eutran_cgi; - ie_field_s tai; - ie_field_s ul_cp_security_info; +// ECGI-List ::= SEQUENCE (SIZE (1..256)) OF EUTRAN-CGI +using ecgi_list_l = dyn_array; - // sequence methods - enbcp_relocation_ind_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// ECGIListForRestart ::= SEQUENCE (SIZE (1..256)) OF EUTRAN-CGI +using ecgi_list_for_restart_l = dyn_array; -// ENBCPRelocationIndication ::= SEQUENCE -struct enbcp_relocation_ind_s { - bool ext = false; - enbcp_relocation_ind_ies_container protocol_ies; +// EHRPDMultiSectorLoadReportingResponseItem ::= SEQUENCE +struct ehrpd_multi_sector_load_report_resp_item_s { + bool ext = false; + fixed_octstring<16, true> ehrpd_sector_id; + ehrpd_sector_load_report_resp_s ehrpd_sector_load_report_resp; // ... // sequence methods @@ -5600,6 +6811,9 @@ using enb_indirect_x2_transport_layer_addresses_l = bounded_array; +// Global-en-gNB-ID-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o global_en_g_nb_id_ext_ies_o; + // MutingPatternInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o muting_pattern_info_ext_ies_o; @@ -5661,11 +6875,34 @@ struct time_synchronisation_info_ext_ies_o { static presence_e get_presence(const uint32_t& id); }; +// EN-DCSONeNBIdentification-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o en_dcso_nenb_identif_ext_ies_o; + +// EN-DCSONengNBIdentification-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o en_dcso_neng_nb_identif_ext_ies_o; + // ENBX2TLAs ::= SEQUENCE (SIZE (1..2)) OF BIT STRING (SIZE (1..160,...)) using enbx2_tlas_l = bounded_array, 2>; -// ListeningSubframePattern-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o listening_sf_pattern_ext_ies_o; +// FiveGSTAI-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o five_gstai_ext_ies_o; + +typedef protocol_ext_container_empty_l global_en_g_nb_id_ext_ies_container; + +// Global-en-gNB-ID ::= SEQUENCE +struct global_en_g_nb_id_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<3, true> plm_nid; + bounded_bitstring<22, 32, true, true> en_g_nb_id; + global_en_g_nb_id_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; typedef protocol_ext_container_empty_l muting_pattern_info_ext_ies_container; @@ -5763,131 +7000,402 @@ struct x2_tnl_cfg_info_ext_ies_o { const enbx2_ext_tlas_l& enbx2_extended_transport_layer_addresses() const; const enb_indirect_x2_transport_layer_addresses_l& enb_indirect_x2_transport_layer_addresses() const; - private: - types type_; - choice_buffer_t c; + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +typedef protocol_ext_container_empty_l en_dcso_nenb_identif_ext_ies_container; + +// EN-DCSONeNBIdentification ::= SEQUENCE +struct en_dcso_nenb_identif_s { + bool ext = false; + bool ie_exts_present = false; + global_enb_id_s globalenbid; + tai_s sel_tai; + en_dcso_nenb_identif_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l en_dcso_neng_nb_identif_ext_ies_container; + +// EN-DCSONengNBIdentification ::= SEQUENCE +struct en_dcso_neng_nb_identif_s { + bool ext = false; + bool ie_exts_present = false; + global_en_g_nb_id_s globaleng_nbid; + tai_s sel_tai; + en_dcso_neng_nb_identif_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EN-DCTransferTypeReply-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o en_dc_transfer_type_reply_ext_ies_o; + +// EN-DCTransferTypeRequest-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o en_dc_transfer_type_request_ext_ies_o; + +typedef protocol_ext_container_empty_l five_gstai_ext_ies_container; + +// FiveGSTAI ::= SEQUENCE +struct five_gstai_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<3, true> plm_nid; + fixed_octstring<3, true> five_gstac; + five_gstai_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SONInformation-ExtensionIE ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct son_info_ext_ie_o { + // Value ::= OPEN TYPE + struct value_c { + struct types_opts { + enum options { son_info_report, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::son_info_report; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + son_info_report_c& son_info_report() { return c; } + const son_info_report_c& son_info_report() const { return c; } + + private: + son_info_report_c c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static value_c get_value(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +// SONInformationReply-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +struct son_info_reply_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { time_synchronisation_info, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::time_synchronisation_info; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + time_synchronisation_info_s& time_synchronisation_info() { return c; } + const time_synchronisation_info_s& time_synchronisation_info() const { return c; } + + private: + time_synchronisation_info_s c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + +struct x2_tnl_cfg_info_ext_ies_container { + template + using ie_field_s = protocol_ext_container_item_s; + + // member variables + bool enbx2_extended_transport_layer_addresses_present = false; + bool enb_indirect_x2_transport_layer_addresses_present = false; + ie_field_s > enbx2_extended_transport_layer_addresses; + ie_field_s, 1, 2, true> > enb_indirect_x2_transport_layer_addresses; + + // sequence methods + x2_tnl_cfg_info_ext_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// X2TNLConfigurationInfo ::= SEQUENCE +struct x2_tnl_cfg_info_s { + bool ext = false; + bool ie_exts_present = false; + enbx2_tlas_l enbx2_transport_layer_addresses; + x2_tnl_cfg_info_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l en_dc_transfer_type_reply_ext_ies_container; + +// EN-DCTransferTypeReply ::= SEQUENCE +struct en_dc_transfer_type_reply_s { + bool ext = false; + bool ie_exts_present = false; + en_dcso_neng_nb_identif_s sourceeng_nb; + en_dcso_nenb_identif_s targetenb; + en_dc_transfer_type_reply_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +typedef protocol_ext_container_empty_l en_dc_transfer_type_request_ext_ies_container; - void destroy_(); - }; +// EN-DCTransferTypeRequest ::= SEQUENCE +struct en_dc_transfer_type_request_s { + bool ext = false; + bool targetenb_present = false; + bool associated_tai_present = false; + bool broadcast5_gstai_present = false; + bool ie_exts_present = false; + en_dcso_nenb_identif_s sourceenb; + en_dcso_neng_nb_identif_s targeteng_nb; + en_dcso_nenb_identif_s targetenb; + tai_s associated_tai; + five_gstai_s broadcast5_gstai; + en_dc_transfer_type_request_ext_ies_container ie_exts; + // ... - // members lookup methods - static uint32_t idx_to_id(uint32_t idx); - static bool is_id_valid(const uint32_t& id); - static crit_e get_crit(const uint32_t& id); - static ext_c get_ext(const uint32_t& id); - static presence_e get_presence(const uint32_t& id); + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -// ENB-ID ::= CHOICE -struct enb_id_c { +// SONInformationReply ::= SEQUENCE +struct son_info_reply_s { + bool ext = false; + bool x2_tnl_cfg_info_present = false; + bool ie_exts_present = false; + x2_tnl_cfg_info_s x2_tnl_cfg_info; + protocol_ext_container_l ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SONInformationRequest ::= ENUMERATED +struct son_info_request_opts { + enum options { x2_tnl_cfg_info, /*...*/ time_synchronisation_info, activ_muting, deactiv_muting, nulltype } value; + typedef uint8_t number_type; + + std::string to_string() const; + uint8_t to_number() const; +}; +typedef enumerated son_info_request_e; + +// EN-DCSONConfigurationTransfer-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o en_dcson_cfg_transfer_ext_ies_o; + +// EN-DCSONTransferType ::= CHOICE +struct en_dcson_transfer_type_c { struct types_opts { - enum options { macro_enb_id, home_enb_id, /*...*/ short_macro_enb_id, long_macro_enb_id, nulltype } value; + enum options { request, reply, /*...*/ nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods - enb_id_c() = default; - enb_id_c(const enb_id_c& other); - enb_id_c& operator=(const enb_id_c& other); - ~enb_id_c() { destroy_(); } + en_dcson_transfer_type_c() = default; + en_dcson_transfer_type_c(const en_dcson_transfer_type_c& other); + en_dcson_transfer_type_c& operator=(const en_dcson_transfer_type_c& other); + ~en_dcson_transfer_type_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 - fixed_bitstring<20, false, true>& macro_enb_id() + en_dc_transfer_type_request_s& request() { - assert_choice_type("macroENB-ID", type_.to_string(), "ENB-ID"); - return c.get >(); + assert_choice_type("request", type_.to_string(), "EN-DCSONTransferType"); + return c.get(); } - fixed_bitstring<28, false, true>& home_enb_id() + en_dc_transfer_type_reply_s& reply() { - assert_choice_type("homeENB-ID", type_.to_string(), "ENB-ID"); - return c.get >(); + assert_choice_type("reply", type_.to_string(), "EN-DCSONTransferType"); + return c.get(); } - fixed_bitstring<18, false, true>& short_macro_enb_id() + const en_dc_transfer_type_request_s& request() const { - assert_choice_type("short-macroENB-ID", type_.to_string(), "ENB-ID"); - return c.get >(); + assert_choice_type("request", type_.to_string(), "EN-DCSONTransferType"); + return c.get(); } - fixed_bitstring<21, false, true>& long_macro_enb_id() + const en_dc_transfer_type_reply_s& reply() const { - assert_choice_type("long-macroENB-ID", type_.to_string(), "ENB-ID"); - return c.get >(); + assert_choice_type("reply", type_.to_string(), "EN-DCSONTransferType"); + return c.get(); } - const fixed_bitstring<20, false, true>& macro_enb_id() const + en_dc_transfer_type_request_s& set_request() { - assert_choice_type("macroENB-ID", type_.to_string(), "ENB-ID"); - return c.get >(); + set(types::request); + return c.get(); } - const fixed_bitstring<28, false, true>& home_enb_id() const + en_dc_transfer_type_reply_s& set_reply() { - assert_choice_type("homeENB-ID", type_.to_string(), "ENB-ID"); - return c.get >(); + set(types::reply); + return c.get(); } - const fixed_bitstring<18, false, true>& short_macro_enb_id() const + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// SONInformation ::= CHOICE +struct son_info_c { + struct types_opts { + enum options { son_info_request, son_info_reply, /*...*/ son_info_ext, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + son_info_c() = default; + son_info_c(const son_info_c& other); + son_info_c& operator=(const son_info_c& other); + ~son_info_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 + son_info_request_e& son_info_request() { - assert_choice_type("short-macroENB-ID", type_.to_string(), "ENB-ID"); - return c.get >(); + assert_choice_type("sONInformationRequest", type_.to_string(), "SONInformation"); + return c.get(); } - const fixed_bitstring<21, false, true>& long_macro_enb_id() const + son_info_reply_s& son_info_reply() { - assert_choice_type("long-macroENB-ID", type_.to_string(), "ENB-ID"); - return c.get >(); + assert_choice_type("sONInformationReply", type_.to_string(), "SONInformation"); + return c.get(); } - fixed_bitstring<20, false, true>& set_macro_enb_id() + protocol_ie_single_container_s& son_info_ext() { - set(types::macro_enb_id); - return c.get >(); + assert_choice_type("sONInformation-Extension", type_.to_string(), "SONInformation"); + return c.get >(); } - fixed_bitstring<28, false, true>& set_home_enb_id() + const son_info_request_e& son_info_request() const { - set(types::home_enb_id); - return c.get >(); + assert_choice_type("sONInformationRequest", type_.to_string(), "SONInformation"); + return c.get(); } - fixed_bitstring<18, false, true>& set_short_macro_enb_id() + const son_info_reply_s& son_info_reply() const { - set(types::short_macro_enb_id); - return c.get >(); + assert_choice_type("sONInformationReply", type_.to_string(), "SONInformation"); + return c.get(); } - fixed_bitstring<21, false, true>& set_long_macro_enb_id() + const protocol_ie_single_container_s& son_info_ext() const { - set(types::long_macro_enb_id); - return c.get >(); + assert_choice_type("sONInformation-Extension", type_.to_string(), "SONInformation"); + return c.get >(); + } + son_info_request_e& set_son_info_request() + { + set(types::son_info_request); + return c.get(); + } + son_info_reply_s& set_son_info_reply() + { + set(types::son_info_reply); + return c.get(); + } + protocol_ie_single_container_s& set_son_info_ext() + { + set(types::son_info_ext); + return c.get >(); } private: - types type_; - choice_buffer_t > c; + types type_; + choice_buffer_t, son_info_reply_s> c; void destroy_(); }; -// GlobalENB-ID-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o global_enb_id_ext_ies_o; +typedef protocol_ext_container_empty_l en_dcson_cfg_transfer_ext_ies_container; -typedef protocol_ext_container_empty_l listening_sf_pattern_ext_ies_container; +// EN-DCSONConfigurationTransfer ::= SEQUENCE +struct en_dcson_cfg_transfer_s { + bool ext = false; + bool x2_tnl_cfg_info_present = false; + bool ie_exts_present = false; + en_dcson_transfer_type_c transfertype; + son_info_c son_info; + x2_tnl_cfg_info_s x2_tnl_cfg_info; + en_dcson_cfg_transfer_ext_ies_container ie_exts; + // ... -// ListeningSubframePattern ::= SEQUENCE -struct listening_sf_pattern_s { - struct pattern_period_opts { - enum options { ms1280, ms2560, ms5120, ms10240, /*...*/ nulltype } value; - typedef uint16_t number_type; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; - std::string to_string() const; - uint16_t to_number() const; - }; - typedef enumerated pattern_period_e_; +// ENB-StatusTransfer-TransparentContainer-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o enb_status_transfer_transparent_container_ext_ies_o; - // member variables - bool ext = false; - bool ie_exts_present = false; - pattern_period_e_ pattern_period; - uint16_t pattern_offset = 0; - listening_sf_pattern_ext_ies_container ie_exts; +typedef protocol_ext_container_empty_l enb_status_transfer_transparent_container_ext_ies_container; + +// ENB-StatusTransfer-TransparentContainer ::= SEQUENCE +struct enb_status_transfer_transparent_container_s { + bool ext = false; + bool ie_exts_present = false; + bearers_subject_to_status_transfer_list_l bearers_subject_to_status_transfer_list; + enb_status_transfer_transparent_container_ext_ies_container ie_exts; // ... // sequence methods @@ -5896,96 +7404,118 @@ struct listening_sf_pattern_s { void to_json(json_writer& j) const; }; -// SONInformation-ExtensionIE ::= OBJECT SET OF S1AP-PROTOCOL-IES -struct son_info_ext_ie_o { - // Value ::= OPEN TYPE - struct value_c { - struct types_opts { - enum options { son_info_report, nulltype } value; +// S-TMSI-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o s_tmsi_ext_ies_o; - std::string to_string() const; - }; - typedef enumerated types; +// UL-CP-SecurityInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o ul_cp_security_info_ext_ies_o; - // choice methods - types type() const { return types::son_info_report; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - son_info_report_c& son_info_report() { return c; } - const son_info_report_c& son_info_report() const { return c; } +typedef protocol_ext_container_empty_l s_tmsi_ext_ies_container; - private: - son_info_report_c c; - }; +// S-TMSI ::= SEQUENCE +struct s_tmsi_s { + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<1, true> mmec; + fixed_octstring<4, true> m_tmsi; + s_tmsi_ext_ies_container ie_exts; + // ... - // members lookup methods - static uint32_t idx_to_id(uint32_t idx); - static bool is_id_valid(const uint32_t& id); - static crit_e get_crit(const uint32_t& id); - static value_c get_value(const uint32_t& id); - static presence_e get_presence(const uint32_t& id); + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; }; -// SONInformationReply-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -struct son_info_reply_ext_ies_o { - // Extension ::= OPEN TYPE - struct ext_c { +typedef protocol_ext_container_empty_l ul_cp_security_info_ext_ies_container; + +// UL-CP-SecurityInformation ::= SEQUENCE +struct ul_cp_security_info_s { + bool ext = false; + bool ie_exts_present = false; + fixed_bitstring<16, false, true> ul_nas_mac; + fixed_bitstring<5, false, true> ul_nas_count; + ul_cp_security_info_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ENBCPRelocationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct enbcp_relocation_ind_ies_o { + // Value ::= OPEN TYPE + struct value_c { struct types_opts { - enum options { time_synchronisation_info, nulltype } value; + enum options { enb_ue_s1ap_id, s_tmsi, eutran_cgi, tai, ul_cp_security_info, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; typedef enumerated types; // choice methods - types type() const { return types::time_synchronisation_info; } + value_c() = default; + value_c(const value_c& other); + value_c& operator=(const value_c& other); + ~value_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 - time_synchronisation_info_s& time_synchronisation_info() { return c; } - const time_synchronisation_info_s& time_synchronisation_info() const { return c; } + uint32_t& enb_ue_s1ap_id(); + s_tmsi_s& s_tmsi(); + eutran_cgi_s& eutran_cgi(); + tai_s& tai(); + ul_cp_security_info_s& ul_cp_security_info(); + const uint32_t& enb_ue_s1ap_id() const; + const s_tmsi_s& s_tmsi() const; + const eutran_cgi_s& eutran_cgi() const; + const tai_s& tai() const; + const ul_cp_security_info_s& ul_cp_security_info() const; private: - time_synchronisation_info_s c; + types type_; + choice_buffer_t c; + + void destroy_(); }; // members lookup methods static uint32_t idx_to_id(uint32_t idx); static bool is_id_valid(const uint32_t& id); static crit_e get_crit(const uint32_t& id); - static ext_c get_ext(const uint32_t& id); + static value_c get_value(const uint32_t& id); static presence_e get_presence(const uint32_t& id); }; -// SynchronisationInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o synchronisation_info_ext_ies_o; - -struct x2_tnl_cfg_info_ext_ies_container { - template - using ie_field_s = protocol_ext_container_item_s; +struct enbcp_relocation_ind_ies_container { + template + using ie_field_s = protocol_ie_container_item_s; // member variables - bool enbx2_extended_transport_layer_addresses_present = false; - bool enb_indirect_x2_transport_layer_addresses_present = false; - ie_field_s > enbx2_extended_transport_layer_addresses; - ie_field_s, 1, 2, true> > enb_indirect_x2_transport_layer_addresses; + ie_field_s > enb_ue_s1ap_id; + ie_field_s s_tmsi; + ie_field_s eutran_cgi; + ie_field_s tai; + ie_field_s ul_cp_security_info; // sequence methods - x2_tnl_cfg_info_ext_ies_container(); + enbcp_relocation_ind_ies_container(); SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; }; -// X2TNLConfigurationInfo ::= SEQUENCE -struct x2_tnl_cfg_info_s { - bool ext = false; - bool ie_exts_present = false; - enbx2_tlas_l enbx2_transport_layer_addresses; - x2_tnl_cfg_info_ext_ies_container ie_exts; +// ENBCPRelocationIndication ::= SEQUENCE +struct enbcp_relocation_ind_s { + bool ext = false; + enbcp_relocation_ind_ies_container protocol_ies; // ... // sequence methods @@ -5994,30 +7524,28 @@ struct x2_tnl_cfg_info_s { void to_json(json_writer& j) const; }; -typedef protocol_ext_container_empty_l global_enb_id_ext_ies_container; +// ListeningSubframePattern-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o listening_sf_pattern_ext_ies_o; -// Global-ENB-ID ::= SEQUENCE -struct global_enb_id_s { - bool ext = false; - bool ie_exts_present = false; - fixed_octstring<3, true> plm_nid; - enb_id_c enb_id; - global_enb_id_ext_ies_container ie_exts; - // ... +typedef protocol_ext_container_empty_l listening_sf_pattern_ext_ies_container; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// ListeningSubframePattern ::= SEQUENCE +struct listening_sf_pattern_s { + struct pattern_period_opts { + enum options { ms1280, ms2560, ms5120, ms10240, /*...*/ nulltype } value; + typedef uint16_t number_type; -// SONInformationReply ::= SEQUENCE -struct son_info_reply_s { - bool ext = false; - bool x2_tnl_cfg_info_present = false; - bool ie_exts_present = false; - x2_tnl_cfg_info_s x2_tnl_cfg_info; - protocol_ext_container_l ie_exts; + std::string to_string() const; + uint16_t to_number() const; + }; + typedef enumerated pattern_period_e_; + + // member variables + bool ext = false; + bool ie_exts_present = false; + pattern_period_e_ pattern_period; + uint16_t pattern_offset = 0; + listening_sf_pattern_ext_ies_container ie_exts; // ... // sequence methods @@ -6026,15 +7554,8 @@ struct son_info_reply_s { void to_json(json_writer& j) const; }; -// SONInformationRequest ::= ENUMERATED -struct son_info_request_opts { - enum options { x2_tnl_cfg_info, /*...*/ time_synchronisation_info, activ_muting, deactiv_muting, nulltype } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; -}; -typedef enumerated son_info_request_e; +// SynchronisationInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o synchronisation_info_ext_ies_o; // SourceeNB-ID-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o sourceenb_id_ext_ies_o; @@ -6107,79 +7628,6 @@ struct son_cfg_transfer_ext_ies_o { static presence_e get_presence(const uint32_t& id); }; -// SONInformation ::= CHOICE -struct son_info_c { - struct types_opts { - enum options { son_info_request, son_info_reply, /*...*/ son_info_ext, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - son_info_c() = default; - son_info_c(const son_info_c& other); - son_info_c& operator=(const son_info_c& other); - ~son_info_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 - son_info_request_e& son_info_request() - { - assert_choice_type("sONInformationRequest", type_.to_string(), "SONInformation"); - return c.get(); - } - son_info_reply_s& son_info_reply() - { - assert_choice_type("sONInformationReply", type_.to_string(), "SONInformation"); - return c.get(); - } - protocol_ie_single_container_s& son_info_ext() - { - assert_choice_type("sONInformation-Extension", type_.to_string(), "SONInformation"); - return c.get >(); - } - const son_info_request_e& son_info_request() const - { - assert_choice_type("sONInformationRequest", type_.to_string(), "SONInformation"); - return c.get(); - } - const son_info_reply_s& son_info_reply() const - { - assert_choice_type("sONInformationReply", type_.to_string(), "SONInformation"); - return c.get(); - } - const protocol_ie_single_container_s& son_info_ext() const - { - assert_choice_type("sONInformation-Extension", type_.to_string(), "SONInformation"); - return c.get >(); - } - son_info_request_e& set_son_info_request() - { - set(types::son_info_request); - return c.get(); - } - son_info_reply_s& set_son_info_reply() - { - set(types::son_info_reply); - return c.get(); - } - protocol_ie_single_container_s& set_son_info_ext() - { - set(types::son_info_ext); - return c.get >(); - } - -private: - types type_; - choice_buffer_t, son_info_reply_s> c; - - void destroy_(); -}; - typedef protocol_ext_container_empty_l sourceenb_id_ext_ies_container; // SourceeNB-ID ::= SEQUENCE @@ -6250,23 +7698,33 @@ struct enb_cfg_transfer_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { son_cfg_transfer_ect, nulltype } value; + enum options { son_cfg_transfer_ect, en_dcson_cfg_transfer_ect, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - types type() const { return types::son_cfg_transfer_ect; } + value_c() = default; + value_c(const value_c& other); + value_c& operator=(const value_c& other); + ~value_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 - son_cfg_transfer_s& son_cfg_transfer_ect() { return c; } - const son_cfg_transfer_s& son_cfg_transfer_ect() const { return c; } + son_cfg_transfer_s& son_cfg_transfer_ect(); + en_dcson_cfg_transfer_s& en_dcson_cfg_transfer_ect(); + const son_cfg_transfer_s& son_cfg_transfer_ect() const; + const en_dcson_cfg_transfer_s& en_dcson_cfg_transfer_ect() const; private: - son_cfg_transfer_s c; + types type_; + choice_buffer_t c; + + void destroy_(); }; // members lookup methods @@ -6277,65 +7735,27 @@ struct enb_cfg_transfer_ies_o { static presence_e get_presence(const uint32_t& id); }; -// ENBConfigurationTransfer ::= SEQUENCE -struct enb_cfg_transfer_s { - bool ext = false; - protocol_ie_container_l protocol_ies; - // ... +struct enb_cfg_transfer_ies_container { + template + using ie_field_s = protocol_ie_container_item_s; + + // member variables + bool son_cfg_transfer_ect_present = false; + bool en_dcson_cfg_transfer_ect_present = false; + ie_field_s son_cfg_transfer_ect; + ie_field_s en_dcson_cfg_transfer_ect; // sequence methods + enb_cfg_transfer_ies_container(); SRSASN_CODE pack(bit_ref& bref) const; SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; }; -// RAT-Type ::= ENUMERATED -struct rat_type_opts { - enum options { nbiot, /*...*/ nulltype } value; - - std::string to_string() const; -}; -typedef enumerated rat_type_e; - -// SupportedTAs-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -struct supported_tas_item_ext_ies_o { - // Extension ::= OPEN TYPE - struct ext_c { - struct types_opts { - enum options { rat_type, nulltype } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - types type() const { return types::rat_type; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - rat_type_e& rat_type() { return c; } - const rat_type_e& rat_type() const { return c; } - - private: - rat_type_e c; - }; - - // members lookup methods - static uint32_t idx_to_id(uint32_t idx); - static bool is_id_valid(const uint32_t& id); - static crit_e get_crit(const uint32_t& id); - static ext_c get_ext(const uint32_t& id); - static presence_e get_presence(const uint32_t& id); -}; - -// SupportedTAs-Item ::= SEQUENCE -struct supported_tas_item_s { - bool ext = false; - bool ie_exts_present = false; - fixed_octstring<2, true> tac; - bplmns_l broadcast_plmns; - protocol_ext_container_l ie_exts; +// ENBConfigurationTransfer ::= SEQUENCE +struct enb_cfg_transfer_s { + bool ext = false; + enb_cfg_transfer_ies_container protocol_ies; // ... // sequence methods @@ -6364,9 +7784,6 @@ struct paging_drx_opts { }; typedef enumerated paging_drx_e; -// SupportedTAs ::= SEQUENCE (SIZE (1..256)) OF SupportedTAs-Item -using supported_tas_l = dyn_array; - // ENBConfigurationUpdateIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES struct enb_cfg_upd_ies_o { // Value ::= OPEN TYPE @@ -6378,6 +7795,8 @@ struct enb_cfg_upd_ies_o { csg_id_list, default_paging_drx, nb_io_t_default_paging_drx, + connectedeng_nb_to_add_list, + connectedeng_nb_to_rem_list, nulltype } value; @@ -6401,15 +7820,19 @@ struct enb_cfg_upd_ies_o { csg_id_list_l& csg_id_list(); paging_drx_e& default_paging_drx(); nb_io_t_default_paging_drx_e& nb_io_t_default_paging_drx(); + connectedeng_nb_list_l& connectedeng_nb_to_add_list(); + connectedeng_nb_list_l& connectedeng_nb_to_rem_list(); const printable_string<1, 150, true, true>& enbname() const; const supported_tas_l& supported_tas() const; const csg_id_list_l& csg_id_list() const; const paging_drx_e& default_paging_drx() const; const nb_io_t_default_paging_drx_e& nb_io_t_default_paging_drx() const; + const connectedeng_nb_list_l& connectedeng_nb_to_add_list() const; + const connectedeng_nb_list_l& connectedeng_nb_to_rem_list() const; private: - types type_; - choice_buffer_t, supported_tas_l> c; + types type_; + choice_buffer_t, supported_tas_l> c; void destroy_(); }; @@ -6427,16 +7850,20 @@ struct enb_cfg_upd_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool enbname_present = false; - bool supported_tas_present = false; - bool csg_id_list_present = false; - bool default_paging_drx_present = false; - bool nb_io_t_default_paging_drx_present = false; - ie_field_s > enbname; - ie_field_s > supported_tas; - ie_field_s > csg_id_list; - ie_field_s default_paging_drx; - ie_field_s nb_io_t_default_paging_drx; + bool enbname_present = false; + bool supported_tas_present = false; + bool csg_id_list_present = false; + bool default_paging_drx_present = false; + bool nb_io_t_default_paging_drx_present = false; + bool connectedeng_nb_to_add_list_present = false; + bool connectedeng_nb_to_rem_list_present = false; + ie_field_s > enbname; + ie_field_s > supported_tas; + ie_field_s > csg_id_list; + ie_field_s default_paging_drx; + ie_field_s nb_io_t_default_paging_drx; + ie_field_s > connectedeng_nb_to_add_list; + ie_field_s > connectedeng_nb_to_rem_list; // sequence methods enb_cfg_upd_ies_container(); @@ -6906,7 +8333,7 @@ struct error_ind_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, cause, crit_diagnostics, nulltype } value; + enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, cause, crit_diagnostics, s_tmsi, nulltype } value; std::string to_string() const; }; @@ -6927,14 +8354,16 @@ struct error_ind_ies_o { uint32_t& enb_ue_s1ap_id(); cause_c& cause(); crit_diagnostics_s& crit_diagnostics(); + s_tmsi_s& s_tmsi(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const cause_c& cause() const; const crit_diagnostics_s& crit_diagnostics() const; + const s_tmsi_s& s_tmsi() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; @@ -6956,10 +8385,12 @@ struct error_ind_ies_container { bool enb_ue_s1ap_id_present = false; bool cause_present = false; bool crit_diagnostics_present = false; + bool s_tmsi_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s cause; ie_field_s crit_diagnostics; + ie_field_s s_tmsi; // sequence methods error_ind_ies_container(); @@ -7310,11 +8741,22 @@ struct ho_cancel_ack_s { // HandoverType ::= ENUMERATED struct handov_type_opts { - enum options { intralte, ltetoutran, ltetogeran, utrantolte, gerantolte, /*...*/ nulltype } value; + enum options { + intralte, + ltetoutran, + ltetogeran, + utrantolte, + gerantolte, + /*...*/ eps_to_minus5gs, + fivegs_to_eps, + nulltype + } value; + typedef int8_t number_type; std::string to_string() const; + int8_t to_number() const; }; -typedef enumerated handov_type_e; +typedef enumerated handov_type_e; // HandoverCommandIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES struct ho_cmd_ies_o { @@ -7506,7 +8948,16 @@ struct ho_notify_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, eutran_cgi, tai, tunnel_info_for_bbf, lhn_id, nulltype } value; + enum options { + mme_ue_s1ap_id, + enb_ue_s1ap_id, + eutran_cgi, + tai, + tunnel_info_for_bbf, + lhn_id, + ps_cell_info, + nulltype + } value; std::string to_string() const; }; @@ -7529,16 +8980,18 @@ struct ho_notify_ies_o { tai_s& tai(); tunnel_info_s& tunnel_info_for_bbf(); bounded_octstring<32, 256, true>& lhn_id(); + ps_cell_info_s& ps_cell_info(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const eutran_cgi_s& eutran_cgi() const; const tai_s& tai() const; const tunnel_info_s& tunnel_info_for_bbf() const; const bounded_octstring<32, 256, true>& lhn_id() const; + const ps_cell_info_s& ps_cell_info() const; private: - types type_; - choice_buffer_t, eutran_cgi_s, tai_s, tunnel_info_s> c; + types type_; + choice_buffer_t, eutran_cgi_s, ps_cell_info_s, tai_s, tunnel_info_s> c; void destroy_(); }; @@ -7558,12 +9011,14 @@ struct ho_notify_ies_container { // member variables bool tunnel_info_for_bbf_present = false; bool lhn_id_present = false; + bool ps_cell_info_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s eutran_cgi; ie_field_s tai; ie_field_s tunnel_info_for_bbf; ie_field_s > lhn_id; + ie_field_s ps_cell_info; // sequence methods ho_notify_ies_container(); @@ -7717,13 +9172,25 @@ typedef s1ap_protocol_ext_empty_o m3_cfg_ext_ies_o; // M3period ::= ENUMERATED struct m3period_opts { - enum options { ms100, ms1000, ms10000, /*...*/ nulltype } value; + enum options { + ms100, + ms1000, + ms10000, + /*...*/ ms1024, + ms1280, + ms2048, + ms2560, + ms5120, + ms10240, + min1, + nulltype + } value; typedef uint16_t number_type; std::string to_string() const; uint16_t to_number() const; }; -typedef enumerated m3period_e; +typedef enumerated m3period_e; // M4Configuration-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o m4_cfg_ext_ies_o; @@ -7780,6 +9247,20 @@ typedef s1ap_protocol_ext_empty_o m7_cfg_ext_ies_o; // MBSFN-ResultToLog ::= SEQUENCE (SIZE (1..8)) OF MBSFN-ResultToLogInfo using mbsfn_result_to_log_l = dyn_array; +// WLANMeasConfig ::= ENUMERATED +struct wlan_meas_cfg_opts { + enum options { setup, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated wlan_meas_cfg_e; + +// WLANMeasConfigNameList ::= SEQUENCE (SIZE (1..4)) OF OCTET STRING (SIZE (1..32)) +using wlan_meas_cfg_name_list_l = bounded_array, 4>; + +// WLANMeasurementConfiguration-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o wlan_meas_cfg_ext_ies_o; + typedef protocol_ext_container_empty_l logged_mbsfnmdt_ext_ies_container; // LoggedMBSFNMDT ::= SEQUENCE @@ -7984,12 +9465,58 @@ struct report_interv_mdt_opts { }; typedef enumerated report_interv_mdt_e; +typedef protocol_ext_container_empty_l wlan_meas_cfg_ext_ies_container; + +// WLANMeasurementConfiguration ::= SEQUENCE +struct wlan_meas_cfg_s { + struct wlan_rssi_opts { + enum options { true_value, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated wlan_rssi_e_; + struct wlan_rtt_opts { + enum options { true_value, /*...*/ nulltype } value; + + std::string to_string() const; + }; + typedef enumerated wlan_rtt_e_; + + // member variables + bool ext = false; + bool wlan_meas_cfg_name_list_present = false; + bool wlan_rssi_present = false; + bool wlan_rtt_present = false; + bool ie_exts_present = false; + wlan_meas_cfg_e wlan_meas_cfg; + wlan_meas_cfg_name_list_l wlan_meas_cfg_name_list; + wlan_rssi_e_ wlan_rssi; + wlan_rtt_e_ wlan_rtt; + wlan_meas_cfg_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // ImmediateMDT-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION struct immediate_mdt_ext_ies_o { // Extension ::= OPEN TYPE struct ext_c { struct types_opts { - enum options { m3_cfg, m4_cfg, m5_cfg, mdt_location_info, m6_cfg, m7_cfg, nulltype } value; + enum options { + m3_cfg, + m4_cfg, + m5_cfg, + mdt_location_info, + m6_cfg, + m7_cfg, + bluetooth_meas_cfg, + wlan_meas_cfg, + nulltype + } value; typedef uint8_t number_type; std::string to_string() const; @@ -8014,16 +9541,28 @@ struct immediate_mdt_ext_ies_o { fixed_bitstring<8, false, true>& mdt_location_info(); m6_cfg_s& m6_cfg(); m7_cfg_s& m7_cfg(); + bluetooth_meas_cfg_s& bluetooth_meas_cfg(); + wlan_meas_cfg_s& wlan_meas_cfg(); const m3_cfg_s& m3_cfg() const; const m4_cfg_s& m4_cfg() const; const m5_cfg_s& m5_cfg() const; const fixed_bitstring<8, false, true>& mdt_location_info() const; const m6_cfg_s& m6_cfg() const; const m7_cfg_s& m7_cfg() const; + const bluetooth_meas_cfg_s& bluetooth_meas_cfg() const; + const wlan_meas_cfg_s& wlan_meas_cfg() const; private: - types type_; - choice_buffer_t, m3_cfg_s, m4_cfg_s, m5_cfg_s, m6_cfg_s, m7_cfg_s> c; + types type_; + choice_buffer_t, + m3_cfg_s, + m4_cfg_s, + m5_cfg_s, + m6_cfg_s, + m7_cfg_s, + wlan_meas_cfg_s> + c; void destroy_(); }; @@ -8037,7 +9576,46 @@ struct immediate_mdt_ext_ies_o { }; // LoggedMDT-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o logged_mdt_ext_ies_o; +struct logged_mdt_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { bluetooth_meas_cfg, wlan_meas_cfg, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + ext_c() = default; + ext_c(const ext_c& other); + ext_c& operator=(const ext_c& other); + ~ext_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 + bluetooth_meas_cfg_s& bluetooth_meas_cfg(); + wlan_meas_cfg_s& wlan_meas_cfg(); + const bluetooth_meas_cfg_s& bluetooth_meas_cfg() const; + const wlan_meas_cfg_s& wlan_meas_cfg() const; + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; typedef protocol_ext_container_empty_l m1_periodic_report_ext_ies_container; @@ -8117,18 +9695,22 @@ struct immediate_mdt_ext_ies_container { using ie_field_s = protocol_ext_container_item_s; // member variables - bool m3_cfg_present = false; - bool m4_cfg_present = false; - bool m5_cfg_present = false; - bool mdt_location_info_present = false; - bool m6_cfg_present = false; - bool m7_cfg_present = false; + bool m3_cfg_present = false; + bool m4_cfg_present = false; + bool m5_cfg_present = false; + bool mdt_location_info_present = false; + bool m6_cfg_present = false; + bool m7_cfg_present = false; + bool bluetooth_meas_cfg_present = false; + bool wlan_meas_cfg_present = false; ie_field_s m3_cfg; ie_field_s m4_cfg; ie_field_s m5_cfg; ie_field_s > mdt_location_info; ie_field_s m6_cfg; ie_field_s m7_cfg; + ie_field_s bluetooth_meas_cfg; + ie_field_s wlan_meas_cfg; // sequence methods immediate_mdt_ext_ies_container(); @@ -8156,7 +9738,22 @@ struct immediate_mdt_s { void to_json(json_writer& j) const; }; -typedef protocol_ext_container_empty_l logged_mdt_ext_ies_container; +struct logged_mdt_ext_ies_container { + template + using ie_field_s = protocol_ext_container_item_s; + + // member variables + bool bluetooth_meas_cfg_present = false; + bool wlan_meas_cfg_present = false; + ie_field_s bluetooth_meas_cfg; + ie_field_s wlan_meas_cfg; + + // sequence methods + logged_mdt_ext_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; // LoggedMDT ::= SEQUENCE struct logged_mdt_s { @@ -8176,6 +9773,14 @@ struct logged_mdt_s { // MDTPLMNList ::= SEQUENCE (SIZE (1..16)) OF OCTET STRING (SIZE (3)) using mdtplmn_list_l = bounded_array, 16>; +// ServiceType ::= ENUMERATED +struct service_type_opts { + enum options { qmc_for_streaming_service, qmc_for_mtsi_service, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated service_type_e; + // MDT-Activation ::= ENUMERATED struct mdt_activation_opts { enum options { @@ -8295,6 +9900,38 @@ private: void destroy_(); }; +// UEAppLayerMeasConfig-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +struct ue_app_layer_meas_cfg_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { service_type, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::service_type; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + service_type_e& service_type() { return c; } + const service_type_e& service_type() const { return c; } + + private: + service_type_e c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + // MDT-Configuration ::= SEQUENCE struct mdt_cfg_s { bool ext = false; @@ -8319,6 +9956,29 @@ struct pro_se_ueto_network_relaying_opts { }; typedef enumerated pro_se_ueto_network_relaying_e; +// RequestTypeAdditionalInfo ::= ENUMERATED +struct request_type_add_info_opts { + enum options { include_ps_cell, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated request_type_add_info_e; + +// UEAppLayerMeasConfig ::= SEQUENCE +struct ue_app_layer_meas_cfg_s { + bool ext = false; + bool ie_exts_present = false; + bounded_octstring<1, 1000, true> container_for_app_layer_meas_cfg; + area_scope_of_qmc_c area_scope_of_qmc; + protocol_ext_container_l ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // EventType ::= ENUMERATED struct event_type_opts { enum options { direct, change_of_serve_cell, stop_change_of_serve_cell, /*...*/ nulltype } value; @@ -8394,7 +10054,36 @@ struct report_area_opts { typedef enumerated report_area_e; // RequestType-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o request_type_ext_ies_o; +struct request_type_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { request_type_add_info, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::request_type_add_info; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + request_type_add_info_e& request_type_add_info() { return c; } + const request_type_add_info_e& request_type_add_info() const { return c; } + + private: + request_type_add_info_e c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; // SecurityContext-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o security_context_ext_ies_o; @@ -8404,23 +10093,33 @@ struct trace_activation_ext_ies_o { // Extension ::= OPEN TYPE struct ext_c { struct types_opts { - enum options { mdt_cfg, nulltype } value; + enum options { mdt_cfg, ue_app_layer_meas_cfg, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - types type() const { return types::mdt_cfg; } + ext_c() = default; + ext_c(const ext_c& other); + ext_c& operator=(const ext_c& other); + ~ext_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 - mdt_cfg_s& mdt_cfg() { return c; } - const mdt_cfg_s& mdt_cfg() const { return c; } + mdt_cfg_s& mdt_cfg(); + ue_app_layer_meas_cfg_s& ue_app_layer_meas_cfg(); + const mdt_cfg_s& mdt_cfg() const; + const ue_app_layer_meas_cfg_s& ue_app_layer_meas_cfg() const; private: - mdt_cfg_s c; + types type_; + choice_buffer_t c; + + void destroy_(); }; // members lookup methods @@ -8465,6 +10164,14 @@ struct vehicle_ue_opts { }; typedef enumerated vehicle_ue_e; +// AerialUEsubscriptionInformation ::= ENUMERATED +struct aerial_uesubscription_info_opts { + enum options { allowed, not_allowed, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated aerial_uesubscription_info_e; + // ManagementBasedMDTAllowed ::= ENUMERATED struct management_based_mdt_allowed_opts { enum options { allowed, /*...*/ nulltype } value; @@ -8490,15 +10197,13 @@ struct pro_se_authorized_s { void to_json(json_writer& j) const; }; -typedef protocol_ext_container_empty_l request_type_ext_ies_container; - // RequestType ::= SEQUENCE struct request_type_s { - bool ext = false; - bool ie_exts_present = false; - event_type_e event_type; - report_area_e report_area; - request_type_ext_ies_container ie_exts; + bool ext = false; + bool ie_exts_present = false; + event_type_e event_type; + report_area_e report_area; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -8524,15 +10229,32 @@ struct security_context_s { void to_json(json_writer& j) const; }; +struct trace_activation_ext_ies_container { + template + using ie_field_s = protocol_ext_container_item_s; + + // member variables + bool mdt_cfg_present = false; + bool ue_app_layer_meas_cfg_present = false; + ie_field_s mdt_cfg; + ie_field_s ue_app_layer_meas_cfg; + + // sequence methods + trace_activation_ext_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // TraceActivation ::= SEQUENCE struct trace_activation_s { - bool ext = false; - bool ie_exts_present = false; - fixed_octstring<8, true> e_utran_trace_id; - fixed_bitstring<8, false, true> interfaces_to_trace; - trace_depth_e trace_depth; - bounded_bitstring<1, 160, true, true> trace_collection_entity_ip_address; - protocol_ext_container_l ie_exts; + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<8, true> e_utran_trace_id; + fixed_bitstring<8, false, true> interfaces_to_trace; + trace_depth_e trace_depth; + bounded_bitstring<1, 160, true, true> trace_collection_entity_ip_address; + trace_activation_ext_ies_container ie_exts; // ... // sequence methods @@ -8633,8 +10355,12 @@ struct ho_request_ies_o { v2xservices_authorized, ue_sidelink_aggregate_maximum_bitrate, enhanced_coverage_restricted, + nrue_security_cap, ce_mode_brestricted, + aerial_uesubscription_info, pending_data_ind, + subscription_based_ue_differentiation_info, + add_rrm_prio_idx, nulltype } value; @@ -8679,8 +10405,12 @@ struct ho_request_ies_o { v2xservices_authorized_s& v2xservices_authorized(); ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); enhanced_coverage_restricted_e& enhanced_coverage_restricted(); + nrue_security_cap_s& nrue_security_cap(); ce_mode_brestricted_e& ce_mode_brestricted(); + aerial_uesubscription_info_e& aerial_uesubscription_info(); pending_data_ind_e& pending_data_ind(); + subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info(); + fixed_bitstring<32, false, true>& add_rrm_prio_idx(); const uint64_t& mme_ue_s1ap_id() const; const handov_type_e& handov_type() const; const cause_c& cause() const; @@ -8707,8 +10437,12 @@ struct ho_request_ies_o { const v2xservices_authorized_s& v2xservices_authorized() const; const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; + const nrue_security_cap_s& nrue_security_cap() const; const ce_mode_brestricted_e& ce_mode_brestricted() const; + const aerial_uesubscription_info_e& aerial_uesubscription_info() const; const pending_data_ind_e& pending_data_ind() const; + const subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info() const; + const fixed_bitstring<32, false, true>& add_rrm_prio_idx() const; private: types type_; @@ -8719,9 +10453,11 @@ struct ho_request_ies_o { gummei_s, ho_restrict_list_s, mdtplmn_list_l, + nrue_security_cap_s, pro_se_authorized_s, request_type_s, security_context_s, + subscription_based_ue_differentiation_info_s, trace_activation_s, ue_aggregate_maximum_bitrate_s, ue_security_cap_s, @@ -8746,26 +10482,30 @@ struct ho_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ho_restrict_list_present = false; - bool trace_activation_present = false; - bool request_type_present = false; - bool srvcc_operation_possible_present = false; - bool nas_security_paramsto_e_utran_present = false; - bool csg_id_present = false; - bool csg_membership_status_present = false; - bool gummei_id_present = false; - bool mme_ue_s1ap_id_minus2_present = false; - bool management_based_mdt_allowed_present = false; - bool management_based_mdtplmn_list_present = false; - bool masked_imeisv_present = false; - bool expected_ue_behaviour_present = false; - bool pro_se_authorized_present = false; - bool ueuser_plane_cio_tsupport_ind_present = false; - bool v2xservices_authorized_present = false; - bool ue_sidelink_aggregate_maximum_bitrate_present = false; - bool enhanced_coverage_restricted_present = false; - bool ce_mode_brestricted_present = false; - bool pending_data_ind_present = false; + bool ho_restrict_list_present = false; + bool trace_activation_present = false; + bool request_type_present = false; + bool srvcc_operation_possible_present = false; + bool nas_security_paramsto_e_utran_present = false; + bool csg_id_present = false; + bool csg_membership_status_present = false; + bool gummei_id_present = false; + bool mme_ue_s1ap_id_minus2_present = false; + bool management_based_mdt_allowed_present = false; + bool management_based_mdtplmn_list_present = false; + bool masked_imeisv_present = false; + bool expected_ue_behaviour_present = false; + bool pro_se_authorized_present = false; + bool ueuser_plane_cio_tsupport_ind_present = false; + bool v2xservices_authorized_present = false; + bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool enhanced_coverage_restricted_present = false; + bool nrue_security_cap_present = false; + bool ce_mode_brestricted_present = false; + bool aerial_uesubscription_info_present = false; + bool pending_data_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool add_rrm_prio_idx_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s handov_type; ie_field_s cause; @@ -8792,8 +10532,12 @@ struct ho_request_ies_container { ie_field_s v2xservices_authorized; ie_field_s ue_sidelink_aggregate_maximum_bitrate; ie_field_s enhanced_coverage_restricted; + ie_field_s nrue_security_cap; ie_field_s ce_mode_brestricted; + ie_field_s aerial_uesubscription_info; ie_field_s pending_data_ind; + ie_field_s subscription_based_ue_differentiation_info; + ie_field_s > add_rrm_prio_idx; // sequence methods ho_request_ies_container(); @@ -8934,6 +10678,26 @@ struct ho_request_ack_s { void to_json(json_writer& j) const; }; +// TargetNgRanNode-ID-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +typedef s1ap_protocol_ext_empty_o target_ng_ran_node_id_ext_ies_o; + +typedef protocol_ext_container_empty_l target_ng_ran_node_id_ext_ies_container; + +// TargetNgRanNode-ID ::= SEQUENCE +struct target_ng_ran_node_id_s { + bool ext = false; + bool ie_exts_present = false; + global_ran_node_id_c global_ran_node_id; + five_gstai_s sel_tai; + target_ng_ran_node_id_ext_ies_container ie_exts; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // Direct-Forwarding-Path-Availability ::= ENUMERATED struct direct_forwarding_path_availability_opts { enum options { direct_path_available, /*...*/ nulltype } value; @@ -8961,11 +10725,11 @@ typedef enumerated srvccho_ind_e; // TargetID ::= CHOICE struct target_id_c { struct types_opts { - enum options { targetenb_id, target_rnc_id, cgi, /*...*/ nulltype } value; + enum options { targetenb_id, target_rnc_id, cgi, /*...*/ targetg_ng_ran_node_id, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods target_id_c() = default; @@ -8993,6 +10757,11 @@ struct target_id_c { assert_choice_type("cGI", type_.to_string(), "TargetID"); return c.get(); } + target_ng_ran_node_id_s& targetg_ng_ran_node_id() + { + assert_choice_type("targetgNgRanNode-ID", type_.to_string(), "TargetID"); + return c.get(); + } const targetenb_id_s& targetenb_id() const { assert_choice_type("targeteNB-ID", type_.to_string(), "TargetID"); @@ -9008,6 +10777,11 @@ struct target_id_c { assert_choice_type("cGI", type_.to_string(), "TargetID"); return c.get(); } + const target_ng_ran_node_id_s& targetg_ng_ran_node_id() const + { + assert_choice_type("targetgNgRanNode-ID", type_.to_string(), "TargetID"); + return c.get(); + } targetenb_id_s& set_targetenb_id() { set(types::targetenb_id); @@ -9023,10 +10797,15 @@ struct target_id_c { set(types::cgi); return c.get(); } + target_ng_ran_node_id_s& set_targetg_ng_ran_node_id() + { + set(types::targetg_ng_ran_node_id); + return c.get(); + } private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; @@ -9435,82 +11214,94 @@ struct init_context_setup_request_ies_o { v2xservices_authorized, ue_sidelink_aggregate_maximum_bitrate, enhanced_coverage_restricted, + nrue_security_cap, ce_mode_brestricted, - pending_data_ind, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - value_c() = default; - value_c(const value_c& other); - value_c& operator=(const value_c& other); - ~value_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 - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate(); - erab_to_be_setup_list_ctxt_su_req_l& erab_to_be_setup_list_ctxt_su_req(); - ue_security_cap_s& ue_security_cap(); - fixed_bitstring<256, false, true>& security_key(); - trace_activation_s& trace_activation(); - ho_restrict_list_s& ho_restrict_list(); - unbounded_octstring& ue_radio_cap(); - uint16_t& subscriber_profile_idfor_rfp(); - cs_fallback_ind_e& cs_fallback_ind(); - srvcc_operation_possible_e& srvcc_operation_possible(); - csg_membership_status_e& csg_membership_status(); - lai_s& registered_lai(); - gummei_s& gummei_id(); - uint64_t& mme_ue_s1ap_id_minus2(); - management_based_mdt_allowed_e& management_based_mdt_allowed(); - mdtplmn_list_l& management_based_mdtplmn_list(); - add_cs_fallback_ind_e& add_cs_fallback_ind(); - fixed_bitstring<64, false, true>& masked_imeisv(); - expected_ue_behaviour_s& expected_ue_behaviour(); - pro_se_authorized_s& pro_se_authorized(); - ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind(); - v2xservices_authorized_s& v2xservices_authorized(); - ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); - enhanced_coverage_restricted_e& enhanced_coverage_restricted(); - ce_mode_brestricted_e& ce_mode_brestricted(); - pending_data_ind_e& pending_data_ind(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate() const; - const erab_to_be_setup_list_ctxt_su_req_l& erab_to_be_setup_list_ctxt_su_req() const; - const ue_security_cap_s& ue_security_cap() const; - const fixed_bitstring<256, false, true>& security_key() const; - const trace_activation_s& trace_activation() const; - const ho_restrict_list_s& ho_restrict_list() const; - const unbounded_octstring& ue_radio_cap() const; - const uint16_t& subscriber_profile_idfor_rfp() const; - const cs_fallback_ind_e& cs_fallback_ind() const; - const srvcc_operation_possible_e& srvcc_operation_possible() const; - const csg_membership_status_e& csg_membership_status() const; - const lai_s& registered_lai() const; - const gummei_s& gummei_id() const; - const uint64_t& mme_ue_s1ap_id_minus2() const; - const management_based_mdt_allowed_e& management_based_mdt_allowed() const; - const mdtplmn_list_l& management_based_mdtplmn_list() const; - const add_cs_fallback_ind_e& add_cs_fallback_ind() const; - const fixed_bitstring<64, false, true>& masked_imeisv() const; - const expected_ue_behaviour_s& expected_ue_behaviour() const; - const pro_se_authorized_s& pro_se_authorized() const; - const ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind() const; - const v2xservices_authorized_s& v2xservices_authorized() const; - const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; - const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; - const ce_mode_brestricted_e& ce_mode_brestricted() const; - const pending_data_ind_e& pending_data_ind() const; + aerial_uesubscription_info, + pending_data_ind, + subscription_based_ue_differentiation_info, + add_rrm_prio_idx, + nulltype + } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + value_c() = default; + value_c(const value_c& other); + value_c& operator=(const value_c& other); + ~value_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 + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate(); + erab_to_be_setup_list_ctxt_su_req_l& erab_to_be_setup_list_ctxt_su_req(); + ue_security_cap_s& ue_security_cap(); + fixed_bitstring<256, false, true>& security_key(); + trace_activation_s& trace_activation(); + ho_restrict_list_s& ho_restrict_list(); + unbounded_octstring& ue_radio_cap(); + uint16_t& subscriber_profile_idfor_rfp(); + cs_fallback_ind_e& cs_fallback_ind(); + srvcc_operation_possible_e& srvcc_operation_possible(); + csg_membership_status_e& csg_membership_status(); + lai_s& registered_lai(); + gummei_s& gummei_id(); + uint64_t& mme_ue_s1ap_id_minus2(); + management_based_mdt_allowed_e& management_based_mdt_allowed(); + mdtplmn_list_l& management_based_mdtplmn_list(); + add_cs_fallback_ind_e& add_cs_fallback_ind(); + fixed_bitstring<64, false, true>& masked_imeisv(); + expected_ue_behaviour_s& expected_ue_behaviour(); + pro_se_authorized_s& pro_se_authorized(); + ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind(); + v2xservices_authorized_s& v2xservices_authorized(); + ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); + enhanced_coverage_restricted_e& enhanced_coverage_restricted(); + nrue_security_cap_s& nrue_security_cap(); + ce_mode_brestricted_e& ce_mode_brestricted(); + aerial_uesubscription_info_e& aerial_uesubscription_info(); + pending_data_ind_e& pending_data_ind(); + subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info(); + fixed_bitstring<32, false, true>& add_rrm_prio_idx(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate() const; + const erab_to_be_setup_list_ctxt_su_req_l& erab_to_be_setup_list_ctxt_su_req() const; + const ue_security_cap_s& ue_security_cap() const; + const fixed_bitstring<256, false, true>& security_key() const; + const trace_activation_s& trace_activation() const; + const ho_restrict_list_s& ho_restrict_list() const; + const unbounded_octstring& ue_radio_cap() const; + const uint16_t& subscriber_profile_idfor_rfp() const; + const cs_fallback_ind_e& cs_fallback_ind() const; + const srvcc_operation_possible_e& srvcc_operation_possible() const; + const csg_membership_status_e& csg_membership_status() const; + const lai_s& registered_lai() const; + const gummei_s& gummei_id() const; + const uint64_t& mme_ue_s1ap_id_minus2() const; + const management_based_mdt_allowed_e& management_based_mdt_allowed() const; + const mdtplmn_list_l& management_based_mdtplmn_list() const; + const add_cs_fallback_ind_e& add_cs_fallback_ind() const; + const fixed_bitstring<64, false, true>& masked_imeisv() const; + const expected_ue_behaviour_s& expected_ue_behaviour() const; + const pro_se_authorized_s& pro_se_authorized() const; + const ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind() const; + const v2xservices_authorized_s& v2xservices_authorized() const; + const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; + const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; + const nrue_security_cap_s& nrue_security_cap() const; + const ce_mode_brestricted_e& ce_mode_brestricted() const; + const aerial_uesubscription_info_e& aerial_uesubscription_info() const; + const pending_data_ind_e& pending_data_ind() const; + const subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info() const; + const fixed_bitstring<32, false, true>& add_rrm_prio_idx() const; private: types type_; @@ -9521,7 +11312,9 @@ struct init_context_setup_request_ies_o { ho_restrict_list_s, lai_s, mdtplmn_list_l, + nrue_security_cap_s, pro_se_authorized_s, + subscription_based_ue_differentiation_info_s, trace_activation_s, ue_aggregate_maximum_bitrate_s, ue_security_cap_s, @@ -9546,28 +11339,32 @@ struct init_context_setup_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool trace_activation_present = false; - bool ho_restrict_list_present = false; - bool ue_radio_cap_present = false; - bool subscriber_profile_idfor_rfp_present = false; - bool cs_fallback_ind_present = false; - bool srvcc_operation_possible_present = false; - bool csg_membership_status_present = false; - bool registered_lai_present = false; - bool gummei_id_present = false; - bool mme_ue_s1ap_id_minus2_present = false; - bool management_based_mdt_allowed_present = false; - bool management_based_mdtplmn_list_present = false; - bool add_cs_fallback_ind_present = false; - bool masked_imeisv_present = false; - bool expected_ue_behaviour_present = false; - bool pro_se_authorized_present = false; - bool ueuser_plane_cio_tsupport_ind_present = false; - bool v2xservices_authorized_present = false; - bool ue_sidelink_aggregate_maximum_bitrate_present = false; - bool enhanced_coverage_restricted_present = false; - bool ce_mode_brestricted_present = false; - bool pending_data_ind_present = false; + bool trace_activation_present = false; + bool ho_restrict_list_present = false; + bool ue_radio_cap_present = false; + bool subscriber_profile_idfor_rfp_present = false; + bool cs_fallback_ind_present = false; + bool srvcc_operation_possible_present = false; + bool csg_membership_status_present = false; + bool registered_lai_present = false; + bool gummei_id_present = false; + bool mme_ue_s1ap_id_minus2_present = false; + bool management_based_mdt_allowed_present = false; + bool management_based_mdtplmn_list_present = false; + bool add_cs_fallback_ind_present = false; + bool masked_imeisv_present = false; + bool expected_ue_behaviour_present = false; + bool pro_se_authorized_present = false; + bool ueuser_plane_cio_tsupport_ind_present = false; + bool v2xservices_authorized_present = false; + bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool enhanced_coverage_restricted_present = false; + bool nrue_security_cap_present = false; + bool ce_mode_brestricted_present = false; + bool aerial_uesubscription_info_present = false; + bool pending_data_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool add_rrm_prio_idx_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s ueaggregate_maximum_bitrate; @@ -9595,8 +11392,12 @@ struct init_context_setup_request_ies_container { ie_field_s v2xservices_authorized; ie_field_s ue_sidelink_aggregate_maximum_bitrate; ie_field_s enhanced_coverage_restricted; + ie_field_s nrue_security_cap; ie_field_s ce_mode_brestricted; + ie_field_s aerial_uesubscription_info; ie_field_s pending_data_ind; + ie_field_s subscription_based_ue_differentiation_info; + ie_field_s > add_rrm_prio_idx; // sequence methods init_context_setup_request_ies_container(); @@ -9714,13 +11515,23 @@ struct coverage_level_opts { }; typedef enumerated coverage_level_e; +// EDT-Session ::= ENUMERATED +struct edt_session_opts { + enum options { true_value, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated edt_session_e; + // GUMMEIType ::= ENUMERATED struct gummei_type_opts { - enum options { native, mapped, /*...*/ nulltype } value; + enum options { native, mapped, /*...*/ mapped_from5_g, nulltype } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; -typedef enumerated gummei_type_e; +typedef enumerated gummei_type_e; // RRC-Establishment-Cause ::= ENUMERATED struct rrc_establishment_cause_opts { @@ -9775,6 +11586,8 @@ struct init_ue_msg_ies_o { ce_mode_b_support_ind, dcn_id, coverage_level, + ue_application_layer_meas_cap, + edt_session, nulltype } value; @@ -9813,6 +11626,8 @@ struct init_ue_msg_ies_o { ce_mode_b_support_ind_e& ce_mode_b_support_ind(); uint32_t& dcn_id(); coverage_level_e& coverage_level(); + fixed_bitstring<8, false, true>& ue_application_layer_meas_cap(); + edt_session_e& edt_session(); const uint32_t& enb_ue_s1ap_id() const; const unbounded_octstring& nas_pdu() const; const tai_s& tai() const; @@ -9833,6 +11648,8 @@ struct init_ue_msg_ies_o { const ce_mode_b_support_ind_e& ce_mode_b_support_ind() const; const uint32_t& dcn_id() const; const coverage_level_e& coverage_level() const; + const fixed_bitstring<8, false, true>& ue_application_layer_meas_cap() const; + const edt_session_e& edt_session() const; private: types type_; @@ -9879,6 +11696,8 @@ struct init_ue_msg_ies_container { bool ce_mode_b_support_ind_present = false; bool dcn_id_present = false; bool coverage_level_present = false; + bool ue_application_layer_meas_cap_present = false; + bool edt_session_present = false; ie_field_s > enb_ue_s1ap_id; ie_field_s > nas_pdu; ie_field_s tai; @@ -9899,6 +11718,8 @@ struct init_ue_msg_ies_container { ie_field_s ce_mode_b_support_ind; ie_field_s > dcn_id; ie_field_s coverage_level; + ie_field_s > ue_application_layer_meas_cap; + ie_field_s edt_session; // sequence methods init_ue_msg_ies_container(); @@ -9948,7 +11769,36 @@ struct ue_associated_lc_s1_conn_item_s { typedef s1ap_protocol_ext_empty_o served_dcns_item_ext_ies_o; // ServedGUMMEIsItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -typedef s1ap_protocol_ext_empty_o served_gummeis_item_ext_ies_o; +struct served_gummeis_item_ext_ies_o { + // Extension ::= OPEN TYPE + struct ext_c { + struct types_opts { + enum options { gummei_type, nulltype } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + types type() const { return types::gummei_type; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + gummei_type_e& gummei_type() { return c; } + const gummei_type_e& gummei_type() const { return c; } + + private: + gummei_type_e c; + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static ext_c get_ext(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; // ServedGroupIDs ::= SEQUENCE (SIZE (1..65535)) OF OCTET STRING (SIZE (2)) using served_group_ids_l = dyn_array >; @@ -10134,16 +11984,14 @@ struct served_dcns_item_s { void to_json(json_writer& j) const; }; -typedef protocol_ext_container_empty_l served_gummeis_item_ext_ies_container; - // ServedGUMMEIsItem ::= SEQUENCE struct served_gummeis_item_s { - bool ext = false; - bool ie_exts_present = false; - served_plmns_l served_plmns; - served_group_ids_l served_group_ids; - served_mmecs_l served_mmecs; - served_gummeis_item_ext_ies_container ie_exts; + bool ext = false; + bool ie_exts_present = false; + served_plmns_l served_plmns; + served_group_ids_l served_group_ids; + served_mmecs_l served_mmecs; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -10275,6 +12123,14 @@ struct gw_context_release_ind_opts { }; typedef enumerated gw_context_release_ind_e; +// HandoverFlag ::= ENUMERATED +struct ho_flag_opts { + enum options { ho_prep, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated ho_flag_e; + // KillAllWarningMessages ::= ENUMERATED struct kill_all_warning_msgs_opts { enum options { true_value, nulltype } value; @@ -10283,6 +12139,14 @@ struct kill_all_warning_msgs_opts { }; typedef enumerated kill_all_warning_msgs_e; +// LTE-M-Indication ::= ENUMERATED +struct lte_m_ind_opts { + enum options { lte_m, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated lte_m_ind_e; + // MMERelaySupportIndicator ::= ENUMERATED struct mme_relay_support_ind_opts { enum options { true_value, /*...*/ nulltype } value; @@ -10758,7 +12622,7 @@ struct location_report_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, eutran_cgi, tai, request_type, nulltype } value; + enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, eutran_cgi, tai, request_type, ps_cell_info, nulltype } value; std::string to_string() const; }; @@ -10780,15 +12644,17 @@ struct location_report_ies_o { eutran_cgi_s& eutran_cgi(); tai_s& tai(); request_type_s& request_type(); + ps_cell_info_s& ps_cell_info(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const eutran_cgi_s& eutran_cgi() const; const tai_s& tai() const; const request_type_s& request_type() const; + const ps_cell_info_s& ps_cell_info() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; @@ -10936,23 +12802,33 @@ struct mme_cfg_transfer_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { son_cfg_transfer_mct, nulltype } value; + enum options { son_cfg_transfer_mct, en_dcson_cfg_transfer_mct, nulltype } value; std::string to_string() const; }; typedef enumerated types; // choice methods - types type() const { return types::son_cfg_transfer_mct; } + value_c() = default; + value_c(const value_c& other); + value_c& operator=(const value_c& other); + ~value_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 - son_cfg_transfer_s& son_cfg_transfer_mct() { return c; } - const son_cfg_transfer_s& son_cfg_transfer_mct() const { return c; } + son_cfg_transfer_s& son_cfg_transfer_mct(); + en_dcson_cfg_transfer_s& en_dcson_cfg_transfer_mct(); + const son_cfg_transfer_s& son_cfg_transfer_mct() const; + const en_dcson_cfg_transfer_s& en_dcson_cfg_transfer_mct() const; private: - son_cfg_transfer_s c; + types type_; + choice_buffer_t c; + + void destroy_(); }; // members lookup methods @@ -11540,8 +13416,13 @@ struct path_switch_request_ack_ies_o { v2xservices_authorized, ue_sidelink_aggregate_maximum_bitrate, enhanced_coverage_restricted, + nrue_security_cap, ce_mode_brestricted, + aerial_uesubscription_info, pending_data_ind, + subscription_based_ue_differentiation_info, + ho_restrict_list, + add_rrm_prio_idx, nulltype } value; @@ -11574,8 +13455,13 @@ struct path_switch_request_ack_ies_o { v2xservices_authorized_s& v2xservices_authorized(); ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); enhanced_coverage_restricted_e& enhanced_coverage_restricted(); + nrue_security_cap_s& nrue_security_cap(); ce_mode_brestricted_e& ce_mode_brestricted(); + aerial_uesubscription_info_e& aerial_uesubscription_info(); pending_data_ind_e& pending_data_ind(); + subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info(); + ho_restrict_list_s& ho_restrict_list(); + fixed_bitstring<32, false, true>& add_rrm_prio_idx(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate() const; @@ -11590,16 +13476,25 @@ struct path_switch_request_ack_ies_o { const v2xservices_authorized_s& v2xservices_authorized() const; const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; + const nrue_security_cap_s& nrue_security_cap() const; const ce_mode_brestricted_e& ce_mode_brestricted() const; + const aerial_uesubscription_info_e& aerial_uesubscription_info() const; const pending_data_ind_e& pending_data_ind() const; + const subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info() const; + const ho_restrict_list_s& ho_restrict_list() const; + const fixed_bitstring<32, false, true>& add_rrm_prio_idx() const; private: types type_; choice_buffer_t, erab_list_l, + fixed_bitstring<32, false, true>, + ho_restrict_list_s, + nrue_security_cap_s, pro_se_authorized_s, security_context_s, + subscription_based_ue_differentiation_info_s, ue_aggregate_maximum_bitrate_s, ue_sidelink_aggregate_maximum_bitrate_s, v2xservices_authorized_s> @@ -11681,6 +13576,8 @@ struct path_switch_request_ies_o { tunnel_info_for_bbf, lhn_id, rrc_resume_cause, + nrue_security_cap, + ps_cell_info, nulltype } value; @@ -11712,6 +13609,8 @@ struct path_switch_request_ies_o { tunnel_info_s& tunnel_info_for_bbf(); bounded_octstring<32, 256, true>& lhn_id(); rrc_establishment_cause_e& rrc_resume_cause(); + nrue_security_cap_s& nrue_security_cap(); + ps_cell_info_s& ps_cell_info(); const uint32_t& enb_ue_s1ap_id() const; const erab_ie_container_list_l& erab_to_be_switched_dl_list() const; const uint64_t& source_mme_ue_s1ap_id() const; @@ -11725,6 +13624,8 @@ struct path_switch_request_ies_o { const tunnel_info_s& tunnel_info_for_bbf() const; const bounded_octstring<32, 256, true>& lhn_id() const; const rrc_establishment_cause_e& rrc_resume_cause() const; + const nrue_security_cap_s& nrue_security_cap() const; + const ps_cell_info_s& ps_cell_info() const; private: types type_; @@ -11733,6 +13634,8 @@ struct path_switch_request_ies_o { eutran_cgi_s, fixed_bitstring<27, false, true>, gummei_s, + nrue_security_cap_s, + ps_cell_info_s, tai_s, tunnel_info_s, ue_security_cap_s> @@ -11994,6 +13897,7 @@ struct s1_setup_request_ies_o { csg_id_list, ue_retention_info, nb_io_t_default_paging_drx, + connectedeng_nb_list, nulltype } value; @@ -12019,6 +13923,7 @@ struct s1_setup_request_ies_o { csg_id_list_l& csg_id_list(); ue_retention_info_e& ue_retention_info(); nb_io_t_default_paging_drx_e& nb_io_t_default_paging_drx(); + connectedeng_nb_list_l& connectedeng_nb_list(); const global_enb_id_s& global_enb_id() const; const printable_string<1, 150, true, true>& enbname() const; const supported_tas_l& supported_tas() const; @@ -12026,10 +13931,16 @@ struct s1_setup_request_ies_o { const csg_id_list_l& csg_id_list() const; const ue_retention_info_e& ue_retention_info() const; const nb_io_t_default_paging_drx_e& nb_io_t_default_paging_drx() const; + const connectedeng_nb_list_l& connectedeng_nb_list() const; private: - types type_; - choice_buffer_t, supported_tas_l> c; + types type_; + choice_buffer_t, + supported_tas_l> + c; void destroy_(); }; @@ -12105,6 +14016,64 @@ struct s1_setup_resp_ies_o { static presence_e get_presence(const uint32_t& id); }; +// SecondaryRATDataUsageReportIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +struct secondary_rat_data_usage_report_ies_o { + // Value ::= OPEN TYPE + struct value_c { + struct types_opts { + enum options { + mme_ue_s1ap_id, + enb_ue_s1ap_id, + secondary_rat_data_usage_report_list, + ho_flag, + user_location_info, + time_since_secondary_node_release, + nulltype + } value; + + std::string to_string() const; + }; + typedef enumerated types; + + // choice methods + value_c() = default; + value_c(const value_c& other); + value_c& operator=(const value_c& other); + ~value_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 + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list(); + ho_flag_e& ho_flag(); + user_location_info_s& user_location_info(); + fixed_octstring<4, true>& time_since_secondary_node_release(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list() const; + const ho_flag_e& ho_flag() const; + const user_location_info_s& user_location_info() const; + const fixed_octstring<4, true>& time_since_secondary_node_release() const; + + private: + types type_; + choice_buffer_t, secondary_rat_data_usage_report_list_l, user_location_info_s> c; + + void destroy_(); + }; + + // members lookup methods + static uint32_t idx_to_id(uint32_t idx); + static bool is_id_valid(const uint32_t& id); + static crit_e get_crit(const uint32_t& id); + static value_c get_value(const uint32_t& id); + static presence_e get_presence(const uint32_t& id); +}; + // TraceFailureIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES struct trace_fail_ind_ies_o { // Value ::= OPEN TYPE @@ -12200,7 +14169,15 @@ struct ue_cap_info_ind_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, ue_radio_cap, ue_radio_cap_for_paging, nulltype } value; + enum options { + mme_ue_s1ap_id, + enb_ue_s1ap_id, + ue_radio_cap, + ue_radio_cap_for_paging, + ue_application_layer_meas_cap, + lte_m_ind, + nulltype + } value; std::string to_string() const; }; @@ -12217,18 +14194,22 @@ struct ue_cap_info_ind_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - unbounded_octstring& ue_radio_cap(); - unbounded_octstring& ue_radio_cap_for_paging(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const unbounded_octstring& ue_radio_cap() const; - const unbounded_octstring& ue_radio_cap_for_paging() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + unbounded_octstring& ue_radio_cap(); + unbounded_octstring& ue_radio_cap_for_paging(); + fixed_bitstring<8, false, true>& ue_application_layer_meas_cap(); + lte_m_ind_e& lte_m_ind(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const unbounded_octstring& ue_radio_cap() const; + const unbounded_octstring& ue_radio_cap_for_paging() const; + const fixed_bitstring<8, false, true>& ue_application_layer_meas_cap() const; + const lte_m_ind_e& lte_m_ind() const; private: - types type_; - choice_buffer_t > c; + types type_; + choice_buffer_t, unbounded_octstring > c; void destroy_(); }; @@ -12398,6 +14379,9 @@ struct ue_context_mod_request_ies_o { srvcc_operation_not_possible, v2xservices_authorized, ue_sidelink_aggregate_maximum_bitrate, + nrue_security_cap, + aerial_uesubscription_info, + add_rrm_prio_idx, nulltype } value; @@ -12431,6 +14415,9 @@ struct ue_context_mod_request_ies_o { srvcc_operation_not_possible_e& srvcc_operation_not_possible(); v2xservices_authorized_s& v2xservices_authorized(); ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); + nrue_security_cap_s& nrue_security_cap(); + aerial_uesubscription_info_e& aerial_uesubscription_info(); + fixed_bitstring<32, false, true>& add_rrm_prio_idx(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const fixed_bitstring<256, false, true>& security_key() const; @@ -12446,11 +14433,15 @@ struct ue_context_mod_request_ies_o { const srvcc_operation_not_possible_e& srvcc_operation_not_possible() const; const v2xservices_authorized_s& v2xservices_authorized() const; const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; + const nrue_security_cap_s& nrue_security_cap() const; + const aerial_uesubscription_info_e& aerial_uesubscription_info() const; + const fixed_bitstring<32, false, true>& add_rrm_prio_idx() const; private: types type_; choice_buffer_t, lai_s, + nrue_security_cap_s, pro_se_authorized_s, ue_aggregate_maximum_bitrate_s, ue_security_cap_s, @@ -12569,6 +14560,8 @@ struct ue_context_release_complete_ies_o { user_location_info, info_on_recommended_cells_and_enbs_for_paging, cell_id_and_ce_level_for_ce_capable_ues, + secondary_rat_data_usage_report_list, + time_since_secondary_node_release, nulltype } value; @@ -12593,18 +14586,24 @@ struct ue_context_release_complete_ies_o { user_location_info_s& user_location_info(); info_on_recommended_cells_and_enbs_for_paging_s& info_on_recommended_cells_and_enbs_for_paging(); cell_id_and_ce_level_for_ce_capable_ues_s& cell_id_and_ce_level_for_ce_capable_ues(); + secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list(); + fixed_octstring<4, true>& time_since_secondary_node_release(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const crit_diagnostics_s& crit_diagnostics() const; const user_location_info_s& user_location_info() const; const info_on_recommended_cells_and_enbs_for_paging_s& info_on_recommended_cells_and_enbs_for_paging() const; const cell_id_and_ce_level_for_ce_capable_ues_s& cell_id_and_ce_level_for_ce_capable_ues() const; + const secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list() const; + const fixed_octstring<4, true>& time_since_secondary_node_release() const; private: types type_; choice_buffer_t, info_on_recommended_cells_and_enbs_for_paging_s, + secondary_rat_data_usage_report_list_l, user_location_info_s> c; @@ -12624,7 +14623,14 @@ struct ue_context_release_request_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { mme_ue_s1ap_id, enb_ue_s1ap_id, cause, gw_context_release_ind, nulltype } value; + enum options { + mme_ue_s1ap_id, + enb_ue_s1ap_id, + cause, + gw_context_release_ind, + secondary_rat_data_usage_report_list, + nulltype + } value; std::string to_string() const; }; @@ -12641,18 +14647,20 @@ struct ue_context_release_request_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint64_t& mme_ue_s1ap_id(); - uint32_t& enb_ue_s1ap_id(); - cause_c& cause(); - gw_context_release_ind_e& gw_context_release_ind(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const cause_c& cause() const; - const gw_context_release_ind_e& gw_context_release_ind() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + cause_c& cause(); + gw_context_release_ind_e& gw_context_release_ind(); + secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const cause_c& cause() const; + const gw_context_release_ind_e& gw_context_release_ind() const; + const secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t c; void destroy_(); }; @@ -12836,6 +14844,9 @@ struct ue_context_suspend_request_ies_o { enb_ue_s1ap_id, info_on_recommended_cells_and_enbs_for_paging, cell_id_and_ce_level_for_ce_capable_ues, + secondary_rat_data_usage_report_list, + user_location_info, + time_since_secondary_node_release, nulltype } value; @@ -12858,14 +14869,25 @@ struct ue_context_suspend_request_ies_o { uint32_t& enb_ue_s1ap_id(); info_on_recommended_cells_and_enbs_for_paging_s& info_on_recommended_cells_and_enbs_for_paging(); cell_id_and_ce_level_for_ce_capable_ues_s& cell_id_and_ce_level_for_ce_capable_ues(); + secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list(); + user_location_info_s& user_location_info(); + fixed_octstring<4, true>& time_since_secondary_node_release(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const info_on_recommended_cells_and_enbs_for_paging_s& info_on_recommended_cells_and_enbs_for_paging() const; const cell_id_and_ce_level_for_ce_capable_ues_s& cell_id_and_ce_level_for_ce_capable_ues() const; + const secondary_rat_data_usage_report_list_l& secondary_rat_data_usage_report_list() const; + const user_location_info_s& user_location_info() const; + const fixed_octstring<4, true>& time_since_secondary_node_release() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t, + info_on_recommended_cells_and_enbs_for_paging_s, + secondary_rat_data_usage_report_list_l, + user_location_info_s> + c; void destroy_(); }; @@ -12929,7 +14951,14 @@ struct ue_info_transfer_ies_o { // Value ::= OPEN TYPE struct value_c { struct types_opts { - enum options { s_tmsi, ue_level_qos_params, ue_radio_cap, pending_data_ind, nulltype } value; + enum options { + s_tmsi, + ue_level_qos_params, + ue_radio_cap, + subscription_based_ue_differentiation_info, + pending_data_ind, + nulltype + } value; std::string to_string() const; }; @@ -12946,18 +14975,24 @@ struct ue_info_transfer_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - s_tmsi_s& s_tmsi(); - erab_level_qos_params_s& ue_level_qos_params(); - unbounded_octstring& ue_radio_cap(); - pending_data_ind_e& pending_data_ind(); - const s_tmsi_s& s_tmsi() const; - const erab_level_qos_params_s& ue_level_qos_params() const; - const unbounded_octstring& ue_radio_cap() const; - const pending_data_ind_e& pending_data_ind() const; + s_tmsi_s& s_tmsi(); + erab_level_qos_params_s& ue_level_qos_params(); + unbounded_octstring& ue_radio_cap(); + subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info(); + pending_data_ind_e& pending_data_ind(); + const s_tmsi_s& s_tmsi() const; + const erab_level_qos_params_s& ue_level_qos_params() const; + const unbounded_octstring& ue_radio_cap() const; + const subscription_based_ue_differentiation_info_s& subscription_based_ue_differentiation_info() const; + const pending_data_ind_e& pending_data_ind() const; private: - types type_; - choice_buffer_t > c; + types type_; + choice_buffer_t > + c; void destroy_(); }; @@ -13074,6 +15109,7 @@ struct ul_nas_transport_ies_o { gw_transport_layer_address, sipto_l_gw_transport_layer_address, lhn_id, + ps_cell_info, nulltype } value; @@ -13100,6 +15136,7 @@ struct ul_nas_transport_ies_o { bounded_bitstring<1, 160, true, true>& gw_transport_layer_address(); bounded_bitstring<1, 160, true, true>& sipto_l_gw_transport_layer_address(); bounded_octstring<32, 256, true>& lhn_id(); + ps_cell_info_s& ps_cell_info(); const uint64_t& mme_ue_s1ap_id() const; const uint32_t& enb_ue_s1ap_id() const; const unbounded_octstring& nas_pdu() const; @@ -13108,12 +15145,14 @@ struct ul_nas_transport_ies_o { const bounded_bitstring<1, 160, true, true>& gw_transport_layer_address() const; const bounded_bitstring<1, 160, true, true>& sipto_l_gw_transport_layer_address() const; const bounded_octstring<32, 256, true>& lhn_id() const; + const ps_cell_info_s& ps_cell_info() const; private: types type_; choice_buffer_t, bounded_octstring<32, 256, true>, eutran_cgi_s, + ps_cell_info_s, tai_s, unbounded_octstring > c; @@ -13303,6 +15342,7 @@ struct write_replace_warning_request_ies_o { data_coding_scheme, warning_msg_contents, concurrent_warning_msg_ind, + warning_area_coordinates, nulltype } value; @@ -13332,6 +15372,7 @@ struct write_replace_warning_request_ies_o { fixed_bitstring<8, false, true>& data_coding_scheme(); bounded_octstring<1, 9600, true>& warning_msg_contents(); concurrent_warning_msg_ind_e& concurrent_warning_msg_ind(); + bounded_octstring<1, 1024, true>& warning_area_coordinates(); const fixed_bitstring<16, false, true>& msg_id() const; const fixed_bitstring<16, false, true>& serial_num() const; const warning_area_list_c& warning_area_list() const; @@ -13343,10 +15384,12 @@ struct write_replace_warning_request_ies_o { const fixed_bitstring<8, false, true>& data_coding_scheme() const; const bounded_octstring<1, 9600, true>& warning_msg_contents() const; const concurrent_warning_msg_ind_e& concurrent_warning_msg_ind() const; + const bounded_octstring<1, 1024, true>& warning_area_coordinates() const; private: types type_; - choice_buffer_t, + choice_buffer_t, + bounded_octstring<1, 9600, true>, fixed_bitstring<16, false, true>, fixed_octstring<2, true>, fixed_octstring<50, true>, @@ -13477,11 +15520,13 @@ struct location_report_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables + bool ps_cell_info_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s eutran_cgi; ie_field_s tai; ie_field_s request_type; + ie_field_s ps_cell_info; // sequence methods location_report_ies_container(); @@ -13585,10 +15630,27 @@ struct mmecp_relocation_ind_s { void to_json(json_writer& j) const; }; +struct mme_cfg_transfer_ies_container { + template + using ie_field_s = protocol_ie_container_item_s; + + // member variables + bool son_cfg_transfer_mct_present = false; + bool en_dcson_cfg_transfer_mct_present = false; + ie_field_s son_cfg_transfer_mct; + ie_field_s en_dcson_cfg_transfer_mct; + + // sequence methods + mme_cfg_transfer_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // MMEConfigurationTransfer ::= SEQUENCE struct mme_cfg_transfer_s { - bool ext = false; - protocol_ie_container_l protocol_ies; + bool ext = false; + mme_cfg_transfer_ies_container protocol_ies; // ... // sequence methods @@ -13930,6 +15992,8 @@ struct path_switch_request_ies_container { bool tunnel_info_for_bbf_present = false; bool lhn_id_present = false; bool rrc_resume_cause_present = false; + bool nrue_security_cap_present = false; + bool ps_cell_info_present = false; ie_field_s > enb_ue_s1ap_id; ie_field_s > erab_to_be_switched_dl_list; ie_field_s > source_mme_ue_s1ap_id; @@ -13943,6 +16007,8 @@ struct path_switch_request_ies_container { ie_field_s tunnel_info_for_bbf; ie_field_s > lhn_id; ie_field_s rrc_resume_cause; + ie_field_s nrue_security_cap; + ie_field_s ps_cell_info; // sequence methods path_switch_request_ies_container(); @@ -13968,19 +16034,24 @@ struct path_switch_request_ack_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ueaggregate_maximum_bitrate_present = false; - bool erab_to_be_switched_ul_list_present = false; - bool erab_to_be_released_list_present = false; - bool crit_diagnostics_present = false; - bool mme_ue_s1ap_id_minus2_present = false; - bool csg_membership_status_present = false; - bool pro_se_authorized_present = false; - bool ueuser_plane_cio_tsupport_ind_present = false; - bool v2xservices_authorized_present = false; - bool ue_sidelink_aggregate_maximum_bitrate_present = false; - bool enhanced_coverage_restricted_present = false; - bool ce_mode_brestricted_present = false; - bool pending_data_ind_present = false; + bool ueaggregate_maximum_bitrate_present = false; + bool erab_to_be_switched_ul_list_present = false; + bool erab_to_be_released_list_present = false; + bool crit_diagnostics_present = false; + bool mme_ue_s1ap_id_minus2_present = false; + bool csg_membership_status_present = false; + bool pro_se_authorized_present = false; + bool ueuser_plane_cio_tsupport_ind_present = false; + bool v2xservices_authorized_present = false; + bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool enhanced_coverage_restricted_present = false; + bool nrue_security_cap_present = false; + bool ce_mode_brestricted_present = false; + bool aerial_uesubscription_info_present = false; + bool pending_data_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool ho_restrict_list_present = false; + bool add_rrm_prio_idx_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s ueaggregate_maximum_bitrate; @@ -13993,10 +16064,15 @@ struct path_switch_request_ack_ies_container { ie_field_s pro_se_authorized; ie_field_s ueuser_plane_cio_tsupport_ind; ie_field_s v2xservices_authorized; - ie_field_s ue_sidelink_aggregate_maximum_bitrate; - ie_field_s enhanced_coverage_restricted; - ie_field_s ce_mode_brestricted; - ie_field_s pending_data_ind; + ie_field_s ue_sidelink_aggregate_maximum_bitrate; + ie_field_s enhanced_coverage_restricted; + ie_field_s nrue_security_cap; + ie_field_s ce_mode_brestricted; + ie_field_s aerial_uesubscription_info; + ie_field_s pending_data_ind; + ie_field_s subscription_based_ue_differentiation_info; + ie_field_s ho_restrict_list; + ie_field_s > add_rrm_prio_idx; // sequence methods path_switch_request_ack_ies_container(); @@ -14221,17 +16297,19 @@ struct s1_setup_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool enbname_present = false; - bool csg_id_list_present = false; - bool ue_retention_info_present = false; - bool nb_io_t_default_paging_drx_present = false; - ie_field_s global_enb_id; - ie_field_s > enbname; - ie_field_s > supported_tas; - ie_field_s default_paging_drx; - ie_field_s > csg_id_list; - ie_field_s ue_retention_info; - ie_field_s nb_io_t_default_paging_drx; + bool enbname_present = false; + bool csg_id_list_present = false; + bool ue_retention_info_present = false; + bool nb_io_t_default_paging_drx_present = false; + bool connectedeng_nb_list_present = false; + ie_field_s global_enb_id; + ie_field_s > enbname; + ie_field_s > supported_tas; + ie_field_s default_paging_drx; + ie_field_s > csg_id_list; + ie_field_s ue_retention_info; + ie_field_s nb_io_t_default_paging_drx; + ie_field_s > connectedeng_nb_list; // sequence methods s1_setup_request_ies_container(); @@ -14289,6 +16367,41 @@ struct s1_setup_resp_s { void to_json(json_writer& j) const; }; +struct secondary_rat_data_usage_report_ies_container { + template + using ie_field_s = protocol_ie_container_item_s; + + // member variables + bool ho_flag_present = false; + bool user_location_info_present = false; + bool time_since_secondary_node_release_present = false; + ie_field_s > mme_ue_s1ap_id; + ie_field_s > enb_ue_s1ap_id; + ie_field_s, 1, 256, true> > + secondary_rat_data_usage_report_list; + ie_field_s ho_flag; + ie_field_s user_location_info; + ie_field_s > time_since_secondary_node_release; + + // sequence methods + secondary_rat_data_usage_report_ies_container(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecondaryRATDataUsageReport ::= SEQUENCE +struct secondary_rat_data_usage_report_s { + bool ext = false; + secondary_rat_data_usage_report_ies_container protocol_ies; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + struct trace_fail_ind_ies_container { template using ie_field_s = protocol_ie_container_item_s; @@ -14351,11 +16464,15 @@ struct ue_cap_info_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_radio_cap_for_paging_present = false; + bool ue_radio_cap_for_paging_present = false; + bool ue_application_layer_meas_cap_present = false; + bool lte_m_ind_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s > ue_radio_cap; ie_field_s > ue_radio_cap_for_paging; + ie_field_s > ue_application_layer_meas_cap; + ie_field_s lte_m_ind; // sequence methods ue_cap_info_ind_ies_container(); @@ -14484,6 +16601,9 @@ struct ue_context_mod_request_ies_container { bool srvcc_operation_not_possible_present = false; bool v2xservices_authorized_present = false; bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool nrue_security_cap_present = false; + bool aerial_uesubscription_info_present = false; + bool add_rrm_prio_idx_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s > security_key; @@ -14499,6 +16619,9 @@ struct ue_context_mod_request_ies_container { ie_field_s srvcc_operation_not_possible; ie_field_s v2xservices_authorized; ie_field_s ue_sidelink_aggregate_maximum_bitrate; + ie_field_s nrue_security_cap; + ie_field_s aerial_uesubscription_info; + ie_field_s > add_rrm_prio_idx; // sequence methods ue_context_mod_request_ies_container(); @@ -14584,12 +16707,17 @@ struct ue_context_release_complete_ies_container { bool user_location_info_present = false; bool info_on_recommended_cells_and_enbs_for_paging_present = false; bool cell_id_and_ce_level_for_ce_capable_ues_present = false; + bool secondary_rat_data_usage_report_list_present = false; + bool time_since_secondary_node_release_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s crit_diagnostics; ie_field_s user_location_info; ie_field_s info_on_recommended_cells_and_enbs_for_paging; ie_field_s cell_id_and_ce_level_for_ce_capable_ues; + ie_field_s, 1, 256, true> > + secondary_rat_data_usage_report_list; + ie_field_s > time_since_secondary_node_release; // sequence methods ue_context_release_complete_ies_container(); @@ -14615,11 +16743,14 @@ struct ue_context_release_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool gw_context_release_ind_present = false; + bool gw_context_release_ind_present = false; + bool secondary_rat_data_usage_report_list_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s cause; ie_field_s gw_context_release_ind; + ie_field_s, 1, 256, true> > + secondary_rat_data_usage_report_list; // sequence methods ue_context_release_request_ies_container(); @@ -14745,10 +16876,17 @@ struct ue_context_suspend_request_ies_container { // member variables bool info_on_recommended_cells_and_enbs_for_paging_present = false; bool cell_id_and_ce_level_for_ce_capable_ues_present = false; + bool secondary_rat_data_usage_report_list_present = false; + bool user_location_info_present = false; + bool time_since_secondary_node_release_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s info_on_recommended_cells_and_enbs_for_paging; ie_field_s cell_id_and_ce_level_for_ce_capable_ues; + ie_field_s, 1, 256, true> > + secondary_rat_data_usage_report_list; + ie_field_s user_location_info; + ie_field_s > time_since_secondary_node_release; // sequence methods ue_context_suspend_request_ies_container(); @@ -14805,13 +16943,15 @@ struct ue_info_transfer_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_level_qos_params_present = false; - bool ue_radio_cap_present = false; - bool pending_data_ind_present = false; - ie_field_s s_tmsi; - ie_field_s ue_level_qos_params; - ie_field_s > ue_radio_cap; - ie_field_s pending_data_ind; + bool ue_level_qos_params_present = false; + bool ue_radio_cap_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool pending_data_ind_present = false; + ie_field_s s_tmsi; + ie_field_s ue_level_qos_params; + ie_field_s > ue_radio_cap; + ie_field_s subscription_based_ue_differentiation_info; + ie_field_s pending_data_ind; // sequence methods ue_info_transfer_ies_container(); @@ -14899,6 +17039,7 @@ struct ul_nas_transport_ies_container { bool gw_transport_layer_address_present = false; bool sipto_l_gw_transport_layer_address_present = false; bool lhn_id_present = false; + bool ps_cell_info_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s > nas_pdu; @@ -14907,6 +17048,7 @@ struct ul_nas_transport_ies_container { ie_field_s > gw_transport_layer_address; ie_field_s > sipto_l_gw_transport_layer_address; ie_field_s > lhn_id; + ie_field_s ps_cell_info; // sequence methods ul_nas_transport_ies_container(); @@ -15033,6 +17175,7 @@ struct write_replace_warning_request_ies_container { bool data_coding_scheme_present = false; bool warning_msg_contents_present = false; bool concurrent_warning_msg_ind_present = false; + bool warning_area_coordinates_present = false; ie_field_s > msg_id; ie_field_s > serial_num; ie_field_s warning_area_list; @@ -15044,6 +17187,7 @@ struct write_replace_warning_request_ies_container { ie_field_s > data_coding_scheme; ie_field_s > warning_msg_contents; ie_field_s concurrent_warning_msg_ind; + ie_field_s > warning_area_coordinates; // sequence methods write_replace_warning_request_ies_container(); @@ -15578,11 +17722,11 @@ struct last_visited_geran_cell_info_c { // LastVisitedCell-Item ::= CHOICE struct last_visited_cell_item_c { struct types_opts { - enum options { e_utran_cell, utran_cell, geran_cell, /*...*/ nulltype } value; + enum options { e_utran_cell, utran_cell, geran_cell, /*...*/ ng_ran_cell, nulltype } value; std::string to_string() const; }; - typedef enumerated types; + typedef enumerated types; // choice methods last_visited_cell_item_c() = default; @@ -15610,6 +17754,11 @@ struct last_visited_cell_item_c { assert_choice_type("gERAN-Cell", type_.to_string(), "LastVisitedCell-Item"); return c.get(); } + unbounded_octstring& ng_ran_cell() + { + assert_choice_type("nG-RAN-Cell", type_.to_string(), "LastVisitedCell-Item"); + return c.get >(); + } const last_visited_eutran_cell_info_s& e_utran_cell() const { assert_choice_type("e-UTRAN-Cell", type_.to_string(), "LastVisitedCell-Item"); @@ -15625,6 +17774,11 @@ struct last_visited_cell_item_c { assert_choice_type("gERAN-Cell", type_.to_string(), "LastVisitedCell-Item"); return c.get(); } + const unbounded_octstring& ng_ran_cell() const + { + assert_choice_type("nG-RAN-Cell", type_.to_string(), "LastVisitedCell-Item"); + return c.get >(); + } last_visited_eutran_cell_info_s& set_e_utran_cell() { set(types::e_utran_cell); @@ -15640,6 +17794,11 @@ struct last_visited_cell_item_c { set(types::geran_cell); return c.get(); } + unbounded_octstring& set_ng_ran_cell() + { + set(types::ng_ran_cell); + return c.get >(); + } private: types type_; @@ -16291,14 +18450,31 @@ private: void destroy_(); }; +// IMSvoiceEPSfallbackfrom5G ::= ENUMERATED +struct im_svoice_ep_sfallbackfrom5_g_opts { + enum options { true_value, /*...*/ nulltype } value; + + std::string to_string() const; +}; +typedef enumerated im_svoice_ep_sfallbackfrom5_g_e; + // SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION struct sourceenb_to_targetenb_transparent_container_ext_ies_o { // Extension ::= OPEN TYPE struct ext_c { struct types_opts { - enum options { mob_info, ue_history_info_from_the_ue, nulltype } value; + enum options { + mob_info, + ue_history_info_from_the_ue, + im_svoice_ep_sfallbackfrom5_g, + add_rrm_prio_idx, + contextat_source, + nulltype + } value; + typedef uint8_t number_type; std::string to_string() const; + uint8_t to_number() const; }; typedef enumerated types; @@ -16315,12 +18491,18 @@ struct sourceenb_to_targetenb_transparent_container_ext_ies_o { // getters fixed_bitstring<32, false, true>& mob_info(); unbounded_octstring& ue_history_info_from_the_ue(); + im_svoice_ep_sfallbackfrom5_g_e& im_svoice_ep_sfallbackfrom5_g(); + fixed_bitstring<32, false, true>& add_rrm_prio_idx(); + contextat_source_s& contextat_source(); const fixed_bitstring<32, false, true>& mob_info() const; const unbounded_octstring& ue_history_info_from_the_ue() const; + const im_svoice_ep_sfallbackfrom5_g_e& im_svoice_ep_sfallbackfrom5_g() const; + const fixed_bitstring<32, false, true>& add_rrm_prio_idx() const; + const contextat_source_s& contextat_source() const; private: - types type_; - choice_buffer_t, unbounded_octstring > c; + types type_; + choice_buffer_t, unbounded_octstring > c; void destroy_(); }; @@ -16341,10 +18523,16 @@ struct sourceenb_to_targetenb_transparent_container_ext_ies_container { using ie_field_s = protocol_ext_container_item_s; // member variables - bool mob_info_present = false; - bool ue_history_info_from_the_ue_present = false; + bool mob_info_present = false; + bool ue_history_info_from_the_ue_present = false; + bool im_svoice_ep_sfallbackfrom5_g_present = false; + bool add_rrm_prio_idx_present = false; + bool contextat_source_present = false; ie_field_s > mob_info; ie_field_s > ue_history_info_from_the_ue; + ie_field_s im_svoice_ep_sfallbackfrom5_g; + ie_field_s > add_rrm_prio_idx; + ie_field_s contextat_source; // sequence methods sourceenb_to_targetenb_transparent_container_ext_ies_container(); diff --git a/lib/src/asn1/s1ap.cc b/lib/src/asn1/s1ap.cc index 43b49c50a..f11d42ca4 100644 --- a/lib/src/asn1/s1ap.cc +++ b/lib/src/asn1/s1ap.cc @@ -956,6 +956,336 @@ std::string area_scope_of_mdt_c::types_opts::to_string() const return convert_enum_idx(options, 4, value, "area_scope_of_mdt_c::types"); } +// CellBasedQMC ::= SEQUENCE +SRSASN_CODE cell_based_qmc_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, cell_id_listfor_qmc, 1, 32, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_based_qmc_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(cell_id_listfor_qmc, bref, 1, 32, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cell_based_qmc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("cellIdListforQMC"); + for (const auto& e1 : cell_id_listfor_qmc) { + e1.to_json(j); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// PLMNAreaBasedQMC ::= SEQUENCE +SRSASN_CODE plmn_area_based_qmc_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_listfor_qmc, 1, 16, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_area_based_qmc_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(plmn_listfor_qmc, bref, 1, 16, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void plmn_area_based_qmc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("plmnListforQMC"); + for (const auto& e1 : plmn_listfor_qmc) { + j.write_str(e1.to_string()); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// TABasedQMC ::= SEQUENCE +SRSASN_CODE ta_based_qmc_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, talistfor_qmc, 1, 8, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ta_based_qmc_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(talistfor_qmc, bref, 1, 8, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ta_based_qmc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("tAListforQMC"); + for (const auto& e1 : talistfor_qmc) { + j.write_str(e1.to_string()); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// TAIBasedQMC ::= SEQUENCE +SRSASN_CODE tai_based_qmc_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, tai_listfor_qmc, 1, 8, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE tai_based_qmc_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(tai_listfor_qmc, bref, 1, 8, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void tai_based_qmc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("tAIListforQMC"); + for (const auto& e1 : tai_listfor_qmc) { + e1.to_json(j); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// AreaScopeOfQMC ::= CHOICE +void area_scope_of_qmc_c::destroy_() +{ + switch (type_) { + case types::cell_based: + c.destroy(); + break; + case types::tabased: + c.destroy(); + break; + case types::tai_based: + c.destroy(); + break; + case types::plmn_area_based: + c.destroy(); + break; + default: + break; + } +} +void area_scope_of_qmc_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_based: + c.init(); + break; + case types::tabased: + c.init(); + break; + case types::tai_based: + c.init(); + break; + case types::plmn_area_based: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_scope_of_qmc_c"); + } +} +area_scope_of_qmc_c::area_scope_of_qmc_c(const area_scope_of_qmc_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_based: + c.init(other.c.get()); + break; + case types::tabased: + c.init(other.c.get()); + break; + case types::tai_based: + c.init(other.c.get()); + break; + case types::plmn_area_based: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_scope_of_qmc_c"); + } +} +area_scope_of_qmc_c& area_scope_of_qmc_c::operator=(const area_scope_of_qmc_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_based: + c.set(other.c.get()); + break; + case types::tabased: + c.set(other.c.get()); + break; + case types::tai_based: + c.set(other.c.get()); + break; + case types::plmn_area_based: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_scope_of_qmc_c"); + } + + return *this; +} +void area_scope_of_qmc_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_based: + j.write_fieldname("cellBased"); + c.get().to_json(j); + break; + case types::tabased: + j.write_fieldname("tABased"); + c.get().to_json(j); + break; + case types::tai_based: + j.write_fieldname("tAIBased"); + c.get().to_json(j); + break; + case types::plmn_area_based: + j.write_fieldname("pLMNAreaBased"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "area_scope_of_qmc_c"); + } + j.end_obj(); +} +SRSASN_CODE area_scope_of_qmc_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_based: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::tabased: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::tai_based: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::plmn_area_based: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "area_scope_of_qmc_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE area_scope_of_qmc_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_based: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::tabased: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::tai_based: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::plmn_area_based: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "area_scope_of_qmc_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string area_scope_of_qmc_c::types_opts::to_string() const +{ + static const char* options[] = {"cellBased", "tABased", "tAIBased", "pLMNAreaBased"}; + return convert_enum_idx(options, 4, value, "area_scope_of_qmc_c::types"); +} + // CellIdentifierAndCELevelForCECapableUEs ::= SEQUENCE SRSASN_CODE cell_id_and_ce_level_for_ce_capable_ues_s::pack(bit_ref& bref) const { @@ -2079,6 +2409,81 @@ std::string bearers_subject_to_status_transfer_item_ies_o::value_c::types_opts:: template struct asn1::s1ap::protocol_ie_single_container_s; +// BluetoothMeasConfig ::= ENUMERATED +std::string bluetooth_meas_cfg_opts::to_string() const +{ + static const char* options[] = {"setup"}; + return convert_enum_idx(options, 1, value, "bluetooth_meas_cfg_e"); +} + +// BluetoothMeasurementConfiguration ::= SEQUENCE +SRSASN_CODE bluetooth_meas_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(bluetooth_meas_cfg_name_list_present, 1)); + HANDLE_CODE(bref.pack(bt_rssi_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(bluetooth_meas_cfg.pack(bref)); + if (bluetooth_meas_cfg_name_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, bluetooth_meas_cfg_name_list, 1, 4, true)); + } + if (bt_rssi_present) { + HANDLE_CODE(bt_rssi.pack(bref)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE bluetooth_meas_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(bluetooth_meas_cfg_name_list_present, 1)); + HANDLE_CODE(bref.unpack(bt_rssi_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(bluetooth_meas_cfg.unpack(bref)); + if (bluetooth_meas_cfg_name_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(bluetooth_meas_cfg_name_list, bref, 1, 4, true)); + } + if (bt_rssi_present) { + HANDLE_CODE(bt_rssi.unpack(bref)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void bluetooth_meas_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bluetoothMeasConfig", "setup"); + if (bluetooth_meas_cfg_name_list_present) { + j.start_array("bluetoothMeasConfigNameList"); + for (const auto& e1 : bluetooth_meas_cfg_name_list) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (bt_rssi_present) { + j.write_str("bt-rssi", "true"); + } + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +std::string bluetooth_meas_cfg_s::bt_rssi_opts::to_string() const +{ + static const char* options[] = {"true"}; + return convert_enum_idx(options, 1, value, "bluetooth_meas_cfg_s::bt_rssi_e_"); +} + // CancelledCellinEAI-Item ::= SEQUENCE SRSASN_CODE cancelled_cellin_eai_item_s::pack(bit_ref& bref) const { @@ -2853,6 +3258,57 @@ void cgi_s::to_json(json_writer& j) const j.end_obj(); } +// CNType ::= ENUMERATED +std::string cn_type_opts::to_string() const +{ + static const char* options[] = {"fiveGCForbidden", "epc-Forbiddden"}; + return convert_enum_idx(options, 2, value, "cn_type_e"); +} +uint8_t cn_type_opts::to_number() const +{ + static const uint8_t options[] = {5}; + return map_enum_number(options, 1, value, "cn_type_e"); +} + +// CNTypeRestrictions-Item ::= SEQUENCE +SRSASN_CODE cn_type_restricts_item_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(cntype.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cn_type_restricts_item_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(cntype.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cn_type_restricts_item_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("pLMN-Identity", plmn_id.to_string()); + j.write_str("cNType", cntype.to_string()); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + // CSG-IdList-Item ::= SEQUENCE SRSASN_CODE csg_id_list_item_s::pack(bit_ref& bref) const { @@ -4384,65 +4840,168 @@ void cell_type_s::to_json(json_writer& j) const j.end_obj(); } -// CE-ModeBRestricted ::= ENUMERATED -std::string ce_mode_brestricted_opts::to_string() const +// RAT-Type ::= ENUMERATED +std::string rat_type_opts::to_string() const { - static const char* options[] = {"restricted", "not-restricted"}; - return convert_enum_idx(options, 2, value, "ce_mode_brestricted_e"); + static const char* options[] = {"nbiot"}; + return convert_enum_idx(options, 1, value, "rat_type_e"); } -// DL-CP-SecurityInformation ::= SEQUENCE -SRSASN_CODE dl_cp_security_info_s::pack(bit_ref& bref) const +// SupportedTAs-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t supported_tas_item_ext_ies_o::idx_to_id(uint32_t idx) +{ + 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) +{ + return 232 == id; +} +crit_e supported_tas_item_ext_ies_o::get_crit(const uint32_t& id) +{ + if (id == 232) { + return crit_e::reject; + } + asn1::log_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{}; + if (id != 232) { + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e supported_tas_item_ext_ies_o::get_presence(const uint32_t& id) +{ + if (id == 232) { + return presence_e::optional; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} + +// Extension ::= OPEN TYPE +void supported_tas_item_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("RAT-Type", "nbiot"); + j.end_obj(); +} +SRSASN_CODE supported_tas_item_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_tas_item_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string supported_tas_item_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"RAT-Type"}; + return convert_enum_idx(options, 1, value, "supported_tas_item_ext_ies_o::ext_c::types"); +} + +// SupportedTAs-Item ::= SEQUENCE +SRSASN_CODE supported_tas_item_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(dl_nas_mac.pack(bref)); + HANDLE_CODE(tac.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, broadcast_plmns, 1, 6, true)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; } -SRSASN_CODE dl_cp_security_info_s::unpack(cbit_ref& bref) +SRSASN_CODE supported_tas_item_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(dl_nas_mac.unpack(bref)); + HANDLE_CODE(tac.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(broadcast_plmns, bref, 1, 6, true)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; } -void dl_cp_security_info_s::to_json(json_writer& j) const +void supported_tas_item_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("dl-NAS-MAC", dl_nas_mac.to_string()); + j.write_str("tAC", tac.to_string()); + j.start_array("broadcastPLMNs"); + for (const auto& e1 : broadcast_plmns) { + j.write_str(e1.to_string()); + } + j.end_array(); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } -// EnhancedCoverageRestricted ::= ENUMERATED -std::string enhanced_coverage_restricted_opts::to_string() const +// ConnectedengNBItem ::= SEQUENCE +SRSASN_CODE connectedeng_nb_item_s::pack(bit_ref& bref) const { - static const char* options[] = {"restricted"}; - return convert_enum_idx(options, 1, value, "enhanced_coverage_restricted_e"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(en_g_nb_id.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, supported_tas, 1, 256, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; } +SRSASN_CODE connectedeng_nb_item_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); -// ConnectionEstablishmentIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -uint32_t conn_establishment_ind_ies_o::idx_to_id(uint32_t idx) + HANDLE_CODE(en_g_nb_id.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(supported_tas, bref, 1, 256, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void connectedeng_nb_item_s::to_json(json_writer& j) const { - static const uint32_t options[] = {0, 8, 74, 251, 253, 271}; - return map_enum_number(options, 6, idx, "id"); + j.start_obj(); + j.write_str("en-gNB-ID", en_g_nb_id.to_string()); + j.start_array("supportedTAs"); + for (const auto& e1 : supported_tas) { + e1.to_json(j); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); } -bool conn_establishment_ind_ies_o::is_id_valid(const uint32_t& id) + +// GBR-QosInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t gbr_qos_info_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {255, 256, 257, 258}; + return map_enum_number(options, 4, idx, "id"); +} +bool gbr_qos_info_ext_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 74, 251, 253, 271}; + static const uint32_t options[] = {255, 256, 257, 258}; for (const auto& o : options) { if (o == id) { return true; @@ -4450,67 +5009,53 @@ bool conn_establishment_ind_ies_o::is_id_valid(const uint32_t& id) } return false; } -crit_e conn_establishment_ind_ies_o::get_crit(const uint32_t& id) +crit_e gbr_qos_info_ext_ies_o::get_crit(const uint32_t& id) { switch (id) { - case 0: - return crit_e::ignore; - case 8: - return crit_e::ignore; - case 74: + case 255: return crit_e::ignore; - case 251: + case 256: return crit_e::ignore; - case 253: + case 257: return crit_e::ignore; - case 271: + case 258: return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } return {}; } -conn_establishment_ind_ies_o::value_c conn_establishment_ind_ies_o::get_value(const uint32_t& id) +gbr_qos_info_ext_ies_o::ext_c gbr_qos_info_ext_ies_o::get_ext(const uint32_t& id) { - value_c ret{}; + ext_c ret{}; switch (id) { - case 0: - ret.set(value_c::types::mme_ue_s1ap_id); + case 255: + ret.set(ext_c::types::extended_erab_maximum_bitrate_dl); break; - case 8: - ret.set(value_c::types::enb_ue_s1ap_id); - break; - case 74: - ret.set(value_c::types::ue_radio_cap); - break; - case 251: - ret.set(value_c::types::enhanced_coverage_restricted); + case 256: + ret.set(ext_c::types::extended_erab_maximum_bitrate_ul); break; - case 253: - ret.set(value_c::types::dl_cp_security_info); + case 257: + ret.set(ext_c::types::extended_erab_guaranteed_bitrate_dl); break; - case 271: - ret.set(value_c::types::ce_mode_brestricted); + case 258: + ret.set(ext_c::types::extended_erab_guaranteed_bitrate_ul); break; default: asn1::log_error("The id=%d is not recognized", id); } return ret; } -presence_e conn_establishment_ind_ies_o::get_presence(const uint32_t& id) +presence_e gbr_qos_info_ext_ies_o::get_presence(const uint32_t& id) { switch (id) { - case 0: - return presence_e::mandatory; - case 8: - return presence_e::mandatory; - case 74: + case 255: return presence_e::optional; - case 251: + case 256: return presence_e::optional; - case 253: + case 257: return presence_e::optional; - case 271: + case 258: return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); @@ -4518,449 +5063,598 @@ presence_e conn_establishment_ind_ies_o::get_presence(const uint32_t& id) return {}; } -// Value ::= OPEN TYPE -uint64_t& conn_establishment_ind_ies_o::value_c::mme_ue_s1ap_id() +// Extension ::= OPEN TYPE +uint64_t& gbr_qos_info_ext_ies_o::ext_c::extended_erab_maximum_bitrate_dl() { - assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); return c.get(); } -uint32_t& conn_establishment_ind_ies_o::value_c::enb_ue_s1ap_id() -{ - assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); - return c.get(); -} -unbounded_octstring& conn_establishment_ind_ies_o::value_c::ue_radio_cap() -{ - assert_choice_type("OCTET STRING", type_.to_string(), "Value"); - return c.get >(); -} -enhanced_coverage_restricted_e& conn_establishment_ind_ies_o::value_c::enhanced_coverage_restricted() +uint64_t& gbr_qos_info_ext_ies_o::ext_c::extended_erab_maximum_bitrate_ul() { - assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); } -dl_cp_security_info_s& conn_establishment_ind_ies_o::value_c::dl_cp_security_info() +uint64_t& gbr_qos_info_ext_ies_o::ext_c::extended_erab_guaranteed_bitrate_dl() { - assert_choice_type("DL-CP-SecurityInformation", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); } -ce_mode_brestricted_e& conn_establishment_ind_ies_o::value_c::ce_mode_brestricted() +uint64_t& gbr_qos_info_ext_ies_o::ext_c::extended_erab_guaranteed_bitrate_ul() { - assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); } -const uint64_t& conn_establishment_ind_ies_o::value_c::mme_ue_s1ap_id() const +const uint64_t& gbr_qos_info_ext_ies_o::ext_c::extended_erab_maximum_bitrate_dl() const { - assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); return c.get(); } -const uint32_t& conn_establishment_ind_ies_o::value_c::enb_ue_s1ap_id() const +const uint64_t& gbr_qos_info_ext_ies_o::ext_c::extended_erab_maximum_bitrate_ul() const { - assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); } -const unbounded_octstring& conn_establishment_ind_ies_o::value_c::ue_radio_cap() const +const uint64_t& gbr_qos_info_ext_ies_o::ext_c::extended_erab_guaranteed_bitrate_dl() const { - assert_choice_type("OCTET STRING", type_.to_string(), "Value"); - return c.get >(); + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); } -const enhanced_coverage_restricted_e& conn_establishment_ind_ies_o::value_c::enhanced_coverage_restricted() const +const uint64_t& gbr_qos_info_ext_ies_o::ext_c::extended_erab_guaranteed_bitrate_ul() const { - assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); } -const dl_cp_security_info_s& conn_establishment_ind_ies_o::value_c::dl_cp_security_info() const +void gbr_qos_info_ext_ies_o::ext_c::destroy_() {} +void gbr_qos_info_ext_ies_o::ext_c::set(types::options e) { - assert_choice_type("DL-CP-SecurityInformation", type_.to_string(), "Value"); - return c.get(); + destroy_(); + type_ = e; } -const ce_mode_brestricted_e& conn_establishment_ind_ies_o::value_c::ce_mode_brestricted() const +gbr_qos_info_ext_ies_o::ext_c::ext_c(const gbr_qos_info_ext_ies_o::ext_c& other) { - assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); - return c.get(); + type_ = other.type(); + switch (type_) { + case types::extended_erab_maximum_bitrate_dl: + c.init(other.c.get()); + break; + case types::extended_erab_maximum_bitrate_ul: + c.init(other.c.get()); + break; + case types::extended_erab_guaranteed_bitrate_dl: + c.init(other.c.get()); + break; + case types::extended_erab_guaranteed_bitrate_ul: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "gbr_qos_info_ext_ies_o::ext_c"); + } } -void conn_establishment_ind_ies_o::value_c::destroy_() +gbr_qos_info_ext_ies_o::ext_c& gbr_qos_info_ext_ies_o::ext_c::operator=(const gbr_qos_info_ext_ies_o::ext_c& other) { + if (this == &other) { + return *this; + } + set(other.type()); switch (type_) { - case types::ue_radio_cap: - c.destroy >(); + case types::extended_erab_maximum_bitrate_dl: + c.set(other.c.get()); break; - case types::dl_cp_security_info: - c.destroy(); + case types::extended_erab_maximum_bitrate_ul: + c.set(other.c.get()); break; - default: + case types::extended_erab_guaranteed_bitrate_dl: + c.set(other.c.get()); break; + case types::extended_erab_guaranteed_bitrate_ul: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "gbr_qos_info_ext_ies_o::ext_c"); } + + return *this; } -void conn_establishment_ind_ies_o::value_c::set(types::options e) +void gbr_qos_info_ext_ies_o::ext_c::to_json(json_writer& j) const { - destroy_(); - type_ = e; + j.start_obj(); switch (type_) { - case types::mme_ue_s1ap_id: + case types::extended_erab_maximum_bitrate_dl: + j.write_int("INTEGER (10000000001..4000000000000,...)", c.get()); break; - case types::enb_ue_s1ap_id: + case types::extended_erab_maximum_bitrate_ul: + j.write_int("INTEGER (10000000001..4000000000000,...)", c.get()); break; - case types::ue_radio_cap: - c.init >(); + case types::extended_erab_guaranteed_bitrate_dl: + j.write_int("INTEGER (10000000001..4000000000000,...)", c.get()); break; - case types::enhanced_coverage_restricted: + case types::extended_erab_guaranteed_bitrate_ul: + j.write_int("INTEGER (10000000001..4000000000000,...)", c.get()); break; - case types::dl_cp_security_info: - c.init(); + default: + log_invalid_choice_id(type_, "gbr_qos_info_ext_ies_o::ext_c"); + } + j.end_obj(); +} +SRSASN_CODE gbr_qos_info_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + switch (type_) { + case types::extended_erab_maximum_bitrate_dl: + HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); break; - case types::ce_mode_brestricted: + case types::extended_erab_maximum_bitrate_ul: + HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); break; - case types::nulltype: + case types::extended_erab_guaranteed_bitrate_dl: + HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); + break; + case types::extended_erab_guaranteed_bitrate_ul: + HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); break; default: - log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "gbr_qos_info_ext_ies_o::ext_c"); + return SRSASN_ERROR_ENCODE_FAIL; } + return SRSASN_SUCCESS; } -conn_establishment_ind_ies_o::value_c::value_c(const conn_establishment_ind_ies_o::value_c& other) +SRSASN_CODE gbr_qos_info_ext_ies_o::ext_c::unpack(cbit_ref& bref) { - type_ = other.type(); + varlength_field_unpack_guard varlen_scope(bref, true); switch (type_) { - case types::mme_ue_s1ap_id: - c.init(other.c.get()); + case types::extended_erab_maximum_bitrate_dl: + HANDLE_CODE( + unpack_integer(c.get(), bref, (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); break; - case types::enb_ue_s1ap_id: - c.init(other.c.get()); + case types::extended_erab_maximum_bitrate_ul: + HANDLE_CODE( + unpack_integer(c.get(), bref, (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); break; - case types::ue_radio_cap: - c.init(other.c.get >()); + case types::extended_erab_guaranteed_bitrate_dl: + HANDLE_CODE( + unpack_integer(c.get(), bref, (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); break; - case types::enhanced_coverage_restricted: - c.init(other.c.get()); + case types::extended_erab_guaranteed_bitrate_ul: + HANDLE_CODE( + unpack_integer(c.get(), bref, (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); break; - case types::dl_cp_security_info: - c.init(other.c.get()); + default: + log_invalid_choice_id(type_, "gbr_qos_info_ext_ies_o::ext_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string gbr_qos_info_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"INTEGER (10000000001..4000000000000,...)", + "INTEGER (10000000001..4000000000000,...)", + "INTEGER (10000000001..4000000000000,...)", + "INTEGER (10000000001..4000000000000,...)"}; + return convert_enum_idx(options, 4, value, "gbr_qos_info_ext_ies_o::ext_c::types"); +} + +// E-RABQoSParameters-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t erab_qos_params_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {273, 274}; + return map_enum_number(options, 2, idx, "id"); +} +bool erab_qos_params_ext_ies_o::is_id_valid(const uint32_t& id) +{ + static const uint32_t options[] = {273, 274}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; +} +crit_e erab_qos_params_ext_ies_o::get_crit(const uint32_t& id) +{ + switch (id) { + case 273: + return crit_e::ignore; + case 274: + return crit_e::ignore; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} +erab_qos_params_ext_ies_o::ext_c erab_qos_params_ext_ies_o::get_ext(const uint32_t& id) +{ + ext_c ret{}; + switch (id) { + case 273: + ret.set(ext_c::types::dl_packet_loss_rate); break; - case types::ce_mode_brestricted: - c.init(other.c.get()); + case 274: + ret.set(ext_c::types::ul_packet_loss_rate); + break; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e erab_qos_params_ext_ies_o::get_presence(const uint32_t& id) +{ + switch (id) { + case 273: + return presence_e::optional; + case 274: + return presence_e::optional; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} + +// Extension ::= OPEN TYPE +uint16_t& erab_qos_params_ext_ies_o::ext_c::dl_packet_loss_rate() +{ + assert_choice_type("INTEGER (0..1000)", type_.to_string(), "Extension"); + return c.get(); +} +uint16_t& erab_qos_params_ext_ies_o::ext_c::ul_packet_loss_rate() +{ + assert_choice_type("INTEGER (0..1000)", type_.to_string(), "Extension"); + return c.get(); +} +const uint16_t& erab_qos_params_ext_ies_o::ext_c::dl_packet_loss_rate() const +{ + assert_choice_type("INTEGER (0..1000)", type_.to_string(), "Extension"); + return c.get(); +} +const uint16_t& erab_qos_params_ext_ies_o::ext_c::ul_packet_loss_rate() const +{ + assert_choice_type("INTEGER (0..1000)", type_.to_string(), "Extension"); + return c.get(); +} +void erab_qos_params_ext_ies_o::ext_c::destroy_() {} +void erab_qos_params_ext_ies_o::ext_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +erab_qos_params_ext_ies_o::ext_c::ext_c(const erab_qos_params_ext_ies_o::ext_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::dl_packet_loss_rate: + c.init(other.c.get()); + break; + case types::ul_packet_loss_rate: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "erab_qos_params_ext_ies_o::ext_c"); } } -conn_establishment_ind_ies_o::value_c& -conn_establishment_ind_ies_o::value_c::operator=(const conn_establishment_ind_ies_o::value_c& other) +erab_qos_params_ext_ies_o::ext_c& +erab_qos_params_ext_ies_o::ext_c::operator=(const erab_qos_params_ext_ies_o::ext_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::mme_ue_s1ap_id: - c.set(other.c.get()); - break; - case types::enb_ue_s1ap_id: - c.set(other.c.get()); - break; - case types::ue_radio_cap: - c.set(other.c.get >()); - break; - case types::enhanced_coverage_restricted: - c.set(other.c.get()); - break; - case types::dl_cp_security_info: - c.set(other.c.get()); + case types::dl_packet_loss_rate: + c.set(other.c.get()); break; - case types::ce_mode_brestricted: - c.set(other.c.get()); + case types::ul_packet_loss_rate: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "erab_qos_params_ext_ies_o::ext_c"); } return *this; } -void conn_establishment_ind_ies_o::value_c::to_json(json_writer& j) const +void erab_qos_params_ext_ies_o::ext_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::mme_ue_s1ap_id: - j.write_int("INTEGER (0..4294967295)", c.get()); - break; - case types::enb_ue_s1ap_id: - j.write_int("INTEGER (0..16777215)", c.get()); - break; - case types::ue_radio_cap: - j.write_str("OCTET STRING", c.get >().to_string()); + case types::dl_packet_loss_rate: + j.write_int("INTEGER (0..1000)", c.get()); break; - case types::enhanced_coverage_restricted: - j.write_str("EnhancedCoverageRestricted", "restricted"); - break; - case types::dl_cp_security_info: - j.write_fieldname("DL-CP-SecurityInformation"); - c.get().to_json(j); - break; - case types::ce_mode_brestricted: - j.write_str("CE-ModeBRestricted", c.get().to_string()); + case types::ul_packet_loss_rate: + j.write_int("INTEGER (0..1000)", c.get()); break; default: - log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "erab_qos_params_ext_ies_o::ext_c"); } j.end_obj(); } -SRSASN_CODE conn_establishment_ind_ies_o::value_c::pack(bit_ref& bref) const +SRSASN_CODE erab_qos_params_ext_ies_o::ext_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); switch (type_) { - case types::mme_ue_s1ap_id: - HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)0u, (uint64_t)4294967295u, false, true)); - break; - case types::enb_ue_s1ap_id: - HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); + case types::dl_packet_loss_rate: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1000u, false, true)); break; - case types::ue_radio_cap: - HANDLE_CODE(c.get >().pack(bref)); - break; - case types::enhanced_coverage_restricted: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_cp_security_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ce_mode_brestricted: - HANDLE_CODE(c.get().pack(bref)); + case types::ul_packet_loss_rate: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1000u, false, true)); break; default: - log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "erab_qos_params_ext_ies_o::ext_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE conn_establishment_ind_ies_o::value_c::unpack(cbit_ref& bref) +SRSASN_CODE erab_qos_params_ext_ies_o::ext_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); switch (type_) { - case types::mme_ue_s1ap_id: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint64_t)0u, (uint64_t)4294967295u, false, true)); - break; - case types::enb_ue_s1ap_id: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); - break; - case types::ue_radio_cap: - HANDLE_CODE(c.get >().unpack(bref)); - break; - case types::enhanced_coverage_restricted: - HANDLE_CODE(c.get().unpack(bref)); + case types::dl_packet_loss_rate: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1000u, false, true)); break; - case types::dl_cp_security_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ce_mode_brestricted: - HANDLE_CODE(c.get().unpack(bref)); + case types::ul_packet_loss_rate: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1000u, false, true)); break; default: - log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "erab_qos_params_ext_ies_o::ext_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string conn_establishment_ind_ies_o::value_c::types_opts::to_string() const +std::string erab_qos_params_ext_ies_o::ext_c::types_opts::to_string() const { - 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"); + static const char* options[] = {"INTEGER (0..1000)", "INTEGER (0..1000)"}; + return convert_enum_idx(options, 2, value, "erab_qos_params_ext_ies_o::ext_c::types"); } -template struct asn1::s1ap::protocol_ie_field_s; +template struct asn1::s1ap::protocol_ext_field_s; -conn_establishment_ind_ies_container::conn_establishment_ind_ies_container() : - mme_ue_s1ap_id(0, crit_e::ignore), - enb_ue_s1ap_id(8, crit_e::ignore), - ue_radio_cap(74, crit_e::ignore), - enhanced_coverage_restricted(251, crit_e::ignore), - dl_cp_security_info(253, crit_e::ignore), - ce_mode_brestricted(271, crit_e::ignore) +gbr_qos_info_ext_ies_container::gbr_qos_info_ext_ies_container() : + extended_erab_maximum_bitrate_dl(255, crit_e::ignore), + extended_erab_maximum_bitrate_ul(256, crit_e::ignore), + extended_erab_guaranteed_bitrate_dl(257, crit_e::ignore), + extended_erab_guaranteed_bitrate_ul(258, crit_e::ignore) {} -SRSASN_CODE conn_establishment_ind_ies_container::pack(bit_ref& bref) const +SRSASN_CODE gbr_qos_info_ext_ies_container::pack(bit_ref& bref) const { - uint32_t nof_ies = 2; - nof_ies += ue_radio_cap_present ? 1 : 0; - nof_ies += enhanced_coverage_restricted_present ? 1 : 0; - nof_ies += dl_cp_security_info_present ? 1 : 0; - nof_ies += ce_mode_brestricted_present ? 1 : 0; - pack_length(bref, nof_ies, 0u, 65535u, true); + uint32_t nof_ies = 0; + nof_ies += extended_erab_maximum_bitrate_dl_present ? 1 : 0; + nof_ies += extended_erab_maximum_bitrate_ul_present ? 1 : 0; + nof_ies += extended_erab_guaranteed_bitrate_dl_present ? 1 : 0; + nof_ies += extended_erab_guaranteed_bitrate_ul_present ? 1 : 0; + pack_length(bref, nof_ies, 1u, 65535u, true); - HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); - HANDLE_CODE(enb_ue_s1ap_id.pack(bref)); - if (ue_radio_cap_present) { - HANDLE_CODE(ue_radio_cap.pack(bref)); + if (extended_erab_maximum_bitrate_dl_present) { + HANDLE_CODE(extended_erab_maximum_bitrate_dl.pack(bref)); } - if (enhanced_coverage_restricted_present) { - HANDLE_CODE(enhanced_coverage_restricted.pack(bref)); + if (extended_erab_maximum_bitrate_ul_present) { + HANDLE_CODE(extended_erab_maximum_bitrate_ul.pack(bref)); } - if (dl_cp_security_info_present) { - HANDLE_CODE(dl_cp_security_info.pack(bref)); + if (extended_erab_guaranteed_bitrate_dl_present) { + HANDLE_CODE(extended_erab_guaranteed_bitrate_dl.pack(bref)); } - if (ce_mode_brestricted_present) { - HANDLE_CODE(ce_mode_brestricted.pack(bref)); + if (extended_erab_guaranteed_bitrate_ul_present) { + HANDLE_CODE(extended_erab_guaranteed_bitrate_ul.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE conn_establishment_ind_ies_container::unpack(cbit_ref& bref) +SRSASN_CODE gbr_qos_info_ext_ies_container::unpack(cbit_ref& bref) { uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - uint32_t nof_mandatory_ies = 2; + unpack_length(nof_ies, bref, 1u, 65535u, true); for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; + protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); switch (c.id) { - case 0: - nof_mandatory_ies--; - mme_ue_s1ap_id.id = c.id; - mme_ue_s1ap_id.crit = c.crit; - mme_ue_s1ap_id.value = c.value.mme_ue_s1ap_id(); - break; - case 8: - nof_mandatory_ies--; - enb_ue_s1ap_id.id = c.id; - enb_ue_s1ap_id.crit = c.crit; - enb_ue_s1ap_id.value = c.value.enb_ue_s1ap_id(); - break; - case 74: - ue_radio_cap_present = true; - ue_radio_cap.id = c.id; - ue_radio_cap.crit = c.crit; - ue_radio_cap.value = c.value.ue_radio_cap(); - break; - case 251: - enhanced_coverage_restricted_present = true; - enhanced_coverage_restricted.id = c.id; - enhanced_coverage_restricted.crit = c.crit; - enhanced_coverage_restricted.value = c.value.enhanced_coverage_restricted(); - break; - case 253: - dl_cp_security_info_present = true; - dl_cp_security_info.id = c.id; - dl_cp_security_info.crit = c.crit; - dl_cp_security_info.value = c.value.dl_cp_security_info(); - break; - case 271: - ce_mode_brestricted_present = true; - ce_mode_brestricted.id = c.id; - ce_mode_brestricted.crit = c.crit; - ce_mode_brestricted.value = c.value.ce_mode_brestricted(); + case 255: + extended_erab_maximum_bitrate_dl_present = true; + extended_erab_maximum_bitrate_dl.id = c.id; + extended_erab_maximum_bitrate_dl.crit = c.crit; + extended_erab_maximum_bitrate_dl.ext = c.ext_value.extended_erab_maximum_bitrate_dl(); + break; + case 256: + extended_erab_maximum_bitrate_ul_present = true; + extended_erab_maximum_bitrate_ul.id = c.id; + extended_erab_maximum_bitrate_ul.crit = c.crit; + extended_erab_maximum_bitrate_ul.ext = c.ext_value.extended_erab_maximum_bitrate_ul(); + break; + case 257: + extended_erab_guaranteed_bitrate_dl_present = true; + extended_erab_guaranteed_bitrate_dl.id = c.id; + extended_erab_guaranteed_bitrate_dl.crit = c.crit; + extended_erab_guaranteed_bitrate_dl.ext = c.ext_value.extended_erab_guaranteed_bitrate_dl(); + break; + case 258: + extended_erab_guaranteed_bitrate_ul_present = true; + extended_erab_guaranteed_bitrate_ul.id = c.id; + extended_erab_guaranteed_bitrate_ul.crit = c.crit; + extended_erab_guaranteed_bitrate_ul.ext = c.ext_value.extended_erab_guaranteed_bitrate_ul(); break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - return SRSASN_ERROR_DECODE_FAIL; - } return SRSASN_SUCCESS; } -void conn_establishment_ind_ies_container::to_json(json_writer& j) const +void gbr_qos_info_ext_ies_container::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname(""); - mme_ue_s1ap_id.to_json(j); - j.write_fieldname(""); - enb_ue_s1ap_id.to_json(j); - if (ue_radio_cap_present) { + if (extended_erab_maximum_bitrate_dl_present) { j.write_fieldname(""); - ue_radio_cap.to_json(j); + extended_erab_maximum_bitrate_dl.to_json(j); } - if (enhanced_coverage_restricted_present) { + if (extended_erab_maximum_bitrate_ul_present) { j.write_fieldname(""); - enhanced_coverage_restricted.to_json(j); + extended_erab_maximum_bitrate_ul.to_json(j); } - if (dl_cp_security_info_present) { + if (extended_erab_guaranteed_bitrate_dl_present) { j.write_fieldname(""); - dl_cp_security_info.to_json(j); + extended_erab_guaranteed_bitrate_dl.to_json(j); } - if (ce_mode_brestricted_present) { + if (extended_erab_guaranteed_bitrate_ul_present) { j.write_fieldname(""); - ce_mode_brestricted.to_json(j); + extended_erab_guaranteed_bitrate_ul.to_json(j); } j.end_obj(); } -// ConnectionEstablishmentIndication ::= SEQUENCE -SRSASN_CODE conn_establishment_ind_s::pack(bit_ref& bref) const +// GBR-QosInformation ::= SEQUENCE +SRSASN_CODE gbr_qos_info_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(pack_integer(bref, erab_maximum_bitrate_dl, (uint64_t)0u, (uint64_t)10000000000u, false, true)); + HANDLE_CODE(pack_integer(bref, erab_maximum_bitrate_ul, (uint64_t)0u, (uint64_t)10000000000u, false, true)); + HANDLE_CODE(pack_integer(bref, erab_guaranteed_bitrate_dl, (uint64_t)0u, (uint64_t)10000000000u, false, true)); + HANDLE_CODE(pack_integer(bref, erab_guaranteed_bitrate_ul, (uint64_t)0u, (uint64_t)10000000000u, false, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE conn_establishment_ind_s::unpack(cbit_ref& bref) +SRSASN_CODE gbr_qos_info_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(unpack_integer(erab_maximum_bitrate_dl, bref, (uint64_t)0u, (uint64_t)10000000000u, false, true)); + HANDLE_CODE(unpack_integer(erab_maximum_bitrate_ul, bref, (uint64_t)0u, (uint64_t)10000000000u, false, true)); + HANDLE_CODE(unpack_integer(erab_guaranteed_bitrate_dl, bref, (uint64_t)0u, (uint64_t)10000000000u, false, true)); + HANDLE_CODE(unpack_integer(erab_guaranteed_bitrate_ul, bref, (uint64_t)0u, (uint64_t)10000000000u, false, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } return SRSASN_SUCCESS; } -void conn_establishment_ind_s::to_json(json_writer& j) const +void gbr_qos_info_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); + j.write_int("e-RAB-MaximumBitrateDL", erab_maximum_bitrate_dl); + j.write_int("e-RAB-MaximumBitrateUL", erab_maximum_bitrate_ul); + j.write_int("e-RAB-GuaranteedBitrateDL", erab_guaranteed_bitrate_dl); + j.write_int("e-RAB-GuaranteedBitrateUL", erab_guaranteed_bitrate_ul); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } j.end_obj(); } -// TypeOfError ::= ENUMERATED -std::string type_of_error_opts::to_string() const +// ScheduledCommunicationTime ::= SEQUENCE +SRSASN_CODE sched_communication_time_s::pack(bit_ref& bref) const { - static const char* options[] = {"not-understood", "missing"}; - return convert_enum_idx(options, 2, value, "type_of_error_e"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dayof_week_present, 1)); + HANDLE_CODE(bref.pack(timeof_day_start_present, 1)); + HANDLE_CODE(bref.pack(timeof_day_end_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + if (dayof_week_present) { + HANDLE_CODE(dayof_week.pack(bref)); + } + if (timeof_day_start_present) { + HANDLE_CODE(pack_integer(bref, timeof_day_start, (uint32_t)0u, (uint32_t)86399u, true, true)); + } + if (timeof_day_end_present) { + HANDLE_CODE(pack_integer(bref, timeof_day_end, (uint32_t)0u, (uint32_t)86399u, true, true)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; } +SRSASN_CODE sched_communication_time_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dayof_week_present, 1)); + HANDLE_CODE(bref.unpack(timeof_day_start_present, 1)); + HANDLE_CODE(bref.unpack(timeof_day_end_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); -// CriticalityDiagnostics-IE-Item ::= SEQUENCE -SRSASN_CODE crit_diagnostics_ie_item_s::pack(bit_ref& bref) const + if (dayof_week_present) { + HANDLE_CODE(dayof_week.unpack(bref)); + } + if (timeof_day_start_present) { + HANDLE_CODE(unpack_integer(timeof_day_start, bref, (uint32_t)0u, (uint32_t)86399u, true, true)); + } + if (timeof_day_end_present) { + HANDLE_CODE(unpack_integer(timeof_day_end, bref, (uint32_t)0u, (uint32_t)86399u, true, true)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sched_communication_time_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dayof_week_present) { + j.write_str("dayofWeek", dayof_week.to_string()); + } + if (timeof_day_start_present) { + j.write_int("timeofDayStart", timeof_day_start); + } + if (timeof_day_end_present) { + j.write_int("timeofDayEnd", timeof_day_end); + } + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// CE-ModeBRestricted ::= ENUMERATED +std::string ce_mode_brestricted_opts::to_string() const +{ + static const char* options[] = {"restricted", "not-restricted"}; + return convert_enum_idx(options, 2, value, "ce_mode_brestricted_e"); +} + +// DL-CP-SecurityInformation ::= SEQUENCE +SRSASN_CODE dl_cp_security_info_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(iecrit.pack(bref)); - HANDLE_CODE(pack_integer(bref, ie_id, (uint32_t)0u, (uint32_t)65535u, false, true)); - HANDLE_CODE(type_of_error.pack(bref)); + HANDLE_CODE(dl_nas_mac.pack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE crit_diagnostics_ie_item_s::unpack(cbit_ref& bref) +SRSASN_CODE dl_cp_security_info_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(iecrit.unpack(bref)); - HANDLE_CODE(unpack_integer(ie_id, bref, (uint32_t)0u, (uint32_t)65535u, false, true)); - HANDLE_CODE(type_of_error.unpack(bref)); + HANDLE_CODE(dl_nas_mac.unpack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void crit_diagnostics_ie_item_s::to_json(json_writer& j) const +void dl_cp_security_info_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("iECriticality", iecrit.to_string()); - j.write_int("iE-ID", ie_id); - j.write_str("typeOfError", type_of_error.to_string()); + j.write_str("dl-NAS-MAC", dl_nas_mac.to_string()); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -4968,34 +5662,165 @@ void crit_diagnostics_ie_item_s::to_json(json_writer& j) const j.end_obj(); } -// TriggeringMessage ::= ENUMERATED -std::string trigger_msg_opts::to_string() const +template struct asn1::s1ap::protocol_ext_field_s; + +erab_qos_params_ext_ies_container::erab_qos_params_ext_ies_container() : + dl_packet_loss_rate(273, crit_e::ignore), ul_packet_loss_rate(274, crit_e::ignore) +{} +SRSASN_CODE erab_qos_params_ext_ies_container::pack(bit_ref& bref) const { - static const char* options[] = {"initiating-message", "successful-outcome", "unsuccessfull-outcome"}; - return convert_enum_idx(options, 3, value, "trigger_msg_e"); + uint32_t nof_ies = 0; + nof_ies += dl_packet_loss_rate_present ? 1 : 0; + nof_ies += ul_packet_loss_rate_present ? 1 : 0; + pack_length(bref, nof_ies, 1u, 65535u, true); + + if (dl_packet_loss_rate_present) { + HANDLE_CODE(dl_packet_loss_rate.pack(bref)); + } + if (ul_packet_loss_rate_present) { + HANDLE_CODE(ul_packet_loss_rate.pack(bref)); + } + + return SRSASN_SUCCESS; } +SRSASN_CODE erab_qos_params_ext_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 1u, 65535u, true); -// CriticalityDiagnostics ::= SEQUENCE -SRSASN_CODE crit_diagnostics_s::pack(bit_ref& bref) const + for (; nof_ies > 0; --nof_ies) { + protocol_ext_field_s c; + HANDLE_CODE(c.unpack(bref)); + switch (c.id) { + case 273: + dl_packet_loss_rate_present = true; + dl_packet_loss_rate.id = c.id; + dl_packet_loss_rate.crit = c.crit; + dl_packet_loss_rate.ext = c.ext_value.dl_packet_loss_rate(); + break; + case 274: + ul_packet_loss_rate_present = true; + ul_packet_loss_rate.id = c.id; + ul_packet_loss_rate.crit = c.crit; + ul_packet_loss_rate.ext = c.ext_value.ul_packet_loss_rate(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + + return SRSASN_SUCCESS; +} +void erab_qos_params_ext_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_packet_loss_rate_present) { + j.write_fieldname(""); + dl_packet_loss_rate.to_json(j); + } + if (ul_packet_loss_rate_present) { + j.write_fieldname(""); + ul_packet_loss_rate.to_json(j); + } + j.end_obj(); +} + +// E-RABLevelQoSParameters ::= SEQUENCE +SRSASN_CODE erab_level_qos_params_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(proc_code_present, 1)); - HANDLE_CODE(bref.pack(trigger_msg_present, 1)); - HANDLE_CODE(bref.pack(proc_crit_present, 1)); - HANDLE_CODE(bref.pack(ies_crit_diagnostics_present, 1)); + HANDLE_CODE(bref.pack(gbr_qos_info_present, 1)); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - if (proc_code_present) { - HANDLE_CODE(pack_integer(bref, proc_code, (uint16_t)0u, (uint16_t)255u, false, true)); + HANDLE_CODE(pack_integer(bref, qci, (uint16_t)0u, (uint16_t)255u, false, true)); + HANDLE_CODE(alloc_retention_prio.pack(bref)); + if (gbr_qos_info_present) { + HANDLE_CODE(gbr_qos_info.pack(bref)); } - if (trigger_msg_present) { - HANDLE_CODE(trigger_msg.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); } - if (proc_crit_present) { - HANDLE_CODE(proc_crit.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE erab_level_qos_params_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(gbr_qos_info_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(unpack_integer(qci, bref, (uint16_t)0u, (uint16_t)255u, false, true)); + HANDLE_CODE(alloc_retention_prio.unpack(bref)); + if (gbr_qos_info_present) { + HANDLE_CODE(gbr_qos_info.unpack(bref)); } - if (ies_crit_diagnostics_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ies_crit_diagnostics, 1, 256, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void erab_level_qos_params_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("qCI", qci); + j.write_fieldname("allocationRetentionPriority"); + alloc_retention_prio.to_json(j); + if (gbr_qos_info_present) { + j.write_fieldname("gbrQosInformation"); + gbr_qos_info.to_json(j); + } + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// EndIndication ::= ENUMERATED +std::string end_ind_opts::to_string() const +{ + static const char* options[] = {"no-further-data", "further-data-exists"}; + return convert_enum_idx(options, 2, value, "end_ind_e"); +} + +// EnhancedCoverageRestricted ::= ENUMERATED +std::string enhanced_coverage_restricted_opts::to_string() const +{ + static const char* options[] = {"restricted"}; + return convert_enum_idx(options, 1, value, "enhanced_coverage_restricted_e"); +} + +// Subscription-Based-UE-DifferentiationInfo ::= SEQUENCE +SRSASN_CODE subscription_based_ue_differentiation_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(periodic_communication_ind_present, 1)); + HANDLE_CODE(bref.pack(periodic_time_present, 1)); + HANDLE_CODE(bref.pack(sched_communication_time_present, 1)); + HANDLE_CODE(bref.pack(stationary_ind_present, 1)); + HANDLE_CODE(bref.pack(traffic_profile_present, 1)); + HANDLE_CODE(bref.pack(battery_ind_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + if (periodic_communication_ind_present) { + HANDLE_CODE(periodic_communication_ind.pack(bref)); + } + if (periodic_time_present) { + HANDLE_CODE(pack_integer(bref, periodic_time, (uint16_t)1u, (uint16_t)3600u, true, true)); + } + if (sched_communication_time_present) { + HANDLE_CODE(sched_communication_time.pack(bref)); + } + if (stationary_ind_present) { + HANDLE_CODE(stationary_ind.pack(bref)); + } + if (traffic_profile_present) { + HANDLE_CODE(traffic_profile.pack(bref)); + } + if (battery_ind_present) { + HANDLE_CODE(battery_ind.pack(bref)); } if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); @@ -5003,26 +5828,34 @@ SRSASN_CODE crit_diagnostics_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE crit_diagnostics_s::unpack(cbit_ref& bref) +SRSASN_CODE subscription_based_ue_differentiation_info_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(proc_code_present, 1)); - HANDLE_CODE(bref.unpack(trigger_msg_present, 1)); - HANDLE_CODE(bref.unpack(proc_crit_present, 1)); - HANDLE_CODE(bref.unpack(ies_crit_diagnostics_present, 1)); + HANDLE_CODE(bref.unpack(periodic_communication_ind_present, 1)); + HANDLE_CODE(bref.unpack(periodic_time_present, 1)); + HANDLE_CODE(bref.unpack(sched_communication_time_present, 1)); + HANDLE_CODE(bref.unpack(stationary_ind_present, 1)); + HANDLE_CODE(bref.unpack(traffic_profile_present, 1)); + HANDLE_CODE(bref.unpack(battery_ind_present, 1)); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - if (proc_code_present) { - HANDLE_CODE(unpack_integer(proc_code, bref, (uint16_t)0u, (uint16_t)255u, false, true)); + if (periodic_communication_ind_present) { + HANDLE_CODE(periodic_communication_ind.unpack(bref)); } - if (trigger_msg_present) { - HANDLE_CODE(trigger_msg.unpack(bref)); + if (periodic_time_present) { + HANDLE_CODE(unpack_integer(periodic_time, bref, (uint16_t)1u, (uint16_t)3600u, true, true)); } - if (proc_crit_present) { - HANDLE_CODE(proc_crit.unpack(bref)); + if (sched_communication_time_present) { + HANDLE_CODE(sched_communication_time.unpack(bref)); } - if (ies_crit_diagnostics_present) { - HANDLE_CODE(unpack_dyn_seq_of(ies_crit_diagnostics, bref, 1, 256, true)); + if (stationary_ind_present) { + HANDLE_CODE(stationary_ind.unpack(bref)); + } + if (traffic_profile_present) { + HANDLE_CODE(traffic_profile.unpack(bref)); + } + if (battery_ind_present) { + HANDLE_CODE(battery_ind.unpack(bref)); } if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); @@ -5030,24 +5863,27 @@ SRSASN_CODE crit_diagnostics_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void crit_diagnostics_s::to_json(json_writer& j) const +void subscription_based_ue_differentiation_info_s::to_json(json_writer& j) const { j.start_obj(); - if (proc_code_present) { - j.write_int("procedureCode", proc_code); + if (periodic_communication_ind_present) { + j.write_str("periodicCommunicationIndicator", periodic_communication_ind.to_string()); } - if (trigger_msg_present) { - j.write_str("triggeringMessage", trigger_msg.to_string()); + if (periodic_time_present) { + j.write_int("periodicTime", periodic_time); } - if (proc_crit_present) { - j.write_str("procedureCriticality", proc_crit.to_string()); + if (sched_communication_time_present) { + j.write_fieldname("scheduledCommunicationTime"); + sched_communication_time.to_json(j); } - if (ies_crit_diagnostics_present) { - j.start_array("iEsCriticalityDiagnostics"); - for (const auto& e1 : ies_crit_diagnostics) { - e1.to_json(j); - } - j.end_array(); + if (stationary_ind_present) { + j.write_str("stationaryIndication", stationary_ind.to_string()); + } + if (traffic_profile_present) { + j.write_str("trafficProfile", traffic_profile.to_string()); + } + if (battery_ind_present) { + j.write_str("batteryIndication", battery_ind.to_string()); } if (ie_exts_present) { j.write_fieldname("iE-Extensions"); @@ -5056,15 +5892,41 @@ void crit_diagnostics_s::to_json(json_writer& j) const j.end_obj(); } -// DeactivateTraceIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -uint32_t deactiv_trace_ies_o::idx_to_id(uint32_t idx) +std::string subscription_based_ue_differentiation_info_s::periodic_communication_ind_opts::to_string() const { - static const uint32_t options[] = {0, 8, 86}; - return map_enum_number(options, 3, idx, "id"); + static const char* options[] = {"periodically", "ondemand"}; + return convert_enum_idx( + options, 2, value, "subscription_based_ue_differentiation_info_s::periodic_communication_ind_e_"); } -bool deactiv_trace_ies_o::is_id_valid(const uint32_t& id) + +std::string subscription_based_ue_differentiation_info_s::stationary_ind_opts::to_string() const { - static const uint32_t options[] = {0, 8, 86}; + static const char* options[] = {"stationary", "mobile"}; + return convert_enum_idx(options, 2, value, "subscription_based_ue_differentiation_info_s::stationary_ind_e_"); +} + +std::string subscription_based_ue_differentiation_info_s::traffic_profile_opts::to_string() const +{ + static const char* options[] = {"single-packet", "dual-packets", "multiple-packets"}; + return convert_enum_idx(options, 3, value, "subscription_based_ue_differentiation_info_s::traffic_profile_e_"); +} + +std::string subscription_based_ue_differentiation_info_s::battery_ind_opts::to_string() const +{ + static const char* options[] = { + "battery-powered", "battery-powered-not-rechargeable-or-replaceable", "not-battery-powered"}; + return convert_enum_idx(options, 3, value, "subscription_based_ue_differentiation_info_s::battery_ind_e_"); +} + +// ConnectionEstablishmentIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +uint32_t conn_establishment_ind_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {0, 8, 74, 251, 253, 271, 280, 278, 252}; + return map_enum_number(options, 9, idx, "id"); +} +bool conn_establishment_ind_ies_o::is_id_valid(const uint32_t& id) +{ + static const uint32_t options[] = {0, 8, 74, 251, 253, 271, 280, 278, 252}; for (const auto& o : options) { if (o == id) { return true; @@ -5072,21 +5934,33 @@ bool deactiv_trace_ies_o::is_id_valid(const uint32_t& id) } return false; } -crit_e deactiv_trace_ies_o::get_crit(const uint32_t& id) +crit_e conn_establishment_ind_ies_o::get_crit(const uint32_t& id) { switch (id) { case 0: - return crit_e::reject; + return crit_e::ignore; case 8: - return crit_e::reject; - case 86: + return crit_e::ignore; + case 74: + return crit_e::ignore; + case 251: + return crit_e::ignore; + case 253: + return crit_e::ignore; + case 271: + return crit_e::ignore; + case 280: + return crit_e::ignore; + case 278: + return crit_e::ignore; + case 252: return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } return {}; } -deactiv_trace_ies_o::value_c deactiv_trace_ies_o::get_value(const uint32_t& id) +conn_establishment_ind_ies_o::value_c conn_establishment_ind_ies_o::get_value(const uint32_t& id) { value_c ret{}; switch (id) { @@ -5096,23 +5970,53 @@ deactiv_trace_ies_o::value_c deactiv_trace_ies_o::get_value(const uint32_t& id) case 8: ret.set(value_c::types::enb_ue_s1ap_id); break; - case 86: - ret.set(value_c::types::e_utran_trace_id); + case 74: + ret.set(value_c::types::ue_radio_cap); + break; + case 251: + ret.set(value_c::types::enhanced_coverage_restricted); + break; + case 253: + ret.set(value_c::types::dl_cp_security_info); + break; + case 271: + ret.set(value_c::types::ce_mode_brestricted); + break; + case 280: + ret.set(value_c::types::end_ind); + break; + case 278: + ret.set(value_c::types::subscription_based_ue_differentiation_info); + break; + case 252: + ret.set(value_c::types::ue_level_qos_params); break; default: asn1::log_error("The id=%d is not recognized", id); } return ret; } -presence_e deactiv_trace_ies_o::get_presence(const uint32_t& id) +presence_e conn_establishment_ind_ies_o::get_presence(const uint32_t& id) { switch (id) { case 0: return presence_e::mandatory; case 8: return presence_e::mandatory; - case 86: - return presence_e::mandatory; + case 74: + return presence_e::optional; + case 251: + return presence_e::optional; + case 253: + return presence_e::optional; + case 271: + return presence_e::optional; + case 280: + return presence_e::optional; + case 278: + return presence_e::optional; + case 252: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -5120,47 +6024,118 @@ presence_e deactiv_trace_ies_o::get_presence(const uint32_t& id) } // Value ::= OPEN TYPE -uint64_t& deactiv_trace_ies_o::value_c::mme_ue_s1ap_id() +uint64_t& conn_establishment_ind_ies_o::value_c::mme_ue_s1ap_id() { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); return c.get(); } -uint32_t& deactiv_trace_ies_o::value_c::enb_ue_s1ap_id() +uint32_t& conn_establishment_ind_ies_o::value_c::enb_ue_s1ap_id() { assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -fixed_octstring<8, true>& deactiv_trace_ies_o::value_c::e_utran_trace_id() +unbounded_octstring& conn_establishment_ind_ies_o::value_c::ue_radio_cap() { assert_choice_type("OCTET STRING", type_.to_string(), "Value"); - return c.get >(); + return c.get >(); } -const uint64_t& deactiv_trace_ies_o::value_c::mme_ue_s1ap_id() const +enhanced_coverage_restricted_e& conn_establishment_ind_ies_o::value_c::enhanced_coverage_restricted() +{ + assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); + return c.get(); +} +dl_cp_security_info_s& conn_establishment_ind_ies_o::value_c::dl_cp_security_info() +{ + assert_choice_type("DL-CP-SecurityInformation", type_.to_string(), "Value"); + return c.get(); +} +ce_mode_brestricted_e& conn_establishment_ind_ies_o::value_c::ce_mode_brestricted() +{ + assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); + return c.get(); +} +end_ind_e& conn_establishment_ind_ies_o::value_c::end_ind() +{ + assert_choice_type("EndIndication", type_.to_string(), "Value"); + return c.get(); +} +subscription_based_ue_differentiation_info_s& +conn_establishment_ind_ies_o::value_c::subscription_based_ue_differentiation_info() +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +erab_level_qos_params_s& conn_establishment_ind_ies_o::value_c::ue_level_qos_params() +{ + assert_choice_type("E-RABLevelQoSParameters", type_.to_string(), "Value"); + return c.get(); +} +const uint64_t& conn_establishment_ind_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); return c.get(); } -const uint32_t& deactiv_trace_ies_o::value_c::enb_ue_s1ap_id() const +const uint32_t& conn_establishment_ind_ies_o::value_c::enb_ue_s1ap_id() const { assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -const fixed_octstring<8, true>& deactiv_trace_ies_o::value_c::e_utran_trace_id() const +const unbounded_octstring& conn_establishment_ind_ies_o::value_c::ue_radio_cap() const { assert_choice_type("OCTET STRING", type_.to_string(), "Value"); - return c.get >(); + return c.get >(); } -void deactiv_trace_ies_o::value_c::destroy_() +const enhanced_coverage_restricted_e& conn_establishment_ind_ies_o::value_c::enhanced_coverage_restricted() const +{ + assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); + return c.get(); +} +const dl_cp_security_info_s& conn_establishment_ind_ies_o::value_c::dl_cp_security_info() const +{ + assert_choice_type("DL-CP-SecurityInformation", type_.to_string(), "Value"); + return c.get(); +} +const ce_mode_brestricted_e& conn_establishment_ind_ies_o::value_c::ce_mode_brestricted() const +{ + assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); + return c.get(); +} +const end_ind_e& conn_establishment_ind_ies_o::value_c::end_ind() const +{ + assert_choice_type("EndIndication", type_.to_string(), "Value"); + return c.get(); +} +const subscription_based_ue_differentiation_info_s& +conn_establishment_ind_ies_o::value_c::subscription_based_ue_differentiation_info() const +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +const erab_level_qos_params_s& conn_establishment_ind_ies_o::value_c::ue_level_qos_params() const +{ + assert_choice_type("E-RABLevelQoSParameters", type_.to_string(), "Value"); + return c.get(); +} +void conn_establishment_ind_ies_o::value_c::destroy_() { switch (type_) { - case types::e_utran_trace_id: - c.destroy >(); + case types::ue_radio_cap: + c.destroy >(); + break; + case types::dl_cp_security_info: + c.destroy(); + break; + case types::subscription_based_ue_differentiation_info: + c.destroy(); + break; + case types::ue_level_qos_params: + c.destroy(); break; default: break; } } -void deactiv_trace_ies_o::value_c::set(types::options e) +void conn_establishment_ind_ies_o::value_c::set(types::options e) { destroy_(); type_ = e; @@ -5169,16 +6144,31 @@ void deactiv_trace_ies_o::value_c::set(types::options e) break; case types::enb_ue_s1ap_id: break; - case types::e_utran_trace_id: - c.init >(); + case types::ue_radio_cap: + c.init >(); + break; + case types::enhanced_coverage_restricted: + break; + case types::dl_cp_security_info: + c.init(); + break; + case types::ce_mode_brestricted: + break; + case types::end_ind: + break; + case types::subscription_based_ue_differentiation_info: + c.init(); + break; + case types::ue_level_qos_params: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); } } -deactiv_trace_ies_o::value_c::value_c(const deactiv_trace_ies_o::value_c& other) +conn_establishment_ind_ies_o::value_c::value_c(const conn_establishment_ind_ies_o::value_c& other) { type_ = other.type(); switch (type_) { @@ -5188,16 +6178,35 @@ deactiv_trace_ies_o::value_c::value_c(const deactiv_trace_ies_o::value_c& other) case types::enb_ue_s1ap_id: c.init(other.c.get()); break; - case types::e_utran_trace_id: - c.init(other.c.get >()); + case types::ue_radio_cap: + c.init(other.c.get >()); + break; + case types::enhanced_coverage_restricted: + c.init(other.c.get()); + break; + case types::dl_cp_security_info: + c.init(other.c.get()); + break; + case types::ce_mode_brestricted: + c.init(other.c.get()); + break; + case types::end_ind: + c.init(other.c.get()); + break; + case types::subscription_based_ue_differentiation_info: + c.init(other.c.get()); + break; + case types::ue_level_qos_params: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); } } -deactiv_trace_ies_o::value_c& deactiv_trace_ies_o::value_c::operator=(const deactiv_trace_ies_o::value_c& other) +conn_establishment_ind_ies_o::value_c& +conn_establishment_ind_ies_o::value_c::operator=(const conn_establishment_ind_ies_o::value_c& other) { if (this == &other) { return *this; @@ -5210,18 +6219,36 @@ deactiv_trace_ies_o::value_c& deactiv_trace_ies_o::value_c::operator=(const deac case types::enb_ue_s1ap_id: c.set(other.c.get()); break; - case types::e_utran_trace_id: - c.set(other.c.get >()); + case types::ue_radio_cap: + c.set(other.c.get >()); break; - case types::nulltype: + case types::enhanced_coverage_restricted: + c.set(other.c.get()); break; - default: - log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + case types::dl_cp_security_info: + c.set(other.c.get()); + break; + case types::ce_mode_brestricted: + c.set(other.c.get()); + break; + case types::end_ind: + c.set(other.c.get()); + break; + case types::subscription_based_ue_differentiation_info: + c.set(other.c.get()); + break; + case types::ue_level_qos_params: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); } return *this; } -void deactiv_trace_ies_o::value_c::to_json(json_writer& j) const +void conn_establishment_ind_ies_o::value_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { @@ -5231,15 +6258,36 @@ void deactiv_trace_ies_o::value_c::to_json(json_writer& j) const case types::enb_ue_s1ap_id: j.write_int("INTEGER (0..16777215)", c.get()); break; - case types::e_utran_trace_id: - j.write_str("OCTET STRING", c.get >().to_string()); + case types::ue_radio_cap: + j.write_str("OCTET STRING", c.get >().to_string()); + break; + case types::enhanced_coverage_restricted: + j.write_str("EnhancedCoverageRestricted", "restricted"); + break; + case types::dl_cp_security_info: + j.write_fieldname("DL-CP-SecurityInformation"); + c.get().to_json(j); + break; + case types::ce_mode_brestricted: + j.write_str("CE-ModeBRestricted", c.get().to_string()); + break; + case types::end_ind: + j.write_str("EndIndication", c.get().to_string()); + break; + case types::subscription_based_ue_differentiation_info: + j.write_fieldname("Subscription-Based-UE-DifferentiationInfo"); + c.get().to_json(j); + break; + case types::ue_level_qos_params: + j.write_fieldname("E-RABLevelQoSParameters"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); } j.end_obj(); } -SRSASN_CODE deactiv_trace_ies_o::value_c::pack(bit_ref& bref) const +SRSASN_CODE conn_establishment_ind_ies_o::value_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); switch (type_) { @@ -5249,16 +6297,34 @@ SRSASN_CODE deactiv_trace_ies_o::value_c::pack(bit_ref& bref) const case types::enb_ue_s1ap_id: HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); break; - case types::e_utran_trace_id: - HANDLE_CODE((c.get >().pack(bref))); + case types::ue_radio_cap: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::enhanced_coverage_restricted: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_cp_security_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ce_mode_brestricted: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::end_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_level_qos_params: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE deactiv_trace_ies_o::value_c::unpack(cbit_ref& bref) +SRSASN_CODE conn_establishment_ind_ies_o::value_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); switch (type_) { @@ -5268,47 +6334,108 @@ SRSASN_CODE deactiv_trace_ies_o::value_c::unpack(cbit_ref& bref) case types::enb_ue_s1ap_id: HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); break; - case types::e_utran_trace_id: - HANDLE_CODE((c.get >().unpack(bref))); + case types::ue_radio_cap: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::enhanced_coverage_restricted: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_cp_security_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ce_mode_brestricted: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::end_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_level_qos_params: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + log_invalid_choice_id(type_, "conn_establishment_ind_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string deactiv_trace_ies_o::value_c::types_opts::to_string() const +std::string conn_establishment_ind_ies_o::value_c::types_opts::to_string() const { - 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"); + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "OCTET STRING", + "EnhancedCoverageRestricted", + "DL-CP-SecurityInformation", + "CE-ModeBRestricted", + "EndIndication", + "Subscription-Based-UE-DifferentiationInfo", + "E-RABLevelQoSParameters"}; + return convert_enum_idx(options, 9, value, "conn_establishment_ind_ies_o::value_c::types"); } -template struct asn1::s1ap::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), enb_ue_s1ap_id(8, crit_e::reject), e_utran_trace_id(86, crit_e::ignore) +conn_establishment_ind_ies_container::conn_establishment_ind_ies_container() : + mme_ue_s1ap_id(0, crit_e::ignore), + enb_ue_s1ap_id(8, crit_e::ignore), + ue_radio_cap(74, crit_e::ignore), + enhanced_coverage_restricted(251, crit_e::ignore), + dl_cp_security_info(253, crit_e::ignore), + ce_mode_brestricted(271, crit_e::ignore), + end_ind(280, crit_e::ignore), + subscription_based_ue_differentiation_info(278, crit_e::ignore), + ue_level_qos_params(252, crit_e::ignore) {} -SRSASN_CODE deactiv_trace_ies_container::pack(bit_ref& bref) const +SRSASN_CODE conn_establishment_ind_ies_container::pack(bit_ref& bref) const { - uint32_t nof_ies = 3; + uint32_t nof_ies = 2; + nof_ies += ue_radio_cap_present ? 1 : 0; + nof_ies += enhanced_coverage_restricted_present ? 1 : 0; + nof_ies += dl_cp_security_info_present ? 1 : 0; + nof_ies += ce_mode_brestricted_present ? 1 : 0; + nof_ies += end_ind_present ? 1 : 0; + nof_ies += subscription_based_ue_differentiation_info_present ? 1 : 0; + nof_ies += ue_level_qos_params_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); HANDLE_CODE(enb_ue_s1ap_id.pack(bref)); - HANDLE_CODE(e_utran_trace_id.pack(bref)); + if (ue_radio_cap_present) { + HANDLE_CODE(ue_radio_cap.pack(bref)); + } + if (enhanced_coverage_restricted_present) { + HANDLE_CODE(enhanced_coverage_restricted.pack(bref)); + } + if (dl_cp_security_info_present) { + HANDLE_CODE(dl_cp_security_info.pack(bref)); + } + if (ce_mode_brestricted_present) { + HANDLE_CODE(ce_mode_brestricted.pack(bref)); + } + if (end_ind_present) { + HANDLE_CODE(end_ind.pack(bref)); + } + if (subscription_based_ue_differentiation_info_present) { + HANDLE_CODE(subscription_based_ue_differentiation_info.pack(bref)); + } + if (ue_level_qos_params_present) { + HANDLE_CODE(ue_level_qos_params.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE deactiv_trace_ies_container::unpack(cbit_ref& bref) +SRSASN_CODE conn_establishment_ind_ies_container::unpack(cbit_ref& bref) { uint32_t nof_ies = 0; unpack_length(nof_ies, bref, 0u, 65535u, true); - uint32_t nof_mandatory_ies = 3; + uint32_t nof_mandatory_ies = 2; for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; + protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); switch (c.id) { case 0: @@ -5323,11 +6450,47 @@ SRSASN_CODE deactiv_trace_ies_container::unpack(cbit_ref& bref) enb_ue_s1ap_id.crit = c.crit; enb_ue_s1ap_id.value = c.value.enb_ue_s1ap_id(); break; - case 86: - nof_mandatory_ies--; - e_utran_trace_id.id = c.id; - e_utran_trace_id.crit = c.crit; - e_utran_trace_id.value = c.value.e_utran_trace_id(); + case 74: + ue_radio_cap_present = true; + ue_radio_cap.id = c.id; + ue_radio_cap.crit = c.crit; + ue_radio_cap.value = c.value.ue_radio_cap(); + break; + case 251: + enhanced_coverage_restricted_present = true; + enhanced_coverage_restricted.id = c.id; + enhanced_coverage_restricted.crit = c.crit; + enhanced_coverage_restricted.value = c.value.enhanced_coverage_restricted(); + break; + case 253: + dl_cp_security_info_present = true; + dl_cp_security_info.id = c.id; + dl_cp_security_info.crit = c.crit; + dl_cp_security_info.value = c.value.dl_cp_security_info(); + break; + case 271: + ce_mode_brestricted_present = true; + ce_mode_brestricted.id = c.id; + ce_mode_brestricted.crit = c.crit; + ce_mode_brestricted.value = c.value.ce_mode_brestricted(); + break; + case 280: + end_ind_present = true; + end_ind.id = c.id; + end_ind.crit = c.crit; + end_ind.value = c.value.end_ind(); + break; + case 278: + subscription_based_ue_differentiation_info_present = true; + subscription_based_ue_differentiation_info.id = c.id; + subscription_based_ue_differentiation_info.crit = c.crit; + subscription_based_ue_differentiation_info.value = c.value.subscription_based_ue_differentiation_info(); + break; + case 252: + ue_level_qos_params_present = true; + ue_level_qos_params.id = c.id; + ue_level_qos_params.crit = c.crit; + ue_level_qos_params.value = c.value.ue_level_qos_params(); break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); @@ -5341,34 +6504,60 @@ SRSASN_CODE deactiv_trace_ies_container::unpack(cbit_ref& bref) } return SRSASN_SUCCESS; } -void deactiv_trace_ies_container::to_json(json_writer& j) const +void conn_establishment_ind_ies_container::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname(""); mme_ue_s1ap_id.to_json(j); j.write_fieldname(""); enb_ue_s1ap_id.to_json(j); - j.write_fieldname(""); - e_utran_trace_id.to_json(j); + if (ue_radio_cap_present) { + j.write_fieldname(""); + ue_radio_cap.to_json(j); + } + if (enhanced_coverage_restricted_present) { + j.write_fieldname(""); + enhanced_coverage_restricted.to_json(j); + } + if (dl_cp_security_info_present) { + j.write_fieldname(""); + dl_cp_security_info.to_json(j); + } + if (ce_mode_brestricted_present) { + j.write_fieldname(""); + ce_mode_brestricted.to_json(j); + } + if (end_ind_present) { + j.write_fieldname(""); + end_ind.to_json(j); + } + if (subscription_based_ue_differentiation_info_present) { + j.write_fieldname(""); + subscription_based_ue_differentiation_info.to_json(j); + } + if (ue_level_qos_params_present) { + j.write_fieldname(""); + ue_level_qos_params.to_json(j); + } j.end_obj(); } -// DeactivateTrace ::= SEQUENCE -SRSASN_CODE deactiv_trace_s::pack(bit_ref& bref) const +// ConnectionEstablishmentIndication ::= SEQUENCE +SRSASN_CODE conn_establishment_ind_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(protocol_ies.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE deactiv_trace_s::unpack(cbit_ref& bref) +SRSASN_CODE conn_establishment_ind_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(protocol_ies.unpack(bref)); return SRSASN_SUCCESS; } -void deactiv_trace_s::to_json(json_writer& j) const +void conn_establishment_ind_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); @@ -5376,42 +6565,240 @@ void deactiv_trace_s::to_json(json_writer& j) const j.end_obj(); } -// ForbiddenLAs-Item ::= SEQUENCE -SRSASN_CODE forbidden_las_item_s::pack(bit_ref& bref) const +// ENB-ID ::= CHOICE +void enb_id_c::destroy_() +{ + switch (type_) { + case types::macro_enb_id: + c.destroy >(); + break; + case types::home_enb_id: + c.destroy >(); + break; + case types::short_macro_enb_id: + c.destroy >(); + break; + case types::long_macro_enb_id: + c.destroy >(); + break; + default: + break; + } +} +void enb_id_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::macro_enb_id: + c.init >(); + break; + case types::home_enb_id: + c.init >(); + break; + case types::short_macro_enb_id: + c.init >(); + break; + case types::long_macro_enb_id: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enb_id_c"); + } +} +enb_id_c::enb_id_c(const enb_id_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::macro_enb_id: + c.init(other.c.get >()); + break; + case types::home_enb_id: + c.init(other.c.get >()); + break; + case types::short_macro_enb_id: + c.init(other.c.get >()); + break; + case types::long_macro_enb_id: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enb_id_c"); + } +} +enb_id_c& enb_id_c::operator=(const enb_id_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::macro_enb_id: + c.set(other.c.get >()); + break; + case types::home_enb_id: + c.set(other.c.get >()); + break; + case types::short_macro_enb_id: + c.set(other.c.get >()); + break; + case types::long_macro_enb_id: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enb_id_c"); + } + + return *this; +} +void enb_id_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::macro_enb_id: + j.write_str("macroENB-ID", c.get >().to_string()); + break; + case types::home_enb_id: + j.write_str("homeENB-ID", c.get >().to_string()); + break; + case types::short_macro_enb_id: + j.write_str("short-macroENB-ID", c.get >().to_string()); + break; + case types::long_macro_enb_id: + j.write_str("long-macroENB-ID", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "enb_id_c"); + } + j.end_obj(); +} +SRSASN_CODE enb_id_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::macro_enb_id: + HANDLE_CODE((c.get >().pack(bref))); + break; + case types::home_enb_id: + HANDLE_CODE((c.get >().pack(bref))); + break; + case types::short_macro_enb_id: { + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE((c.get >().pack(bref))); + } break; + case types::long_macro_enb_id: { + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE((c.get >().pack(bref))); + } break; + default: + log_invalid_choice_id(type_, "enb_id_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE enb_id_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::macro_enb_id: + HANDLE_CODE((c.get >().unpack(bref))); + break; + case types::home_enb_id: + HANDLE_CODE((c.get >().unpack(bref))); + break; + case types::short_macro_enb_id: { + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE((c.get >().unpack(bref))); + } break; + case types::long_macro_enb_id: { + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE((c.get >().unpack(bref))); + } break; + default: + log_invalid_choice_id(type_, "enb_id_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string enb_id_c::types_opts::to_string() const +{ + 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"); +} + +// GNB-Identity ::= CHOICE +void gnb_id_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("gNB-ID", c.to_string()); + j.end_obj(); +} +SRSASN_CODE gnb_id_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type()); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE gnb_id_c::unpack(cbit_ref& bref) +{ + types e; + unpack_enum(e, bref); + if (e != type()) { + log_invalid_choice_id(e, "gnb_id_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string gnb_id_c::types_opts::to_string() const +{ + static const char* options[] = {"gNB-ID"}; + return convert_enum_idx(options, 1, value, "gnb_id_c::types"); +} + +// Global-ENB-ID ::= SEQUENCE +SRSASN_CODE global_enb_id_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(plmn_id.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, forbidden_lacs, 1, 4096, true)); + HANDLE_CODE(plm_nid.pack(bref)); + HANDLE_CODE(enb_id.pack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE forbidden_las_item_s::unpack(cbit_ref& bref) +SRSASN_CODE global_enb_id_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(plmn_id.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(forbidden_lacs, bref, 1, 4096, true)); + HANDLE_CODE(plm_nid.unpack(bref)); + HANDLE_CODE(enb_id.unpack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void forbidden_las_item_s::to_json(json_writer& j) const +void global_enb_id_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("pLMN-Identity", plmn_id.to_string()); - j.start_array("forbiddenLACs"); - for (const auto& e1 : forbidden_lacs) { - j.write_str(e1.to_string()); - } - j.end_array(); + j.write_str("pLMNidentity", plm_nid.to_string()); + j.write_fieldname("eNB-ID"); + enb_id.to_json(j); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -5419,42 +6806,39 @@ void forbidden_las_item_s::to_json(json_writer& j) const j.end_obj(); } -// ForbiddenTAs-Item ::= SEQUENCE -SRSASN_CODE forbidden_tas_item_s::pack(bit_ref& bref) const +// Global-GNB-ID ::= SEQUENCE +SRSASN_CODE global_gnb_id_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(ie_exts_present, 1)); HANDLE_CODE(plmn_id.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, forbidden_tacs, 1, 4096, true)); + HANDLE_CODE(gnb_id.pack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE forbidden_tas_item_s::unpack(cbit_ref& bref) +SRSASN_CODE global_gnb_id_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); HANDLE_CODE(plmn_id.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(forbidden_tacs, bref, 1, 4096, true)); + HANDLE_CODE(gnb_id.unpack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void forbidden_tas_item_s::to_json(json_writer& j) const +void global_gnb_id_s::to_json(json_writer& j) const { j.start_obj(); j.write_str("pLMN-Identity", plmn_id.to_string()); - j.start_array("forbiddenTACs"); - for (const auto& e1 : forbidden_tacs) { - j.write_str(e1.to_string()); - } - j.end_array(); + j.write_fieldname("gNB-ID"); + gnb_id.to_json(j); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -5462,85 +6846,1321 @@ void forbidden_tas_item_s::to_json(json_writer& j) const j.end_obj(); } -// ForbiddenInterRATs ::= ENUMERATED -std::string forbidden_inter_rats_opts::to_string() const +// GNB ::= SEQUENCE +SRSASN_CODE gnb_s::pack(bit_ref& bref) const { - static const char* options[] = {"all", "geran", "utran", "cdma2000", "geranandutran", "cdma2000andutran"}; - return convert_enum_idx(options, 6, value, "forbidden_inter_rats_e"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(global_g_nb_id.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; } +SRSASN_CODE gnb_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); -// DLNASPDUDeliveryAckRequest ::= ENUMERATED -std::string dlnaspdu_delivery_ack_request_opts::to_string() const + HANDLE_CODE(global_g_nb_id.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void gnb_s::to_json(json_writer& j) const { - static const char* options[] = {"requested"}; - return convert_enum_idx(options, 1, value, "dlnaspdu_delivery_ack_request_e"); + j.start_obj(); + j.write_fieldname("global-gNB-ID"); + global_g_nb_id.to_json(j); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); } -// HandoverRestrictionList ::= SEQUENCE -SRSASN_CODE ho_restrict_list_s::pack(bit_ref& bref) const +// NG-eNB ::= SEQUENCE +SRSASN_CODE ng_enb_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(equivalent_plmns_present, 1)); - HANDLE_CODE(bref.pack(forbidden_tas_present, 1)); - HANDLE_CODE(bref.pack(forbidden_las_present, 1)); - HANDLE_CODE(bref.pack(forbidden_inter_rats_present, 1)); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(serving_plmn.pack(bref)); - if (equivalent_plmns_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, equivalent_plmns, 1, 15, true)); - } - if (forbidden_tas_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, forbidden_tas, 1, 16, true)); - } - if (forbidden_las_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, forbidden_las, 1, 16, true)); - } - if (forbidden_inter_rats_present) { - HANDLE_CODE(forbidden_inter_rats.pack(bref)); - } + HANDLE_CODE(global_ng_enb_id.pack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE ho_restrict_list_s::unpack(cbit_ref& bref) +SRSASN_CODE ng_enb_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(equivalent_plmns_present, 1)); - HANDLE_CODE(bref.unpack(forbidden_tas_present, 1)); - HANDLE_CODE(bref.unpack(forbidden_las_present, 1)); - HANDLE_CODE(bref.unpack(forbidden_inter_rats_present, 1)); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(serving_plmn.unpack(bref)); - if (equivalent_plmns_present) { - HANDLE_CODE(unpack_dyn_seq_of(equivalent_plmns, bref, 1, 15, true)); - } - if (forbidden_tas_present) { - HANDLE_CODE(unpack_dyn_seq_of(forbidden_tas, bref, 1, 16, true)); - } - if (forbidden_las_present) { - HANDLE_CODE(unpack_dyn_seq_of(forbidden_las, bref, 1, 16, true)); - } - if (forbidden_inter_rats_present) { - HANDLE_CODE(forbidden_inter_rats.unpack(bref)); - } + HANDLE_CODE(global_ng_enb_id.unpack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void ho_restrict_list_s::to_json(json_writer& j) const +void ng_enb_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("servingPLMN", serving_plmn.to_string()); - if (equivalent_plmns_present) { - j.start_array("equivalentPLMNs"); - for (const auto& e1 : equivalent_plmns) { - j.write_str(e1.to_string()); + j.write_fieldname("global-ng-eNB-ID"); + global_ng_enb_id.to_json(j); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// Global-RAN-NODE-ID ::= CHOICE +void global_ran_node_id_c::destroy_() +{ + switch (type_) { + case types::gnb: + c.destroy(); + break; + case types::ng_enb: + c.destroy(); + break; + default: + break; + } +} +void global_ran_node_id_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::gnb: + c.init(); + break; + case types::ng_enb: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "global_ran_node_id_c"); + } +} +global_ran_node_id_c::global_ran_node_id_c(const global_ran_node_id_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::gnb: + c.init(other.c.get()); + break; + case types::ng_enb: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "global_ran_node_id_c"); + } +} +global_ran_node_id_c& global_ran_node_id_c::operator=(const global_ran_node_id_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::gnb: + c.set(other.c.get()); + break; + case types::ng_enb: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "global_ran_node_id_c"); + } + + return *this; +} +void global_ran_node_id_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::gnb: + j.write_fieldname("gNB"); + c.get().to_json(j); + break; + case types::ng_enb: + j.write_fieldname("ng-eNB"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "global_ran_node_id_c"); + } + j.end_obj(); +} +SRSASN_CODE global_ran_node_id_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::gnb: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ng_enb: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "global_ran_node_id_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE global_ran_node_id_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::gnb: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ng_enb: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "global_ran_node_id_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string global_ran_node_id_c::types_opts::to_string() const +{ + static const char* options[] = {"gNB", "ng-eNB"}; + return convert_enum_idx(options, 2, value, "global_ran_node_id_c::types"); +} + +// ContextatSource ::= SEQUENCE +SRSASN_CODE contextat_source_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(source_ng_ran_node_id.pack(bref)); + HANDLE_CODE(pack_integer(bref, ran_ue_ngap_id, (uint64_t)0u, (uint64_t)4294967295u, false, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE contextat_source_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(source_ng_ran_node_id.unpack(bref)); + HANDLE_CODE(unpack_integer(ran_ue_ngap_id, bref, (uint64_t)0u, (uint64_t)4294967295u, false, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void contextat_source_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("sourceNG-RAN-node-ID"); + source_ng_ran_node_id.to_json(j); + j.write_int("rAN-UE-NGAP-ID", ran_ue_ngap_id); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// TypeOfError ::= ENUMERATED +std::string type_of_error_opts::to_string() const +{ + static const char* options[] = {"not-understood", "missing"}; + return convert_enum_idx(options, 2, value, "type_of_error_e"); +} + +// CriticalityDiagnostics-IE-Item ::= SEQUENCE +SRSASN_CODE crit_diagnostics_ie_item_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(iecrit.pack(bref)); + HANDLE_CODE(pack_integer(bref, ie_id, (uint32_t)0u, (uint32_t)65535u, false, true)); + HANDLE_CODE(type_of_error.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE crit_diagnostics_ie_item_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(iecrit.unpack(bref)); + HANDLE_CODE(unpack_integer(ie_id, bref, (uint32_t)0u, (uint32_t)65535u, false, true)); + HANDLE_CODE(type_of_error.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void crit_diagnostics_ie_item_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("iECriticality", iecrit.to_string()); + j.write_int("iE-ID", ie_id); + j.write_str("typeOfError", type_of_error.to_string()); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// TriggeringMessage ::= ENUMERATED +std::string trigger_msg_opts::to_string() const +{ + static const char* options[] = {"initiating-message", "successful-outcome", "unsuccessfull-outcome"}; + return convert_enum_idx(options, 3, value, "trigger_msg_e"); +} + +// CriticalityDiagnostics ::= SEQUENCE +SRSASN_CODE crit_diagnostics_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(proc_code_present, 1)); + HANDLE_CODE(bref.pack(trigger_msg_present, 1)); + HANDLE_CODE(bref.pack(proc_crit_present, 1)); + HANDLE_CODE(bref.pack(ies_crit_diagnostics_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + if (proc_code_present) { + HANDLE_CODE(pack_integer(bref, proc_code, (uint16_t)0u, (uint16_t)255u, false, true)); + } + if (trigger_msg_present) { + HANDLE_CODE(trigger_msg.pack(bref)); + } + if (proc_crit_present) { + HANDLE_CODE(proc_crit.pack(bref)); + } + if (ies_crit_diagnostics_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ies_crit_diagnostics, 1, 256, true)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE crit_diagnostics_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(proc_code_present, 1)); + HANDLE_CODE(bref.unpack(trigger_msg_present, 1)); + HANDLE_CODE(bref.unpack(proc_crit_present, 1)); + HANDLE_CODE(bref.unpack(ies_crit_diagnostics_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + if (proc_code_present) { + HANDLE_CODE(unpack_integer(proc_code, bref, (uint16_t)0u, (uint16_t)255u, false, true)); + } + if (trigger_msg_present) { + HANDLE_CODE(trigger_msg.unpack(bref)); + } + if (proc_crit_present) { + HANDLE_CODE(proc_crit.unpack(bref)); + } + if (ies_crit_diagnostics_present) { + HANDLE_CODE(unpack_dyn_seq_of(ies_crit_diagnostics, bref, 1, 256, true)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void crit_diagnostics_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (proc_code_present) { + j.write_int("procedureCode", proc_code); + } + if (trigger_msg_present) { + j.write_str("triggeringMessage", trigger_msg.to_string()); + } + if (proc_crit_present) { + j.write_str("procedureCriticality", proc_crit.to_string()); + } + if (ies_crit_diagnostics_present) { + j.start_array("iEsCriticalityDiagnostics"); + for (const auto& e1 : ies_crit_diagnostics) { + e1.to_json(j); + } + j.end_array(); + } + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// DeactivateTraceIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +uint32_t deactiv_trace_ies_o::idx_to_id(uint32_t idx) +{ + 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 const uint32_t options[] = {0, 8, 86}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; +} +crit_e deactiv_trace_ies_o::get_crit(const uint32_t& id) +{ + switch (id) { + case 0: + return crit_e::reject; + case 8: + return crit_e::reject; + case 86: + return crit_e::ignore; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} +deactiv_trace_ies_o::value_c deactiv_trace_ies_o::get_value(const uint32_t& id) +{ + value_c ret{}; + switch (id) { + case 0: + ret.set(value_c::types::mme_ue_s1ap_id); + break; + case 8: + ret.set(value_c::types::enb_ue_s1ap_id); + break; + case 86: + ret.set(value_c::types::e_utran_trace_id); + break; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e deactiv_trace_ies_o::get_presence(const uint32_t& id) +{ + switch (id) { + case 0: + return presence_e::mandatory; + case 8: + return presence_e::mandatory; + case 86: + return presence_e::mandatory; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} + +// Value ::= OPEN TYPE +uint64_t& deactiv_trace_ies_o::value_c::mme_ue_s1ap_id() +{ + assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); + return c.get(); +} +uint32_t& deactiv_trace_ies_o::value_c::enb_ue_s1ap_id() +{ + assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); + return c.get(); +} +fixed_octstring<8, true>& deactiv_trace_ies_o::value_c::e_utran_trace_id() +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} +const uint64_t& deactiv_trace_ies_o::value_c::mme_ue_s1ap_id() const +{ + assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); + return c.get(); +} +const uint32_t& deactiv_trace_ies_o::value_c::enb_ue_s1ap_id() const +{ + assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); + return c.get(); +} +const fixed_octstring<8, true>& deactiv_trace_ies_o::value_c::e_utran_trace_id() const +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} +void deactiv_trace_ies_o::value_c::destroy_() +{ + switch (type_) { + case types::e_utran_trace_id: + c.destroy >(); + break; + default: + break; + } +} +void deactiv_trace_ies_o::value_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::mme_ue_s1ap_id: + break; + case types::enb_ue_s1ap_id: + break; + case types::e_utran_trace_id: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + } +} +deactiv_trace_ies_o::value_c::value_c(const deactiv_trace_ies_o::value_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::mme_ue_s1ap_id: + c.init(other.c.get()); + break; + case types::enb_ue_s1ap_id: + c.init(other.c.get()); + break; + case types::e_utran_trace_id: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + } +} +deactiv_trace_ies_o::value_c& deactiv_trace_ies_o::value_c::operator=(const deactiv_trace_ies_o::value_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::mme_ue_s1ap_id: + c.set(other.c.get()); + break; + case types::enb_ue_s1ap_id: + c.set(other.c.get()); + break; + case types::e_utran_trace_id: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + } + + return *this; +} +void deactiv_trace_ies_o::value_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mme_ue_s1ap_id: + j.write_int("INTEGER (0..4294967295)", c.get()); + break; + case types::enb_ue_s1ap_id: + j.write_int("INTEGER (0..16777215)", c.get()); + break; + case types::e_utran_trace_id: + j.write_str("OCTET STRING", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + } + j.end_obj(); +} +SRSASN_CODE deactiv_trace_ies_o::value_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + switch (type_) { + case types::mme_ue_s1ap_id: + HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)0u, (uint64_t)4294967295u, false, true)); + break; + case types::enb_ue_s1ap_id: + HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); + break; + case types::e_utran_trace_id: + HANDLE_CODE((c.get >().pack(bref))); + break; + default: + log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE deactiv_trace_ies_o::value_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + switch (type_) { + case types::mme_ue_s1ap_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint64_t)0u, (uint64_t)4294967295u, false, true)); + break; + case types::enb_ue_s1ap_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); + break; + case types::e_utran_trace_id: + HANDLE_CODE((c.get >().unpack(bref))); + break; + default: + log_invalid_choice_id(type_, "deactiv_trace_ies_o::value_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string deactiv_trace_ies_o::value_c::types_opts::to_string() const +{ + 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 asn1::s1ap::protocol_ie_field_s; + +deactiv_trace_ies_container::deactiv_trace_ies_container() : + mme_ue_s1ap_id(0, crit_e::reject), enb_ue_s1ap_id(8, crit_e::reject), e_utran_trace_id(86, crit_e::ignore) +{} +SRSASN_CODE deactiv_trace_ies_container::pack(bit_ref& bref) const +{ + uint32_t nof_ies = 3; + pack_length(bref, nof_ies, 0u, 65535u, true); + + HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); + HANDLE_CODE(enb_ue_s1ap_id.pack(bref)); + HANDLE_CODE(e_utran_trace_id.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE deactiv_trace_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 0u, 65535u, true); + + uint32_t nof_mandatory_ies = 3; + + for (; nof_ies > 0; --nof_ies) { + protocol_ie_field_s c; + HANDLE_CODE(c.unpack(bref)); + switch (c.id) { + case 0: + nof_mandatory_ies--; + mme_ue_s1ap_id.id = c.id; + mme_ue_s1ap_id.crit = c.crit; + mme_ue_s1ap_id.value = c.value.mme_ue_s1ap_id(); + break; + case 8: + nof_mandatory_ies--; + enb_ue_s1ap_id.id = c.id; + enb_ue_s1ap_id.crit = c.crit; + enb_ue_s1ap_id.value = c.value.enb_ue_s1ap_id(); + break; + case 86: + nof_mandatory_ies--; + e_utran_trace_id.id = c.id; + e_utran_trace_id.crit = c.crit; + e_utran_trace_id.value = c.value.e_utran_trace_id(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + if (nof_mandatory_ies > 0) { + asn1::log_error("Mandatory fields are missing\n"); + + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} +void deactiv_trace_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname(""); + mme_ue_s1ap_id.to_json(j); + j.write_fieldname(""); + enb_ue_s1ap_id.to_json(j); + j.write_fieldname(""); + e_utran_trace_id.to_json(j); + j.end_obj(); +} + +// DeactivateTrace ::= SEQUENCE +SRSASN_CODE deactiv_trace_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(protocol_ies.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE deactiv_trace_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(protocol_ies.unpack(bref)); + + return SRSASN_SUCCESS; +} +void deactiv_trace_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("protocolIEs"); + protocol_ies.to_json(j); + j.end_obj(); +} + +// ForbiddenLAs-Item ::= SEQUENCE +SRSASN_CODE forbidden_las_item_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, forbidden_lacs, 1, 4096, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE forbidden_las_item_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(forbidden_lacs, bref, 1, 4096, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +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 (const auto& e1 : forbidden_lacs) { + j.write_str(e1.to_string()); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// ForbiddenTAs-Item ::= SEQUENCE +SRSASN_CODE forbidden_tas_item_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, forbidden_tacs, 1, 4096, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE forbidden_tas_item_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(forbidden_tacs, bref, 1, 4096, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +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 (const auto& e1 : forbidden_tacs) { + j.write_str(e1.to_string()); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// NRrestrictionin5GS ::= ENUMERATED +std::string nrrestrictin5_gs_opts::to_string() const +{ + static const char* options[] = {"nRrestrictedin5GS"}; + return convert_enum_idx(options, 1, value, "nrrestrictin5_gs_e"); +} +uint8_t nrrestrictin5_gs_opts::to_number() const +{ + static const uint8_t options[] = {5}; + return map_enum_number(options, 1, value, "nrrestrictin5_gs_e"); +} + +// NRrestrictioninEPSasSecondaryRAT ::= ENUMERATED +std::string nrrestrictin_ep_sas_secondary_rat_opts::to_string() const +{ + static const char* options[] = {"nRrestrictedinEPSasSecondaryRAT"}; + return convert_enum_idx(options, 1, value, "nrrestrictin_ep_sas_secondary_rat_e"); +} + +// UnlicensedSpectrumRestriction ::= ENUMERATED +std::string unlicensed_spec_restrict_opts::to_string() const +{ + static const char* options[] = {"unlicensed-restricted"}; + return convert_enum_idx(options, 1, value, "unlicensed_spec_restrict_e"); +} + +// ForbiddenInterRATs ::= ENUMERATED +std::string forbidden_inter_rats_opts::to_string() const +{ + static const char* options[] = {"all", "geran", "utran", "cdma2000", "geranandutran", "cdma2000andutran"}; + return convert_enum_idx(options, 6, value, "forbidden_inter_rats_e"); +} + +// HandoverRestrictionList-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t ho_restrict_list_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {261, 270, 282, 287, 290}; + return map_enum_number(options, 5, idx, "id"); +} +bool ho_restrict_list_ext_ies_o::is_id_valid(const uint32_t& id) +{ + static const uint32_t options[] = {261, 270, 282, 287, 290}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; +} +crit_e ho_restrict_list_ext_ies_o::get_crit(const uint32_t& id) +{ + switch (id) { + case 261: + return crit_e::ignore; + case 270: + return crit_e::ignore; + case 282: + return crit_e::ignore; + case 287: + return crit_e::ignore; + case 290: + return crit_e::ignore; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} +ho_restrict_list_ext_ies_o::ext_c ho_restrict_list_ext_ies_o::get_ext(const uint32_t& id) +{ + ext_c ret{}; + switch (id) { + case 261: + ret.set(ext_c::types::nrrestrictin_ep_sas_secondary_rat); + break; + case 270: + ret.set(ext_c::types::unlicensed_spec_restrict); + break; + case 282: + ret.set(ext_c::types::cn_type_restricts); + break; + case 287: + ret.set(ext_c::types::nrrestrictin5_gs); + break; + case 290: + ret.set(ext_c::types::last_ng_ranplmn_id); + break; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e ho_restrict_list_ext_ies_o::get_presence(const uint32_t& id) +{ + switch (id) { + case 261: + return presence_e::optional; + case 270: + return presence_e::optional; + case 282: + return presence_e::optional; + case 287: + return presence_e::optional; + case 290: + return presence_e::optional; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} + +// Extension ::= OPEN TYPE +nrrestrictin_ep_sas_secondary_rat_e& ho_restrict_list_ext_ies_o::ext_c::nrrestrictin_ep_sas_secondary_rat() +{ + assert_choice_type("NRrestrictioninEPSasSecondaryRAT", type_.to_string(), "Extension"); + return c.get(); +} +unlicensed_spec_restrict_e& ho_restrict_list_ext_ies_o::ext_c::unlicensed_spec_restrict() +{ + assert_choice_type("UnlicensedSpectrumRestriction", type_.to_string(), "Extension"); + return c.get(); +} +cn_type_restricts_l& ho_restrict_list_ext_ies_o::ext_c::cn_type_restricts() +{ + assert_choice_type("CNTypeRestrictions", type_.to_string(), "Extension"); + return c.get(); +} +nrrestrictin5_gs_e& ho_restrict_list_ext_ies_o::ext_c::nrrestrictin5_gs() +{ + assert_choice_type("NRrestrictionin5GS", type_.to_string(), "Extension"); + return c.get(); +} +plm_nid& ho_restrict_list_ext_ies_o::ext_c::last_ng_ranplmn_id() +{ + assert_choice_type("PLMNidentity", type_.to_string(), "Extension"); + return c.get(); +} +const nrrestrictin_ep_sas_secondary_rat_e& ho_restrict_list_ext_ies_o::ext_c::nrrestrictin_ep_sas_secondary_rat() const +{ + assert_choice_type("NRrestrictioninEPSasSecondaryRAT", type_.to_string(), "Extension"); + return c.get(); +} +const unlicensed_spec_restrict_e& ho_restrict_list_ext_ies_o::ext_c::unlicensed_spec_restrict() const +{ + assert_choice_type("UnlicensedSpectrumRestriction", type_.to_string(), "Extension"); + return c.get(); +} +const cn_type_restricts_l& ho_restrict_list_ext_ies_o::ext_c::cn_type_restricts() const +{ + assert_choice_type("CNTypeRestrictions", type_.to_string(), "Extension"); + return c.get(); +} +const nrrestrictin5_gs_e& ho_restrict_list_ext_ies_o::ext_c::nrrestrictin5_gs() const +{ + assert_choice_type("NRrestrictionin5GS", type_.to_string(), "Extension"); + return c.get(); +} +const plm_nid& ho_restrict_list_ext_ies_o::ext_c::last_ng_ranplmn_id() const +{ + assert_choice_type("PLMNidentity", type_.to_string(), "Extension"); + return c.get(); +} +void ho_restrict_list_ext_ies_o::ext_c::destroy_() +{ + switch (type_) { + case types::cn_type_restricts: + c.destroy(); + break; + case types::last_ng_ranplmn_id: + c.destroy(); + break; + default: + break; + } +} +void ho_restrict_list_ext_ies_o::ext_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nrrestrictin_ep_sas_secondary_rat: + break; + case types::unlicensed_spec_restrict: + break; + case types::cn_type_restricts: + c.init(); + break; + case types::nrrestrictin5_gs: + break; + case types::last_ng_ranplmn_id: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_restrict_list_ext_ies_o::ext_c"); + } +} +ho_restrict_list_ext_ies_o::ext_c::ext_c(const ho_restrict_list_ext_ies_o::ext_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::nrrestrictin_ep_sas_secondary_rat: + c.init(other.c.get()); + break; + case types::unlicensed_spec_restrict: + c.init(other.c.get()); + break; + case types::cn_type_restricts: + c.init(other.c.get()); + break; + case types::nrrestrictin5_gs: + c.init(other.c.get()); + break; + case types::last_ng_ranplmn_id: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_restrict_list_ext_ies_o::ext_c"); + } +} +ho_restrict_list_ext_ies_o::ext_c& +ho_restrict_list_ext_ies_o::ext_c::operator=(const ho_restrict_list_ext_ies_o::ext_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nrrestrictin_ep_sas_secondary_rat: + c.set(other.c.get()); + break; + case types::unlicensed_spec_restrict: + c.set(other.c.get()); + break; + case types::cn_type_restricts: + c.set(other.c.get()); + break; + case types::nrrestrictin5_gs: + c.set(other.c.get()); + break; + case types::last_ng_ranplmn_id: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_restrict_list_ext_ies_o::ext_c"); + } + + return *this; +} +void ho_restrict_list_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nrrestrictin_ep_sas_secondary_rat: + j.write_str("NRrestrictioninEPSasSecondaryRAT", "nRrestrictedinEPSasSecondaryRAT"); + break; + case types::unlicensed_spec_restrict: + j.write_str("UnlicensedSpectrumRestriction", "unlicensed-restricted"); + break; + case types::cn_type_restricts: + j.start_array("CNTypeRestrictions"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::nrrestrictin5_gs: + j.write_str("NRrestrictionin5GS", "nRrestrictedin5GS"); + break; + case types::last_ng_ranplmn_id: + j.write_str("PLMNidentity", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "ho_restrict_list_ext_ies_o::ext_c"); + } + j.end_obj(); +} +SRSASN_CODE ho_restrict_list_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + switch (type_) { + case types::nrrestrictin_ep_sas_secondary_rat: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::unlicensed_spec_restrict: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::cn_type_restricts: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16, true)); + break; + case types::nrrestrictin5_gs: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::last_ng_ranplmn_id: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ho_restrict_list_ext_ies_o::ext_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_restrict_list_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + switch (type_) { + case types::nrrestrictin_ep_sas_secondary_rat: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::unlicensed_spec_restrict: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::cn_type_restricts: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16, true)); + break; + case types::nrrestrictin5_gs: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::last_ng_ranplmn_id: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ho_restrict_list_ext_ies_o::ext_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string ho_restrict_list_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"NRrestrictioninEPSasSecondaryRAT", + "UnlicensedSpectrumRestriction", + "CNTypeRestrictions", + "NRrestrictionin5GS", + "PLMNidentity"}; + return convert_enum_idx(options, 5, value, "ho_restrict_list_ext_ies_o::ext_c::types"); +} +uint8_t ho_restrict_list_ext_ies_o::ext_c::types_opts::to_number() const +{ + if (value == nrrestrictin5_gs) { + return 5; + } + invalid_enum_number(value, "ho_restrict_list_ext_ies_o::ext_c::types"); + return 0; +} + +// DLNASPDUDeliveryAckRequest ::= ENUMERATED +std::string dlnaspdu_delivery_ack_request_opts::to_string() const +{ + static const char* options[] = {"requested"}; + return convert_enum_idx(options, 1, value, "dlnaspdu_delivery_ack_request_e"); +} + +template struct asn1::s1ap::protocol_ext_field_s; + +ho_restrict_list_ext_ies_container::ho_restrict_list_ext_ies_container() : + nrrestrictin_ep_sas_secondary_rat(261, crit_e::ignore), + unlicensed_spec_restrict(270, crit_e::ignore), + cn_type_restricts(282, crit_e::ignore), + nrrestrictin5_gs(287, crit_e::ignore), + last_ng_ranplmn_id(290, crit_e::ignore) +{} +SRSASN_CODE ho_restrict_list_ext_ies_container::pack(bit_ref& bref) const +{ + uint32_t nof_ies = 0; + nof_ies += nrrestrictin_ep_sas_secondary_rat_present ? 1 : 0; + nof_ies += unlicensed_spec_restrict_present ? 1 : 0; + nof_ies += cn_type_restricts_present ? 1 : 0; + nof_ies += nrrestrictin5_gs_present ? 1 : 0; + nof_ies += last_ng_ranplmn_id_present ? 1 : 0; + pack_length(bref, nof_ies, 1u, 65535u, true); + + if (nrrestrictin_ep_sas_secondary_rat_present) { + HANDLE_CODE(nrrestrictin_ep_sas_secondary_rat.pack(bref)); + } + if (unlicensed_spec_restrict_present) { + HANDLE_CODE(unlicensed_spec_restrict.pack(bref)); + } + if (cn_type_restricts_present) { + HANDLE_CODE(cn_type_restricts.pack(bref)); + } + if (nrrestrictin5_gs_present) { + HANDLE_CODE(nrrestrictin5_gs.pack(bref)); + } + if (last_ng_ranplmn_id_present) { + HANDLE_CODE(last_ng_ranplmn_id.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_restrict_list_ext_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 1u, 65535u, true); + + for (; nof_ies > 0; --nof_ies) { + protocol_ext_field_s c; + HANDLE_CODE(c.unpack(bref)); + switch (c.id) { + case 261: + nrrestrictin_ep_sas_secondary_rat_present = true; + nrrestrictin_ep_sas_secondary_rat.id = c.id; + nrrestrictin_ep_sas_secondary_rat.crit = c.crit; + nrrestrictin_ep_sas_secondary_rat.ext = c.ext_value.nrrestrictin_ep_sas_secondary_rat(); + break; + case 270: + unlicensed_spec_restrict_present = true; + unlicensed_spec_restrict.id = c.id; + unlicensed_spec_restrict.crit = c.crit; + unlicensed_spec_restrict.ext = c.ext_value.unlicensed_spec_restrict(); + break; + case 282: + cn_type_restricts_present = true; + cn_type_restricts.id = c.id; + cn_type_restricts.crit = c.crit; + cn_type_restricts.ext = c.ext_value.cn_type_restricts(); + break; + case 287: + nrrestrictin5_gs_present = true; + nrrestrictin5_gs.id = c.id; + nrrestrictin5_gs.crit = c.crit; + nrrestrictin5_gs.ext = c.ext_value.nrrestrictin5_gs(); + break; + case 290: + last_ng_ranplmn_id_present = true; + last_ng_ranplmn_id.id = c.id; + last_ng_ranplmn_id.crit = c.crit; + last_ng_ranplmn_id.ext = c.ext_value.last_ng_ranplmn_id(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + + return SRSASN_SUCCESS; +} +void ho_restrict_list_ext_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + if (nrrestrictin_ep_sas_secondary_rat_present) { + j.write_fieldname(""); + nrrestrictin_ep_sas_secondary_rat.to_json(j); + } + if (unlicensed_spec_restrict_present) { + j.write_fieldname(""); + unlicensed_spec_restrict.to_json(j); + } + if (cn_type_restricts_present) { + j.write_fieldname(""); + cn_type_restricts.to_json(j); + } + if (nrrestrictin5_gs_present) { + j.write_fieldname(""); + nrrestrictin5_gs.to_json(j); + } + if (last_ng_ranplmn_id_present) { + j.write_fieldname(""); + last_ng_ranplmn_id.to_json(j); + } + j.end_obj(); +} + +// HandoverRestrictionList ::= SEQUENCE +SRSASN_CODE ho_restrict_list_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(equivalent_plmns_present, 1)); + HANDLE_CODE(bref.pack(forbidden_tas_present, 1)); + HANDLE_CODE(bref.pack(forbidden_las_present, 1)); + HANDLE_CODE(bref.pack(forbidden_inter_rats_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(serving_plmn.pack(bref)); + if (equivalent_plmns_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, equivalent_plmns, 1, 15, true)); + } + if (forbidden_tas_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, forbidden_tas, 1, 16, true)); + } + if (forbidden_las_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, forbidden_las, 1, 16, true)); + } + if (forbidden_inter_rats_present) { + HANDLE_CODE(forbidden_inter_rats.pack(bref)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_restrict_list_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(equivalent_plmns_present, 1)); + HANDLE_CODE(bref.unpack(forbidden_tas_present, 1)); + HANDLE_CODE(bref.unpack(forbidden_las_present, 1)); + HANDLE_CODE(bref.unpack(forbidden_inter_rats_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(serving_plmn.unpack(bref)); + if (equivalent_plmns_present) { + HANDLE_CODE(unpack_dyn_seq_of(equivalent_plmns, bref, 1, 15, true)); + } + if (forbidden_tas_present) { + HANDLE_CODE(unpack_dyn_seq_of(forbidden_tas, bref, 1, 16, true)); + } + if (forbidden_las_present) { + HANDLE_CODE(unpack_dyn_seq_of(forbidden_las, bref, 1, 16, true)); + } + if (forbidden_inter_rats_present) { + HANDLE_CODE(forbidden_inter_rats.unpack(bref)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_restrict_list_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("servingPLMN", serving_plmn.to_string()); + if (equivalent_plmns_present) { + j.start_array("equivalentPLMNs"); + for (const auto& e1 : equivalent_plmns) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -5568,6 +8188,45 @@ void ho_restrict_list_s::to_json(json_writer& j) const j.end_obj(); } +// NRUESecurityCapabilities ::= SEQUENCE +SRSASN_CODE nrue_security_cap_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(nrencryption_algorithms.pack(bref)); + HANDLE_CODE(nrintegrity_protection_algorithms.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE nrue_security_cap_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(nrencryption_algorithms.unpack(bref)); + HANDLE_CODE(nrintegrity_protection_algorithms.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void nrue_security_cap_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("nRencryptionAlgorithms", nrencryption_algorithms.to_string()); + j.write_str("nRintegrityProtectionAlgorithms", nrintegrity_protection_algorithms.to_string()); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + // PendingDataIndication ::= ENUMERATED std::string pending_data_ind_opts::to_string() const { @@ -5582,15 +8241,22 @@ std::string srvcc_operation_possible_opts::to_string() const return convert_enum_idx(options, 1, value, "srvcc_operation_possible_e"); } +// UECapabilityInfoRequest ::= ENUMERATED +std::string ue_cap_info_request_opts::to_string() const +{ + static const char* options[] = {"requested"}; + return convert_enum_idx(options, 1, value, "ue_cap_info_request_e"); +} + // DownlinkNASTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t dl_nas_transport_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {0, 8, 26, 41, 106, 124, 74, 249, 251, 271, 283}; - return map_enum_number(options, 11, idx, "id"); + static const uint32_t options[] = {0, 8, 26, 41, 106, 124, 74, 249, 251, 269, 271, 275, 280, 283, 278, 299}; + return map_enum_number(options, 16, idx, "id"); } bool dl_nas_transport_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 26, 41, 106, 124, 74, 249, 251, 271, 283}; + static const uint32_t options[] = {0, 8, 26, 41, 106, 124, 74, 249, 251, 269, 271, 275, 280, 283, 278, 299}; for (const auto& o : options) { if (o == id) { return true; @@ -5619,10 +8285,20 @@ crit_e dl_nas_transport_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 251: return crit_e::ignore; + case 269: + return crit_e::ignore; case 271: return crit_e::ignore; + case 275: + return crit_e::ignore; + case 280: + return crit_e::ignore; case 283: return crit_e::ignore; + case 278: + return crit_e::ignore; + case 299: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -5659,12 +8335,27 @@ dl_nas_transport_ies_o::value_c dl_nas_transport_ies_o::get_value(const uint32_t case 251: ret.set(value_c::types::enhanced_coverage_restricted); break; + case 269: + ret.set(value_c::types::nrue_security_cap); + break; case 271: ret.set(value_c::types::ce_mode_brestricted); break; + case 275: + ret.set(value_c::types::ue_cap_info_request); + break; + case 280: + ret.set(value_c::types::end_ind); + break; case 283: ret.set(value_c::types::pending_data_ind); break; + case 278: + ret.set(value_c::types::subscription_based_ue_differentiation_info); + break; + case 299: + ret.set(value_c::types::add_rrm_prio_idx); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -5691,10 +8382,20 @@ presence_e dl_nas_transport_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 251: return presence_e::optional; + case 269: + return presence_e::optional; case 271: return presence_e::optional; + case 275: + return presence_e::optional; + case 280: + return presence_e::optional; case 283: return presence_e::optional; + case 278: + return presence_e::optional; + case 299: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -5747,16 +8448,42 @@ enhanced_coverage_restricted_e& dl_nas_transport_ies_o::value_c::enhanced_covera assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); return c.get(); } +nrue_security_cap_s& dl_nas_transport_ies_o::value_c::nrue_security_cap() +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} ce_mode_brestricted_e& dl_nas_transport_ies_o::value_c::ce_mode_brestricted() { assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); return c.get(); } +ue_cap_info_request_e& dl_nas_transport_ies_o::value_c::ue_cap_info_request() +{ + assert_choice_type("UECapabilityInfoRequest", type_.to_string(), "Value"); + return c.get(); +} +end_ind_e& dl_nas_transport_ies_o::value_c::end_ind() +{ + assert_choice_type("EndIndication", type_.to_string(), "Value"); + return c.get(); +} pending_data_ind_e& dl_nas_transport_ies_o::value_c::pending_data_ind() { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); return c.get(); } +subscription_based_ue_differentiation_info_s& +dl_nas_transport_ies_o::value_c::subscription_based_ue_differentiation_info() +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +fixed_bitstring<32, false, true>& dl_nas_transport_ies_o::value_c::add_rrm_prio_idx() +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} const uint64_t& dl_nas_transport_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -5802,16 +8529,42 @@ const enhanced_coverage_restricted_e& dl_nas_transport_ies_o::value_c::enhanced_ assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); return c.get(); } +const nrue_security_cap_s& dl_nas_transport_ies_o::value_c::nrue_security_cap() const +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} const ce_mode_brestricted_e& dl_nas_transport_ies_o::value_c::ce_mode_brestricted() const { assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); return c.get(); } +const ue_cap_info_request_e& dl_nas_transport_ies_o::value_c::ue_cap_info_request() const +{ + assert_choice_type("UECapabilityInfoRequest", type_.to_string(), "Value"); + return c.get(); +} +const end_ind_e& dl_nas_transport_ies_o::value_c::end_ind() const +{ + assert_choice_type("EndIndication", type_.to_string(), "Value"); + return c.get(); +} const pending_data_ind_e& dl_nas_transport_ies_o::value_c::pending_data_ind() const { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); return c.get(); } +const subscription_based_ue_differentiation_info_s& +dl_nas_transport_ies_o::value_c::subscription_based_ue_differentiation_info() const +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +const fixed_bitstring<32, false, true>& dl_nas_transport_ies_o::value_c::add_rrm_prio_idx() const +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} void dl_nas_transport_ies_o::value_c::destroy_() { switch (type_) { @@ -5824,6 +8577,15 @@ void dl_nas_transport_ies_o::value_c::destroy_() case types::ue_radio_cap: c.destroy >(); break; + case types::nrue_security_cap: + c.destroy(); + break; + case types::subscription_based_ue_differentiation_info: + c.destroy(); + break; + case types::add_rrm_prio_idx: + c.destroy >(); + break; default: break; } @@ -5854,10 +8616,23 @@ void dl_nas_transport_ies_o::value_c::set(types::options e) break; case types::enhanced_coverage_restricted: break; + case types::nrue_security_cap: + c.init(); + break; case types::ce_mode_brestricted: break; + case types::ue_cap_info_request: + break; + case types::end_ind: + break; case types::pending_data_ind: break; + case types::subscription_based_ue_differentiation_info: + c.init(); + break; + case types::add_rrm_prio_idx: + c.init >(); + break; case types::nulltype: break; default: @@ -5895,12 +8670,27 @@ dl_nas_transport_ies_o::value_c::value_c(const dl_nas_transport_ies_o::value_c& case types::enhanced_coverage_restricted: c.init(other.c.get()); break; + case types::nrue_security_cap: + c.init(other.c.get()); + break; case types::ce_mode_brestricted: c.init(other.c.get()); break; + case types::ue_cap_info_request: + c.init(other.c.get()); + break; + case types::end_ind: + c.init(other.c.get()); + break; case types::pending_data_ind: c.init(other.c.get()); break; + case types::subscription_based_ue_differentiation_info: + c.init(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -5942,12 +8732,27 @@ dl_nas_transport_ies_o::value_c::operator=(const dl_nas_transport_ies_o::value_c case types::enhanced_coverage_restricted: c.set(other.c.get()); break; + case types::nrue_security_cap: + c.set(other.c.get()); + break; case types::ce_mode_brestricted: c.set(other.c.get()); break; + case types::ue_cap_info_request: + c.set(other.c.get()); + break; + case types::end_ind: + c.set(other.c.get()); + break; case types::pending_data_ind: c.set(other.c.get()); break; + case types::subscription_based_ue_differentiation_info: + c.set(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -5988,12 +8793,29 @@ void dl_nas_transport_ies_o::value_c::to_json(json_writer& j) const case types::enhanced_coverage_restricted: j.write_str("EnhancedCoverageRestricted", "restricted"); break; + case types::nrue_security_cap: + j.write_fieldname("NRUESecurityCapabilities"); + c.get().to_json(j); + break; case types::ce_mode_brestricted: j.write_str("CE-ModeBRestricted", c.get().to_string()); break; + case types::ue_cap_info_request: + j.write_str("UECapabilityInfoRequest", "requested"); + break; + case types::end_ind: + j.write_str("EndIndication", c.get().to_string()); + break; case types::pending_data_ind: j.write_str("PendingDataIndication", "true"); break; + case types::subscription_based_ue_differentiation_info: + j.write_fieldname("Subscription-Based-UE-DifferentiationInfo"); + c.get().to_json(j); + break; + case types::add_rrm_prio_idx: + j.write_str("BIT STRING", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "dl_nas_transport_ies_o::value_c"); } @@ -6030,12 +8852,27 @@ SRSASN_CODE dl_nas_transport_ies_o::value_c::pack(bit_ref& bref) const case types::enhanced_coverage_restricted: HANDLE_CODE(c.get().pack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().pack(bref)); + break; case types::ce_mode_brestricted: HANDLE_CODE(c.get().pack(bref)); break; + case types::ue_cap_info_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::end_ind: + HANDLE_CODE(c.get().pack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().pack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().pack(bref))); + break; default: log_invalid_choice_id(type_, "dl_nas_transport_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -6073,12 +8910,27 @@ SRSASN_CODE dl_nas_transport_ies_o::value_c::unpack(cbit_ref& bref) case types::enhanced_coverage_restricted: HANDLE_CODE(c.get().unpack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::ce_mode_brestricted: HANDLE_CODE(c.get().unpack(bref)); break; + case types::ue_cap_info_request: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::end_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().unpack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().unpack(bref))); + break; default: log_invalid_choice_id(type_, "dl_nas_transport_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -6097,9 +8949,14 @@ std::string dl_nas_transport_ies_o::value_c::types_opts::to_string() const "OCTET STRING", "DLNASPDUDeliveryAckRequest", "EnhancedCoverageRestricted", + "NRUESecurityCapabilities", "CE-ModeBRestricted", - "PendingDataIndication"}; - return convert_enum_idx(options, 11, value, "dl_nas_transport_ies_o::value_c::types"); + "UECapabilityInfoRequest", + "EndIndication", + "PendingDataIndication", + "Subscription-Based-UE-DifferentiationInfo", + "BIT STRING"}; + return convert_enum_idx(options, 16, value, "dl_nas_transport_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -6114,8 +8971,13 @@ dl_nas_transport_ies_container::dl_nas_transport_ies_container() : ue_radio_cap(74, crit_e::ignore), dlnaspdu_delivery_ack_request(249, crit_e::ignore), enhanced_coverage_restricted(251, crit_e::ignore), + nrue_security_cap(269, crit_e::ignore), ce_mode_brestricted(271, crit_e::ignore), - pending_data_ind(283, crit_e::ignore) + ue_cap_info_request(275, crit_e::ignore), + end_ind(280, crit_e::ignore), + pending_data_ind(283, crit_e::ignore), + subscription_based_ue_differentiation_info(278, crit_e::ignore), + add_rrm_prio_idx(299, crit_e::ignore) {} SRSASN_CODE dl_nas_transport_ies_container::pack(bit_ref& bref) const { @@ -6126,8 +8988,13 @@ SRSASN_CODE dl_nas_transport_ies_container::pack(bit_ref& bref) const nof_ies += ue_radio_cap_present ? 1 : 0; nof_ies += dlnaspdu_delivery_ack_request_present ? 1 : 0; nof_ies += enhanced_coverage_restricted_present ? 1 : 0; + nof_ies += nrue_security_cap_present ? 1 : 0; nof_ies += ce_mode_brestricted_present ? 1 : 0; + nof_ies += ue_cap_info_request_present ? 1 : 0; + nof_ies += end_ind_present ? 1 : 0; nof_ies += pending_data_ind_present ? 1 : 0; + nof_ies += subscription_based_ue_differentiation_info_present ? 1 : 0; + nof_ies += add_rrm_prio_idx_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -6151,12 +9018,27 @@ SRSASN_CODE dl_nas_transport_ies_container::pack(bit_ref& bref) const if (enhanced_coverage_restricted_present) { HANDLE_CODE(enhanced_coverage_restricted.pack(bref)); } + if (nrue_security_cap_present) { + HANDLE_CODE(nrue_security_cap.pack(bref)); + } if (ce_mode_brestricted_present) { HANDLE_CODE(ce_mode_brestricted.pack(bref)); } + if (ue_cap_info_request_present) { + HANDLE_CODE(ue_cap_info_request.pack(bref)); + } + if (end_ind_present) { + HANDLE_CODE(end_ind.pack(bref)); + } if (pending_data_ind_present) { HANDLE_CODE(pending_data_ind.pack(bref)); } + if (subscription_based_ue_differentiation_info_present) { + HANDLE_CODE(subscription_based_ue_differentiation_info.pack(bref)); + } + if (add_rrm_prio_idx_present) { + HANDLE_CODE(add_rrm_prio_idx.pack(bref)); + } return SRSASN_SUCCESS; } @@ -6225,18 +9107,48 @@ SRSASN_CODE dl_nas_transport_ies_container::unpack(cbit_ref& bref) enhanced_coverage_restricted.crit = c.crit; enhanced_coverage_restricted.value = c.value.enhanced_coverage_restricted(); break; + case 269: + nrue_security_cap_present = true; + nrue_security_cap.id = c.id; + nrue_security_cap.crit = c.crit; + nrue_security_cap.value = c.value.nrue_security_cap(); + break; case 271: ce_mode_brestricted_present = true; ce_mode_brestricted.id = c.id; ce_mode_brestricted.crit = c.crit; ce_mode_brestricted.value = c.value.ce_mode_brestricted(); break; + case 275: + ue_cap_info_request_present = true; + ue_cap_info_request.id = c.id; + ue_cap_info_request.crit = c.crit; + ue_cap_info_request.value = c.value.ue_cap_info_request(); + break; + case 280: + end_ind_present = true; + end_ind.id = c.id; + end_ind.crit = c.crit; + end_ind.value = c.value.end_ind(); + break; case 283: pending_data_ind_present = true; pending_data_ind.id = c.id; pending_data_ind.crit = c.crit; pending_data_ind.value = c.value.pending_data_ind(); break; + case 278: + subscription_based_ue_differentiation_info_present = true; + subscription_based_ue_differentiation_info.id = c.id; + subscription_based_ue_differentiation_info.crit = c.crit; + subscription_based_ue_differentiation_info.value = c.value.subscription_based_ue_differentiation_info(); + break; + case 299: + add_rrm_prio_idx_present = true; + add_rrm_prio_idx.id = c.id; + add_rrm_prio_idx.crit = c.crit; + add_rrm_prio_idx.value = c.value.add_rrm_prio_idx(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -6282,14 +9194,34 @@ void dl_nas_transport_ies_container::to_json(json_writer& j) const j.write_fieldname(""); enhanced_coverage_restricted.to_json(j); } + if (nrue_security_cap_present) { + j.write_fieldname(""); + nrue_security_cap.to_json(j); + } if (ce_mode_brestricted_present) { j.write_fieldname(""); ce_mode_brestricted.to_json(j); } + if (ue_cap_info_request_present) { + j.write_fieldname(""); + ue_cap_info_request.to_json(j); + } + if (end_ind_present) { + j.write_fieldname(""); + end_ind.to_json(j); + } if (pending_data_ind_present) { j.write_fieldname(""); pending_data_ind.to_json(j); } + if (subscription_based_ue_differentiation_info_present) { + j.write_fieldname(""); + subscription_based_ue_differentiation_info.to_json(j); + } + if (add_rrm_prio_idx_present) { + j.write_fieldname(""); + add_rrm_prio_idx.to_json(j); + } j.end_obj(); } @@ -8288,103 +11220,6 @@ std::string erab_item_ies_o::value_c::types_opts::to_string() const return convert_enum_idx(options, 1, value, "erab_item_ies_o::value_c::types"); } -// GBR-QosInformation ::= SEQUENCE -SRSASN_CODE gbr_qos_info_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ie_exts_present, 1)); - - HANDLE_CODE(pack_integer(bref, erab_maximum_bitrate_dl, (uint64_t)0u, (uint64_t)10000000000u, false, true)); - HANDLE_CODE(pack_integer(bref, erab_maximum_bitrate_ul, (uint64_t)0u, (uint64_t)10000000000u, false, true)); - HANDLE_CODE(pack_integer(bref, erab_guaranteed_bitrate_dl, (uint64_t)0u, (uint64_t)10000000000u, false, true)); - HANDLE_CODE(pack_integer(bref, erab_guaranteed_bitrate_ul, (uint64_t)0u, (uint64_t)10000000000u, false, true)); - if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE gbr_qos_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - - HANDLE_CODE(unpack_integer(erab_maximum_bitrate_dl, bref, (uint64_t)0u, (uint64_t)10000000000u, false, true)); - HANDLE_CODE(unpack_integer(erab_maximum_bitrate_ul, bref, (uint64_t)0u, (uint64_t)10000000000u, false, true)); - HANDLE_CODE(unpack_integer(erab_guaranteed_bitrate_dl, bref, (uint64_t)0u, (uint64_t)10000000000u, false, true)); - HANDLE_CODE(unpack_integer(erab_guaranteed_bitrate_ul, bref, (uint64_t)0u, (uint64_t)10000000000u, false, true)); - if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void gbr_qos_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("e-RAB-MaximumBitrateDL", erab_maximum_bitrate_dl); - j.write_int("e-RAB-MaximumBitrateUL", erab_maximum_bitrate_ul); - j.write_int("e-RAB-GuaranteedBitrateDL", erab_guaranteed_bitrate_dl); - j.write_int("e-RAB-GuaranteedBitrateUL", erab_guaranteed_bitrate_ul); - if (ie_exts_present) { - j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); - } - j.end_obj(); -} - -// E-RABLevelQoSParameters ::= SEQUENCE -SRSASN_CODE erab_level_qos_params_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(gbr_qos_info_present, 1)); - HANDLE_CODE(bref.pack(ie_exts_present, 1)); - - HANDLE_CODE(pack_integer(bref, qci, (uint16_t)0u, (uint16_t)255u, false, true)); - HANDLE_CODE(alloc_retention_prio.pack(bref)); - if (gbr_qos_info_present) { - HANDLE_CODE(gbr_qos_info.pack(bref)); - } - if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_level_qos_params_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(gbr_qos_info_present, 1)); - HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - - HANDLE_CODE(unpack_integer(qci, bref, (uint16_t)0u, (uint16_t)255u, false, true)); - HANDLE_CODE(alloc_retention_prio.unpack(bref)); - if (gbr_qos_info_present) { - HANDLE_CODE(gbr_qos_info.unpack(bref)); - } - if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void erab_level_qos_params_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("qCI", qci); - j.write_fieldname("allocationRetentionPriority"); - alloc_retention_prio.to_json(j); - if (gbr_qos_info_present) { - j.write_fieldname("gbrQosInformation"); - gbr_qos_info.to_json(j); - } - if (ie_exts_present) { - j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); - } - j.end_obj(); -} - template struct asn1::s1ap::protocol_ie_single_container_s; // E-RABModifyItemBearerModConf ::= SEQUENCE @@ -9042,6 +11877,161 @@ void erab_mod_confirm_s::to_json(json_writer& j) const j.end_obj(); } +// E-RABUsageReportItem ::= SEQUENCE +SRSASN_CODE erabusage_report_item_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(start_timestamp.pack(bref)); + HANDLE_CODE(end_timestamp.pack(bref)); + HANDLE_CODE(pack_integer(bref, usage_count_ul, (uint64_t)0u, (uint64_t)18446744073709551615u, false, true)); + HANDLE_CODE(pack_integer(bref, usage_count_dl, (uint64_t)0u, (uint64_t)18446744073709551615u, false, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE erabusage_report_item_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(start_timestamp.unpack(bref)); + HANDLE_CODE(end_timestamp.unpack(bref)); + HANDLE_CODE(unpack_integer(usage_count_ul, bref, (uint64_t)0u, (uint64_t)18446744073709551615u, false, true)); + HANDLE_CODE(unpack_integer(usage_count_dl, bref, (uint64_t)0u, (uint64_t)18446744073709551615u, false, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void erabusage_report_item_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("startTimestamp", start_timestamp.to_string()); + j.write_str("endTimestamp", end_timestamp.to_string()); + j.write_int("usageCountUL", usage_count_ul); + j.write_int("usageCountDL", usage_count_dl); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// E-RABUsageReportItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +uint32_t erabusage_report_item_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {267}; + return map_enum_number(options, 1, idx, "id"); +} +bool erabusage_report_item_ies_o::is_id_valid(const uint32_t& id) +{ + return 267 == id; +} +crit_e erabusage_report_item_ies_o::get_crit(const uint32_t& id) +{ + if (id == 267) { + return crit_e::ignore; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} +erabusage_report_item_ies_o::value_c erabusage_report_item_ies_o::get_value(const uint32_t& id) +{ + value_c ret{}; + if (id != 267) { + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e erabusage_report_item_ies_o::get_presence(const uint32_t& id) +{ + if (id == 267) { + return presence_e::mandatory; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} + +// Value ::= OPEN TYPE +void erabusage_report_item_ies_o::value_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("E-RABUsageReportItem"); + c.to_json(j); + j.end_obj(); +} +SRSASN_CODE erabusage_report_item_ies_o::value_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE erabusage_report_item_ies_o::value_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string erabusage_report_item_ies_o::value_c::types_opts::to_string() const +{ + static const char* options[] = {"E-RABUsageReportItem"}; + return convert_enum_idx(options, 1, value, "erabusage_report_item_ies_o::value_c::types"); +} + +template struct asn1::s1ap::protocol_ie_single_container_s; + +// NR-CGI ::= SEQUENCE +SRSASN_CODE nr_cgi_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(nrcell_id.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE nr_cgi_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(nrcell_id.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void nr_cgi_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("pLMNIdentity", plmn_id.to_string()); + j.write_str("nRCellIdentity", nrcell_id.to_string()); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// SecondaryRATType ::= ENUMERATED +std::string secondary_rat_type_opts::to_string() const +{ + static const char* options[] = {"nR", "unlicensed"}; + return convert_enum_idx(options, 2, value, "secondary_rat_type_e"); +} + // E-RABNotToBeModifiedItemBearerModInd ::= SEQUENCE SRSASN_CODE erab_not_to_be_modified_item_bearer_mod_ind_s::pack(bit_ref& bref) const { @@ -9126,6 +12116,89 @@ void erab_to_be_modified_item_bearer_mod_ind_s::to_json(json_writer& j) const j.end_obj(); } +// PSCellInformation ::= SEQUENCE +SRSASN_CODE ps_cell_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(ncgi.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ps_cell_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(ncgi.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ps_cell_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("nCGI"); + ncgi.to_json(j); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// SecondaryRATDataUsageReportItem ::= SEQUENCE +SRSASN_CODE secondary_rat_data_usage_report_item_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(pack_integer(bref, erab_id, (uint8_t)0u, (uint8_t)15u, true, true)); + HANDLE_CODE(secondary_rat_type.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, erabusage_report_list, 1, 2, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE secondary_rat_data_usage_report_item_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(unpack_integer(erab_id, bref, (uint8_t)0u, (uint8_t)15u, true, true)); + HANDLE_CODE(secondary_rat_type.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(erabusage_report_list, bref, 1, 2, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void secondary_rat_data_usage_report_item_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("e-RAB-ID", erab_id); + j.write_str("secondaryRATType", secondary_rat_type.to_string()); + j.start_array("e-RABUsageReportList"); + for (const auto& e1 : erabusage_report_list) { + e1.to_json(j); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + // 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) { @@ -9252,6 +12325,133 @@ std::string erab_to_be_modified_item_bearer_mod_ind_ies_o::value_c::types_opts:: return convert_enum_idx(options, 1, value, "erab_to_be_modified_item_bearer_mod_ind_ies_o::value_c::types"); } +// SecondaryRATDataUsageReportItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +uint32_t secondary_rat_data_usage_report_item_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {265}; + return map_enum_number(options, 1, idx, "id"); +} +bool secondary_rat_data_usage_report_item_ies_o::is_id_valid(const uint32_t& id) +{ + return 265 == id; +} +crit_e secondary_rat_data_usage_report_item_ies_o::get_crit(const uint32_t& id) +{ + if (id == 265) { + return crit_e::ignore; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} +secondary_rat_data_usage_report_item_ies_o::value_c +secondary_rat_data_usage_report_item_ies_o::get_value(const uint32_t& id) +{ + value_c ret{}; + if (id != 265) { + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e secondary_rat_data_usage_report_item_ies_o::get_presence(const uint32_t& id) +{ + if (id == 265) { + return presence_e::mandatory; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} + +// Value ::= OPEN TYPE +void secondary_rat_data_usage_report_item_ies_o::value_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("SecondaryRATDataUsageReportItem"); + c.to_json(j); + j.end_obj(); +} +SRSASN_CODE secondary_rat_data_usage_report_item_ies_o::value_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE secondary_rat_data_usage_report_item_ies_o::value_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string secondary_rat_data_usage_report_item_ies_o::value_c::types_opts::to_string() const +{ + static const char* options[] = {"SecondaryRATDataUsageReportItem"}; + return convert_enum_idx(options, 1, value, "secondary_rat_data_usage_report_item_ies_o::value_c::types"); +} + +// UserLocationInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t user_location_info_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {288}; + return map_enum_number(options, 1, idx, "id"); +} +bool user_location_info_ext_ies_o::is_id_valid(const uint32_t& id) +{ + return 288 == id; +} +crit_e user_location_info_ext_ies_o::get_crit(const uint32_t& id) +{ + if (id == 288) { + return crit_e::ignore; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} +user_location_info_ext_ies_o::ext_c user_location_info_ext_ies_o::get_ext(const uint32_t& id) +{ + ext_c ret{}; + if (id != 288) { + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e user_location_info_ext_ies_o::get_presence(const uint32_t& id) +{ + if (id == 288) { + return presence_e::optional; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} + +// Extension ::= OPEN TYPE +void user_location_info_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("PSCellInformation"); + c.to_json(j); + j.end_obj(); +} +SRSASN_CODE user_location_info_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE user_location_info_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string user_location_info_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"PSCellInformation"}; + return convert_enum_idx(options, 1, value, "user_location_info_ext_ies_o::ext_c::types"); +} + +template struct asn1::s1ap::protocol_ie_single_container_s; + // TunnelInformation ::= SEQUENCE SRSASN_CODE tunnel_info_s::pack(bit_ref& bref) const { @@ -9299,15 +12499,55 @@ void tunnel_info_s::to_json(json_writer& j) const j.end_obj(); } +// UserLocationInformation ::= SEQUENCE +SRSASN_CODE user_location_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(eutran_cgi.pack(bref)); + HANDLE_CODE(tai.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE user_location_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(eutran_cgi.unpack(bref)); + HANDLE_CODE(tai.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); + } + + return SRSASN_SUCCESS; +} +void user_location_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("eutran-cgi"); + eutran_cgi.to_json(j); + j.write_fieldname("tai"); + tai.to_json(j); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + } + j.end_obj(); +} + // E-RABModificationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_mod_ind_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {0, 8, 199, 201, 226, 176}; - return map_enum_number(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 199, 201, 226, 176, 264, 189}; + return map_enum_number(options, 8, idx, "id"); } bool erab_mod_ind_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 199, 201, 226, 176}; + static const uint32_t options[] = {0, 8, 199, 201, 226, 176, 264, 189}; for (const auto& o : options) { if (o == id) { return true; @@ -9330,6 +12570,10 @@ crit_e erab_mod_ind_ies_o::get_crit(const uint32_t& id) return crit_e::reject; case 176: return crit_e::ignore; + case 264: + return crit_e::ignore; + case 189: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -9357,6 +12601,12 @@ erab_mod_ind_ies_o::value_c erab_mod_ind_ies_o::get_value(const uint32_t& id) case 176: ret.set(value_c::types::tunnel_info_for_bbf); break; + case 264: + ret.set(value_c::types::secondary_rat_data_usage_report_list); + break; + case 189: + ret.set(value_c::types::user_location_info); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -9377,6 +12627,10 @@ presence_e erab_mod_ind_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 176: return presence_e::optional; + case 264: + return presence_e::optional; + case 189: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -9416,6 +12670,16 @@ tunnel_info_s& erab_mod_ind_ies_o::value_c::tunnel_info_for_bbf() assert_choice_type("TunnelInformation", type_.to_string(), "Value"); return c.get(); } +secondary_rat_data_usage_report_list_l& erab_mod_ind_ies_o::value_c::secondary_rat_data_usage_report_list() +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} +user_location_info_s& erab_mod_ind_ies_o::value_c::user_location_info() +{ + assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& erab_mod_ind_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -9448,6 +12712,16 @@ const tunnel_info_s& erab_mod_ind_ies_o::value_c::tunnel_info_for_bbf() const assert_choice_type("TunnelInformation", type_.to_string(), "Value"); return c.get(); } +const secondary_rat_data_usage_report_list_l& erab_mod_ind_ies_o::value_c::secondary_rat_data_usage_report_list() const +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} +const user_location_info_s& erab_mod_ind_ies_o::value_c::user_location_info() const +{ + assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); + return c.get(); +} void erab_mod_ind_ies_o::value_c::destroy_() { switch (type_) { @@ -9463,6 +12737,12 @@ void erab_mod_ind_ies_o::value_c::destroy_() case types::tunnel_info_for_bbf: c.destroy(); break; + case types::secondary_rat_data_usage_report_list: + c.destroy(); + break; + case types::user_location_info: + c.destroy(); + break; default: break; } @@ -9488,6 +12768,12 @@ void erab_mod_ind_ies_o::value_c::set(types::options e) case types::tunnel_info_for_bbf: c.init(); break; + case types::secondary_rat_data_usage_report_list: + c.init(); + break; + case types::user_location_info: + c.init(); + break; case types::nulltype: break; default: @@ -9516,6 +12802,12 @@ erab_mod_ind_ies_o::value_c::value_c(const erab_mod_ind_ies_o::value_c& other) case types::tunnel_info_for_bbf: c.init(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.init(other.c.get()); + break; + case types::user_location_info: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -9547,6 +12839,12 @@ erab_mod_ind_ies_o::value_c& erab_mod_ind_ies_o::value_c::operator=(const erab_m case types::tunnel_info_for_bbf: c.set(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.set(other.c.get()); + break; + case types::user_location_info: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -9579,6 +12877,17 @@ void erab_mod_ind_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("TunnelInformation"); c.get().to_json(j); break; + case types::secondary_rat_data_usage_report_list: + j.start_array("SecondaryRATDataUsageReportList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::user_location_info: + j.write_fieldname("UserLocationInformation"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "erab_mod_ind_ies_o::value_c"); } @@ -9608,6 +12917,12 @@ SRSASN_CODE erab_mod_ind_ies_o::value_c::pack(bit_ref& bref) const case types::tunnel_info_for_bbf: HANDLE_CODE(c.get().pack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; + case types::user_location_info: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "erab_mod_ind_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -9638,6 +12953,12 @@ SRSASN_CODE erab_mod_ind_ies_o::value_c::unpack(cbit_ref& bref) case types::tunnel_info_for_bbf: HANDLE_CODE(c.get().unpack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; + case types::user_location_info: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "erab_mod_ind_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -9652,8 +12973,10 @@ std::string erab_mod_ind_ies_o::value_c::types_opts::to_string() const "E-RAB-IE-ContainerList{{E-RABToBeModifiedItemBearerModIndIEs}}", "E-RAB-IE-ContainerList{{E-RABNotToBeModifiedItemBearerModIndIEs}}", "CSGMembershipInfo", - "TunnelInformation"}; - return convert_enum_idx(options, 6, value, "erab_mod_ind_ies_o::value_c::types"); + "TunnelInformation", + "SecondaryRATDataUsageReportList", + "UserLocationInformation"}; + return convert_enum_idx(options, 8, value, "erab_mod_ind_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -9664,7 +12987,9 @@ erab_mod_ind_ies_container::erab_mod_ind_ies_container() : erab_to_be_modified_list_bearer_mod_ind(199, crit_e::reject), erab_not_to_be_modified_list_bearer_mod_ind(201, crit_e::reject), csg_membership_info(226, crit_e::reject), - tunnel_info_for_bbf(176, crit_e::ignore) + tunnel_info_for_bbf(176, crit_e::ignore), + secondary_rat_data_usage_report_list(264, crit_e::ignore), + user_location_info(189, crit_e::ignore) {} SRSASN_CODE erab_mod_ind_ies_container::pack(bit_ref& bref) const { @@ -9672,6 +12997,8 @@ SRSASN_CODE erab_mod_ind_ies_container::pack(bit_ref& bref) const nof_ies += erab_not_to_be_modified_list_bearer_mod_ind_present ? 1 : 0; nof_ies += csg_membership_info_present ? 1 : 0; nof_ies += tunnel_info_for_bbf_present ? 1 : 0; + nof_ies += secondary_rat_data_usage_report_list_present ? 1 : 0; + nof_ies += user_location_info_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -9686,6 +13013,12 @@ SRSASN_CODE erab_mod_ind_ies_container::pack(bit_ref& bref) const if (tunnel_info_for_bbf_present) { HANDLE_CODE(tunnel_info_for_bbf.pack(bref)); } + if (secondary_rat_data_usage_report_list_present) { + HANDLE_CODE(secondary_rat_data_usage_report_list.pack(bref)); + } + if (user_location_info_present) { + HANDLE_CODE(user_location_info.pack(bref)); + } return SRSASN_SUCCESS; } @@ -9736,6 +13069,18 @@ SRSASN_CODE erab_mod_ind_ies_container::unpack(cbit_ref& bref) tunnel_info_for_bbf.crit = c.crit; tunnel_info_for_bbf.value = c.value.tunnel_info_for_bbf(); break; + case 264: + secondary_rat_data_usage_report_list_present = true; + secondary_rat_data_usage_report_list.id = c.id; + secondary_rat_data_usage_report_list.crit = c.crit; + secondary_rat_data_usage_report_list.value = c.value.secondary_rat_data_usage_report_list(); + break; + case 189: + user_location_info_present = true; + user_location_info.id = c.id; + user_location_info.crit = c.crit; + user_location_info.value = c.value.user_location_info(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -9769,6 +13114,14 @@ void erab_mod_ind_ies_container::to_json(json_writer& j) const j.write_fieldname(""); tunnel_info_for_bbf.to_json(j); } + if (secondary_rat_data_usage_report_list_present) { + j.write_fieldname(""); + secondary_rat_data_usage_report_list.to_json(j); + } + if (user_location_info_present) { + j.write_fieldname(""); + user_location_info.to_json(j); + } j.end_obj(); } @@ -10088,8 +13441,258 @@ std::string erab_to_be_modified_item_bearer_mod_req_ies_o::value_c::types_opts:: return convert_enum_idx(options, 1, value, "erab_to_be_modified_item_bearer_mod_req_ies_o::value_c::types"); } +// UEAggregate-MaximumBitrates-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t ue_aggregate_maximum_bitrates_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {259, 260}; + return map_enum_number(options, 2, idx, "id"); +} +bool ue_aggregate_maximum_bitrates_ext_ies_o::is_id_valid(const uint32_t& id) +{ + static const uint32_t options[] = {259, 260}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; +} +crit_e ue_aggregate_maximum_bitrates_ext_ies_o::get_crit(const uint32_t& id) +{ + switch (id) { + case 259: + return crit_e::ignore; + case 260: + return crit_e::ignore; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} +ue_aggregate_maximum_bitrates_ext_ies_o::ext_c ue_aggregate_maximum_bitrates_ext_ies_o::get_ext(const uint32_t& id) +{ + ext_c ret{}; + switch (id) { + case 259: + ret.set(ext_c::types::extended_u_eaggregate_maximum_bit_rate_dl); + break; + case 260: + ret.set(ext_c::types::extended_u_eaggregate_maximum_bit_rate_ul); + break; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e ue_aggregate_maximum_bitrates_ext_ies_o::get_presence(const uint32_t& id) +{ + switch (id) { + case 259: + return presence_e::optional; + case 260: + return presence_e::optional; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} + +// Extension ::= OPEN TYPE +uint64_t& ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::extended_u_eaggregate_maximum_bit_rate_dl() +{ + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); +} +uint64_t& ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::extended_u_eaggregate_maximum_bit_rate_ul() +{ + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); +} +const uint64_t& ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::extended_u_eaggregate_maximum_bit_rate_dl() const +{ + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); +} +const uint64_t& ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::extended_u_eaggregate_maximum_bit_rate_ul() const +{ + assert_choice_type("INTEGER (10000000001..4000000000000,...)", type_.to_string(), "Extension"); + return c.get(); +} +void ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::destroy_() {} +void ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::ext_c(const ue_aggregate_maximum_bitrates_ext_ies_o::ext_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::extended_u_eaggregate_maximum_bit_rate_dl: + c.init(other.c.get()); + break; + case types::extended_u_eaggregate_maximum_bit_rate_ul: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_aggregate_maximum_bitrates_ext_ies_o::ext_c"); + } +} +ue_aggregate_maximum_bitrates_ext_ies_o::ext_c& +ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::operator=(const ue_aggregate_maximum_bitrates_ext_ies_o::ext_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::extended_u_eaggregate_maximum_bit_rate_dl: + c.set(other.c.get()); + break; + case types::extended_u_eaggregate_maximum_bit_rate_ul: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_aggregate_maximum_bitrates_ext_ies_o::ext_c"); + } + + return *this; +} +void ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::extended_u_eaggregate_maximum_bit_rate_dl: + j.write_int("INTEGER (10000000001..4000000000000,...)", c.get()); + break; + case types::extended_u_eaggregate_maximum_bit_rate_ul: + j.write_int("INTEGER (10000000001..4000000000000,...)", c.get()); + break; + default: + log_invalid_choice_id(type_, "ue_aggregate_maximum_bitrates_ext_ies_o::ext_c"); + } + j.end_obj(); +} +SRSASN_CODE ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + switch (type_) { + case types::extended_u_eaggregate_maximum_bit_rate_dl: + HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); + break; + case types::extended_u_eaggregate_maximum_bit_rate_ul: + HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); + break; + default: + log_invalid_choice_id(type_, "ue_aggregate_maximum_bitrates_ext_ies_o::ext_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + switch (type_) { + case types::extended_u_eaggregate_maximum_bit_rate_dl: + HANDLE_CODE( + unpack_integer(c.get(), bref, (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); + break; + case types::extended_u_eaggregate_maximum_bit_rate_ul: + HANDLE_CODE( + unpack_integer(c.get(), bref, (uint64_t)10000000001u, (uint64_t)4000000000000u, true, true)); + break; + default: + log_invalid_choice_id(type_, "ue_aggregate_maximum_bitrates_ext_ies_o::ext_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"INTEGER (10000000001..4000000000000,...)", + "INTEGER (10000000001..4000000000000,...)"}; + return convert_enum_idx(options, 2, value, "ue_aggregate_maximum_bitrates_ext_ies_o::ext_c::types"); +} + template struct asn1::s1ap::protocol_ie_single_container_s; +// SecondaryRATDataUsageRequest ::= ENUMERATED +std::string secondary_rat_data_usage_request_opts::to_string() const +{ + static const char* options[] = {"requested"}; + return convert_enum_idx(options, 1, value, "secondary_rat_data_usage_request_e"); +} + +template struct asn1::s1ap::protocol_ext_field_s; + +ue_aggregate_maximum_bitrates_ext_ies_container::ue_aggregate_maximum_bitrates_ext_ies_container() : + extended_u_eaggregate_maximum_bit_rate_dl(259, crit_e::ignore), + extended_u_eaggregate_maximum_bit_rate_ul(260, crit_e::ignore) +{} +SRSASN_CODE ue_aggregate_maximum_bitrates_ext_ies_container::pack(bit_ref& bref) const +{ + uint32_t nof_ies = 0; + nof_ies += extended_u_eaggregate_maximum_bit_rate_dl_present ? 1 : 0; + nof_ies += extended_u_eaggregate_maximum_bit_rate_ul_present ? 1 : 0; + pack_length(bref, nof_ies, 1u, 65535u, true); + + if (extended_u_eaggregate_maximum_bit_rate_dl_present) { + HANDLE_CODE(extended_u_eaggregate_maximum_bit_rate_dl.pack(bref)); + } + if (extended_u_eaggregate_maximum_bit_rate_ul_present) { + HANDLE_CODE(extended_u_eaggregate_maximum_bit_rate_ul.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_aggregate_maximum_bitrates_ext_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 1u, 65535u, true); + + for (; nof_ies > 0; --nof_ies) { + protocol_ext_field_s c; + HANDLE_CODE(c.unpack(bref)); + switch (c.id) { + case 259: + extended_u_eaggregate_maximum_bit_rate_dl_present = true; + extended_u_eaggregate_maximum_bit_rate_dl.id = c.id; + extended_u_eaggregate_maximum_bit_rate_dl.crit = c.crit; + extended_u_eaggregate_maximum_bit_rate_dl.ext = c.ext_value.extended_u_eaggregate_maximum_bit_rate_dl(); + break; + case 260: + extended_u_eaggregate_maximum_bit_rate_ul_present = true; + extended_u_eaggregate_maximum_bit_rate_ul.id = c.id; + extended_u_eaggregate_maximum_bit_rate_ul.crit = c.crit; + extended_u_eaggregate_maximum_bit_rate_ul.ext = c.ext_value.extended_u_eaggregate_maximum_bit_rate_ul(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + + return SRSASN_SUCCESS; +} +void ue_aggregate_maximum_bitrates_ext_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + if (extended_u_eaggregate_maximum_bit_rate_dl_present) { + j.write_fieldname(""); + extended_u_eaggregate_maximum_bit_rate_dl.to_json(j); + } + if (extended_u_eaggregate_maximum_bit_rate_ul_present) { + j.write_fieldname(""); + extended_u_eaggregate_maximum_bit_rate_ul.to_json(j); + } + j.end_obj(); +} + // UEAggregateMaximumBitrate ::= SEQUENCE SRSASN_CODE ue_aggregate_maximum_bitrate_s::pack(bit_ref& bref) const { @@ -10132,12 +13735,12 @@ 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 const uint32_t options[] = {0, 8, 66, 30}; - return map_enum_number(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 66, 30, 268}; + return map_enum_number(options, 5, idx, "id"); } bool erab_modify_request_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 66, 30}; + static const uint32_t options[] = {0, 8, 66, 30, 268}; for (const auto& o : options) { if (o == id) { return true; @@ -10156,6 +13759,8 @@ crit_e erab_modify_request_ies_o::get_crit(const uint32_t& id) return crit_e::reject; case 30: return crit_e::reject; + case 268: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -10177,6 +13782,9 @@ erab_modify_request_ies_o::value_c erab_modify_request_ies_o::get_value(const ui case 30: ret.set(value_c::types::erab_to_be_modified_list_bearer_mod_req); break; + case 268: + ret.set(value_c::types::secondary_rat_data_usage_request); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -10193,6 +13801,8 @@ presence_e erab_modify_request_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 30: return presence_e::mandatory; + case 268: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -10220,6 +13830,11 @@ erab_to_be_modified_list_bearer_mod_req_l& erab_modify_request_ies_o::value_c::e assert_choice_type("E-RABToBeModifiedListBearerModReq", type_.to_string(), "Value"); return c.get(); } +secondary_rat_data_usage_request_e& erab_modify_request_ies_o::value_c::secondary_rat_data_usage_request() +{ + assert_choice_type("SecondaryRATDataUsageRequest", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& erab_modify_request_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -10241,6 +13856,11 @@ erab_modify_request_ies_o::value_c::erab_to_be_modified_list_bearer_mod_req() co assert_choice_type("E-RABToBeModifiedListBearerModReq", type_.to_string(), "Value"); return c.get(); } +const secondary_rat_data_usage_request_e& erab_modify_request_ies_o::value_c::secondary_rat_data_usage_request() const +{ + assert_choice_type("SecondaryRATDataUsageRequest", type_.to_string(), "Value"); + return c.get(); +} void erab_modify_request_ies_o::value_c::destroy_() { switch (type_) { @@ -10269,6 +13889,8 @@ void erab_modify_request_ies_o::value_c::set(types::options e) case types::erab_to_be_modified_list_bearer_mod_req: c.init(); break; + case types::secondary_rat_data_usage_request: + break; case types::nulltype: break; default: @@ -10291,6 +13913,9 @@ erab_modify_request_ies_o::value_c::value_c(const erab_modify_request_ies_o::val case types::erab_to_be_modified_list_bearer_mod_req: c.init(other.c.get()); break; + case types::secondary_rat_data_usage_request: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -10317,6 +13942,9 @@ erab_modify_request_ies_o::value_c::operator=(const erab_modify_request_ies_o::v case types::erab_to_be_modified_list_bearer_mod_req: c.set(other.c.get()); break; + case types::secondary_rat_data_usage_request: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -10346,6 +13974,9 @@ void erab_modify_request_ies_o::value_c::to_json(json_writer& j) const } j.end_array(); break; + case types::secondary_rat_data_usage_request: + j.write_str("SecondaryRATDataUsageRequest", "requested"); + break; default: log_invalid_choice_id(type_, "erab_modify_request_ies_o::value_c"); } @@ -10367,6 +13998,9 @@ SRSASN_CODE erab_modify_request_ies_o::value_c::pack(bit_ref& bref) const case types::erab_to_be_modified_list_bearer_mod_req: HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); break; + case types::secondary_rat_data_usage_request: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "erab_modify_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -10389,6 +14023,9 @@ SRSASN_CODE erab_modify_request_ies_o::value_c::unpack(cbit_ref& bref) case types::erab_to_be_modified_list_bearer_mod_req: HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); break; + case types::secondary_rat_data_usage_request: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "erab_modify_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -10401,8 +14038,9 @@ std::string erab_modify_request_ies_o::value_c::types_opts::to_string() const 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"); + "E-RABToBeModifiedListBearerModReq", + "SecondaryRATDataUsageRequest"}; + return convert_enum_idx(options, 5, value, "erab_modify_request_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -10411,12 +14049,14 @@ erab_modify_request_ies_container::erab_modify_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), enb_ue_s1ap_id(8, crit_e::reject), ueaggregate_maximum_bitrate(66, crit_e::reject), - erab_to_be_modified_list_bearer_mod_req(30, crit_e::reject) + erab_to_be_modified_list_bearer_mod_req(30, crit_e::reject), + secondary_rat_data_usage_request(268, crit_e::ignore) {} SRSASN_CODE erab_modify_request_ies_container::pack(bit_ref& bref) const { uint32_t nof_ies = 3; nof_ies += ueaggregate_maximum_bitrate_present ? 1 : 0; + nof_ies += secondary_rat_data_usage_request_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -10425,6 +14065,9 @@ SRSASN_CODE erab_modify_request_ies_container::pack(bit_ref& bref) const HANDLE_CODE(ueaggregate_maximum_bitrate.pack(bref)); } HANDLE_CODE(erab_to_be_modified_list_bearer_mod_req.pack(bref)); + if (secondary_rat_data_usage_request_present) { + HANDLE_CODE(secondary_rat_data_usage_request.pack(bref)); + } return SRSASN_SUCCESS; } @@ -10463,6 +14106,12 @@ SRSASN_CODE erab_modify_request_ies_container::unpack(cbit_ref& bref) erab_to_be_modified_list_bearer_mod_req.crit = c.crit; erab_to_be_modified_list_bearer_mod_req.value = c.value.erab_to_be_modified_list_bearer_mod_req(); break; + case 268: + secondary_rat_data_usage_request_present = true; + secondary_rat_data_usage_request.id = c.id; + secondary_rat_data_usage_request.crit = c.crit; + secondary_rat_data_usage_request.value = c.value.secondary_rat_data_usage_request(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -10488,6 +14137,10 @@ void erab_modify_request_ies_container::to_json(json_writer& j) const } j.write_fieldname(""); erab_to_be_modified_list_bearer_mod_req.to_json(j); + if (secondary_rat_data_usage_request_present) { + j.write_fieldname(""); + secondary_rat_data_usage_request.to_json(j); + } j.end_obj(); } @@ -10517,12 +14170,12 @@ 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 const uint32_t options[] = {0, 8, 31, 32, 58}; - return map_enum_number(options, 5, idx, "id"); + static const uint32_t options[] = {0, 8, 31, 32, 58, 264}; + return map_enum_number(options, 6, idx, "id"); } bool erab_modify_resp_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 31, 32, 58}; + static const uint32_t options[] = {0, 8, 31, 32, 58, 264}; for (const auto& o : options) { if (o == id) { return true; @@ -10543,6 +14196,8 @@ crit_e erab_modify_resp_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 58: return crit_e::ignore; + case 264: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -10567,6 +14222,9 @@ erab_modify_resp_ies_o::value_c erab_modify_resp_ies_o::get_value(const uint32_t case 58: ret.set(value_c::types::crit_diagnostics); break; + case 264: + ret.set(value_c::types::secondary_rat_data_usage_report_list); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -10585,6 +14243,8 @@ presence_e erab_modify_resp_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 58: return presence_e::optional; + case 264: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -10617,6 +14277,11 @@ crit_diagnostics_s& erab_modify_resp_ies_o::value_c::crit_diagnostics() assert_choice_type("CriticalityDiagnostics", type_.to_string(), "Value"); return c.get(); } +secondary_rat_data_usage_report_list_l& erab_modify_resp_ies_o::value_c::secondary_rat_data_usage_report_list() +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& erab_modify_resp_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -10642,6 +14307,12 @@ const crit_diagnostics_s& erab_modify_resp_ies_o::value_c::crit_diagnostics() co assert_choice_type("CriticalityDiagnostics", type_.to_string(), "Value"); return c.get(); } +const secondary_rat_data_usage_report_list_l& +erab_modify_resp_ies_o::value_c::secondary_rat_data_usage_report_list() const +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} void erab_modify_resp_ies_o::value_c::destroy_() { switch (type_) { @@ -10654,6 +14325,9 @@ void erab_modify_resp_ies_o::value_c::destroy_() case types::crit_diagnostics: c.destroy(); break; + case types::secondary_rat_data_usage_report_list: + c.destroy(); + break; default: break; } @@ -10676,6 +14350,9 @@ void erab_modify_resp_ies_o::value_c::set(types::options e) case types::crit_diagnostics: c.init(); break; + case types::secondary_rat_data_usage_report_list: + c.init(); + break; case types::nulltype: break; default: @@ -10701,6 +14378,9 @@ erab_modify_resp_ies_o::value_c::value_c(const erab_modify_resp_ies_o::value_c& case types::crit_diagnostics: c.init(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -10730,6 +14410,9 @@ erab_modify_resp_ies_o::value_c::operator=(const erab_modify_resp_ies_o::value_c case types::crit_diagnostics: c.set(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -10766,6 +14449,13 @@ void erab_modify_resp_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("CriticalityDiagnostics"); c.get().to_json(j); break; + case types::secondary_rat_data_usage_report_list: + j.start_array("SecondaryRATDataUsageReportList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; default: log_invalid_choice_id(type_, "erab_modify_resp_ies_o::value_c"); } @@ -10790,6 +14480,9 @@ SRSASN_CODE erab_modify_resp_ies_o::value_c::pack(bit_ref& bref) const case types::crit_diagnostics: HANDLE_CODE(c.get().pack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; default: log_invalid_choice_id(type_, "erab_modify_resp_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -10815,6 +14508,9 @@ SRSASN_CODE erab_modify_resp_ies_o::value_c::unpack(cbit_ref& bref) case types::crit_diagnostics: HANDLE_CODE(c.get().unpack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; default: log_invalid_choice_id(type_, "erab_modify_resp_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -10828,8 +14524,9 @@ std::string erab_modify_resp_ies_o::value_c::types_opts::to_string() const "INTEGER (0..16777215)", "E-RABModifyListBearerModRes", "E-RABList", - "CriticalityDiagnostics"}; - return convert_enum_idx(options, 5, value, "erab_modify_resp_ies_o::value_c::types"); + "CriticalityDiagnostics", + "SecondaryRATDataUsageReportList"}; + return convert_enum_idx(options, 6, value, "erab_modify_resp_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -10839,7 +14536,8 @@ erab_modify_resp_ies_container::erab_modify_resp_ies_container() : enb_ue_s1ap_id(8, crit_e::ignore), erab_modify_list_bearer_mod_res(31, crit_e::ignore), erab_failed_to_modify_list(32, crit_e::ignore), - crit_diagnostics(58, crit_e::ignore) + crit_diagnostics(58, crit_e::ignore), + secondary_rat_data_usage_report_list(264, crit_e::ignore) {} SRSASN_CODE erab_modify_resp_ies_container::pack(bit_ref& bref) const { @@ -10847,6 +14545,7 @@ SRSASN_CODE erab_modify_resp_ies_container::pack(bit_ref& bref) const nof_ies += erab_modify_list_bearer_mod_res_present ? 1 : 0; nof_ies += erab_failed_to_modify_list_present ? 1 : 0; nof_ies += crit_diagnostics_present ? 1 : 0; + nof_ies += secondary_rat_data_usage_report_list_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -10860,6 +14559,9 @@ SRSASN_CODE erab_modify_resp_ies_container::pack(bit_ref& bref) const if (crit_diagnostics_present) { HANDLE_CODE(crit_diagnostics.pack(bref)); } + if (secondary_rat_data_usage_report_list_present) { + HANDLE_CODE(secondary_rat_data_usage_report_list.pack(bref)); + } return SRSASN_SUCCESS; } @@ -10904,6 +14606,12 @@ SRSASN_CODE erab_modify_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.crit = c.crit; crit_diagnostics.value = c.value.crit_diagnostics(); break; + case 264: + secondary_rat_data_usage_report_list_present = true; + secondary_rat_data_usage_report_list.id = c.id; + secondary_rat_data_usage_report_list.crit = c.crit; + secondary_rat_data_usage_report_list.value = c.value.secondary_rat_data_usage_report_list(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -10935,6 +14643,10 @@ void erab_modify_resp_ies_container::to_json(json_writer& j) const j.write_fieldname(""); crit_diagnostics.to_json(j); } + if (secondary_rat_data_usage_report_list_present) { + j.write_fieldname(""); + secondary_rat_data_usage_report_list.to_json(j); + } j.end_obj(); } @@ -11396,56 +15108,15 @@ void erab_release_cmd_s::to_json(json_writer& j) const j.end_obj(); } -// UserLocationInformation ::= SEQUENCE -SRSASN_CODE user_location_info_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ie_exts_present, 1)); - - HANDLE_CODE(eutran_cgi.pack(bref)); - HANDLE_CODE(tai.pack(bref)); - if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE user_location_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - - HANDLE_CODE(eutran_cgi.unpack(bref)); - HANDLE_CODE(tai.unpack(bref)); - if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void user_location_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("eutran-cgi"); - eutran_cgi.to_json(j); - j.write_fieldname("tai"); - tai.to_json(j); - if (ie_exts_present) { - j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); - } - j.end_obj(); -} - // E-RABReleaseIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_release_ind_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {0, 8, 110, 189}; - return map_enum_number(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 110, 189, 264}; + return map_enum_number(options, 5, idx, "id"); } bool erab_release_ind_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 110, 189}; + static const uint32_t options[] = {0, 8, 110, 189, 264}; for (const auto& o : options) { if (o == id) { return true; @@ -11464,6 +15135,8 @@ crit_e erab_release_ind_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 189: return crit_e::ignore; + case 264: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -11485,6 +15158,9 @@ erab_release_ind_ies_o::value_c erab_release_ind_ies_o::get_value(const uint32_t case 189: ret.set(value_c::types::user_location_info); break; + case 264: + ret.set(value_c::types::secondary_rat_data_usage_report_list); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -11501,6 +15177,8 @@ presence_e erab_release_ind_ies_o::get_presence(const uint32_t& id) return presence_e::mandatory; case 189: return presence_e::optional; + case 264: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -11528,6 +15206,11 @@ user_location_info_s& erab_release_ind_ies_o::value_c::user_location_info() assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); return c.get(); } +secondary_rat_data_usage_report_list_l& erab_release_ind_ies_o::value_c::secondary_rat_data_usage_report_list() +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& erab_release_ind_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -11548,6 +15231,12 @@ const user_location_info_s& erab_release_ind_ies_o::value_c::user_location_info( assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); return c.get(); } +const secondary_rat_data_usage_report_list_l& +erab_release_ind_ies_o::value_c::secondary_rat_data_usage_report_list() const +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} void erab_release_ind_ies_o::value_c::destroy_() { switch (type_) { @@ -11557,6 +15246,9 @@ void erab_release_ind_ies_o::value_c::destroy_() case types::user_location_info: c.destroy(); break; + case types::secondary_rat_data_usage_report_list: + c.destroy(); + break; default: break; } @@ -11576,6 +15268,9 @@ void erab_release_ind_ies_o::value_c::set(types::options e) case types::user_location_info: c.init(); break; + case types::secondary_rat_data_usage_report_list: + c.init(); + break; case types::nulltype: break; default: @@ -11598,6 +15293,9 @@ erab_release_ind_ies_o::value_c::value_c(const erab_release_ind_ies_o::value_c& case types::user_location_info: c.init(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -11624,6 +15322,9 @@ erab_release_ind_ies_o::value_c::operator=(const erab_release_ind_ies_o::value_c case types::user_location_info: c.set(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -11653,6 +15354,13 @@ void erab_release_ind_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("UserLocationInformation"); c.get().to_json(j); break; + case types::secondary_rat_data_usage_report_list: + j.start_array("SecondaryRATDataUsageReportList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; default: log_invalid_choice_id(type_, "erab_release_ind_ies_o::value_c"); } @@ -11674,6 +15382,9 @@ SRSASN_CODE erab_release_ind_ies_o::value_c::pack(bit_ref& bref) const case types::user_location_info: HANDLE_CODE(c.get().pack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; default: log_invalid_choice_id(type_, "erab_release_ind_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -11696,6 +15407,9 @@ SRSASN_CODE erab_release_ind_ies_o::value_c::unpack(cbit_ref& bref) case types::user_location_info: HANDLE_CODE(c.get().unpack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; default: log_invalid_choice_id(type_, "erab_release_ind_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -11705,9 +15419,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 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"); + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RABList", + "UserLocationInformation", + "SecondaryRATDataUsageReportList"}; + return convert_enum_idx(options, 5, value, "erab_release_ind_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -11716,12 +15433,14 @@ erab_release_ind_ies_container::erab_release_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), enb_ue_s1ap_id(8, crit_e::reject), erab_released_list(110, crit_e::ignore), - user_location_info(189, crit_e::ignore) + user_location_info(189, crit_e::ignore), + secondary_rat_data_usage_report_list(264, crit_e::ignore) {} SRSASN_CODE erab_release_ind_ies_container::pack(bit_ref& bref) const { uint32_t nof_ies = 3; nof_ies += user_location_info_present ? 1 : 0; + nof_ies += secondary_rat_data_usage_report_list_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -11730,6 +15449,9 @@ SRSASN_CODE erab_release_ind_ies_container::pack(bit_ref& bref) const if (user_location_info_present) { HANDLE_CODE(user_location_info.pack(bref)); } + if (secondary_rat_data_usage_report_list_present) { + HANDLE_CODE(secondary_rat_data_usage_report_list.pack(bref)); + } return SRSASN_SUCCESS; } @@ -11768,6 +15490,12 @@ SRSASN_CODE erab_release_ind_ies_container::unpack(cbit_ref& bref) user_location_info.crit = c.crit; user_location_info.value = c.value.user_location_info(); break; + case 264: + secondary_rat_data_usage_report_list_present = true; + secondary_rat_data_usage_report_list.id = c.id; + secondary_rat_data_usage_report_list.crit = c.crit; + secondary_rat_data_usage_report_list.value = c.value.secondary_rat_data_usage_report_list(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -11793,6 +15521,10 @@ void erab_release_ind_ies_container::to_json(json_writer& j) const j.write_fieldname(""); user_location_info.to_json(j); } + if (secondary_rat_data_usage_report_list_present) { + j.write_fieldname(""); + secondary_rat_data_usage_report_list.to_json(j); + } j.end_obj(); } @@ -11922,12 +15654,12 @@ template struct asn1::s1ap::protocol_ie_single_container_s(); } +secondary_rat_data_usage_report_list_l& erab_release_resp_ies_o::value_c::secondary_rat_data_usage_report_list() +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& erab_release_resp_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -12064,6 +15808,12 @@ const user_location_info_s& erab_release_resp_ies_o::value_c::user_location_info assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); return c.get(); } +const secondary_rat_data_usage_report_list_l& +erab_release_resp_ies_o::value_c::secondary_rat_data_usage_report_list() const +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} void erab_release_resp_ies_o::value_c::destroy_() { switch (type_) { @@ -12079,6 +15829,9 @@ void erab_release_resp_ies_o::value_c::destroy_() case types::user_location_info: c.destroy(); break; + case types::secondary_rat_data_usage_report_list: + c.destroy(); + break; default: break; } @@ -12104,6 +15857,9 @@ void erab_release_resp_ies_o::value_c::set(types::options e) case types::user_location_info: c.init(); break; + case types::secondary_rat_data_usage_report_list: + c.init(); + break; case types::nulltype: break; default: @@ -12132,6 +15888,9 @@ erab_release_resp_ies_o::value_c::value_c(const erab_release_resp_ies_o::value_c case types::user_location_info: c.init(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -12164,6 +15923,9 @@ erab_release_resp_ies_o::value_c::operator=(const erab_release_resp_ies_o::value case types::user_location_info: c.set(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -12204,6 +15966,13 @@ void erab_release_resp_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("UserLocationInformation"); c.get().to_json(j); break; + case types::secondary_rat_data_usage_report_list: + j.start_array("SecondaryRATDataUsageReportList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; default: log_invalid_choice_id(type_, "erab_release_resp_ies_o::value_c"); } @@ -12231,6 +16000,9 @@ SRSASN_CODE erab_release_resp_ies_o::value_c::pack(bit_ref& bref) const case types::user_location_info: HANDLE_CODE(c.get().pack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; default: log_invalid_choice_id(type_, "erab_release_resp_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -12259,6 +16031,9 @@ SRSASN_CODE erab_release_resp_ies_o::value_c::unpack(cbit_ref& bref) case types::user_location_info: HANDLE_CODE(c.get().unpack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; default: log_invalid_choice_id(type_, "erab_release_resp_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -12273,8 +16048,9 @@ std::string erab_release_resp_ies_o::value_c::types_opts::to_string() const "E-RABReleaseListBearerRelComp", "E-RABList", "CriticalityDiagnostics", - "UserLocationInformation"}; - return convert_enum_idx(options, 6, value, "erab_release_resp_ies_o::value_c::types"); + "UserLocationInformation", + "SecondaryRATDataUsageReportList"}; + return convert_enum_idx(options, 7, value, "erab_release_resp_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -12285,7 +16061,8 @@ erab_release_resp_ies_container::erab_release_resp_ies_container() : erab_release_list_bearer_rel_comp(69, crit_e::ignore), erab_failed_to_release_list(34, crit_e::ignore), crit_diagnostics(58, crit_e::ignore), - user_location_info(189, crit_e::ignore) + user_location_info(189, crit_e::ignore), + secondary_rat_data_usage_report_list(264, crit_e::ignore) {} SRSASN_CODE erab_release_resp_ies_container::pack(bit_ref& bref) const { @@ -12294,6 +16071,7 @@ SRSASN_CODE erab_release_resp_ies_container::pack(bit_ref& bref) const nof_ies += erab_failed_to_release_list_present ? 1 : 0; nof_ies += crit_diagnostics_present ? 1 : 0; nof_ies += user_location_info_present ? 1 : 0; + nof_ies += secondary_rat_data_usage_report_list_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -12310,6 +16088,9 @@ SRSASN_CODE erab_release_resp_ies_container::pack(bit_ref& bref) const if (user_location_info_present) { HANDLE_CODE(user_location_info.pack(bref)); } + if (secondary_rat_data_usage_report_list_present) { + HANDLE_CODE(secondary_rat_data_usage_report_list.pack(bref)); + } return SRSASN_SUCCESS; } @@ -12360,6 +16141,12 @@ SRSASN_CODE erab_release_resp_ies_container::unpack(cbit_ref& bref) user_location_info.crit = c.crit; user_location_info.value = c.value.user_location_info(); break; + case 264: + secondary_rat_data_usage_report_list_present = true; + secondary_rat_data_usage_report_list.id = c.id; + secondary_rat_data_usage_report_list.crit = c.crit; + secondary_rat_data_usage_report_list.value = c.value.secondary_rat_data_usage_report_list(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -12395,6 +16182,10 @@ void erab_release_resp_ies_container::to_json(json_writer& j) const j.write_fieldname(""); user_location_info.to_json(j); } + if (secondary_rat_data_usage_report_list_present) { + j.write_fieldname(""); + secondary_rat_data_usage_report_list.to_json(j); + } j.end_obj(); } @@ -14870,88 +18661,268 @@ presence_e erab_to_be_switched_ul_item_ies_o::get_presence(const uint32_t& id) void erab_to_be_switched_ul_item_ies_o::value_c::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("E-RABToBeSwitchedULItem"); - c.to_json(j); + j.write_fieldname("E-RABToBeSwitchedULItem"); + c.to_json(j); + j.end_obj(); +} +SRSASN_CODE erab_to_be_switched_ul_item_ies_o::value_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE erab_to_be_switched_ul_item_ies_o::value_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string erab_to_be_switched_ul_item_ies_o::value_c::types_opts::to_string() const +{ + static const char* options[] = {"E-RABToBeSwitchedULItem"}; + return convert_enum_idx(options, 1, value, "erab_to_be_switched_ul_item_ies_o::value_c::types"); +} + +// EHRPDMultiSectorLoadReportingResponseItem ::= SEQUENCE +SRSASN_CODE ehrpd_multi_sector_load_report_resp_item_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(ehrpd_sector_id.pack(bref)); + HANDLE_CODE(ehrpd_sector_load_report_resp.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ehrpd_multi_sector_load_report_resp_item_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(ehrpd_sector_id.unpack(bref)); + HANDLE_CODE(ehrpd_sector_load_report_resp.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ehrpd_multi_sector_load_report_resp_item_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("eHRPD-Sector-ID", ehrpd_sector_id.to_string()); + j.write_fieldname("eHRPDSectorLoadReportingResponse"); + ehrpd_sector_load_report_resp.to_json(j); + j.end_obj(); +} + +// ENBX2ExtTLA ::= SEQUENCE +SRSASN_CODE enbx2_ext_tla_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ipsec_tla_present, 1)); + HANDLE_CODE(bref.pack(gtptl_aa_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + if (ipsec_tla_present) { + HANDLE_CODE(ipsec_tla.pack(bref)); + } + if (gtptl_aa_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, gtptl_aa, 1, 16, true)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE enbx2_ext_tla_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ipsec_tla_present, 1)); + HANDLE_CODE(bref.unpack(gtptl_aa_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + if (ipsec_tla_present) { + HANDLE_CODE(ipsec_tla.unpack(bref)); + } + if (gtptl_aa_present) { + HANDLE_CODE(unpack_dyn_seq_of(gtptl_aa, bref, 1, 16, true)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void enbx2_ext_tla_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ipsec_tla_present) { + j.write_str("iPsecTLA", ipsec_tla.to_string()); + } + if (gtptl_aa_present) { + j.start_array("gTPTLAa"); + for (const auto& e1 : gtptl_aa) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// MutingAvailabilityIndication ::= ENUMERATED +std::string muting_availability_ind_opts::to_string() const +{ + static const char* options[] = {"available", "unavailable"}; + return convert_enum_idx(options, 2, value, "muting_availability_ind_e"); +} + +// RLFReportInformation ::= SEQUENCE +SRSASN_CODE rlf_report_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ue_rlf_report_container_for_extended_bands_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(ue_rlf_report_container.pack(bref)); + if (ue_rlf_report_container_for_extended_bands_present) { + HANDLE_CODE(ue_rlf_report_container_for_extended_bands.pack(bref)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ue_rlf_report_container_for_extended_bands_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(ue_rlf_report_container.unpack(bref)); + if (ue_rlf_report_container_for_extended_bands_present) { + HANDLE_CODE(ue_rlf_report_container_for_extended_bands.unpack(bref)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rlf_report_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("uE-RLF-Report-Container", ue_rlf_report_container.to_string()); + if (ue_rlf_report_container_for_extended_bands_present) { + j.write_str("uE-RLF-Report-Container-for-extended-bands", ue_rlf_report_container_for_extended_bands.to_string()); + } + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// SynchronisationStatus ::= ENUMERATED +std::string synchronisation_status_opts::to_string() const +{ + 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 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) +{ + return 207 == id; +} +crit_e time_synchronisation_info_ext_ies_o::get_crit(const uint32_t& id) +{ + if (id == 207) { + return crit_e::ignore; + } + asn1::log_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{}; + if (id != 207) { + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e time_synchronisation_info_ext_ies_o::get_presence(const uint32_t& id) +{ + if (id == 207) { + return presence_e::optional; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} + +// Extension ::= OPEN TYPE +void time_synchronisation_info_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("MutingAvailabilityIndication", c.to_string()); j.end_obj(); } -SRSASN_CODE erab_to_be_switched_ul_item_ies_o::value_c::pack(bit_ref& bref) const +SRSASN_CODE time_synchronisation_info_ext_ies_o::ext_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); HANDLE_CODE(c.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE erab_to_be_switched_ul_item_ies_o::value_c::unpack(cbit_ref& bref) +SRSASN_CODE time_synchronisation_info_ext_ies_o::ext_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); HANDLE_CODE(c.unpack(bref)); return SRSASN_SUCCESS; } -std::string erab_to_be_switched_ul_item_ies_o::value_c::types_opts::to_string() const -{ - static const char* options[] = {"E-RABToBeSwitchedULItem"}; - return convert_enum_idx(options, 1, value, "erab_to_be_switched_ul_item_ies_o::value_c::types"); -} - -// EHRPDMultiSectorLoadReportingResponseItem ::= SEQUENCE -SRSASN_CODE ehrpd_multi_sector_load_report_resp_item_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(ehrpd_sector_id.pack(bref)); - HANDLE_CODE(ehrpd_sector_load_report_resp.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ehrpd_multi_sector_load_report_resp_item_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(ehrpd_sector_id.unpack(bref)); - HANDLE_CODE(ehrpd_sector_load_report_resp.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ehrpd_multi_sector_load_report_resp_item_s::to_json(json_writer& j) const +std::string time_synchronisation_info_ext_ies_o::ext_c::types_opts::to_string() const { - j.start_obj(); - j.write_str("eHRPD-Sector-ID", ehrpd_sector_id.to_string()); - j.write_fieldname("eHRPDSectorLoadReportingResponse"); - ehrpd_sector_load_report_resp.to_json(j); - j.end_obj(); + static const char* options[] = {"MutingAvailabilityIndication"}; + return convert_enum_idx(options, 1, value, "time_synchronisation_info_ext_ies_o::ext_c::types"); } -// ENB-StatusTransfer-TransparentContainer ::= SEQUENCE -SRSASN_CODE enb_status_transfer_transparent_container_s::pack(bit_ref& bref) const +// Global-en-gNB-ID ::= SEQUENCE +SRSASN_CODE global_en_g_nb_id_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(pack_dyn_seq_of(bref, bearers_subject_to_status_transfer_list, 1, 256, true)); + HANDLE_CODE(plm_nid.pack(bref)); + HANDLE_CODE(en_g_nb_id.pack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE enb_status_transfer_transparent_container_s::unpack(cbit_ref& bref) +SRSASN_CODE global_en_g_nb_id_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(unpack_dyn_seq_of(bearers_subject_to_status_transfer_list, bref, 1, 256, true)); + HANDLE_CODE(plm_nid.unpack(bref)); + HANDLE_CODE(en_g_nb_id.unpack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void enb_status_transfer_transparent_container_s::to_json(json_writer& j) const +void global_en_g_nb_id_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("bearers-SubjectToStatusTransferList"); - for (const auto& e1 : bearers_subject_to_status_transfer_list) { - e1.to_json(j); - } - j.end_array(); + j.write_str("pLMNidentity", plm_nid.to_string()); + j.write_str("en-gNB-ID", en_g_nb_id.to_string()); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -14959,38 +18930,46 @@ void enb_status_transfer_transparent_container_s::to_json(json_writer& j) const j.end_obj(); } -// S-TMSI ::= SEQUENCE -SRSASN_CODE s_tmsi_s::pack(bit_ref& bref) const +// MutingPatternInformation ::= SEQUENCE +SRSASN_CODE muting_pattern_info_s::pack(bit_ref& bref) const { bref.pack(ext, 1); + HANDLE_CODE(bref.pack(muting_pattern_offset_present, 1)); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(mmec.pack(bref)); - HANDLE_CODE(m_tmsi.pack(bref)); + HANDLE_CODE(muting_pattern_period.pack(bref)); + if (muting_pattern_offset_present) { + HANDLE_CODE(pack_integer(bref, muting_pattern_offset, (uint16_t)0u, (uint16_t)10239u, true, true)); + } if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE s_tmsi_s::unpack(cbit_ref& bref) +SRSASN_CODE muting_pattern_info_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(muting_pattern_offset_present, 1)); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(mmec.unpack(bref)); - HANDLE_CODE(m_tmsi.unpack(bref)); + HANDLE_CODE(muting_pattern_period.unpack(bref)); + if (muting_pattern_offset_present) { + HANDLE_CODE(unpack_integer(muting_pattern_offset, bref, (uint16_t)0u, (uint16_t)10239u, true, true)); + } if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void s_tmsi_s::to_json(json_writer& j) const +void muting_pattern_info_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("mMEC", mmec.to_string()); - j.write_str("m-TMSI", m_tmsi.to_string()); + j.write_str("muting-pattern-period", muting_pattern_period.to_string()); + if (muting_pattern_offset_present) { + j.write_int("muting-pattern-offset", muting_pattern_offset); + } if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -14998,54 +18977,96 @@ void s_tmsi_s::to_json(json_writer& j) const j.end_obj(); } -// UL-CP-SecurityInformation ::= SEQUENCE -SRSASN_CODE ul_cp_security_info_s::pack(bit_ref& bref) const +std::string muting_pattern_info_s::muting_pattern_period_opts::to_string() const +{ + 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 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 +void son_info_report_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rLFReportInformation"); + c.to_json(j); + j.end_obj(); +} +SRSASN_CODE son_info_report_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type()); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE son_info_report_c::unpack(cbit_ref& bref) +{ + types e; + unpack_enum(e, bref); + if (e != type()) { + log_invalid_choice_id(e, "son_info_report_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string son_info_report_c::types_opts::to_string() const +{ + static const char* options[] = {"rLFReportInformation"}; + return convert_enum_idx(options, 1, value, "son_info_report_c::types"); +} + +// TimeSynchronisationInfo ::= SEQUENCE +SRSASN_CODE time_synchronisation_info_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(ul_nas_mac.pack(bref)); - HANDLE_CODE(ul_nas_count.pack(bref)); + HANDLE_CODE(pack_integer(bref, stratum_level, (uint8_t)0u, (uint8_t)3u, true, true)); + HANDLE_CODE(synchronisation_status.pack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; } -SRSASN_CODE ul_cp_security_info_s::unpack(cbit_ref& bref) +SRSASN_CODE time_synchronisation_info_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(ul_nas_mac.unpack(bref)); - HANDLE_CODE(ul_nas_count.unpack(bref)); + HANDLE_CODE(unpack_integer(stratum_level, bref, (uint8_t)0u, (uint8_t)3u, true, true)); + HANDLE_CODE(synchronisation_status.unpack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; } -void ul_cp_security_info_s::to_json(json_writer& j) const +void time_synchronisation_info_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("ul-NAS-MAC", ul_nas_mac.to_string()); - j.write_str("ul-NAS-Count", ul_nas_count.to_string()); + j.write_int("stratumLevel", stratum_level); + j.write_str("synchronisationStatus", synchronisation_status.to_string()); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } -// ENBCPRelocationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES -uint32_t enbcp_relocation_ind_ies_o::idx_to_id(uint32_t idx) +// X2TNLConfigurationInfo-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t x2_tnl_cfg_info_ext_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {8, 96, 100, 67, 254}; - return map_enum_number(options, 5, idx, "id"); + static const uint32_t options[] = {153, 193}; + return map_enum_number(options, 2, idx, "id"); } -bool enbcp_relocation_ind_ies_o::is_id_valid(const uint32_t& id) +bool x2_tnl_cfg_info_ext_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {8, 96, 100, 67, 254}; + static const uint32_t options[] = {153, 193}; for (const auto& o : options) { if (o == id) { return true; @@ -15053,474 +19074,274 @@ bool enbcp_relocation_ind_ies_o::is_id_valid(const uint32_t& id) } return false; } -crit_e enbcp_relocation_ind_ies_o::get_crit(const uint32_t& id) +crit_e x2_tnl_cfg_info_ext_ies_o::get_crit(const uint32_t& id) { switch (id) { - case 8: - return crit_e::reject; - case 96: - return crit_e::reject; - case 100: + case 153: return crit_e::ignore; - case 67: + case 193: return crit_e::ignore; - case 254: - return crit_e::reject; default: asn1::log_error("The id=%d is not recognized", id); } return {}; } -enbcp_relocation_ind_ies_o::value_c enbcp_relocation_ind_ies_o::get_value(const uint32_t& id) +x2_tnl_cfg_info_ext_ies_o::ext_c x2_tnl_cfg_info_ext_ies_o::get_ext(const uint32_t& id) { - value_c ret{}; + ext_c ret{}; switch (id) { - case 8: - ret.set(value_c::types::enb_ue_s1ap_id); - break; - case 96: - ret.set(value_c::types::s_tmsi); - break; - case 100: - ret.set(value_c::types::eutran_cgi); - break; - case 67: - ret.set(value_c::types::tai); + case 153: + ret.set(ext_c::types::enbx2_extended_transport_layer_addresses); break; - case 254: - ret.set(value_c::types::ul_cp_security_info); + case 193: + ret.set(ext_c::types::enb_indirect_x2_transport_layer_addresses); break; default: asn1::log_error("The id=%d is not recognized", id); } return ret; } -presence_e enbcp_relocation_ind_ies_o::get_presence(const uint32_t& id) +presence_e x2_tnl_cfg_info_ext_ies_o::get_presence(const uint32_t& id) { switch (id) { - case 8: - return presence_e::mandatory; - case 96: - return presence_e::mandatory; - case 100: - return presence_e::mandatory; - case 67: - return presence_e::mandatory; - case 254: - return presence_e::mandatory; + case 153: + return presence_e::optional; + case 193: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } return {}; } -// Value ::= OPEN TYPE -uint32_t& enbcp_relocation_ind_ies_o::value_c::enb_ue_s1ap_id() -{ - assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); - return c.get(); -} -s_tmsi_s& enbcp_relocation_ind_ies_o::value_c::s_tmsi() -{ - assert_choice_type("S-TMSI", type_.to_string(), "Value"); - return c.get(); -} -eutran_cgi_s& enbcp_relocation_ind_ies_o::value_c::eutran_cgi() -{ - assert_choice_type("EUTRAN-CGI", type_.to_string(), "Value"); - return c.get(); -} -tai_s& enbcp_relocation_ind_ies_o::value_c::tai() -{ - assert_choice_type("TAI", type_.to_string(), "Value"); - return c.get(); -} -ul_cp_security_info_s& enbcp_relocation_ind_ies_o::value_c::ul_cp_security_info() -{ - assert_choice_type("UL-CP-SecurityInformation", type_.to_string(), "Value"); - return c.get(); -} -const uint32_t& enbcp_relocation_ind_ies_o::value_c::enb_ue_s1ap_id() const -{ - assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); - return c.get(); -} -const s_tmsi_s& enbcp_relocation_ind_ies_o::value_c::s_tmsi() const +// Extension ::= OPEN TYPE +enbx2_ext_tlas_l& x2_tnl_cfg_info_ext_ies_o::ext_c::enbx2_extended_transport_layer_addresses() { - assert_choice_type("S-TMSI", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("ENBX2ExtTLAs", type_.to_string(), "Extension"); + return c.get(); } -const eutran_cgi_s& enbcp_relocation_ind_ies_o::value_c::eutran_cgi() const +enb_indirect_x2_transport_layer_addresses_l& +x2_tnl_cfg_info_ext_ies_o::ext_c::enb_indirect_x2_transport_layer_addresses() { - assert_choice_type("EUTRAN-CGI", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("ENBIndirectX2TransportLayerAddresses", type_.to_string(), "Extension"); + return c.get(); } -const tai_s& enbcp_relocation_ind_ies_o::value_c::tai() const +const enbx2_ext_tlas_l& x2_tnl_cfg_info_ext_ies_o::ext_c::enbx2_extended_transport_layer_addresses() const { - assert_choice_type("TAI", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("ENBX2ExtTLAs", type_.to_string(), "Extension"); + return c.get(); } -const ul_cp_security_info_s& enbcp_relocation_ind_ies_o::value_c::ul_cp_security_info() const +const enb_indirect_x2_transport_layer_addresses_l& +x2_tnl_cfg_info_ext_ies_o::ext_c::enb_indirect_x2_transport_layer_addresses() const { - assert_choice_type("UL-CP-SecurityInformation", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("ENBIndirectX2TransportLayerAddresses", type_.to_string(), "Extension"); + return c.get(); } -void enbcp_relocation_ind_ies_o::value_c::destroy_() +void x2_tnl_cfg_info_ext_ies_o::ext_c::destroy_() { switch (type_) { - case types::s_tmsi: - c.destroy(); - break; - case types::eutran_cgi: - c.destroy(); - break; - case types::tai: - c.destroy(); + case types::enbx2_extended_transport_layer_addresses: + c.destroy(); break; - case types::ul_cp_security_info: - c.destroy(); + case types::enb_indirect_x2_transport_layer_addresses: + c.destroy(); break; default: break; } } -void enbcp_relocation_ind_ies_o::value_c::set(types::options e) +void x2_tnl_cfg_info_ext_ies_o::ext_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::enb_ue_s1ap_id: - break; - case types::s_tmsi: - c.init(); - break; - case types::eutran_cgi: - c.init(); - break; - case types::tai: - c.init(); + case types::enbx2_extended_transport_layer_addresses: + c.init(); break; - case types::ul_cp_security_info: - c.init(); + case types::enb_indirect_x2_transport_layer_addresses: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); } } -enbcp_relocation_ind_ies_o::value_c::value_c(const enbcp_relocation_ind_ies_o::value_c& other) +x2_tnl_cfg_info_ext_ies_o::ext_c::ext_c(const x2_tnl_cfg_info_ext_ies_o::ext_c& other) { type_ = other.type(); switch (type_) { - case types::enb_ue_s1ap_id: - c.init(other.c.get()); - break; - case types::s_tmsi: - c.init(other.c.get()); - break; - case types::eutran_cgi: - c.init(other.c.get()); - break; - case types::tai: - c.init(other.c.get()); + case types::enbx2_extended_transport_layer_addresses: + c.init(other.c.get()); break; - case types::ul_cp_security_info: - c.init(other.c.get()); + case types::enb_indirect_x2_transport_layer_addresses: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); } } -enbcp_relocation_ind_ies_o::value_c& -enbcp_relocation_ind_ies_o::value_c::operator=(const enbcp_relocation_ind_ies_o::value_c& other) +x2_tnl_cfg_info_ext_ies_o::ext_c& +x2_tnl_cfg_info_ext_ies_o::ext_c::operator=(const x2_tnl_cfg_info_ext_ies_o::ext_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::enb_ue_s1ap_id: - c.set(other.c.get()); - break; - case types::s_tmsi: - c.set(other.c.get()); - break; - case types::eutran_cgi: - c.set(other.c.get()); - break; - case types::tai: - c.set(other.c.get()); + case types::enbx2_extended_transport_layer_addresses: + c.set(other.c.get()); break; - case types::ul_cp_security_info: - c.set(other.c.get()); + case types::enb_indirect_x2_transport_layer_addresses: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); } return *this; } -void enbcp_relocation_ind_ies_o::value_c::to_json(json_writer& j) const +void x2_tnl_cfg_info_ext_ies_o::ext_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::enb_ue_s1ap_id: - j.write_int("INTEGER (0..16777215)", c.get()); - break; - case types::s_tmsi: - j.write_fieldname("S-TMSI"); - c.get().to_json(j); - break; - case types::eutran_cgi: - j.write_fieldname("EUTRAN-CGI"); - c.get().to_json(j); - break; - case types::tai: - j.write_fieldname("TAI"); - c.get().to_json(j); + case types::enbx2_extended_transport_layer_addresses: + j.start_array("ENBX2ExtTLAs"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); break; - case types::ul_cp_security_info: - j.write_fieldname("UL-CP-SecurityInformation"); - c.get().to_json(j); + case types::enb_indirect_x2_transport_layer_addresses: + j.start_array("ENBIndirectX2TransportLayerAddresses"); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); + } + j.end_array(); break; default: - log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); + log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); } j.end_obj(); } -SRSASN_CODE enbcp_relocation_ind_ies_o::value_c::pack(bit_ref& bref) const +SRSASN_CODE x2_tnl_cfg_info_ext_ies_o::ext_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); switch (type_) { - case types::enb_ue_s1ap_id: - HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); - break; - case types::s_tmsi: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutran_cgi: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::tai: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_cp_security_info: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE enbcp_relocation_ind_ies_o::value_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::enb_ue_s1ap_id: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); - break; - case types::s_tmsi: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutran_cgi: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::tai: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_cp_security_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string enbcp_relocation_ind_ies_o::value_c::types_opts::to_string() const -{ - 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 const uint8_t options[] = {0}; - return map_enum_number(options, 1, value, "enbcp_relocation_ind_ies_o::value_c::types"); -} - -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), - s_tmsi(96, crit_e::reject), - eutran_cgi(100, crit_e::ignore), - tai(67, crit_e::ignore), - ul_cp_security_info(254, crit_e::reject) -{} -SRSASN_CODE enbcp_relocation_ind_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 5; - pack_length(bref, nof_ies, 0u, 65535u, true); - - HANDLE_CODE(enb_ue_s1ap_id.pack(bref)); - HANDLE_CODE(s_tmsi.pack(bref)); - HANDLE_CODE(eutran_cgi.pack(bref)); - HANDLE_CODE(tai.pack(bref)); - HANDLE_CODE(ul_cp_security_info.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE enbcp_relocation_ind_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - uint32_t nof_mandatory_ies = 5; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 8: - nof_mandatory_ies--; - enb_ue_s1ap_id.id = c.id; - enb_ue_s1ap_id.crit = c.crit; - enb_ue_s1ap_id.value = c.value.enb_ue_s1ap_id(); - break; - case 96: - nof_mandatory_ies--; - s_tmsi.id = c.id; - s_tmsi.crit = c.crit; - s_tmsi.value = c.value.s_tmsi(); - break; - case 100: - nof_mandatory_ies--; - eutran_cgi.id = c.id; - eutran_cgi.crit = c.crit; - eutran_cgi.value = c.value.eutran_cgi(); - break; - case 67: - nof_mandatory_ies--; - tai.id = c.id; - tai.crit = c.crit; - tai.value = c.value.tai(); - break; - case 254: - nof_mandatory_ies--; - ul_cp_security_info.id = c.id; - ul_cp_security_info.crit = c.crit; - ul_cp_security_info.value = c.value.ul_cp_security_info(); - break; - default: - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } + case types::enbx2_extended_transport_layer_addresses: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16, true)); + break; + case types::enb_indirect_x2_transport_layer_addresses: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 2, true)); + break; + default: + log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); + return SRSASN_ERROR_ENCODE_FAIL; } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; + return SRSASN_SUCCESS; +} +SRSASN_CODE x2_tnl_cfg_info_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + switch (type_) { + case types::enbx2_extended_transport_layer_addresses: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16, true)); + break; + case types::enb_indirect_x2_transport_layer_addresses: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 2, true)); + break; + default: + log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void enbcp_relocation_ind_ies_container::to_json(json_writer& j) const + +std::string x2_tnl_cfg_info_ext_ies_o::ext_c::types_opts::to_string() const { - j.start_obj(); - j.write_fieldname(""); - enb_ue_s1ap_id.to_json(j); - j.write_fieldname(""); - s_tmsi.to_json(j); - j.write_fieldname(""); - eutran_cgi.to_json(j); - j.write_fieldname(""); - tai.to_json(j); - j.write_fieldname(""); - ul_cp_security_info.to_json(j); - j.end_obj(); + static const char* options[] = {"ENBX2ExtTLAs", "ENBIndirectX2TransportLayerAddresses"}; + return convert_enum_idx(options, 2, value, "x2_tnl_cfg_info_ext_ies_o::ext_c::types"); } -// ENBCPRelocationIndication ::= SEQUENCE -SRSASN_CODE enbcp_relocation_ind_s::pack(bit_ref& bref) const +// EN-DCSONeNBIdentification ::= SEQUENCE +SRSASN_CODE en_dcso_nenb_identif_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(globalenbid.pack(bref)); + HANDLE_CODE(sel_tai.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE enbcp_relocation_ind_s::unpack(cbit_ref& bref) +SRSASN_CODE en_dcso_nenb_identif_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(globalenbid.unpack(bref)); + HANDLE_CODE(sel_tai.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } return SRSASN_SUCCESS; } -void enbcp_relocation_ind_s::to_json(json_writer& j) const +void en_dcso_nenb_identif_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); + j.write_fieldname("globaleNBID"); + globalenbid.to_json(j); + j.write_fieldname("selectedTAI"); + sel_tai.to_json(j); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } j.end_obj(); } -// ENBX2ExtTLA ::= SEQUENCE -SRSASN_CODE enbx2_ext_tla_s::pack(bit_ref& bref) const +// EN-DCSONengNBIdentification ::= SEQUENCE +SRSASN_CODE en_dcso_neng_nb_identif_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ipsec_tla_present, 1)); - HANDLE_CODE(bref.pack(gtptl_aa_present, 1)); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - if (ipsec_tla_present) { - HANDLE_CODE(ipsec_tla.pack(bref)); - } - if (gtptl_aa_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, gtptl_aa, 1, 16, true)); - } + HANDLE_CODE(globaleng_nbid.pack(bref)); + HANDLE_CODE(sel_tai.pack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE enbx2_ext_tla_s::unpack(cbit_ref& bref) +SRSASN_CODE en_dcso_neng_nb_identif_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ipsec_tla_present, 1)); - HANDLE_CODE(bref.unpack(gtptl_aa_present, 1)); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - if (ipsec_tla_present) { - HANDLE_CODE(ipsec_tla.unpack(bref)); - } - if (gtptl_aa_present) { - HANDLE_CODE(unpack_dyn_seq_of(gtptl_aa, bref, 1, 16, true)); - } + HANDLE_CODE(globaleng_nbid.unpack(bref)); + HANDLE_CODE(sel_tai.unpack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void enbx2_ext_tla_s::to_json(json_writer& j) const +void en_dcso_neng_nb_identif_s::to_json(json_writer& j) const { j.start_obj(); - if (ipsec_tla_present) { - j.write_str("iPsecTLA", ipsec_tla.to_string()); - } - if (gtptl_aa_present) { - j.start_array("gTPTLAa"); - for (const auto& e1 : gtptl_aa) { - j.write_str(e1.to_string()); - } - j.end_array(); - } + j.write_fieldname("globalengNBID"); + globaleng_nbid.to_json(j); + j.write_fieldname("selectedTAI"); + sel_tai.to_json(j); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -15528,53 +19349,38 @@ void enbx2_ext_tla_s::to_json(json_writer& j) const j.end_obj(); } -// MutingAvailabilityIndication ::= ENUMERATED -std::string muting_availability_ind_opts::to_string() const -{ - static const char* options[] = {"available", "unavailable"}; - return convert_enum_idx(options, 2, value, "muting_availability_ind_e"); -} - -// RLFReportInformation ::= SEQUENCE -SRSASN_CODE rlf_report_info_s::pack(bit_ref& bref) const +// FiveGSTAI ::= SEQUENCE +SRSASN_CODE five_gstai_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ue_rlf_report_container_for_extended_bands_present, 1)); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(ue_rlf_report_container.pack(bref)); - if (ue_rlf_report_container_for_extended_bands_present) { - HANDLE_CODE(ue_rlf_report_container_for_extended_bands.pack(bref)); - } + HANDLE_CODE(plm_nid.pack(bref)); + HANDLE_CODE(five_gstac.pack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE rlf_report_info_s::unpack(cbit_ref& bref) +SRSASN_CODE five_gstai_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ue_rlf_report_container_for_extended_bands_present, 1)); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(ue_rlf_report_container.unpack(bref)); - if (ue_rlf_report_container_for_extended_bands_present) { - HANDLE_CODE(ue_rlf_report_container_for_extended_bands.unpack(bref)); - } + HANDLE_CODE(plm_nid.unpack(bref)); + HANDLE_CODE(five_gstac.unpack(bref)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void rlf_report_info_s::to_json(json_writer& j) const +void five_gstai_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("uE-RLF-Report-Container", ue_rlf_report_container.to_string()); - if (ue_rlf_report_container_for_extended_bands_present) { - j.write_str("uE-RLF-Report-Container-for-extended-bands", ue_rlf_report_container_for_extended_bands.to_string()); - } + j.write_str("pLMNidentity", plm_nid.to_string()); + j.write_str("fiveGSTAC", five_gstac.to_string()); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -15582,42 +19388,97 @@ void rlf_report_info_s::to_json(json_writer& j) const j.end_obj(); } -// SynchronisationStatus ::= ENUMERATED -std::string synchronisation_status_opts::to_string() const +// SONInformation-ExtensionIE ::= OBJECT SET OF S1AP-PROTOCOL-IES +uint32_t son_info_ext_ie_o::idx_to_id(uint32_t idx) { - static const char* options[] = {"synchronous", "asynchronous"}; - return convert_enum_idx(options, 2, value, "synchronisation_status_e"); + 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) +{ + return 206 == id; +} +crit_e son_info_ext_ie_o::get_crit(const uint32_t& id) +{ + if (id == 206) { + return crit_e::ignore; + } + asn1::log_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{}; + if (id != 206) { + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e son_info_ext_ie_o::get_presence(const uint32_t& id) +{ + if (id == 206) { + return presence_e::mandatory; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; } -// TimeSynchronisationInfo-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -uint32_t time_synchronisation_info_ext_ies_o::idx_to_id(uint32_t idx) +// Value ::= OPEN TYPE +void son_info_ext_ie_o::value_c::to_json(json_writer& j) const { - static const uint32_t options[] = {207}; + j.start_obj(); + j.write_fieldname("SONInformationReport"); + c.to_json(j); + j.end_obj(); +} +SRSASN_CODE son_info_ext_ie_o::value_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE son_info_ext_ie_o::value_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string son_info_ext_ie_o::value_c::types_opts::to_string() const +{ + 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 const uint32_t options[] = {149}; return map_enum_number(options, 1, idx, "id"); } -bool time_synchronisation_info_ext_ies_o::is_id_valid(const uint32_t& id) +bool son_info_reply_ext_ies_o::is_id_valid(const uint32_t& id) { - return 207 == id; + return 149 == id; } -crit_e time_synchronisation_info_ext_ies_o::get_crit(const uint32_t& id) +crit_e son_info_reply_ext_ies_o::get_crit(const uint32_t& id) { - if (id == 207) { + if (id == 149) { return crit_e::ignore; } asn1::log_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) +son_info_reply_ext_ies_o::ext_c son_info_reply_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - if (id != 207) { + if (id != 149) { asn1::log_error("The id=%d is not recognized", id); } return ret; } -presence_e time_synchronisation_info_ext_ies_o::get_presence(const uint32_t& id) +presence_e son_info_reply_ext_ies_o::get_presence(const uint32_t& id) { - if (id == 207) { + if (id == 149) { return presence_e::optional; } asn1::log_error("The id=%d is not recognized", id); @@ -15625,71 +19486,130 @@ presence_e time_synchronisation_info_ext_ies_o::get_presence(const uint32_t& id) } // Extension ::= OPEN TYPE -void time_synchronisation_info_ext_ies_o::ext_c::to_json(json_writer& j) const +void son_info_reply_ext_ies_o::ext_c::to_json(json_writer& j) const { j.start_obj(); - j.write_str("MutingAvailabilityIndication", c.to_string()); + j.write_fieldname("TimeSynchronisationInfo"); + c.to_json(j); j.end_obj(); } -SRSASN_CODE time_synchronisation_info_ext_ies_o::ext_c::pack(bit_ref& bref) const +SRSASN_CODE son_info_reply_ext_ies_o::ext_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); HANDLE_CODE(c.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE time_synchronisation_info_ext_ies_o::ext_c::unpack(cbit_ref& bref) +SRSASN_CODE son_info_reply_ext_ies_o::ext_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); HANDLE_CODE(c.unpack(bref)); return SRSASN_SUCCESS; } -std::string time_synchronisation_info_ext_ies_o::ext_c::types_opts::to_string() const +std::string son_info_reply_ext_ies_o::ext_c::types_opts::to_string() const { - static const char* options[] = {"MutingAvailabilityIndication"}; - return convert_enum_idx(options, 1, value, "time_synchronisation_info_ext_ies_o::ext_c::types"); + static const char* options[] = {"TimeSynchronisationInfo"}; + return convert_enum_idx(options, 1, value, "son_info_reply_ext_ies_o::ext_c::types"); } -// MutingPatternInformation ::= SEQUENCE -SRSASN_CODE muting_pattern_info_s::pack(bit_ref& bref) const +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), + enb_indirect_x2_transport_layer_addresses(193, crit_e::ignore) +{} +SRSASN_CODE x2_tnl_cfg_info_ext_ies_container::pack(bit_ref& bref) const +{ + uint32_t nof_ies = 0; + nof_ies += enbx2_extended_transport_layer_addresses_present ? 1 : 0; + nof_ies += enb_indirect_x2_transport_layer_addresses_present ? 1 : 0; + pack_length(bref, nof_ies, 1u, 65535u, true); + + if (enbx2_extended_transport_layer_addresses_present) { + HANDLE_CODE(enbx2_extended_transport_layer_addresses.pack(bref)); + } + if (enb_indirect_x2_transport_layer_addresses_present) { + HANDLE_CODE(enb_indirect_x2_transport_layer_addresses.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE x2_tnl_cfg_info_ext_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 1u, 65535u, true); + + for (; nof_ies > 0; --nof_ies) { + protocol_ext_field_s c; + HANDLE_CODE(c.unpack(bref)); + switch (c.id) { + case 153: + enbx2_extended_transport_layer_addresses_present = true; + enbx2_extended_transport_layer_addresses.id = c.id; + enbx2_extended_transport_layer_addresses.crit = c.crit; + enbx2_extended_transport_layer_addresses.ext = c.ext_value.enbx2_extended_transport_layer_addresses(); + break; + case 193: + enb_indirect_x2_transport_layer_addresses_present = true; + enb_indirect_x2_transport_layer_addresses.id = c.id; + enb_indirect_x2_transport_layer_addresses.crit = c.crit; + enb_indirect_x2_transport_layer_addresses.ext = c.ext_value.enb_indirect_x2_transport_layer_addresses(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + + return SRSASN_SUCCESS; +} +void x2_tnl_cfg_info_ext_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + if (enbx2_extended_transport_layer_addresses_present) { + j.write_fieldname(""); + enbx2_extended_transport_layer_addresses.to_json(j); + } + if (enb_indirect_x2_transport_layer_addresses_present) { + j.write_fieldname(""); + enb_indirect_x2_transport_layer_addresses.to_json(j); + } + j.end_obj(); +} + +// X2TNLConfigurationInfo ::= SEQUENCE +SRSASN_CODE x2_tnl_cfg_info_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(muting_pattern_offset_present, 1)); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(muting_pattern_period.pack(bref)); - if (muting_pattern_offset_present) { - HANDLE_CODE(pack_integer(bref, muting_pattern_offset, (uint16_t)0u, (uint16_t)10239u, true, true)); - } + HANDLE_CODE(pack_dyn_seq_of(bref, enbx2_transport_layer_addresses, 1, 2, true)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE muting_pattern_info_s::unpack(cbit_ref& bref) +SRSASN_CODE x2_tnl_cfg_info_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(muting_pattern_offset_present, 1)); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(muting_pattern_period.unpack(bref)); - if (muting_pattern_offset_present) { - HANDLE_CODE(unpack_integer(muting_pattern_offset, bref, (uint16_t)0u, (uint16_t)10239u, true, true)); - } + HANDLE_CODE(unpack_dyn_seq_of(enbx2_transport_layer_addresses, bref, 1, 2, true)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void muting_pattern_info_s::to_json(json_writer& j) const +void x2_tnl_cfg_info_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("muting-pattern-period", muting_pattern_period.to_string()); - if (muting_pattern_offset_present) { - j.write_int("muting-pattern-offset", muting_pattern_offset); + j.start_array("eNBX2TransportLayerAddresses"); + for (const auto& e1 : enbx2_transport_layer_addresses) { + j.write_str(e1.to_string()); } + j.end_array(); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -15697,498 +19617,500 @@ void muting_pattern_info_s::to_json(json_writer& j) const j.end_obj(); } -std::string muting_pattern_info_s::muting_pattern_period_opts::to_string() const -{ - 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 +// EN-DCTransferTypeReply ::= SEQUENCE +SRSASN_CODE en_dc_transfer_type_reply_s::pack(bit_ref& bref) const { - 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_"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(sourceeng_nb.pack(bref)); + HANDLE_CODE(targetenb.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } -// SONInformationReport ::= CHOICE -void son_info_report_c::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("rLFReportInformation"); - c.to_json(j); - j.end_obj(); -} -SRSASN_CODE son_info_report_c::pack(bit_ref& bref) const -{ - pack_enum(bref, type()); - HANDLE_CODE(c.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE son_info_report_c::unpack(cbit_ref& bref) +SRSASN_CODE en_dc_transfer_type_reply_s::unpack(cbit_ref& bref) { - types e; - unpack_enum(e, bref); - if (e != type()) { - log_invalid_choice_id(e, "son_info_report_c"); - return SRSASN_ERROR_DECODE_FAIL; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(sourceeng_nb.unpack(bref)); + HANDLE_CODE(targetenb.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); } - HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; } - -std::string son_info_report_c::types_opts::to_string() const +void en_dc_transfer_type_reply_s::to_json(json_writer& j) const { - static const char* options[] = {"rLFReportInformation"}; - return convert_enum_idx(options, 1, value, "son_info_report_c::types"); + j.start_obj(); + j.write_fieldname("sourceengNB"); + sourceeng_nb.to_json(j); + j.write_fieldname("targeteNB"); + targetenb.to_json(j); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); } -// TimeSynchronisationInfo ::= SEQUENCE -SRSASN_CODE time_synchronisation_info_s::pack(bit_ref& bref) const +// EN-DCTransferTypeRequest ::= SEQUENCE +SRSASN_CODE en_dc_transfer_type_request_s::pack(bit_ref& bref) const { bref.pack(ext, 1); + HANDLE_CODE(bref.pack(targetenb_present, 1)); + HANDLE_CODE(bref.pack(associated_tai_present, 1)); + HANDLE_CODE(bref.pack(broadcast5_gstai_present, 1)); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(pack_integer(bref, stratum_level, (uint8_t)0u, (uint8_t)3u, true, true)); - HANDLE_CODE(synchronisation_status.pack(bref)); + HANDLE_CODE(sourceenb.pack(bref)); + HANDLE_CODE(targeteng_nb.pack(bref)); + if (targetenb_present) { + HANDLE_CODE(targetenb.pack(bref)); + } + if (associated_tai_present) { + HANDLE_CODE(associated_tai.pack(bref)); + } + if (broadcast5_gstai_present) { + HANDLE_CODE(broadcast5_gstai.pack(bref)); + } if (ie_exts_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); + HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE time_synchronisation_info_s::unpack(cbit_ref& bref) +SRSASN_CODE en_dc_transfer_type_request_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(targetenb_present, 1)); + HANDLE_CODE(bref.unpack(associated_tai_present, 1)); + HANDLE_CODE(bref.unpack(broadcast5_gstai_present, 1)); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(unpack_integer(stratum_level, bref, (uint8_t)0u, (uint8_t)3u, true, true)); - HANDLE_CODE(synchronisation_status.unpack(bref)); + HANDLE_CODE(sourceenb.unpack(bref)); + HANDLE_CODE(targeteng_nb.unpack(bref)); + if (targetenb_present) { + HANDLE_CODE(targetenb.unpack(bref)); + } + if (associated_tai_present) { + HANDLE_CODE(associated_tai.unpack(bref)); + } + if (broadcast5_gstai_present) { + HANDLE_CODE(broadcast5_gstai.unpack(bref)); + } if (ie_exts_present) { - HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); + HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void time_synchronisation_info_s::to_json(json_writer& j) const +void en_dc_transfer_type_request_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("stratumLevel", stratum_level); - j.write_str("synchronisationStatus", synchronisation_status.to_string()); + j.write_fieldname("sourceeNB"); + sourceenb.to_json(j); + j.write_fieldname("targetengNB"); + targeteng_nb.to_json(j); + if (targetenb_present) { + j.write_fieldname("targeteNB"); + targetenb.to_json(j); + } + if (associated_tai_present) { + j.write_fieldname("associatedTAI"); + associated_tai.to_json(j); + } + if (broadcast5_gstai_present) { + j.write_fieldname("broadcast5GSTAI"); + broadcast5_gstai.to_json(j); + } if (ie_exts_present) { j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); } j.end_obj(); } -// X2TNLConfigurationInfo-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -uint32_t x2_tnl_cfg_info_ext_ies_o::idx_to_id(uint32_t idx) -{ - 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) +template struct asn1::s1ap::protocol_ie_single_container_s; + +// SONInformationReply ::= SEQUENCE +SRSASN_CODE son_info_reply_s::pack(bit_ref& bref) const { - static const uint32_t options[] = {153, 193}; - for (const auto& o : options) { - if (o == id) { - return true; - } + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(x2_tnl_cfg_info_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + if (x2_tnl_cfg_info_present) { + HANDLE_CODE(x2_tnl_cfg_info.pack(bref)); } - return false; -} -crit_e x2_tnl_cfg_info_ext_ies_o::get_crit(const uint32_t& id) -{ - switch (id) { - case 153: - return crit_e::ignore; - case 193: - return crit_e::ignore; - default: - asn1::log_error("The id=%d is not recognized", id); + if (ie_exts_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } - return {}; + + return SRSASN_SUCCESS; } -x2_tnl_cfg_info_ext_ies_o::ext_c x2_tnl_cfg_info_ext_ies_o::get_ext(const uint32_t& id) +SRSASN_CODE son_info_reply_s::unpack(cbit_ref& bref) { - ext_c ret{}; - switch (id) { - case 153: - ret.set(ext_c::types::enbx2_extended_transport_layer_addresses); - break; - case 193: - ret.set(ext_c::types::enb_indirect_x2_transport_layer_addresses); - break; - default: - asn1::log_error("The id=%d is not recognized", id); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(x2_tnl_cfg_info_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + if (x2_tnl_cfg_info_present) { + HANDLE_CODE(x2_tnl_cfg_info.unpack(bref)); } - return ret; -} -presence_e x2_tnl_cfg_info_ext_ies_o::get_presence(const uint32_t& id) -{ - switch (id) { - case 153: - return presence_e::optional; - case 193: - return presence_e::optional; - default: - asn1::log_error("The id=%d is not recognized", id); + if (ie_exts_present) { + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } - return {}; -} -// Extension ::= OPEN TYPE -enbx2_ext_tlas_l& x2_tnl_cfg_info_ext_ies_o::ext_c::enbx2_extended_transport_layer_addresses() -{ - assert_choice_type("ENBX2ExtTLAs", type_.to_string(), "Extension"); - return c.get(); + return SRSASN_SUCCESS; } -enb_indirect_x2_transport_layer_addresses_l& -x2_tnl_cfg_info_ext_ies_o::ext_c::enb_indirect_x2_transport_layer_addresses() +void son_info_reply_s::to_json(json_writer& j) const { - assert_choice_type("ENBIndirectX2TransportLayerAddresses", type_.to_string(), "Extension"); - return c.get(); + j.start_obj(); + if (x2_tnl_cfg_info_present) { + j.write_fieldname("x2TNLConfigurationInfo"); + x2_tnl_cfg_info.to_json(j); + } + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + } + j.end_obj(); } -const enbx2_ext_tlas_l& x2_tnl_cfg_info_ext_ies_o::ext_c::enbx2_extended_transport_layer_addresses() const + +// SONInformationRequest ::= ENUMERATED +std::string son_info_request_opts::to_string() const { - assert_choice_type("ENBX2ExtTLAs", type_.to_string(), "Extension"); - return c.get(); + 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"); } -const enb_indirect_x2_transport_layer_addresses_l& -x2_tnl_cfg_info_ext_ies_o::ext_c::enb_indirect_x2_transport_layer_addresses() const +uint8_t son_info_request_opts::to_number() const { - assert_choice_type("ENBIndirectX2TransportLayerAddresses", type_.to_string(), "Extension"); - return c.get(); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "son_info_request_e"); } -void x2_tnl_cfg_info_ext_ies_o::ext_c::destroy_() + +// EN-DCSONTransferType ::= CHOICE +void en_dcson_transfer_type_c::destroy_() { switch (type_) { - case types::enbx2_extended_transport_layer_addresses: - c.destroy(); + case types::request: + c.destroy(); break; - case types::enb_indirect_x2_transport_layer_addresses: - c.destroy(); + case types::reply: + c.destroy(); break; default: break; } } -void x2_tnl_cfg_info_ext_ies_o::ext_c::set(types::options e) +void en_dcson_transfer_type_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::enbx2_extended_transport_layer_addresses: - c.init(); - break; - case types::enb_indirect_x2_transport_layer_addresses: - c.init(); + case types::request: + c.init(); + break; + case types::reply: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); + log_invalid_choice_id(type_, "en_dcson_transfer_type_c"); } } -x2_tnl_cfg_info_ext_ies_o::ext_c::ext_c(const x2_tnl_cfg_info_ext_ies_o::ext_c& other) +en_dcson_transfer_type_c::en_dcson_transfer_type_c(const en_dcson_transfer_type_c& other) { type_ = other.type(); switch (type_) { - case types::enbx2_extended_transport_layer_addresses: - c.init(other.c.get()); + case types::request: + c.init(other.c.get()); break; - case types::enb_indirect_x2_transport_layer_addresses: - c.init(other.c.get()); + case types::reply: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); + log_invalid_choice_id(type_, "en_dcson_transfer_type_c"); } } -x2_tnl_cfg_info_ext_ies_o::ext_c& -x2_tnl_cfg_info_ext_ies_o::ext_c::operator=(const x2_tnl_cfg_info_ext_ies_o::ext_c& other) +en_dcson_transfer_type_c& en_dcson_transfer_type_c::operator=(const en_dcson_transfer_type_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::enbx2_extended_transport_layer_addresses: - c.set(other.c.get()); + case types::request: + c.set(other.c.get()); break; - case types::enb_indirect_x2_transport_layer_addresses: - c.set(other.c.get()); + case types::reply: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); + log_invalid_choice_id(type_, "en_dcson_transfer_type_c"); } return *this; } -void x2_tnl_cfg_info_ext_ies_o::ext_c::to_json(json_writer& j) const +void en_dcson_transfer_type_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::enbx2_extended_transport_layer_addresses: - j.start_array("ENBX2ExtTLAs"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::request: + j.write_fieldname("request"); + c.get().to_json(j); break; - case types::enb_indirect_x2_transport_layer_addresses: - j.start_array("ENBIndirectX2TransportLayerAddresses"); - for (const auto& e1 : c.get()) { - j.write_str(e1.to_string()); - } - j.end_array(); + case types::reply: + j.write_fieldname("reply"); + c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); + log_invalid_choice_id(type_, "en_dcson_transfer_type_c"); } j.end_obj(); } -SRSASN_CODE x2_tnl_cfg_info_ext_ies_o::ext_c::pack(bit_ref& bref) const +SRSASN_CODE en_dcson_transfer_type_c::pack(bit_ref& bref) const { - varlength_field_pack_guard varlen_scope(bref, true); + type_.pack(bref); switch (type_) { - case types::enbx2_extended_transport_layer_addresses: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16, true)); + case types::request: + HANDLE_CODE(c.get().pack(bref)); break; - case types::enb_indirect_x2_transport_layer_addresses: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 2, true)); + case types::reply: + HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); + log_invalid_choice_id(type_, "en_dcson_transfer_type_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE x2_tnl_cfg_info_ext_ies_o::ext_c::unpack(cbit_ref& bref) +SRSASN_CODE en_dcson_transfer_type_c::unpack(cbit_ref& bref) { - varlength_field_unpack_guard varlen_scope(bref, true); + types e; + e.unpack(bref); + set(e); switch (type_) { - case types::enbx2_extended_transport_layer_addresses: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16, true)); + case types::request: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::enb_indirect_x2_transport_layer_addresses: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 2, true)); + case types::reply: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "x2_tnl_cfg_info_ext_ies_o::ext_c"); + log_invalid_choice_id(type_, "en_dcson_transfer_type_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string x2_tnl_cfg_info_ext_ies_o::ext_c::types_opts::to_string() const +std::string en_dcson_transfer_type_c::types_opts::to_string() const { - static const char* options[] = {"ENBX2ExtTLAs", "ENBIndirectX2TransportLayerAddresses"}; - return convert_enum_idx(options, 2, value, "x2_tnl_cfg_info_ext_ies_o::ext_c::types"); + static const char* options[] = {"request", "reply"}; + return convert_enum_idx(options, 2, value, "en_dcson_transfer_type_c::types"); } -// ENB-ID ::= CHOICE -void enb_id_c::destroy_() +// SONInformation ::= CHOICE +void son_info_c::destroy_() { switch (type_) { - case types::macro_enb_id: - c.destroy >(); - break; - case types::home_enb_id: - c.destroy >(); - break; - case types::short_macro_enb_id: - c.destroy >(); + case types::son_info_reply: + c.destroy(); break; - case types::long_macro_enb_id: - c.destroy >(); + case types::son_info_ext: + c.destroy >(); break; default: break; } } -void enb_id_c::set(types::options e) +void son_info_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::macro_enb_id: - c.init >(); - break; - case types::home_enb_id: - c.init >(); + case types::son_info_request: break; - case types::short_macro_enb_id: - c.init >(); + case types::son_info_reply: + c.init(); break; - case types::long_macro_enb_id: - c.init >(); + case types::son_info_ext: + c.init >(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "enb_id_c"); + log_invalid_choice_id(type_, "son_info_c"); } } -enb_id_c::enb_id_c(const enb_id_c& other) +son_info_c::son_info_c(const son_info_c& other) { type_ = other.type(); switch (type_) { - case types::macro_enb_id: - c.init(other.c.get >()); - break; - case types::home_enb_id: - c.init(other.c.get >()); + case types::son_info_request: + c.init(other.c.get()); break; - case types::short_macro_enb_id: - c.init(other.c.get >()); + case types::son_info_reply: + c.init(other.c.get()); break; - case types::long_macro_enb_id: - c.init(other.c.get >()); + case types::son_info_ext: + c.init(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "enb_id_c"); + log_invalid_choice_id(type_, "son_info_c"); } } -enb_id_c& enb_id_c::operator=(const enb_id_c& other) +son_info_c& son_info_c::operator=(const son_info_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::macro_enb_id: - c.set(other.c.get >()); - break; - case types::home_enb_id: - c.set(other.c.get >()); + case types::son_info_request: + c.set(other.c.get()); break; - case types::short_macro_enb_id: - c.set(other.c.get >()); + case types::son_info_reply: + c.set(other.c.get()); break; - case types::long_macro_enb_id: - c.set(other.c.get >()); + case types::son_info_ext: + c.set(other.c.get >()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "enb_id_c"); + log_invalid_choice_id(type_, "son_info_c"); } return *this; } -void enb_id_c::to_json(json_writer& j) const +void son_info_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::macro_enb_id: - j.write_str("macroENB-ID", c.get >().to_string()); - break; - case types::home_enb_id: - j.write_str("homeENB-ID", c.get >().to_string()); + case types::son_info_request: + j.write_str("sONInformationRequest", c.get().to_string()); break; - case types::short_macro_enb_id: - j.write_str("short-macroENB-ID", c.get >().to_string()); + case types::son_info_reply: + j.write_fieldname("sONInformationReply"); + c.get().to_json(j); break; - case types::long_macro_enb_id: - j.write_str("long-macroENB-ID", c.get >().to_string()); + case types::son_info_ext: + j.write_fieldname("sONInformation-Extension"); + c.get >().to_json(j); break; default: - log_invalid_choice_id(type_, "enb_id_c"); + log_invalid_choice_id(type_, "son_info_c"); } j.end_obj(); } -SRSASN_CODE enb_id_c::pack(bit_ref& bref) const +SRSASN_CODE son_info_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::macro_enb_id: - HANDLE_CODE((c.get >().pack(bref))); + case types::son_info_request: + HANDLE_CODE(c.get().pack(bref)); break; - case types::home_enb_id: - HANDLE_CODE((c.get >().pack(bref))); + case types::son_info_reply: + HANDLE_CODE(c.get().pack(bref)); break; - case types::short_macro_enb_id: { - varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE((c.get >().pack(bref))); - } break; - case types::long_macro_enb_id: { + case types::son_info_ext: { varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE((c.get >().pack(bref))); + HANDLE_CODE(c.get >().pack(bref)); } break; default: - log_invalid_choice_id(type_, "enb_id_c"); + log_invalid_choice_id(type_, "son_info_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE enb_id_c::unpack(cbit_ref& bref) +SRSASN_CODE son_info_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::macro_enb_id: - HANDLE_CODE((c.get >().unpack(bref))); + case types::son_info_request: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::home_enb_id: - HANDLE_CODE((c.get >().unpack(bref))); + case types::son_info_reply: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::short_macro_enb_id: { - varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE((c.get >().unpack(bref))); - } break; - case types::long_macro_enb_id: { + case types::son_info_ext: { varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE((c.get >().unpack(bref))); + HANDLE_CODE(c.get >().unpack(bref)); } break; default: - log_invalid_choice_id(type_, "enb_id_c"); + log_invalid_choice_id(type_, "son_info_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -std::string enb_id_c::types_opts::to_string() const +std::string son_info_c::types_opts::to_string() const { - 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"); + static const char* options[] = {"sONInformationRequest", "sONInformationReply", "sONInformation-Extension"}; + return convert_enum_idx(options, 3, value, "son_info_c::types"); } -// ListeningSubframePattern ::= SEQUENCE -SRSASN_CODE listening_sf_pattern_s::pack(bit_ref& bref) const +// EN-DCSONConfigurationTransfer ::= SEQUENCE +SRSASN_CODE en_dcson_cfg_transfer_s::pack(bit_ref& bref) const { bref.pack(ext, 1); + HANDLE_CODE(bref.pack(x2_tnl_cfg_info_present, 1)); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(pattern_period.pack(bref)); - HANDLE_CODE(pack_integer(bref, pattern_offset, (uint16_t)0u, (uint16_t)10239u, true, true)); + HANDLE_CODE(transfertype.pack(bref)); + HANDLE_CODE(son_info.pack(bref)); + if (x2_tnl_cfg_info_present) { + HANDLE_CODE(x2_tnl_cfg_info.pack(bref)); + } if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE listening_sf_pattern_s::unpack(cbit_ref& bref) +SRSASN_CODE en_dcson_cfg_transfer_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(x2_tnl_cfg_info_present, 1)); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(pattern_period.unpack(bref)); - HANDLE_CODE(unpack_integer(pattern_offset, bref, (uint16_t)0u, (uint16_t)10239u, true, true)); + HANDLE_CODE(transfertype.unpack(bref)); + HANDLE_CODE(son_info.unpack(bref)); + if (x2_tnl_cfg_info_present) { + HANDLE_CODE(x2_tnl_cfg_info.unpack(bref)); + } if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void listening_sf_pattern_s::to_json(json_writer& j) const +void en_dcson_cfg_transfer_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("pattern-period", pattern_period.to_string()); - j.write_int("pattern-offset", pattern_offset); + j.write_fieldname("transfertype"); + transfertype.to_json(j); + j.write_fieldname("sONInformation"); + son_info.to_json(j); + if (x2_tnl_cfg_info_present) { + j.write_fieldname("x2TNLConfigInfo"); + x2_tnl_cfg_info.to_json(j); + } if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -16196,279 +20118,588 @@ void listening_sf_pattern_s::to_json(json_writer& j) const j.end_obj(); } -std::string listening_sf_pattern_s::pattern_period_opts::to_string() const +// ENB-StatusTransfer-TransparentContainer ::= SEQUENCE +SRSASN_CODE enb_status_transfer_transparent_container_s::pack(bit_ref& bref) const { - static const char* options[] = {"ms1280", "ms2560", "ms5120", "ms10240"}; - return convert_enum_idx(options, 4, value, "listening_sf_pattern_s::pattern_period_e_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, bearers_subject_to_status_transfer_list, 1, 256, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; } -uint16_t listening_sf_pattern_s::pattern_period_opts::to_number() const +SRSASN_CODE enb_status_transfer_transparent_container_s::unpack(cbit_ref& bref) { - static const uint16_t options[] = {1280, 2560, 5120, 10240}; - return map_enum_number(options, 4, value, "listening_sf_pattern_s::pattern_period_e_"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(bearers_subject_to_status_transfer_list, bref, 1, 256, true)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void enb_status_transfer_transparent_container_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("bearers-SubjectToStatusTransferList"); + for (const auto& e1 : bearers_subject_to_status_transfer_list) { + e1.to_json(j); + } + j.end_array(); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); } -// SONInformation-ExtensionIE ::= OBJECT SET OF S1AP-PROTOCOL-IES -uint32_t son_info_ext_ie_o::idx_to_id(uint32_t idx) +// S-TMSI ::= SEQUENCE +SRSASN_CODE s_tmsi_s::pack(bit_ref& bref) const { - static const uint32_t options[] = {206}; - return map_enum_number(options, 1, idx, "id"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(mmec.pack(bref)); + HANDLE_CODE(m_tmsi.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; } -bool son_info_ext_ie_o::is_id_valid(const uint32_t& id) +SRSASN_CODE s_tmsi_s::unpack(cbit_ref& bref) { - return 206 == id; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(mmec.unpack(bref)); + HANDLE_CODE(m_tmsi.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; } -crit_e son_info_ext_ie_o::get_crit(const uint32_t& id) +void s_tmsi_s::to_json(json_writer& j) const { - if (id == 206) { - return crit_e::ignore; + j.start_obj(); + j.write_str("mMEC", mmec.to_string()); + j.write_str("m-TMSI", m_tmsi.to_string()); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// UL-CP-SecurityInformation ::= SEQUENCE +SRSASN_CODE ul_cp_security_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(ul_nas_mac.pack(bref)); + HANDLE_CODE(ul_nas_count.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_cp_security_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(ul_nas_mac.unpack(bref)); + HANDLE_CODE(ul_nas_count.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_cp_security_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ul-NAS-MAC", ul_nas_mac.to_string()); + j.write_str("ul-NAS-Count", ul_nas_count.to_string()); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +// ENBCPRelocationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +uint32_t enbcp_relocation_ind_ies_o::idx_to_id(uint32_t idx) +{ + 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 const uint32_t options[] = {8, 96, 100, 67, 254}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; +} +crit_e enbcp_relocation_ind_ies_o::get_crit(const uint32_t& id) +{ + switch (id) { + case 8: + return crit_e::reject; + case 96: + return crit_e::reject; + case 100: + return crit_e::ignore; + case 67: + return crit_e::ignore; + case 254: + return crit_e::reject; + default: + asn1::log_error("The id=%d is not recognized", id); } - asn1::log_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) +enbcp_relocation_ind_ies_o::value_c enbcp_relocation_ind_ies_o::get_value(const uint32_t& id) { value_c ret{}; - if (id != 206) { - asn1::log_error("The id=%d is not recognized", id); + switch (id) { + case 8: + ret.set(value_c::types::enb_ue_s1ap_id); + break; + case 96: + ret.set(value_c::types::s_tmsi); + break; + case 100: + ret.set(value_c::types::eutran_cgi); + break; + case 67: + ret.set(value_c::types::tai); + break; + case 254: + ret.set(value_c::types::ul_cp_security_info); + break; + default: + asn1::log_error("The id=%d is not recognized", id); } return ret; } -presence_e son_info_ext_ie_o::get_presence(const uint32_t& id) +presence_e enbcp_relocation_ind_ies_o::get_presence(const uint32_t& id) { - if (id == 206) { - return presence_e::mandatory; + switch (id) { + case 8: + return presence_e::mandatory; + case 96: + return presence_e::mandatory; + case 100: + return presence_e::mandatory; + case 67: + return presence_e::mandatory; + case 254: + return presence_e::mandatory; + default: + asn1::log_error("The id=%d is not recognized", id); } - asn1::log_error("The id=%d is not recognized", id); return {}; } // Value ::= OPEN TYPE -void son_info_ext_ie_o::value_c::to_json(json_writer& j) const +uint32_t& enbcp_relocation_ind_ies_o::value_c::enb_ue_s1ap_id() { - j.start_obj(); - j.write_fieldname("SONInformationReport"); - c.to_json(j); - j.end_obj(); + assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); + return c.get(); } -SRSASN_CODE son_info_ext_ie_o::value_c::pack(bit_ref& bref) const +s_tmsi_s& enbcp_relocation_ind_ies_o::value_c::s_tmsi() { - varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE(c.pack(bref)); - return SRSASN_SUCCESS; + assert_choice_type("S-TMSI", type_.to_string(), "Value"); + return c.get(); } -SRSASN_CODE son_info_ext_ie_o::value_c::unpack(cbit_ref& bref) +eutran_cgi_s& enbcp_relocation_ind_ies_o::value_c::eutran_cgi() { - varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE(c.unpack(bref)); - return SRSASN_SUCCESS; + assert_choice_type("EUTRAN-CGI", type_.to_string(), "Value"); + return c.get(); } - -std::string son_info_ext_ie_o::value_c::types_opts::to_string() const +tai_s& enbcp_relocation_ind_ies_o::value_c::tai() { - static const char* options[] = {"SONInformationReport"}; - return convert_enum_idx(options, 1, value, "son_info_ext_ie_o::value_c::types"); + assert_choice_type("TAI", type_.to_string(), "Value"); + return c.get(); } - -// SONInformationReply-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION -uint32_t son_info_reply_ext_ies_o::idx_to_id(uint32_t idx) +ul_cp_security_info_s& enbcp_relocation_ind_ies_o::value_c::ul_cp_security_info() { - static const uint32_t options[] = {149}; - return map_enum_number(options, 1, idx, "id"); + assert_choice_type("UL-CP-SecurityInformation", type_.to_string(), "Value"); + return c.get(); } -bool son_info_reply_ext_ies_o::is_id_valid(const uint32_t& id) +const uint32_t& enbcp_relocation_ind_ies_o::value_c::enb_ue_s1ap_id() const { - return 149 == id; + assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); + return c.get(); } -crit_e son_info_reply_ext_ies_o::get_crit(const uint32_t& id) +const s_tmsi_s& enbcp_relocation_ind_ies_o::value_c::s_tmsi() const { - if (id == 149) { - return crit_e::ignore; + assert_choice_type("S-TMSI", type_.to_string(), "Value"); + return c.get(); +} +const eutran_cgi_s& enbcp_relocation_ind_ies_o::value_c::eutran_cgi() const +{ + assert_choice_type("EUTRAN-CGI", type_.to_string(), "Value"); + return c.get(); +} +const tai_s& enbcp_relocation_ind_ies_o::value_c::tai() const +{ + assert_choice_type("TAI", type_.to_string(), "Value"); + return c.get(); +} +const ul_cp_security_info_s& enbcp_relocation_ind_ies_o::value_c::ul_cp_security_info() const +{ + assert_choice_type("UL-CP-SecurityInformation", type_.to_string(), "Value"); + return c.get(); +} +void enbcp_relocation_ind_ies_o::value_c::destroy_() +{ + switch (type_) { + case types::s_tmsi: + c.destroy(); + break; + case types::eutran_cgi: + c.destroy(); + break; + case types::tai: + c.destroy(); + break; + case types::ul_cp_security_info: + c.destroy(); + break; + default: + break; + } +} +void enbcp_relocation_ind_ies_o::value_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::enb_ue_s1ap_id: + break; + case types::s_tmsi: + c.init(); + break; + case types::eutran_cgi: + c.init(); + break; + case types::tai: + c.init(); + break; + case types::ul_cp_security_info: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); } - asn1::log_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) +enbcp_relocation_ind_ies_o::value_c::value_c(const enbcp_relocation_ind_ies_o::value_c& other) { - ext_c ret{}; - if (id != 149) { - asn1::log_error("The id=%d is not recognized", id); + type_ = other.type(); + switch (type_) { + case types::enb_ue_s1ap_id: + c.init(other.c.get()); + break; + case types::s_tmsi: + c.init(other.c.get()); + break; + case types::eutran_cgi: + c.init(other.c.get()); + break; + case types::tai: + c.init(other.c.get()); + break; + case types::ul_cp_security_info: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); } - return ret; } -presence_e son_info_reply_ext_ies_o::get_presence(const uint32_t& id) +enbcp_relocation_ind_ies_o::value_c& +enbcp_relocation_ind_ies_o::value_c::operator=(const enbcp_relocation_ind_ies_o::value_c& other) { - if (id == 149) { - return presence_e::optional; + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::enb_ue_s1ap_id: + c.set(other.c.get()); + break; + case types::s_tmsi: + c.set(other.c.get()); + break; + case types::eutran_cgi: + c.set(other.c.get()); + break; + case types::tai: + c.set(other.c.get()); + break; + case types::ul_cp_security_info: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); } - asn1::log_error("The id=%d is not recognized", id); - return {}; -} -// Extension ::= OPEN TYPE -void son_info_reply_ext_ies_o::ext_c::to_json(json_writer& j) const + return *this; +} +void enbcp_relocation_ind_ies_o::value_c::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("TimeSynchronisationInfo"); - c.to_json(j); + switch (type_) { + case types::enb_ue_s1ap_id: + j.write_int("INTEGER (0..16777215)", c.get()); + break; + case types::s_tmsi: + j.write_fieldname("S-TMSI"); + c.get().to_json(j); + break; + case types::eutran_cgi: + j.write_fieldname("EUTRAN-CGI"); + c.get().to_json(j); + break; + case types::tai: + j.write_fieldname("TAI"); + c.get().to_json(j); + break; + case types::ul_cp_security_info: + j.write_fieldname("UL-CP-SecurityInformation"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); + } j.end_obj(); } -SRSASN_CODE son_info_reply_ext_ies_o::ext_c::pack(bit_ref& bref) const +SRSASN_CODE enbcp_relocation_ind_ies_o::value_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE(c.pack(bref)); + switch (type_) { + case types::enb_ue_s1ap_id: + HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); + break; + case types::s_tmsi: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutran_cgi: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::tai: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_cp_security_info: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } return SRSASN_SUCCESS; } -SRSASN_CODE son_info_reply_ext_ies_o::ext_c::unpack(cbit_ref& bref) +SRSASN_CODE enbcp_relocation_ind_ies_o::value_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE(c.unpack(bref)); + switch (type_) { + case types::enb_ue_s1ap_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); + break; + case types::s_tmsi: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutran_cgi: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::tai: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_cp_security_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "enbcp_relocation_ind_ies_o::value_c"); + return SRSASN_ERROR_DECODE_FAIL; + } return SRSASN_SUCCESS; } -std::string son_info_reply_ext_ies_o::ext_c::types_opts::to_string() const +std::string enbcp_relocation_ind_ies_o::value_c::types_opts::to_string() const { - static const char* options[] = {"TimeSynchronisationInfo"}; - return convert_enum_idx(options, 1, value, "son_info_reply_ext_ies_o::ext_c::types"); + 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 const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "enbcp_relocation_ind_ies_o::value_c::types"); } -template struct asn1::s1ap::protocol_ext_field_s; +template struct asn1::s1ap::protocol_ie_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), - enb_indirect_x2_transport_layer_addresses(193, crit_e::ignore) +enbcp_relocation_ind_ies_container::enbcp_relocation_ind_ies_container() : + enb_ue_s1ap_id(8, crit_e::reject), + s_tmsi(96, crit_e::reject), + eutran_cgi(100, crit_e::ignore), + tai(67, crit_e::ignore), + ul_cp_security_info(254, crit_e::reject) {} -SRSASN_CODE x2_tnl_cfg_info_ext_ies_container::pack(bit_ref& bref) const +SRSASN_CODE enbcp_relocation_ind_ies_container::pack(bit_ref& bref) const { - uint32_t nof_ies = 0; - nof_ies += enbx2_extended_transport_layer_addresses_present ? 1 : 0; - nof_ies += enb_indirect_x2_transport_layer_addresses_present ? 1 : 0; - pack_length(bref, nof_ies, 1u, 65535u, true); + uint32_t nof_ies = 5; + pack_length(bref, nof_ies, 0u, 65535u, true); - if (enbx2_extended_transport_layer_addresses_present) { - HANDLE_CODE(enbx2_extended_transport_layer_addresses.pack(bref)); - } - if (enb_indirect_x2_transport_layer_addresses_present) { - HANDLE_CODE(enb_indirect_x2_transport_layer_addresses.pack(bref)); - } + HANDLE_CODE(enb_ue_s1ap_id.pack(bref)); + HANDLE_CODE(s_tmsi.pack(bref)); + HANDLE_CODE(eutran_cgi.pack(bref)); + HANDLE_CODE(tai.pack(bref)); + HANDLE_CODE(ul_cp_security_info.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE x2_tnl_cfg_info_ext_ies_container::unpack(cbit_ref& bref) +SRSASN_CODE enbcp_relocation_ind_ies_container::unpack(cbit_ref& bref) { uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 65535u, true); + unpack_length(nof_ies, bref, 0u, 65535u, true); + + uint32_t nof_mandatory_ies = 5; for (; nof_ies > 0; --nof_ies) { - protocol_ext_field_s c; + protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); switch (c.id) { - case 153: - enbx2_extended_transport_layer_addresses_present = true; - enbx2_extended_transport_layer_addresses.id = c.id; - enbx2_extended_transport_layer_addresses.crit = c.crit; - enbx2_extended_transport_layer_addresses.ext = c.ext_value.enbx2_extended_transport_layer_addresses(); + case 8: + nof_mandatory_ies--; + enb_ue_s1ap_id.id = c.id; + enb_ue_s1ap_id.crit = c.crit; + enb_ue_s1ap_id.value = c.value.enb_ue_s1ap_id(); break; - case 193: - enb_indirect_x2_transport_layer_addresses_present = true; - enb_indirect_x2_transport_layer_addresses.id = c.id; - enb_indirect_x2_transport_layer_addresses.crit = c.crit; - enb_indirect_x2_transport_layer_addresses.ext = c.ext_value.enb_indirect_x2_transport_layer_addresses(); + case 96: + nof_mandatory_ies--; + s_tmsi.id = c.id; + s_tmsi.crit = c.crit; + s_tmsi.value = c.value.s_tmsi(); + break; + case 100: + nof_mandatory_ies--; + eutran_cgi.id = c.id; + eutran_cgi.crit = c.crit; + eutran_cgi.value = c.value.eutran_cgi(); + break; + case 67: + nof_mandatory_ies--; + tai.id = c.id; + tai.crit = c.crit; + tai.value = c.value.tai(); + break; + case 254: + nof_mandatory_ies--; + ul_cp_security_info.id = c.id; + ul_cp_security_info.crit = c.crit; + ul_cp_security_info.value = c.value.ul_cp_security_info(); break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } + if (nof_mandatory_ies > 0) { + asn1::log_error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; + } return SRSASN_SUCCESS; } -void x2_tnl_cfg_info_ext_ies_container::to_json(json_writer& j) const +void enbcp_relocation_ind_ies_container::to_json(json_writer& j) const { j.start_obj(); - if (enbx2_extended_transport_layer_addresses_present) { - j.write_fieldname(""); - enbx2_extended_transport_layer_addresses.to_json(j); - } - if (enb_indirect_x2_transport_layer_addresses_present) { - j.write_fieldname(""); - enb_indirect_x2_transport_layer_addresses.to_json(j); - } + j.write_fieldname(""); + enb_ue_s1ap_id.to_json(j); + j.write_fieldname(""); + s_tmsi.to_json(j); + j.write_fieldname(""); + eutran_cgi.to_json(j); + j.write_fieldname(""); + tai.to_json(j); + j.write_fieldname(""); + ul_cp_security_info.to_json(j); j.end_obj(); } -// X2TNLConfigurationInfo ::= SEQUENCE -SRSASN_CODE x2_tnl_cfg_info_s::pack(bit_ref& bref) const +// ENBCPRelocationIndication ::= SEQUENCE +SRSASN_CODE enbcp_relocation_ind_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ie_exts_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, enbx2_transport_layer_addresses, 1, 2, true)); - if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); - } + HANDLE_CODE(protocol_ies.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE x2_tnl_cfg_info_s::unpack(cbit_ref& bref) +SRSASN_CODE enbcp_relocation_ind_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(enbx2_transport_layer_addresses, bref, 1, 2, true)); - if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); - } + HANDLE_CODE(protocol_ies.unpack(bref)); return SRSASN_SUCCESS; } -void x2_tnl_cfg_info_s::to_json(json_writer& j) const +void enbcp_relocation_ind_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("eNBX2TransportLayerAddresses"); - for (const auto& e1 : enbx2_transport_layer_addresses) { - j.write_str(e1.to_string()); - } - j.end_array(); - if (ie_exts_present) { - j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); - } + j.write_fieldname("protocolIEs"); + protocol_ies.to_json(j); j.end_obj(); } -// Global-ENB-ID ::= SEQUENCE -SRSASN_CODE global_enb_id_s::pack(bit_ref& bref) const +// ListeningSubframePattern ::= SEQUENCE +SRSASN_CODE listening_sf_pattern_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(ie_exts_present, 1)); - HANDLE_CODE(plm_nid.pack(bref)); - HANDLE_CODE(enb_id.pack(bref)); + HANDLE_CODE(pattern_period.pack(bref)); + HANDLE_CODE(pack_integer(bref, pattern_offset, (uint16_t)0u, (uint16_t)10239u, true, true)); if (ie_exts_present) { HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE global_enb_id_s::unpack(cbit_ref& bref) +SRSASN_CODE listening_sf_pattern_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - HANDLE_CODE(plm_nid.unpack(bref)); - HANDLE_CODE(enb_id.unpack(bref)); + HANDLE_CODE(pattern_period.unpack(bref)); + HANDLE_CODE(unpack_integer(pattern_offset, bref, (uint16_t)0u, (uint16_t)10239u, true, true)); if (ie_exts_present) { HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; } -void global_enb_id_s::to_json(json_writer& j) const +void listening_sf_pattern_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("pLMNidentity", plm_nid.to_string()); - j.write_fieldname("eNB-ID"); - enb_id.to_json(j); + j.write_str("pattern-period", pattern_period.to_string()); + j.write_int("pattern-offset", pattern_offset); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); ie_exts.to_json(j); @@ -16476,63 +20707,15 @@ void global_enb_id_s::to_json(json_writer& j) const j.end_obj(); } -template struct asn1::s1ap::protocol_ie_single_container_s; - -// SONInformationReply ::= SEQUENCE -SRSASN_CODE son_info_reply_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(x2_tnl_cfg_info_present, 1)); - HANDLE_CODE(bref.pack(ie_exts_present, 1)); - - if (x2_tnl_cfg_info_present) { - HANDLE_CODE(x2_tnl_cfg_info.pack(bref)); - } - if (ie_exts_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE son_info_reply_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(x2_tnl_cfg_info_present, 1)); - HANDLE_CODE(bref.unpack(ie_exts_present, 1)); - - if (x2_tnl_cfg_info_present) { - HANDLE_CODE(x2_tnl_cfg_info.unpack(bref)); - } - if (ie_exts_present) { - HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); - } - - return SRSASN_SUCCESS; -} -void son_info_reply_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (x2_tnl_cfg_info_present) { - j.write_fieldname("x2TNLConfigurationInfo"); - x2_tnl_cfg_info.to_json(j); - } - if (ie_exts_present) { - j.write_fieldname("iE-Extensions"); - } - j.end_obj(); -} - -// SONInformationRequest ::= ENUMERATED -std::string son_info_request_opts::to_string() const +std::string listening_sf_pattern_s::pattern_period_opts::to_string() const { - 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"); + static const char* options[] = {"ms1280", "ms2560", "ms5120", "ms10240"}; + return convert_enum_idx(options, 4, value, "listening_sf_pattern_s::pattern_period_e_"); } -uint8_t son_info_request_opts::to_number() const +uint16_t listening_sf_pattern_s::pattern_period_opts::to_number() const { - static const uint8_t options[] = {2}; - return map_enum_number(options, 1, value, "son_info_request_e"); + static const uint16_t options[] = {1280, 2560, 5120, 10240}; + return map_enum_number(options, 4, value, "listening_sf_pattern_s::pattern_period_e_"); } // SynchronisationInformation ::= SEQUENCE @@ -16812,151 +20995,6 @@ uint8_t son_cfg_transfer_ext_ies_o::ext_c::types_opts::to_number() const return map_enum_number(options, 1, value, "son_cfg_transfer_ext_ies_o::ext_c::types"); } -// SONInformation ::= CHOICE -void son_info_c::destroy_() -{ - switch (type_) { - case types::son_info_reply: - c.destroy(); - break; - case types::son_info_ext: - c.destroy >(); - break; - default: - break; - } -} -void son_info_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::son_info_request: - break; - case types::son_info_reply: - c.init(); - break; - case types::son_info_ext: - c.init >(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "son_info_c"); - } -} -son_info_c::son_info_c(const son_info_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::son_info_request: - c.init(other.c.get()); - break; - case types::son_info_reply: - c.init(other.c.get()); - break; - case types::son_info_ext: - c.init(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "son_info_c"); - } -} -son_info_c& son_info_c::operator=(const son_info_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::son_info_request: - c.set(other.c.get()); - break; - case types::son_info_reply: - c.set(other.c.get()); - break; - case types::son_info_ext: - c.set(other.c.get >()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "son_info_c"); - } - - return *this; -} -void son_info_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::son_info_request: - j.write_str("sONInformationRequest", c.get().to_string()); - break; - case types::son_info_reply: - j.write_fieldname("sONInformationReply"); - c.get().to_json(j); - break; - case types::son_info_ext: - j.write_fieldname("sONInformation-Extension"); - c.get >().to_json(j); - break; - default: - log_invalid_choice_id(type_, "son_info_c"); - } - j.end_obj(); -} -SRSASN_CODE son_info_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::son_info_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::son_info_reply: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::son_info_ext: { - varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE(c.get >().pack(bref)); - } break; - default: - log_invalid_choice_id(type_, "son_info_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE son_info_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::son_info_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::son_info_reply: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::son_info_ext: { - varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE(c.get >().unpack(bref)); - } break; - default: - log_invalid_choice_id(type_, "son_info_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string son_info_c::types_opts::to_string() const -{ - static const char* options[] = {"sONInformationRequest", "sONInformationReply", "sONInformation-Extension"}; - return convert_enum_idx(options, 3, value, "son_info_c::types"); -} - // SourceeNB-ID ::= SEQUENCE SRSASN_CODE sourceenb_id_s::pack(bit_ref& bref) const { @@ -17149,197 +21187,291 @@ 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 const uint32_t options[] = {129}; - return map_enum_number(options, 1, idx, "id"); + static const uint32_t options[] = {129, 294}; + return map_enum_number(options, 2, idx, "id"); } bool enb_cfg_transfer_ies_o::is_id_valid(const uint32_t& id) { - return 129 == id; + static const uint32_t options[] = {129, 294}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; } crit_e enb_cfg_transfer_ies_o::get_crit(const uint32_t& id) { - if (id == 129) { - return crit_e::ignore; + switch (id) { + case 129: + return crit_e::ignore; + case 294: + return crit_e::ignore; + default: + asn1::log_error("The id=%d is not recognized", id); } - asn1::log_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{}; - if (id != 129) { - asn1::log_error("The id=%d is not recognized", id); + switch (id) { + case 129: + ret.set(value_c::types::son_cfg_transfer_ect); + break; + case 294: + ret.set(value_c::types::en_dcson_cfg_transfer_ect); + break; + default: + asn1::log_error("The id=%d is not recognized", id); } return ret; } presence_e enb_cfg_transfer_ies_o::get_presence(const uint32_t& id) { - if (id == 129) { - return presence_e::optional; + switch (id) { + case 129: + return presence_e::optional; + case 294: + return presence_e::optional; + default: + asn1::log_error("The id=%d is not recognized", id); } - asn1::log_error("The id=%d is not recognized", id); return {}; } // Value ::= OPEN TYPE -void enb_cfg_transfer_ies_o::value_c::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("SONConfigurationTransfer"); - c.to_json(j); - j.end_obj(); -} -SRSASN_CODE enb_cfg_transfer_ies_o::value_c::pack(bit_ref& bref) const +son_cfg_transfer_s& enb_cfg_transfer_ies_o::value_c::son_cfg_transfer_ect() { - varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE(c.pack(bref)); - return SRSASN_SUCCESS; + assert_choice_type("SONConfigurationTransfer", type_.to_string(), "Value"); + return c.get(); } -SRSASN_CODE enb_cfg_transfer_ies_o::value_c::unpack(cbit_ref& bref) +en_dcson_cfg_transfer_s& enb_cfg_transfer_ies_o::value_c::en_dcson_cfg_transfer_ect() { - varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE(c.unpack(bref)); - return SRSASN_SUCCESS; + assert_choice_type("EN-DCSONConfigurationTransfer", type_.to_string(), "Value"); + return c.get(); } - -std::string enb_cfg_transfer_ies_o::value_c::types_opts::to_string() const +const son_cfg_transfer_s& enb_cfg_transfer_ies_o::value_c::son_cfg_transfer_ect() const { - static const char* options[] = {"SONConfigurationTransfer"}; - return convert_enum_idx(options, 1, value, "enb_cfg_transfer_ies_o::value_c::types"); + assert_choice_type("SONConfigurationTransfer", type_.to_string(), "Value"); + return c.get(); } - -// ENBConfigurationTransfer ::= SEQUENCE -SRSASN_CODE enb_cfg_transfer_s::pack(bit_ref& bref) const +const en_dcson_cfg_transfer_s& enb_cfg_transfer_ies_o::value_c::en_dcson_cfg_transfer_ect() const { - bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); - - return SRSASN_SUCCESS; + assert_choice_type("EN-DCSONConfigurationTransfer", type_.to_string(), "Value"); + return c.get(); } -SRSASN_CODE enb_cfg_transfer_s::unpack(cbit_ref& bref) +void enb_cfg_transfer_ies_o::value_c::destroy_() { - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); - - return SRSASN_SUCCESS; -} -void enb_cfg_transfer_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("protocolIEs"); - j.end_obj(); -} - -// RAT-Type ::= ENUMERATED -std::string rat_type_opts::to_string() const -{ - 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 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) -{ - return 232 == id; + switch (type_) { + case types::son_cfg_transfer_ect: + c.destroy(); + break; + case types::en_dcson_cfg_transfer_ect: + c.destroy(); + break; + default: + break; + } } -crit_e supported_tas_item_ext_ies_o::get_crit(const uint32_t& id) +void enb_cfg_transfer_ies_o::value_c::set(types::options e) { - if (id == 232) { - return crit_e::reject; + destroy_(); + type_ = e; + switch (type_) { + case types::son_cfg_transfer_ect: + c.init(); + break; + case types::en_dcson_cfg_transfer_ect: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enb_cfg_transfer_ies_o::value_c"); } - asn1::log_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) +enb_cfg_transfer_ies_o::value_c::value_c(const enb_cfg_transfer_ies_o::value_c& other) { - ext_c ret{}; - if (id != 232) { - asn1::log_error("The id=%d is not recognized", id); + type_ = other.type(); + switch (type_) { + case types::son_cfg_transfer_ect: + c.init(other.c.get()); + break; + case types::en_dcson_cfg_transfer_ect: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enb_cfg_transfer_ies_o::value_c"); } - return ret; } -presence_e supported_tas_item_ext_ies_o::get_presence(const uint32_t& id) +enb_cfg_transfer_ies_o::value_c& +enb_cfg_transfer_ies_o::value_c::operator=(const enb_cfg_transfer_ies_o::value_c& other) { - if (id == 232) { - return presence_e::optional; + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::son_cfg_transfer_ect: + c.set(other.c.get()); + break; + case types::en_dcson_cfg_transfer_ect: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enb_cfg_transfer_ies_o::value_c"); } - asn1::log_error("The id=%d is not recognized", id); - return {}; -} -// Extension ::= OPEN TYPE -void supported_tas_item_ext_ies_o::ext_c::to_json(json_writer& j) const + return *this; +} +void enb_cfg_transfer_ies_o::value_c::to_json(json_writer& j) const { j.start_obj(); - j.write_str("RAT-Type", "nbiot"); + switch (type_) { + case types::son_cfg_transfer_ect: + j.write_fieldname("SONConfigurationTransfer"); + c.get().to_json(j); + break; + case types::en_dcson_cfg_transfer_ect: + j.write_fieldname("EN-DCSONConfigurationTransfer"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "enb_cfg_transfer_ies_o::value_c"); + } j.end_obj(); } -SRSASN_CODE supported_tas_item_ext_ies_o::ext_c::pack(bit_ref& bref) const +SRSASN_CODE enb_cfg_transfer_ies_o::value_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE(c.pack(bref)); + switch (type_) { + case types::son_cfg_transfer_ect: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::en_dcson_cfg_transfer_ect: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "enb_cfg_transfer_ies_o::value_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } return SRSASN_SUCCESS; } -SRSASN_CODE supported_tas_item_ext_ies_o::ext_c::unpack(cbit_ref& bref) +SRSASN_CODE enb_cfg_transfer_ies_o::value_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE(c.unpack(bref)); + switch (type_) { + case types::son_cfg_transfer_ect: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::en_dcson_cfg_transfer_ect: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "enb_cfg_transfer_ies_o::value_c"); + return SRSASN_ERROR_DECODE_FAIL; + } return SRSASN_SUCCESS; } -std::string supported_tas_item_ext_ies_o::ext_c::types_opts::to_string() const +std::string enb_cfg_transfer_ies_o::value_c::types_opts::to_string() const { - static const char* options[] = {"RAT-Type"}; - return convert_enum_idx(options, 1, value, "supported_tas_item_ext_ies_o::ext_c::types"); + static const char* options[] = {"SONConfigurationTransfer", "EN-DCSONConfigurationTransfer"}; + return convert_enum_idx(options, 2, value, "enb_cfg_transfer_ies_o::value_c::types"); } -// SupportedTAs-Item ::= SEQUENCE -SRSASN_CODE supported_tas_item_s::pack(bit_ref& bref) const +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), en_dcson_cfg_transfer_ect(294, crit_e::ignore) +{} +SRSASN_CODE enb_cfg_transfer_ies_container::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ie_exts_present, 1)); + uint32_t nof_ies = 0; + nof_ies += son_cfg_transfer_ect_present ? 1 : 0; + nof_ies += en_dcson_cfg_transfer_ect_present ? 1 : 0; + pack_length(bref, nof_ies, 0u, 65535u, true); - HANDLE_CODE(tac.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, broadcast_plmns, 1, 6, true)); - if (ie_exts_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); + if (son_cfg_transfer_ect_present) { + HANDLE_CODE(son_cfg_transfer_ect.pack(bref)); + } + if (en_dcson_cfg_transfer_ect_present) { + HANDLE_CODE(en_dcson_cfg_transfer_ect.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE supported_tas_item_s::unpack(cbit_ref& bref) +SRSASN_CODE enb_cfg_transfer_ies_container::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 0u, 65535u, true); - HANDLE_CODE(tac.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(broadcast_plmns, bref, 1, 6, true)); - if (ie_exts_present) { - HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); + 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; + case 294: + en_dcson_cfg_transfer_ect_present = true; + en_dcson_cfg_transfer_ect.id = c.id; + en_dcson_cfg_transfer_ect.crit = c.crit; + en_dcson_cfg_transfer_ect.value = c.value.en_dcson_cfg_transfer_ect(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } } return SRSASN_SUCCESS; } -void supported_tas_item_s::to_json(json_writer& j) const +void enb_cfg_transfer_ies_container::to_json(json_writer& j) const { j.start_obj(); - j.write_str("tAC", tac.to_string()); - j.start_array("broadcastPLMNs"); - for (const auto& e1 : broadcast_plmns) { - j.write_str(e1.to_string()); + if (son_cfg_transfer_ect_present) { + j.write_fieldname(""); + son_cfg_transfer_ect.to_json(j); } - j.end_array(); - if (ie_exts_present) { - j.write_fieldname("iE-Extensions"); + if (en_dcson_cfg_transfer_ect_present) { + j.write_fieldname(""); + en_dcson_cfg_transfer_ect.to_json(j); } j.end_obj(); } +// ENBConfigurationTransfer ::= SEQUENCE +SRSASN_CODE enb_cfg_transfer_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(protocol_ies.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE enb_cfg_transfer_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(protocol_ies.unpack(bref)); + + return SRSASN_SUCCESS; +} +void enb_cfg_transfer_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("protocolIEs"); + protocol_ies.to_json(j); + j.end_obj(); +} + // NB-IoT-DefaultPagingDRX ::= ENUMERATED std::string nb_io_t_default_paging_drx_opts::to_string() const { @@ -17367,12 +21499,12 @@ uint16_t paging_drx_opts::to_number() const // ENBConfigurationUpdateIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t enb_cfg_upd_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {60, 64, 128, 137, 234}; - return map_enum_number(options, 5, idx, "id"); + static const uint32_t options[] = {60, 64, 128, 137, 234, 292, 293}; + return map_enum_number(options, 7, idx, "id"); } bool enb_cfg_upd_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {60, 64, 128, 137, 234}; + static const uint32_t options[] = {60, 64, 128, 137, 234, 292, 293}; for (const auto& o : options) { if (o == id) { return true; @@ -17393,6 +21525,10 @@ crit_e enb_cfg_upd_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 234: return crit_e::ignore; + case 292: + return crit_e::ignore; + case 293: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -17417,6 +21553,12 @@ enb_cfg_upd_ies_o::value_c enb_cfg_upd_ies_o::get_value(const uint32_t& id) case 234: ret.set(value_c::types::nb_io_t_default_paging_drx); break; + case 292: + ret.set(value_c::types::connectedeng_nb_to_add_list); + break; + case 293: + ret.set(value_c::types::connectedeng_nb_to_rem_list); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -17435,6 +21577,10 @@ presence_e enb_cfg_upd_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 234: return presence_e::optional; + case 292: + return presence_e::optional; + case 293: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -17467,6 +21613,16 @@ nb_io_t_default_paging_drx_e& enb_cfg_upd_ies_o::value_c::nb_io_t_default_paging assert_choice_type("NB-IoT-DefaultPagingDRX", type_.to_string(), "Value"); return c.get(); } +connectedeng_nb_list_l& enb_cfg_upd_ies_o::value_c::connectedeng_nb_to_add_list() +{ + assert_choice_type("ConnectedengNBList", type_.to_string(), "Value"); + return c.get(); +} +connectedeng_nb_list_l& enb_cfg_upd_ies_o::value_c::connectedeng_nb_to_rem_list() +{ + assert_choice_type("ConnectedengNBList", type_.to_string(), "Value"); + return c.get(); +} const printable_string<1, 150, true, true>& enb_cfg_upd_ies_o::value_c::enbname() const { assert_choice_type("PrintableString", type_.to_string(), "Value"); @@ -17492,6 +21648,16 @@ const nb_io_t_default_paging_drx_e& enb_cfg_upd_ies_o::value_c::nb_io_t_default_ assert_choice_type("NB-IoT-DefaultPagingDRX", type_.to_string(), "Value"); return c.get(); } +const connectedeng_nb_list_l& enb_cfg_upd_ies_o::value_c::connectedeng_nb_to_add_list() const +{ + assert_choice_type("ConnectedengNBList", type_.to_string(), "Value"); + return c.get(); +} +const connectedeng_nb_list_l& enb_cfg_upd_ies_o::value_c::connectedeng_nb_to_rem_list() const +{ + assert_choice_type("ConnectedengNBList", type_.to_string(), "Value"); + return c.get(); +} void enb_cfg_upd_ies_o::value_c::destroy_() { switch (type_) { @@ -17504,6 +21670,12 @@ void enb_cfg_upd_ies_o::value_c::destroy_() case types::csg_id_list: c.destroy(); break; + case types::connectedeng_nb_to_add_list: + c.destroy(); + break; + case types::connectedeng_nb_to_rem_list: + c.destroy(); + break; default: break; } @@ -17526,6 +21698,12 @@ void enb_cfg_upd_ies_o::value_c::set(types::options e) break; case types::nb_io_t_default_paging_drx: break; + case types::connectedeng_nb_to_add_list: + c.init(); + break; + case types::connectedeng_nb_to_rem_list: + c.init(); + break; case types::nulltype: break; default: @@ -17551,6 +21729,12 @@ enb_cfg_upd_ies_o::value_c::value_c(const enb_cfg_upd_ies_o::value_c& other) case types::nb_io_t_default_paging_drx: c.init(other.c.get()); break; + case types::connectedeng_nb_to_add_list: + c.init(other.c.get()); + break; + case types::connectedeng_nb_to_rem_list: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -17579,6 +21763,12 @@ enb_cfg_upd_ies_o::value_c& enb_cfg_upd_ies_o::value_c::operator=(const enb_cfg_ case types::nb_io_t_default_paging_drx: c.set(other.c.get()); break; + case types::connectedeng_nb_to_add_list: + c.set(other.c.get()); + break; + case types::connectedeng_nb_to_rem_list: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -17614,6 +21804,20 @@ void enb_cfg_upd_ies_o::value_c::to_json(json_writer& j) const case types::nb_io_t_default_paging_drx: j.write_str("NB-IoT-DefaultPagingDRX", c.get().to_string()); break; + case types::connectedeng_nb_to_add_list: + j.start_array("ConnectedengNBList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::connectedeng_nb_to_rem_list: + j.start_array("ConnectedengNBList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; default: log_invalid_choice_id(type_, "enb_cfg_upd_ies_o::value_c"); } @@ -17638,6 +21842,12 @@ SRSASN_CODE enb_cfg_upd_ies_o::value_c::pack(bit_ref& bref) const case types::nb_io_t_default_paging_drx: HANDLE_CODE(c.get().pack(bref)); break; + case types::connectedeng_nb_to_add_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; + case types::connectedeng_nb_to_rem_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; default: log_invalid_choice_id(type_, "enb_cfg_upd_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -17663,6 +21873,12 @@ SRSASN_CODE enb_cfg_upd_ies_o::value_c::unpack(cbit_ref& bref) case types::nb_io_t_default_paging_drx: HANDLE_CODE(c.get().unpack(bref)); break; + case types::connectedeng_nb_to_add_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; + case types::connectedeng_nb_to_rem_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; default: log_invalid_choice_id(type_, "enb_cfg_upd_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -17672,9 +21888,14 @@ 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 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"); + static const char* options[] = {"PrintableString", + "SupportedTAs", + "CSG-IdList", + "PagingDRX", + "NB-IoT-DefaultPagingDRX", + "ConnectedengNBList", + "ConnectedengNBList"}; + return convert_enum_idx(options, 7, value, "enb_cfg_upd_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -17684,7 +21905,9 @@ enb_cfg_upd_ies_container::enb_cfg_upd_ies_container() : supported_tas(64, crit_e::reject), csg_id_list(128, crit_e::reject), default_paging_drx(137, crit_e::ignore), - nb_io_t_default_paging_drx(234, crit_e::ignore) + nb_io_t_default_paging_drx(234, crit_e::ignore), + connectedeng_nb_to_add_list(292, crit_e::ignore), + connectedeng_nb_to_rem_list(293, crit_e::ignore) {} SRSASN_CODE enb_cfg_upd_ies_container::pack(bit_ref& bref) const { @@ -17694,6 +21917,8 @@ SRSASN_CODE enb_cfg_upd_ies_container::pack(bit_ref& bref) const nof_ies += csg_id_list_present ? 1 : 0; nof_ies += default_paging_drx_present ? 1 : 0; nof_ies += nb_io_t_default_paging_drx_present ? 1 : 0; + nof_ies += connectedeng_nb_to_add_list_present ? 1 : 0; + nof_ies += connectedeng_nb_to_rem_list_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); if (enbname_present) { @@ -17711,6 +21936,12 @@ SRSASN_CODE enb_cfg_upd_ies_container::pack(bit_ref& bref) const if (nb_io_t_default_paging_drx_present) { HANDLE_CODE(nb_io_t_default_paging_drx.pack(bref)); } + if (connectedeng_nb_to_add_list_present) { + HANDLE_CODE(connectedeng_nb_to_add_list.pack(bref)); + } + if (connectedeng_nb_to_rem_list_present) { + HANDLE_CODE(connectedeng_nb_to_rem_list.pack(bref)); + } return SRSASN_SUCCESS; } @@ -17753,6 +21984,18 @@ SRSASN_CODE enb_cfg_upd_ies_container::unpack(cbit_ref& bref) nb_io_t_default_paging_drx.crit = c.crit; nb_io_t_default_paging_drx.value = c.value.nb_io_t_default_paging_drx(); break; + case 292: + connectedeng_nb_to_add_list_present = true; + connectedeng_nb_to_add_list.id = c.id; + connectedeng_nb_to_add_list.crit = c.crit; + connectedeng_nb_to_add_list.value = c.value.connectedeng_nb_to_add_list(); + break; + case 293: + connectedeng_nb_to_rem_list_present = true; + connectedeng_nb_to_rem_list.id = c.id; + connectedeng_nb_to_rem_list.crit = c.crit; + connectedeng_nb_to_rem_list.value = c.value.connectedeng_nb_to_rem_list(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -17784,6 +22027,14 @@ void enb_cfg_upd_ies_container::to_json(json_writer& j) const j.write_fieldname(""); nb_io_t_default_paging_drx.to_json(j); } + if (connectedeng_nb_to_add_list_present) { + j.write_fieldname(""); + connectedeng_nb_to_add_list.to_json(j); + } + if (connectedeng_nb_to_rem_list_present) { + j.write_fieldname(""); + connectedeng_nb_to_rem_list.to_json(j); + } j.end_obj(); } @@ -19058,12 +23309,12 @@ 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 const uint32_t options[] = {0, 8, 2, 58}; - return map_enum_number(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 58, 96}; + return map_enum_number(options, 5, idx, "id"); } bool error_ind_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 2, 58}; + static const uint32_t options[] = {0, 8, 2, 58, 96}; for (const auto& o : options) { if (o == id) { return true; @@ -19082,6 +23333,8 @@ crit_e error_ind_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 58: return crit_e::ignore; + case 96: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -19103,6 +23356,9 @@ error_ind_ies_o::value_c error_ind_ies_o::get_value(const uint32_t& id) case 58: ret.set(value_c::types::crit_diagnostics); break; + case 96: + ret.set(value_c::types::s_tmsi); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -19119,6 +23375,8 @@ presence_e error_ind_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 58: return presence_e::optional; + case 96: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -19146,6 +23404,11 @@ crit_diagnostics_s& error_ind_ies_o::value_c::crit_diagnostics() assert_choice_type("CriticalityDiagnostics", type_.to_string(), "Value"); return c.get(); } +s_tmsi_s& error_ind_ies_o::value_c::s_tmsi() +{ + assert_choice_type("S-TMSI", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& error_ind_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -19166,6 +23429,11 @@ const crit_diagnostics_s& error_ind_ies_o::value_c::crit_diagnostics() const assert_choice_type("CriticalityDiagnostics", type_.to_string(), "Value"); return c.get(); } +const s_tmsi_s& error_ind_ies_o::value_c::s_tmsi() const +{ + assert_choice_type("S-TMSI", type_.to_string(), "Value"); + return c.get(); +} void error_ind_ies_o::value_c::destroy_() { switch (type_) { @@ -19175,6 +23443,9 @@ void error_ind_ies_o::value_c::destroy_() case types::crit_diagnostics: c.destroy(); break; + case types::s_tmsi: + c.destroy(); + break; default: break; } @@ -19194,6 +23465,9 @@ void error_ind_ies_o::value_c::set(types::options e) case types::crit_diagnostics: c.init(); break; + case types::s_tmsi: + c.init(); + break; case types::nulltype: break; default: @@ -19216,6 +23490,9 @@ error_ind_ies_o::value_c::value_c(const error_ind_ies_o::value_c& other) case types::crit_diagnostics: c.init(other.c.get()); break; + case types::s_tmsi: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -19241,6 +23518,9 @@ error_ind_ies_o::value_c& error_ind_ies_o::value_c::operator=(const error_ind_ie case types::crit_diagnostics: c.set(other.c.get()); break; + case types::s_tmsi: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -19267,6 +23547,10 @@ void error_ind_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("CriticalityDiagnostics"); c.get().to_json(j); break; + case types::s_tmsi: + j.write_fieldname("S-TMSI"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "error_ind_ies_o::value_c"); } @@ -19288,6 +23572,9 @@ SRSASN_CODE error_ind_ies_o::value_c::pack(bit_ref& bref) const case types::crit_diagnostics: HANDLE_CODE(c.get().pack(bref)); break; + case types::s_tmsi: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "error_ind_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -19310,6 +23597,9 @@ SRSASN_CODE error_ind_ies_o::value_c::unpack(cbit_ref& bref) case types::crit_diagnostics: HANDLE_CODE(c.get().unpack(bref)); break; + case types::s_tmsi: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "error_ind_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -19320,8 +23610,8 @@ 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 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"); + "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause", "CriticalityDiagnostics", "S-TMSI"}; + return convert_enum_idx(options, 5, value, "error_ind_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -19330,7 +23620,8 @@ error_ind_ies_container::error_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), enb_ue_s1ap_id(8, crit_e::ignore), cause(2, crit_e::ignore), - crit_diagnostics(58, crit_e::ignore) + crit_diagnostics(58, crit_e::ignore), + s_tmsi(96, crit_e::ignore) {} SRSASN_CODE error_ind_ies_container::pack(bit_ref& bref) const { @@ -19339,6 +23630,7 @@ SRSASN_CODE error_ind_ies_container::pack(bit_ref& bref) const nof_ies += enb_ue_s1ap_id_present ? 1 : 0; nof_ies += cause_present ? 1 : 0; nof_ies += crit_diagnostics_present ? 1 : 0; + nof_ies += s_tmsi_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); if (mme_ue_s1ap_id_present) { @@ -19353,6 +23645,9 @@ SRSASN_CODE error_ind_ies_container::pack(bit_ref& bref) const if (crit_diagnostics_present) { HANDLE_CODE(crit_diagnostics.pack(bref)); } + if (s_tmsi_present) { + HANDLE_CODE(s_tmsi.pack(bref)); + } return SRSASN_SUCCESS; } @@ -19389,6 +23684,12 @@ SRSASN_CODE error_ind_ies_container::unpack(cbit_ref& bref) crit_diagnostics.crit = c.crit; crit_diagnostics.value = c.value.crit_diagnostics(); break; + case 96: + s_tmsi_present = true; + s_tmsi.id = c.id; + s_tmsi.crit = c.crit; + s_tmsi.value = c.value.s_tmsi(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -19416,6 +23717,10 @@ void error_ind_ies_container::to_json(json_writer& j) const j.write_fieldname(""); crit_diagnostics.to_json(j); } + if (s_tmsi_present) { + j.write_fieldname(""); + s_tmsi.to_json(j); + } j.end_obj(); } @@ -20456,8 +24761,21 @@ void ho_cancel_ack_s::to_json(json_writer& j) const // HandoverType ::= ENUMERATED std::string handov_type_opts::to_string() const { - static const char* options[] = {"intralte", "ltetoutran", "ltetogeran", "utrantolte", "gerantolte"}; - return convert_enum_idx(options, 5, value, "handov_type_e"); + static const char* options[] = { + "intralte", "ltetoutran", "ltetogeran", "utrantolte", "gerantolte", "eps-to-5gs", "fivegs-to-eps"}; + return convert_enum_idx(options, 7, value, "handov_type_e"); +} +int8_t handov_type_opts::to_number() const +{ + switch (value) { + case eps_to_minus5gs: + return -5; + case fivegs_to_eps: + return 5; + default: + invalid_enum_number(value, "handov_type_e"); + } + return 0; } // HandoverCommandIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -21447,12 +25765,12 @@ 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 const uint32_t options[] = {0, 8, 100, 67, 176, 186}; - return map_enum_number(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 100, 67, 176, 186, 288}; + return map_enum_number(options, 7, idx, "id"); } bool ho_notify_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 100, 67, 176, 186}; + static const uint32_t options[] = {0, 8, 100, 67, 176, 186, 288}; for (const auto& o : options) { if (o == id) { return true; @@ -21475,6 +25793,8 @@ crit_e ho_notify_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 186: return crit_e::ignore; + case 288: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -21502,6 +25822,9 @@ ho_notify_ies_o::value_c ho_notify_ies_o::get_value(const uint32_t& id) case 186: ret.set(value_c::types::lhn_id); break; + case 288: + ret.set(value_c::types::ps_cell_info); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -21522,6 +25845,8 @@ presence_e ho_notify_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 186: return presence_e::optional; + case 288: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -21559,6 +25884,11 @@ bounded_octstring<32, 256, true>& ho_notify_ies_o::value_c::lhn_id() assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } +ps_cell_info_s& ho_notify_ies_o::value_c::ps_cell_info() +{ + assert_choice_type("PSCellInformation", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& ho_notify_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -21589,6 +25919,11 @@ const bounded_octstring<32, 256, true>& ho_notify_ies_o::value_c::lhn_id() const assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } +const ps_cell_info_s& ho_notify_ies_o::value_c::ps_cell_info() const +{ + assert_choice_type("PSCellInformation", type_.to_string(), "Value"); + return c.get(); +} void ho_notify_ies_o::value_c::destroy_() { switch (type_) { @@ -21604,6 +25939,9 @@ void ho_notify_ies_o::value_c::destroy_() case types::lhn_id: c.destroy >(); break; + case types::ps_cell_info: + c.destroy(); + break; default: break; } @@ -21629,6 +25967,9 @@ void ho_notify_ies_o::value_c::set(types::options e) case types::lhn_id: c.init >(); break; + case types::ps_cell_info: + c.init(); + break; case types::nulltype: break; default: @@ -21657,6 +25998,9 @@ ho_notify_ies_o::value_c::value_c(const ho_notify_ies_o::value_c& other) case types::lhn_id: c.init(other.c.get >()); break; + case types::ps_cell_info: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -21688,6 +26032,9 @@ ho_notify_ies_o::value_c& ho_notify_ies_o::value_c::operator=(const ho_notify_ie case types::lhn_id: c.set(other.c.get >()); break; + case types::ps_cell_info: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -21721,6 +26068,10 @@ void ho_notify_ies_o::value_c::to_json(json_writer& j) const case types::lhn_id: j.write_str("OCTET STRING", c.get >().to_string()); break; + case types::ps_cell_info: + j.write_fieldname("PSCellInformation"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "ho_notify_ies_o::value_c"); } @@ -21748,6 +26099,9 @@ SRSASN_CODE ho_notify_ies_o::value_c::pack(bit_ref& bref) const case types::lhn_id: HANDLE_CODE((c.get >().pack(bref))); break; + case types::ps_cell_info: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "ho_notify_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -21776,6 +26130,9 @@ SRSASN_CODE ho_notify_ies_o::value_c::unpack(cbit_ref& bref) case types::lhn_id: HANDLE_CODE((c.get >().unpack(bref))); break; + case types::ps_cell_info: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "ho_notify_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -21785,9 +26142,14 @@ 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 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"); + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "EUTRAN-CGI", + "TAI", + "TunnelInformation", + "OCTET STRING", + "PSCellInformation"}; + return convert_enum_idx(options, 7, value, "ho_notify_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -21798,13 +26160,15 @@ ho_notify_ies_container::ho_notify_ies_container() : eutran_cgi(100, crit_e::ignore), tai(67, crit_e::ignore), tunnel_info_for_bbf(176, crit_e::ignore), - lhn_id(186, crit_e::ignore) + lhn_id(186, crit_e::ignore), + ps_cell_info(288, crit_e::ignore) {} SRSASN_CODE ho_notify_ies_container::pack(bit_ref& bref) const { uint32_t nof_ies = 4; nof_ies += tunnel_info_for_bbf_present ? 1 : 0; nof_ies += lhn_id_present ? 1 : 0; + nof_ies += ps_cell_info_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -21817,6 +26181,9 @@ SRSASN_CODE ho_notify_ies_container::pack(bit_ref& bref) const if (lhn_id_present) { HANDLE_CODE(lhn_id.pack(bref)); } + if (ps_cell_info_present) { + HANDLE_CODE(ps_cell_info.pack(bref)); + } return SRSASN_SUCCESS; } @@ -21867,6 +26234,12 @@ SRSASN_CODE ho_notify_ies_container::unpack(cbit_ref& bref) lhn_id.crit = c.crit; lhn_id.value = c.value.lhn_id(); break; + case 288: + ps_cell_info_present = true; + ps_cell_info.id = c.id; + ps_cell_info.crit = c.crit; + ps_cell_info.value = c.value.ps_cell_info(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -21898,6 +26271,10 @@ void ho_notify_ies_container::to_json(json_writer& j) const j.write_fieldname(""); lhn_id.to_json(j); } + if (ps_cell_info_present) { + j.write_fieldname(""); + ps_cell_info.to_json(j); + } j.end_obj(); } @@ -22383,13 +26760,14 @@ uint16_t logging_interv_opts::to_number() const // M3period ::= ENUMERATED std::string m3period_opts::to_string() const { - static const char* options[] = {"ms100", "ms1000", "ms10000"}; - return convert_enum_idx(options, 3, value, "m3period_e"); + static const char* options[] = { + "ms100", "ms1000", "ms10000", "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240", "min1"}; + return convert_enum_idx(options, 10, value, "m3period_e"); } uint16_t m3period_opts::to_number() const { - static const uint16_t options[] = {100, 1000, 10000}; - return map_enum_number(options, 3, value, "m3period_e"); + static const uint16_t options[] = {100, 1000, 10000, 1024, 1280, 2048, 2560, 5120, 10240, 1}; + return map_enum_number(options, 10, value, "m3period_e"); } // M4period ::= ENUMERATED @@ -22441,6 +26819,13 @@ uint16_t m6report_interv_opts::to_number() const return map_enum_number(options, 4, value, "m6report_interv_e"); } +// WLANMeasConfig ::= ENUMERATED +std::string wlan_meas_cfg_opts::to_string() const +{ + static const char* options[] = {"setup"}; + return convert_enum_idx(options, 1, value, "wlan_meas_cfg_e"); +} + // LoggedMBSFNMDT ::= SEQUENCE SRSASN_CODE logged_mbsfnmdt_s::pack(bit_ref& bref) const { @@ -22834,15 +27219,100 @@ uint16_t report_interv_mdt_opts::to_number() const return map_enum_number(options, 13, value, "report_interv_mdt_e"); } +// WLANMeasurementConfiguration ::= SEQUENCE +SRSASN_CODE wlan_meas_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(wlan_meas_cfg_name_list_present, 1)); + HANDLE_CODE(bref.pack(wlan_rssi_present, 1)); + HANDLE_CODE(bref.pack(wlan_rtt_present, 1)); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(wlan_meas_cfg.pack(bref)); + if (wlan_meas_cfg_name_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_meas_cfg_name_list, 1, 4, true)); + } + if (wlan_rssi_present) { + HANDLE_CODE(wlan_rssi.pack(bref)); + } + if (wlan_rtt_present) { + HANDLE_CODE(wlan_rtt.pack(bref)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_meas_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(wlan_meas_cfg_name_list_present, 1)); + HANDLE_CODE(bref.unpack(wlan_rssi_present, 1)); + HANDLE_CODE(bref.unpack(wlan_rtt_present, 1)); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(wlan_meas_cfg.unpack(bref)); + if (wlan_meas_cfg_name_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_meas_cfg_name_list, bref, 1, 4, true)); + } + if (wlan_rssi_present) { + HANDLE_CODE(wlan_rssi.unpack(bref)); + } + if (wlan_rtt_present) { + HANDLE_CODE(wlan_rtt.unpack(bref)); + } + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void wlan_meas_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("wlanMeasConfig", "setup"); + if (wlan_meas_cfg_name_list_present) { + j.start_array("wlanMeasConfigNameList"); + for (const auto& e1 : wlan_meas_cfg_name_list) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (wlan_rssi_present) { + j.write_str("wlan-rssi", "true"); + } + if (wlan_rtt_present) { + j.write_str("wlan-rtt", "true"); + } + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + +std::string wlan_meas_cfg_s::wlan_rssi_opts::to_string() const +{ + static const char* options[] = {"true"}; + return convert_enum_idx(options, 1, value, "wlan_meas_cfg_s::wlan_rssi_e_"); +} + +std::string wlan_meas_cfg_s::wlan_rtt_opts::to_string() const +{ + static const char* options[] = {"true"}; + return convert_enum_idx(options, 1, value, "wlan_meas_cfg_s::wlan_rtt_e_"); +} + // ImmediateMDT-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t immediate_mdt_ext_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {171, 172, 173, 174, 220, 221}; - return map_enum_number(options, 6, idx, "id"); + static const uint32_t options[] = {171, 172, 173, 174, 220, 221, 284, 285}; + return map_enum_number(options, 8, idx, "id"); } bool immediate_mdt_ext_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {171, 172, 173, 174, 220, 221}; + static const uint32_t options[] = {171, 172, 173, 174, 220, 221, 284, 285}; for (const auto& o : options) { if (o == id) { return true; @@ -22865,6 +27335,10 @@ crit_e immediate_mdt_ext_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 221: return crit_e::ignore; + case 284: + return crit_e::ignore; + case 285: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -22892,6 +27366,12 @@ immediate_mdt_ext_ies_o::ext_c immediate_mdt_ext_ies_o::get_ext(const uint32_t& case 221: ret.set(ext_c::types::m7_cfg); break; + case 284: + ret.set(ext_c::types::bluetooth_meas_cfg); + break; + case 285: + ret.set(ext_c::types::wlan_meas_cfg); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -22912,6 +27392,10 @@ presence_e immediate_mdt_ext_ies_o::get_presence(const uint32_t& id) return presence_e::conditional; case 221: return presence_e::conditional; + case 284: + return presence_e::optional; + case 285: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -22949,6 +27433,16 @@ m7_cfg_s& immediate_mdt_ext_ies_o::ext_c::m7_cfg() assert_choice_type("M7Configuration", type_.to_string(), "Extension"); return c.get(); } +bluetooth_meas_cfg_s& immediate_mdt_ext_ies_o::ext_c::bluetooth_meas_cfg() +{ + assert_choice_type("BluetoothMeasurementConfiguration", type_.to_string(), "Extension"); + return c.get(); +} +wlan_meas_cfg_s& immediate_mdt_ext_ies_o::ext_c::wlan_meas_cfg() +{ + assert_choice_type("WLANMeasurementConfiguration", type_.to_string(), "Extension"); + return c.get(); +} const m3_cfg_s& immediate_mdt_ext_ies_o::ext_c::m3_cfg() const { assert_choice_type("M3Configuration", type_.to_string(), "Extension"); @@ -22979,6 +27473,16 @@ const m7_cfg_s& immediate_mdt_ext_ies_o::ext_c::m7_cfg() const assert_choice_type("M7Configuration", type_.to_string(), "Extension"); return c.get(); } +const bluetooth_meas_cfg_s& immediate_mdt_ext_ies_o::ext_c::bluetooth_meas_cfg() const +{ + assert_choice_type("BluetoothMeasurementConfiguration", type_.to_string(), "Extension"); + return c.get(); +} +const wlan_meas_cfg_s& immediate_mdt_ext_ies_o::ext_c::wlan_meas_cfg() const +{ + assert_choice_type("WLANMeasurementConfiguration", type_.to_string(), "Extension"); + return c.get(); +} void immediate_mdt_ext_ies_o::ext_c::destroy_() { switch (type_) { @@ -23000,6 +27504,12 @@ void immediate_mdt_ext_ies_o::ext_c::destroy_() case types::m7_cfg: c.destroy(); break; + case types::bluetooth_meas_cfg: + c.destroy(); + break; + case types::wlan_meas_cfg: + c.destroy(); + break; default: break; } @@ -23027,6 +27537,12 @@ void immediate_mdt_ext_ies_o::ext_c::set(types::options e) case types::m7_cfg: c.init(); break; + case types::bluetooth_meas_cfg: + c.init(); + break; + case types::wlan_meas_cfg: + c.init(); + break; case types::nulltype: break; default: @@ -23055,6 +27571,12 @@ immediate_mdt_ext_ies_o::ext_c::ext_c(const immediate_mdt_ext_ies_o::ext_c& othe case types::m7_cfg: c.init(other.c.get()); break; + case types::bluetooth_meas_cfg: + c.init(other.c.get()); + break; + case types::wlan_meas_cfg: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -23086,6 +27608,12 @@ immediate_mdt_ext_ies_o::ext_c& immediate_mdt_ext_ies_o::ext_c::operator=(const case types::m7_cfg: c.set(other.c.get()); break; + case types::bluetooth_meas_cfg: + c.set(other.c.get()); + break; + case types::wlan_meas_cfg: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -23121,6 +27649,14 @@ void immediate_mdt_ext_ies_o::ext_c::to_json(json_writer& j) const j.write_fieldname("M7Configuration"); c.get().to_json(j); break; + case types::bluetooth_meas_cfg: + j.write_fieldname("BluetoothMeasurementConfiguration"); + c.get().to_json(j); + break; + case types::wlan_meas_cfg: + j.write_fieldname("WLANMeasurementConfiguration"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "immediate_mdt_ext_ies_o::ext_c"); } @@ -23148,6 +27684,12 @@ SRSASN_CODE immediate_mdt_ext_ies_o::ext_c::pack(bit_ref& bref) const case types::m7_cfg: HANDLE_CODE(c.get().pack(bref)); break; + case types::bluetooth_meas_cfg: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::wlan_meas_cfg: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "immediate_mdt_ext_ies_o::ext_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -23176,6 +27718,12 @@ SRSASN_CODE immediate_mdt_ext_ies_o::ext_c::unpack(cbit_ref& bref) case types::m7_cfg: HANDLE_CODE(c.get().unpack(bref)); break; + case types::bluetooth_meas_cfg: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::wlan_meas_cfg: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "immediate_mdt_ext_ies_o::ext_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -23185,9 +27733,15 @@ 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 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"); + static const char* options[] = {"M3Configuration", + "M4Configuration", + "M5Configuration", + "BIT STRING", + "M6Configuration", + "M7Configuration", + "BluetoothMeasurementConfiguration", + "WLANMeasurementConfiguration"}; + return convert_enum_idx(options, 8, value, "immediate_mdt_ext_ies_o::ext_c::types"); } uint8_t immediate_mdt_ext_ies_o::ext_c::types_opts::to_number() const { @@ -23208,6 +27762,206 @@ uint8_t immediate_mdt_ext_ies_o::ext_c::types_opts::to_number() const return 0; } +// LoggedMDT-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t logged_mdt_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {284, 285}; + return map_enum_number(options, 2, idx, "id"); +} +bool logged_mdt_ext_ies_o::is_id_valid(const uint32_t& id) +{ + static const uint32_t options[] = {284, 285}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; +} +crit_e logged_mdt_ext_ies_o::get_crit(const uint32_t& id) +{ + switch (id) { + case 284: + return crit_e::ignore; + case 285: + return crit_e::ignore; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} +logged_mdt_ext_ies_o::ext_c logged_mdt_ext_ies_o::get_ext(const uint32_t& id) +{ + ext_c ret{}; + switch (id) { + case 284: + ret.set(ext_c::types::bluetooth_meas_cfg); + break; + case 285: + ret.set(ext_c::types::wlan_meas_cfg); + break; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e logged_mdt_ext_ies_o::get_presence(const uint32_t& id) +{ + switch (id) { + case 284: + return presence_e::optional; + case 285: + return presence_e::optional; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} + +// Extension ::= OPEN TYPE +bluetooth_meas_cfg_s& logged_mdt_ext_ies_o::ext_c::bluetooth_meas_cfg() +{ + assert_choice_type("BluetoothMeasurementConfiguration", type_.to_string(), "Extension"); + return c.get(); +} +wlan_meas_cfg_s& logged_mdt_ext_ies_o::ext_c::wlan_meas_cfg() +{ + assert_choice_type("WLANMeasurementConfiguration", type_.to_string(), "Extension"); + return c.get(); +} +const bluetooth_meas_cfg_s& logged_mdt_ext_ies_o::ext_c::bluetooth_meas_cfg() const +{ + assert_choice_type("BluetoothMeasurementConfiguration", type_.to_string(), "Extension"); + return c.get(); +} +const wlan_meas_cfg_s& logged_mdt_ext_ies_o::ext_c::wlan_meas_cfg() const +{ + assert_choice_type("WLANMeasurementConfiguration", type_.to_string(), "Extension"); + return c.get(); +} +void logged_mdt_ext_ies_o::ext_c::destroy_() +{ + switch (type_) { + case types::bluetooth_meas_cfg: + c.destroy(); + break; + case types::wlan_meas_cfg: + c.destroy(); + break; + default: + break; + } +} +void logged_mdt_ext_ies_o::ext_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::bluetooth_meas_cfg: + c.init(); + break; + case types::wlan_meas_cfg: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_mdt_ext_ies_o::ext_c"); + } +} +logged_mdt_ext_ies_o::ext_c::ext_c(const logged_mdt_ext_ies_o::ext_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::bluetooth_meas_cfg: + c.init(other.c.get()); + break; + case types::wlan_meas_cfg: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_mdt_ext_ies_o::ext_c"); + } +} +logged_mdt_ext_ies_o::ext_c& logged_mdt_ext_ies_o::ext_c::operator=(const logged_mdt_ext_ies_o::ext_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::bluetooth_meas_cfg: + c.set(other.c.get()); + break; + case types::wlan_meas_cfg: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_mdt_ext_ies_o::ext_c"); + } + + return *this; +} +void logged_mdt_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::bluetooth_meas_cfg: + j.write_fieldname("BluetoothMeasurementConfiguration"); + c.get().to_json(j); + break; + case types::wlan_meas_cfg: + j.write_fieldname("WLANMeasurementConfiguration"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "logged_mdt_ext_ies_o::ext_c"); + } + j.end_obj(); +} +SRSASN_CODE logged_mdt_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + switch (type_) { + case types::bluetooth_meas_cfg: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::wlan_meas_cfg: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "logged_mdt_ext_ies_o::ext_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_mdt_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + switch (type_) { + case types::bluetooth_meas_cfg: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::wlan_meas_cfg: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "logged_mdt_ext_ies_o::ext_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string logged_mdt_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"BluetoothMeasurementConfiguration", "WLANMeasurementConfiguration"}; + return convert_enum_idx(options, 2, value, "logged_mdt_ext_ies_o::ext_c::types"); +} + // M1PeriodicReporting ::= SEQUENCE SRSASN_CODE m1_periodic_report_s::pack(bit_ref& bref) const { @@ -23361,7 +28115,9 @@ immediate_mdt_ext_ies_container::immediate_mdt_ext_ies_container() : m5_cfg(173, crit_e::ignore), mdt_location_info(174, crit_e::ignore), m6_cfg(220, crit_e::ignore), - m7_cfg(221, crit_e::ignore) + m7_cfg(221, crit_e::ignore), + bluetooth_meas_cfg(284, crit_e::ignore), + wlan_meas_cfg(285, crit_e::ignore) {} SRSASN_CODE immediate_mdt_ext_ies_container::pack(bit_ref& bref) const { @@ -23372,6 +28128,8 @@ SRSASN_CODE immediate_mdt_ext_ies_container::pack(bit_ref& bref) const nof_ies += mdt_location_info_present ? 1 : 0; nof_ies += m6_cfg_present ? 1 : 0; nof_ies += m7_cfg_present ? 1 : 0; + nof_ies += bluetooth_meas_cfg_present ? 1 : 0; + nof_ies += wlan_meas_cfg_present ? 1 : 0; pack_length(bref, nof_ies, 1u, 65535u, true); if (m3_cfg_present) { @@ -23392,6 +28150,12 @@ SRSASN_CODE immediate_mdt_ext_ies_container::pack(bit_ref& bref) const if (m7_cfg_present) { HANDLE_CODE(m7_cfg.pack(bref)); } + if (bluetooth_meas_cfg_present) { + HANDLE_CODE(bluetooth_meas_cfg.pack(bref)); + } + if (wlan_meas_cfg_present) { + HANDLE_CODE(wlan_meas_cfg.pack(bref)); + } return SRSASN_SUCCESS; } @@ -23440,6 +28204,18 @@ SRSASN_CODE immediate_mdt_ext_ies_container::unpack(cbit_ref& bref) m7_cfg.crit = c.crit; m7_cfg.ext = c.ext_value.m7_cfg(); break; + case 284: + bluetooth_meas_cfg_present = true; + bluetooth_meas_cfg.id = c.id; + bluetooth_meas_cfg.crit = c.crit; + bluetooth_meas_cfg.ext = c.ext_value.bluetooth_meas_cfg(); + break; + case 285: + wlan_meas_cfg_present = true; + wlan_meas_cfg.id = c.id; + wlan_meas_cfg.crit = c.crit; + wlan_meas_cfg.ext = c.ext_value.wlan_meas_cfg(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -23475,6 +28251,14 @@ void immediate_mdt_ext_ies_container::to_json(json_writer& j) const j.write_fieldname(""); m7_cfg.to_json(j); } + if (bluetooth_meas_cfg_present) { + j.write_fieldname(""); + bluetooth_meas_cfg.to_json(j); + } + if (wlan_meas_cfg_present) { + j.write_fieldname(""); + wlan_meas_cfg.to_json(j); + } j.end_obj(); } @@ -23541,6 +28325,70 @@ void immediate_mdt_s::to_json(json_writer& j) const j.end_obj(); } +template struct asn1::s1ap::protocol_ext_field_s; + +logged_mdt_ext_ies_container::logged_mdt_ext_ies_container() : + bluetooth_meas_cfg(284, crit_e::ignore), wlan_meas_cfg(285, crit_e::ignore) +{} +SRSASN_CODE logged_mdt_ext_ies_container::pack(bit_ref& bref) const +{ + uint32_t nof_ies = 0; + nof_ies += bluetooth_meas_cfg_present ? 1 : 0; + nof_ies += wlan_meas_cfg_present ? 1 : 0; + pack_length(bref, nof_ies, 1u, 65535u, true); + + if (bluetooth_meas_cfg_present) { + HANDLE_CODE(bluetooth_meas_cfg.pack(bref)); + } + if (wlan_meas_cfg_present) { + HANDLE_CODE(wlan_meas_cfg.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_mdt_ext_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 1u, 65535u, true); + + for (; nof_ies > 0; --nof_ies) { + protocol_ext_field_s c; + HANDLE_CODE(c.unpack(bref)); + switch (c.id) { + case 284: + bluetooth_meas_cfg_present = true; + bluetooth_meas_cfg.id = c.id; + bluetooth_meas_cfg.crit = c.crit; + bluetooth_meas_cfg.ext = c.ext_value.bluetooth_meas_cfg(); + break; + case 285: + wlan_meas_cfg_present = true; + wlan_meas_cfg.id = c.id; + wlan_meas_cfg.crit = c.crit; + wlan_meas_cfg.ext = c.ext_value.wlan_meas_cfg(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + + return SRSASN_SUCCESS; +} +void logged_mdt_ext_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + if (bluetooth_meas_cfg_present) { + j.write_fieldname(""); + bluetooth_meas_cfg.to_json(j); + } + if (wlan_meas_cfg_present) { + j.write_fieldname(""); + wlan_meas_cfg.to_json(j); + } + j.end_obj(); +} + // LoggedMDT ::= SEQUENCE SRSASN_CODE logged_mdt_s::pack(bit_ref& bref) const { @@ -23582,6 +28430,13 @@ void logged_mdt_s::to_json(json_writer& j) const template struct asn1::s1ap::protocol_ie_single_container_s; +// ServiceType ::= ENUMERATED +std::string service_type_opts::to_string() const +{ + static const char* options[] = {"qMC-for-streaming-service", "qMC-for-MTSI-service"}; + return convert_enum_idx(options, 2, value, "service_type_e"); +} + // MDT-Activation ::= ENUMERATED std::string mdt_activation_opts::to_string() const { @@ -23805,6 +28660,67 @@ std::string mdt_mode_c::types_opts::to_string() const return convert_enum_idx(options, 3, value, "mdt_mode_c::types"); } +// UEAppLayerMeasConfig-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t ue_app_layer_meas_cfg_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {276}; + return map_enum_number(options, 1, idx, "id"); +} +bool ue_app_layer_meas_cfg_ext_ies_o::is_id_valid(const uint32_t& id) +{ + return 276 == id; +} +crit_e ue_app_layer_meas_cfg_ext_ies_o::get_crit(const uint32_t& id) +{ + if (id == 276) { + return crit_e::ignore; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} +ue_app_layer_meas_cfg_ext_ies_o::ext_c ue_app_layer_meas_cfg_ext_ies_o::get_ext(const uint32_t& id) +{ + ext_c ret{}; + if (id != 276) { + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e ue_app_layer_meas_cfg_ext_ies_o::get_presence(const uint32_t& id) +{ + if (id == 276) { + return presence_e::optional; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} + +// Extension ::= OPEN TYPE +void ue_app_layer_meas_cfg_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ServiceType", c.to_string()); + j.end_obj(); +} +SRSASN_CODE ue_app_layer_meas_cfg_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_app_layer_meas_cfg_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string ue_app_layer_meas_cfg_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"ServiceType"}; + return convert_enum_idx(options, 1, value, "ue_app_layer_meas_cfg_ext_ies_o::ext_c::types"); +} + // MDT-Configuration ::= SEQUENCE SRSASN_CODE mdt_cfg_s::pack(bit_ref& bref) const { @@ -23855,6 +28771,52 @@ std::string pro_se_ueto_network_relaying_opts::to_string() const return convert_enum_idx(options, 2, value, "pro_se_ueto_network_relaying_e"); } +// RequestTypeAdditionalInfo ::= ENUMERATED +std::string request_type_add_info_opts::to_string() const +{ + static const char* options[] = {"includePSCell"}; + return convert_enum_idx(options, 1, value, "request_type_add_info_e"); +} + +// UEAppLayerMeasConfig ::= SEQUENCE +SRSASN_CODE ue_app_layer_meas_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(container_for_app_layer_meas_cfg.pack(bref)); + HANDLE_CODE(area_scope_of_qmc.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_app_layer_meas_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(container_for_app_layer_meas_cfg.unpack(bref)); + HANDLE_CODE(area_scope_of_qmc.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); + } + + return SRSASN_SUCCESS; +} +void ue_app_layer_meas_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("containerForAppLayerMeasConfig", container_for_app_layer_meas_cfg.to_string()); + j.write_fieldname("areaScopeOfQMC"); + area_scope_of_qmc.to_json(j); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + } + j.end_obj(); +} + // EventType ::= ENUMERATED std::string event_type_opts::to_string() const { @@ -23956,35 +28918,35 @@ std::string report_area_opts::to_string() const 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) +// RequestType-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t request_type_ext_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {162}; + static const uint32_t options[] = {298}; return map_enum_number(options, 1, idx, "id"); } -bool trace_activation_ext_ies_o::is_id_valid(const uint32_t& id) +bool request_type_ext_ies_o::is_id_valid(const uint32_t& id) { - return 162 == id; + return 298 == id; } -crit_e trace_activation_ext_ies_o::get_crit(const uint32_t& id) +crit_e request_type_ext_ies_o::get_crit(const uint32_t& id) { - if (id == 162) { + if (id == 298) { return crit_e::ignore; } asn1::log_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) +request_type_ext_ies_o::ext_c request_type_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - if (id != 162) { + if (id != 298) { asn1::log_error("The id=%d is not recognized", id); } return ret; } -presence_e trace_activation_ext_ies_o::get_presence(const uint32_t& id) +presence_e request_type_ext_ies_o::get_presence(const uint32_t& id) { - if (id == 162) { + if (id == 298) { return presence_e::optional; } asn1::log_error("The id=%d is not recognized", id); @@ -23992,30 +28954,230 @@ presence_e trace_activation_ext_ies_o::get_presence(const uint32_t& id) } // Extension ::= OPEN TYPE +void request_type_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("RequestTypeAdditionalInfo", "includePSCell"); + j.end_obj(); +} +SRSASN_CODE request_type_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE request_type_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string request_type_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"RequestTypeAdditionalInfo"}; + return convert_enum_idx(options, 1, value, "request_type_ext_ies_o::ext_c::types"); +} + +// TraceActivation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t trace_activation_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {162, 262}; + return map_enum_number(options, 2, idx, "id"); +} +bool trace_activation_ext_ies_o::is_id_valid(const uint32_t& id) +{ + static const uint32_t options[] = {162, 262}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; +} +crit_e trace_activation_ext_ies_o::get_crit(const uint32_t& id) +{ + switch (id) { + case 162: + return crit_e::ignore; + case 262: + return crit_e::ignore; + default: + asn1::log_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: + ret.set(ext_c::types::mdt_cfg); + break; + case 262: + ret.set(ext_c::types::ue_app_layer_meas_cfg); + break; + default: + asn1::log_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; + case 262: + return presence_e::optional; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} + +// Extension ::= OPEN TYPE +mdt_cfg_s& trace_activation_ext_ies_o::ext_c::mdt_cfg() +{ + assert_choice_type("MDT-Configuration", type_.to_string(), "Extension"); + return c.get(); +} +ue_app_layer_meas_cfg_s& trace_activation_ext_ies_o::ext_c::ue_app_layer_meas_cfg() +{ + assert_choice_type("UEAppLayerMeasConfig", type_.to_string(), "Extension"); + return c.get(); +} +const mdt_cfg_s& trace_activation_ext_ies_o::ext_c::mdt_cfg() const +{ + assert_choice_type("MDT-Configuration", type_.to_string(), "Extension"); + return c.get(); +} +const ue_app_layer_meas_cfg_s& trace_activation_ext_ies_o::ext_c::ue_app_layer_meas_cfg() const +{ + assert_choice_type("UEAppLayerMeasConfig", type_.to_string(), "Extension"); + return c.get(); +} +void trace_activation_ext_ies_o::ext_c::destroy_() +{ + switch (type_) { + case types::mdt_cfg: + c.destroy(); + break; + case types::ue_app_layer_meas_cfg: + c.destroy(); + break; + default: + break; + } +} +void trace_activation_ext_ies_o::ext_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::mdt_cfg: + c.init(); + break; + case types::ue_app_layer_meas_cfg: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "trace_activation_ext_ies_o::ext_c"); + } +} +trace_activation_ext_ies_o::ext_c::ext_c(const trace_activation_ext_ies_o::ext_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::mdt_cfg: + c.init(other.c.get()); + break; + case types::ue_app_layer_meas_cfg: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "trace_activation_ext_ies_o::ext_c"); + } +} +trace_activation_ext_ies_o::ext_c& +trace_activation_ext_ies_o::ext_c::operator=(const trace_activation_ext_ies_o::ext_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::mdt_cfg: + c.set(other.c.get()); + break; + case types::ue_app_layer_meas_cfg: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "trace_activation_ext_ies_o::ext_c"); + } + + return *this; +} void trace_activation_ext_ies_o::ext_c::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("MDT-Configuration"); - c.to_json(j); + switch (type_) { + case types::mdt_cfg: + j.write_fieldname("MDT-Configuration"); + c.get().to_json(j); + break; + case types::ue_app_layer_meas_cfg: + j.write_fieldname("UEAppLayerMeasConfig"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "trace_activation_ext_ies_o::ext_c"); + } j.end_obj(); } SRSASN_CODE trace_activation_ext_ies_o::ext_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE(c.pack(bref)); + switch (type_) { + case types::mdt_cfg: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_app_layer_meas_cfg: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "trace_activation_ext_ies_o::ext_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } return SRSASN_SUCCESS; } SRSASN_CODE trace_activation_ext_ies_o::ext_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE(c.unpack(bref)); + switch (type_) { + case types::mdt_cfg: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_app_layer_meas_cfg: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "trace_activation_ext_ies_o::ext_c"); + return SRSASN_ERROR_DECODE_FAIL; + } return SRSASN_SUCCESS; } std::string trace_activation_ext_ies_o::ext_c::types_opts::to_string() const { - static const char* options[] = {"MDT-Configuration"}; - return convert_enum_idx(options, 1, value, "trace_activation_ext_ies_o::ext_c::types"); + static const char* options[] = {"MDT-Configuration", "UEAppLayerMeasConfig"}; + return convert_enum_idx(options, 2, value, "trace_activation_ext_ies_o::ext_c::types"); } // TraceDepth ::= ENUMERATED @@ -24037,6 +29199,13 @@ std::string vehicle_ue_opts::to_string() const return convert_enum_idx(options, 2, value, "vehicle_ue_e"); } +// AerialUEsubscriptionInformation ::= ENUMERATED +std::string aerial_uesubscription_info_opts::to_string() const +{ + static const char* options[] = {"allowed", "not-allowed"}; + return convert_enum_idx(options, 2, value, "aerial_uesubscription_info_e"); +} + // ManagementBasedMDTAllowed ::= ENUMERATED std::string management_based_mdt_allowed_opts::to_string() const { @@ -24107,7 +29276,7 @@ SRSASN_CODE request_type_s::pack(bit_ref& bref) const HANDLE_CODE(event_type.pack(bref)); HANDLE_CODE(report_area.pack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -24120,7 +29289,7 @@ SRSASN_CODE request_type_s::unpack(cbit_ref& bref) HANDLE_CODE(event_type.unpack(bref)); HANDLE_CODE(report_area.unpack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -24132,7 +29301,6 @@ void request_type_s::to_json(json_writer& j) const j.write_str("reportArea", "ecgi"); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -24176,6 +29344,70 @@ void security_context_s::to_json(json_writer& j) const j.end_obj(); } +template struct asn1::s1ap::protocol_ext_field_s; + +trace_activation_ext_ies_container::trace_activation_ext_ies_container() : + mdt_cfg(162, crit_e::ignore), ue_app_layer_meas_cfg(262, crit_e::ignore) +{} +SRSASN_CODE trace_activation_ext_ies_container::pack(bit_ref& bref) const +{ + uint32_t nof_ies = 0; + nof_ies += mdt_cfg_present ? 1 : 0; + nof_ies += ue_app_layer_meas_cfg_present ? 1 : 0; + pack_length(bref, nof_ies, 1u, 65535u, true); + + if (mdt_cfg_present) { + HANDLE_CODE(mdt_cfg.pack(bref)); + } + if (ue_app_layer_meas_cfg_present) { + HANDLE_CODE(ue_app_layer_meas_cfg.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE trace_activation_ext_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 1u, 65535u, true); + + 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; + case 262: + ue_app_layer_meas_cfg_present = true; + ue_app_layer_meas_cfg.id = c.id; + ue_app_layer_meas_cfg.crit = c.crit; + ue_app_layer_meas_cfg.ext = c.ext_value.ue_app_layer_meas_cfg(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + + return SRSASN_SUCCESS; +} +void trace_activation_ext_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + if (mdt_cfg_present) { + j.write_fieldname(""); + mdt_cfg.to_json(j); + } + if (ue_app_layer_meas_cfg_present) { + j.write_fieldname(""); + ue_app_layer_meas_cfg.to_json(j); + } + j.end_obj(); +} + // TraceActivation ::= SEQUENCE SRSASN_CODE trace_activation_s::pack(bit_ref& bref) const { @@ -24187,7 +29419,7 @@ SRSASN_CODE trace_activation_s::pack(bit_ref& bref) const HANDLE_CODE(trace_depth.pack(bref)); HANDLE_CODE(trace_collection_entity_ip_address.pack(bref)); if (ie_exts_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); + HANDLE_CODE(ie_exts.pack(bref)); } return SRSASN_SUCCESS; @@ -24202,7 +29434,7 @@ SRSASN_CODE trace_activation_s::unpack(cbit_ref& bref) HANDLE_CODE(trace_depth.unpack(bref)); HANDLE_CODE(trace_collection_entity_ip_address.unpack(bref)); if (ie_exts_present) { - HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); + HANDLE_CODE(ie_exts.unpack(bref)); } return SRSASN_SUCCESS; @@ -24216,6 +29448,7 @@ void trace_activation_s::to_json(json_writer& j) const j.write_str("traceCollectionEntityIPAddress", trace_collection_entity_ip_address.to_string()); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); } j.end_obj(); } @@ -24362,14 +29595,14 @@ 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 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"); + 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, 269, 271, 277, 283, 278, 299}; + return map_enum_number(options, 32, idx, "id"); } bool ho_request_ies_o::is_id_valid(const uint32_t& 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}; + 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, 269, 271, 277, 283, 278, 299}; for (const auto& o : options) { if (o == id) { return true; @@ -24432,10 +29665,18 @@ crit_e ho_request_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 251: return crit_e::ignore; + case 269: + return crit_e::ignore; case 271: return crit_e::ignore; + case 277: + return crit_e::ignore; case 283: return crit_e::ignore; + case 278: + return crit_e::ignore; + case 299: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -24523,12 +29764,24 @@ ho_request_ies_o::value_c ho_request_ies_o::get_value(const uint32_t& id) case 251: ret.set(value_c::types::enhanced_coverage_restricted); break; + case 269: + ret.set(value_c::types::nrue_security_cap); + break; case 271: ret.set(value_c::types::ce_mode_brestricted); break; + case 277: + ret.set(value_c::types::aerial_uesubscription_info); + break; case 283: ret.set(value_c::types::pending_data_ind); break; + case 278: + ret.set(value_c::types::subscription_based_ue_differentiation_info); + break; + case 299: + ret.set(value_c::types::add_rrm_prio_idx); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -24589,10 +29842,18 @@ presence_e ho_request_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 251: return presence_e::optional; + case 269: + return presence_e::optional; case 271: return presence_e::optional; + case 277: + return presence_e::optional; case 283: return presence_e::optional; + case 278: + return presence_e::optional; + case 299: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -24730,16 +29991,36 @@ enhanced_coverage_restricted_e& ho_request_ies_o::value_c::enhanced_coverage_res assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); return c.get(); } +nrue_security_cap_s& ho_request_ies_o::value_c::nrue_security_cap() +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} ce_mode_brestricted_e& ho_request_ies_o::value_c::ce_mode_brestricted() { assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); return c.get(); } +aerial_uesubscription_info_e& ho_request_ies_o::value_c::aerial_uesubscription_info() +{ + assert_choice_type("AerialUEsubscriptionInformation", type_.to_string(), "Value"); + return c.get(); +} pending_data_ind_e& ho_request_ies_o::value_c::pending_data_ind() { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); return c.get(); } +subscription_based_ue_differentiation_info_s& ho_request_ies_o::value_c::subscription_based_ue_differentiation_info() +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +fixed_bitstring<32, false, true>& ho_request_ies_o::value_c::add_rrm_prio_idx() +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} const uint64_t& ho_request_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -24871,16 +30152,37 @@ const enhanced_coverage_restricted_e& ho_request_ies_o::value_c::enhanced_covera assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); return c.get(); } +const nrue_security_cap_s& ho_request_ies_o::value_c::nrue_security_cap() const +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} const ce_mode_brestricted_e& ho_request_ies_o::value_c::ce_mode_brestricted() const { assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); return c.get(); } +const aerial_uesubscription_info_e& ho_request_ies_o::value_c::aerial_uesubscription_info() const +{ + assert_choice_type("AerialUEsubscriptionInformation", type_.to_string(), "Value"); + return c.get(); +} const pending_data_ind_e& ho_request_ies_o::value_c::pending_data_ind() const { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); return c.get(); } +const subscription_based_ue_differentiation_info_s& +ho_request_ies_o::value_c::subscription_based_ue_differentiation_info() const +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +const fixed_bitstring<32, false, true>& ho_request_ies_o::value_c::add_rrm_prio_idx() const +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} void ho_request_ies_o::value_c::destroy_() { switch (type_) { @@ -24938,6 +30240,15 @@ void ho_request_ies_o::value_c::destroy_() case types::ue_sidelink_aggregate_maximum_bitrate: c.destroy(); break; + case types::nrue_security_cap: + c.destroy(); + break; + case types::subscription_based_ue_differentiation_info: + c.destroy(); + break; + case types::add_rrm_prio_idx: + c.destroy >(); + break; default: break; } @@ -25017,10 +30328,21 @@ void ho_request_ies_o::value_c::set(types::options e) break; case types::enhanced_coverage_restricted: break; + case types::nrue_security_cap: + c.init(); + break; case types::ce_mode_brestricted: break; + case types::aerial_uesubscription_info: + break; case types::pending_data_ind: break; + case types::subscription_based_ue_differentiation_info: + c.init(); + break; + case types::add_rrm_prio_idx: + c.init >(); + break; case types::nulltype: break; default: @@ -25109,12 +30431,24 @@ ho_request_ies_o::value_c::value_c(const ho_request_ies_o::value_c& other) case types::enhanced_coverage_restricted: c.init(other.c.get()); break; + case types::nrue_security_cap: + c.init(other.c.get()); + break; case types::ce_mode_brestricted: c.init(other.c.get()); break; + case types::aerial_uesubscription_info: + c.init(other.c.get()); + break; case types::pending_data_ind: c.init(other.c.get()); break; + case types::subscription_based_ue_differentiation_info: + c.init(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -25206,12 +30540,24 @@ ho_request_ies_o::value_c& ho_request_ies_o::value_c::operator=(const ho_request case types::enhanced_coverage_restricted: c.set(other.c.get()); break; + case types::nrue_security_cap: + c.set(other.c.get()); + break; case types::ce_mode_brestricted: c.set(other.c.get()); break; + case types::aerial_uesubscription_info: + c.set(other.c.get()); + break; case types::pending_data_ind: c.set(other.c.get()); break; + case types::subscription_based_ue_differentiation_info: + c.set(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -25318,12 +30664,26 @@ void ho_request_ies_o::value_c::to_json(json_writer& j) const case types::enhanced_coverage_restricted: j.write_str("EnhancedCoverageRestricted", "restricted"); break; + case types::nrue_security_cap: + j.write_fieldname("NRUESecurityCapabilities"); + c.get().to_json(j); + break; case types::ce_mode_brestricted: j.write_str("CE-ModeBRestricted", c.get().to_string()); break; + case types::aerial_uesubscription_info: + j.write_str("AerialUEsubscriptionInformation", c.get().to_string()); + break; case types::pending_data_ind: j.write_str("PendingDataIndication", "true"); break; + case types::subscription_based_ue_differentiation_info: + j.write_fieldname("Subscription-Based-UE-DifferentiationInfo"); + c.get().to_json(j); + break; + case types::add_rrm_prio_idx: + j.write_str("BIT STRING", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "ho_request_ies_o::value_c"); } @@ -25412,12 +30772,24 @@ SRSASN_CODE ho_request_ies_o::value_c::pack(bit_ref& bref) const case types::enhanced_coverage_restricted: HANDLE_CODE(c.get().pack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().pack(bref)); + break; case types::ce_mode_brestricted: HANDLE_CODE(c.get().pack(bref)); break; + case types::aerial_uesubscription_info: + HANDLE_CODE(c.get().pack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().pack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().pack(bref))); + break; default: log_invalid_choice_id(type_, "ho_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -25507,12 +30879,24 @@ SRSASN_CODE ho_request_ies_o::value_c::unpack(cbit_ref& bref) case types::enhanced_coverage_restricted: HANDLE_CODE(c.get().unpack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::ce_mode_brestricted: HANDLE_CODE(c.get().unpack(bref)); break; + case types::aerial_uesubscription_info: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().unpack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().unpack(bref))); + break; default: log_invalid_choice_id(type_, "ho_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -25548,9 +30932,13 @@ std::string ho_request_ies_o::value_c::types_opts::to_string() const "V2XServicesAuthorized", "UESidelinkAggregateMaximumBitrate", "EnhancedCoverageRestricted", + "NRUESecurityCapabilities", "CE-ModeBRestricted", - "PendingDataIndication"}; - return convert_enum_idx(options, 28, value, "ho_request_ies_o::value_c::types"); + "AerialUEsubscriptionInformation", + "PendingDataIndication", + "Subscription-Based-UE-DifferentiationInfo", + "BIT STRING"}; + return convert_enum_idx(options, 32, value, "ho_request_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -25582,8 +30970,12 @@ ho_request_ies_container::ho_request_ies_container() : v2xservices_authorized(240, crit_e::ignore), ue_sidelink_aggregate_maximum_bitrate(248, crit_e::ignore), enhanced_coverage_restricted(251, crit_e::ignore), + nrue_security_cap(269, crit_e::ignore), ce_mode_brestricted(271, crit_e::ignore), - pending_data_ind(283, crit_e::ignore) + aerial_uesubscription_info(277, crit_e::ignore), + pending_data_ind(283, crit_e::ignore), + subscription_based_ue_differentiation_info(278, crit_e::ignore), + add_rrm_prio_idx(299, crit_e::ignore) {} SRSASN_CODE ho_request_ies_container::pack(bit_ref& bref) const { @@ -25606,8 +30998,12 @@ SRSASN_CODE ho_request_ies_container::pack(bit_ref& bref) const nof_ies += v2xservices_authorized_present ? 1 : 0; nof_ies += ue_sidelink_aggregate_maximum_bitrate_present ? 1 : 0; nof_ies += enhanced_coverage_restricted_present ? 1 : 0; + nof_ies += nrue_security_cap_present ? 1 : 0; nof_ies += ce_mode_brestricted_present ? 1 : 0; + nof_ies += aerial_uesubscription_info_present ? 1 : 0; nof_ies += pending_data_ind_present ? 1 : 0; + nof_ies += subscription_based_ue_differentiation_info_present ? 1 : 0; + nof_ies += add_rrm_prio_idx_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -25672,12 +31068,24 @@ SRSASN_CODE ho_request_ies_container::pack(bit_ref& bref) const if (enhanced_coverage_restricted_present) { HANDLE_CODE(enhanced_coverage_restricted.pack(bref)); } + if (nrue_security_cap_present) { + HANDLE_CODE(nrue_security_cap.pack(bref)); + } if (ce_mode_brestricted_present) { HANDLE_CODE(ce_mode_brestricted.pack(bref)); } + if (aerial_uesubscription_info_present) { + HANDLE_CODE(aerial_uesubscription_info.pack(bref)); + } if (pending_data_ind_present) { HANDLE_CODE(pending_data_ind.pack(bref)); } + if (subscription_based_ue_differentiation_info_present) { + HANDLE_CODE(subscription_based_ue_differentiation_info.pack(bref)); + } + if (add_rrm_prio_idx_present) { + HANDLE_CODE(add_rrm_prio_idx.pack(bref)); + } return SRSASN_SUCCESS; } @@ -25848,18 +31256,42 @@ SRSASN_CODE ho_request_ies_container::unpack(cbit_ref& bref) enhanced_coverage_restricted.crit = c.crit; enhanced_coverage_restricted.value = c.value.enhanced_coverage_restricted(); break; + case 269: + nrue_security_cap_present = true; + nrue_security_cap.id = c.id; + nrue_security_cap.crit = c.crit; + nrue_security_cap.value = c.value.nrue_security_cap(); + break; case 271: ce_mode_brestricted_present = true; ce_mode_brestricted.id = c.id; ce_mode_brestricted.crit = c.crit; ce_mode_brestricted.value = c.value.ce_mode_brestricted(); break; + case 277: + aerial_uesubscription_info_present = true; + aerial_uesubscription_info.id = c.id; + aerial_uesubscription_info.crit = c.crit; + aerial_uesubscription_info.value = c.value.aerial_uesubscription_info(); + break; case 283: pending_data_ind_present = true; pending_data_ind.id = c.id; pending_data_ind.crit = c.crit; pending_data_ind.value = c.value.pending_data_ind(); break; + case 278: + subscription_based_ue_differentiation_info_present = true; + subscription_based_ue_differentiation_info.id = c.id; + subscription_based_ue_differentiation_info.crit = c.crit; + subscription_based_ue_differentiation_info.value = c.value.subscription_based_ue_differentiation_info(); + break; + case 299: + add_rrm_prio_idx_present = true; + add_rrm_prio_idx.id = c.id; + add_rrm_prio_idx.crit = c.crit; + add_rrm_prio_idx.value = c.value.add_rrm_prio_idx(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -25963,14 +31395,30 @@ void ho_request_ies_container::to_json(json_writer& j) const j.write_fieldname(""); enhanced_coverage_restricted.to_json(j); } + if (nrue_security_cap_present) { + j.write_fieldname(""); + nrue_security_cap.to_json(j); + } if (ce_mode_brestricted_present) { j.write_fieldname(""); ce_mode_brestricted.to_json(j); } + if (aerial_uesubscription_info_present) { + j.write_fieldname(""); + aerial_uesubscription_info.to_json(j); + } if (pending_data_ind_present) { j.write_fieldname(""); pending_data_ind.to_json(j); } + if (subscription_based_ue_differentiation_info_present) { + j.write_fieldname(""); + subscription_based_ue_differentiation_info.to_json(j); + } + if (add_rrm_prio_idx_present) { + j.write_fieldname(""); + add_rrm_prio_idx.to_json(j); + } j.end_obj(); } @@ -26644,6 +32092,47 @@ void ho_request_ack_s::to_json(json_writer& j) const j.end_obj(); } +// TargetNgRanNode-ID ::= SEQUENCE +SRSASN_CODE target_ng_ran_node_id_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ie_exts_present, 1)); + + HANDLE_CODE(global_ran_node_id.pack(bref)); + HANDLE_CODE(sel_tai.pack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE target_ng_ran_node_id_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ie_exts_present, 1)); + + HANDLE_CODE(global_ran_node_id.unpack(bref)); + HANDLE_CODE(sel_tai.unpack(bref)); + if (ie_exts_present) { + HANDLE_CODE(ie_exts.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void target_ng_ran_node_id_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("global-RAN-NODE-ID"); + global_ran_node_id.to_json(j); + j.write_fieldname("selected-TAI"); + sel_tai.to_json(j); + if (ie_exts_present) { + j.write_fieldname("iE-Extensions"); + ie_exts.to_json(j); + } + j.end_obj(); +} + // Direct-Forwarding-Path-Availability ::= ENUMERATED std::string direct_forwarding_path_availability_opts::to_string() const { @@ -26678,6 +32167,9 @@ void target_id_c::destroy_() case types::cgi: c.destroy(); break; + case types::targetg_ng_ran_node_id: + c.destroy(); + break; default: break; } @@ -26696,6 +32188,9 @@ void target_id_c::set(types::options e) case types::cgi: c.init(); break; + case types::targetg_ng_ran_node_id: + c.init(); + break; case types::nulltype: break; default: @@ -26715,6 +32210,9 @@ target_id_c::target_id_c(const target_id_c& other) case types::cgi: c.init(other.c.get()); break; + case types::targetg_ng_ran_node_id: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -26737,6 +32235,9 @@ target_id_c& target_id_c::operator=(const target_id_c& other) case types::cgi: c.set(other.c.get()); break; + case types::targetg_ng_ran_node_id: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -26761,6 +32262,10 @@ void target_id_c::to_json(json_writer& j) const j.write_fieldname("cGI"); c.get().to_json(j); break; + case types::targetg_ng_ran_node_id: + j.write_fieldname("targetgNgRanNode-ID"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "target_id_c"); } @@ -26779,6 +32284,10 @@ SRSASN_CODE target_id_c::pack(bit_ref& bref) const case types::cgi: HANDLE_CODE(c.get().pack(bref)); break; + case types::targetg_ng_ran_node_id: { + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.get().pack(bref)); + } break; default: log_invalid_choice_id(type_, "target_id_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -26800,6 +32309,10 @@ SRSASN_CODE target_id_c::unpack(cbit_ref& bref) case types::cgi: HANDLE_CODE(c.get().unpack(bref)); break; + case types::targetg_ng_ran_node_id: { + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.get().unpack(bref)); + } break; default: log_invalid_choice_id(type_, "target_id_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -26809,8 +32322,8 @@ SRSASN_CODE target_id_c::unpack(cbit_ref& bref) std::string target_id_c::types_opts::to_string() const { - static const char* options[] = {"targeteNB-ID", "targetRNC-ID", "cGI"}; - return convert_enum_idx(options, 3, value, "target_id_c::types"); + static const char* options[] = {"targeteNB-ID", "targetRNC-ID", "cGI", "targetgNgRanNode-ID"}; + return convert_enum_idx(options, 4, value, "target_id_c::types"); } // HandoverRequiredIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -28403,14 +33916,14 @@ std::string cs_fallback_ind_opts::to_string() const // InitialContextSetupRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t init_context_setup_request_ies_o::idx_to_id(uint32_t idx) { - 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"); + 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, 269, 271, 277, 283, 278, 299}; + return map_enum_number(options, 32, idx, "id"); } bool init_context_setup_request_ies_o::is_id_valid(const uint32_t& 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}; + 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, 269, 271, 277, 283, 278, 299}; for (const auto& o : options) { if (o == id) { return true; @@ -28473,10 +33986,18 @@ crit_e init_context_setup_request_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 251: return crit_e::ignore; + case 269: + return crit_e::ignore; case 271: return crit_e::ignore; + case 277: + return crit_e::ignore; case 283: return crit_e::ignore; + case 278: + return crit_e::ignore; + case 299: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -28564,12 +34085,24 @@ init_context_setup_request_ies_o::value_c init_context_setup_request_ies_o::get_ case 251: ret.set(value_c::types::enhanced_coverage_restricted); break; + case 269: + ret.set(value_c::types::nrue_security_cap); + break; case 271: ret.set(value_c::types::ce_mode_brestricted); break; + case 277: + ret.set(value_c::types::aerial_uesubscription_info); + break; case 283: ret.set(value_c::types::pending_data_ind); break; + case 278: + ret.set(value_c::types::subscription_based_ue_differentiation_info); + break; + case 299: + ret.set(value_c::types::add_rrm_prio_idx); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -28630,10 +34163,18 @@ presence_e init_context_setup_request_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 251: return presence_e::optional; + case 269: + return presence_e::optional; case 271: return presence_e::optional; + case 277: + return presence_e::optional; case 283: return presence_e::optional; + case 278: + return presence_e::optional; + case 299: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -28772,16 +34313,37 @@ enhanced_coverage_restricted_e& init_context_setup_request_ies_o::value_c::enhan assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); return c.get(); } +nrue_security_cap_s& init_context_setup_request_ies_o::value_c::nrue_security_cap() +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} ce_mode_brestricted_e& init_context_setup_request_ies_o::value_c::ce_mode_brestricted() { assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); return c.get(); } +aerial_uesubscription_info_e& init_context_setup_request_ies_o::value_c::aerial_uesubscription_info() +{ + assert_choice_type("AerialUEsubscriptionInformation", type_.to_string(), "Value"); + return c.get(); +} pending_data_ind_e& init_context_setup_request_ies_o::value_c::pending_data_ind() { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); return c.get(); } +subscription_based_ue_differentiation_info_s& +init_context_setup_request_ies_o::value_c::subscription_based_ue_differentiation_info() +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +fixed_bitstring<32, false, true>& init_context_setup_request_ies_o::value_c::add_rrm_prio_idx() +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} const uint64_t& init_context_setup_request_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -28914,16 +34476,37 @@ const enhanced_coverage_restricted_e& init_context_setup_request_ies_o::value_c: assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); return c.get(); } +const nrue_security_cap_s& init_context_setup_request_ies_o::value_c::nrue_security_cap() const +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} const ce_mode_brestricted_e& init_context_setup_request_ies_o::value_c::ce_mode_brestricted() const { assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); return c.get(); } +const aerial_uesubscription_info_e& init_context_setup_request_ies_o::value_c::aerial_uesubscription_info() const +{ + assert_choice_type("AerialUEsubscriptionInformation", type_.to_string(), "Value"); + return c.get(); +} const pending_data_ind_e& init_context_setup_request_ies_o::value_c::pending_data_ind() const { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); return c.get(); } +const subscription_based_ue_differentiation_info_s& +init_context_setup_request_ies_o::value_c::subscription_based_ue_differentiation_info() const +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +const fixed_bitstring<32, false, true>& init_context_setup_request_ies_o::value_c::add_rrm_prio_idx() const +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} void init_context_setup_request_ies_o::value_c::destroy_() { switch (type_) { @@ -28972,6 +34555,15 @@ void init_context_setup_request_ies_o::value_c::destroy_() case types::ue_sidelink_aggregate_maximum_bitrate: c.destroy(); break; + case types::nrue_security_cap: + c.destroy(); + break; + case types::subscription_based_ue_differentiation_info: + c.destroy(); + break; + case types::add_rrm_prio_idx: + c.destroy >(); + break; default: break; } @@ -29048,10 +34640,21 @@ void init_context_setup_request_ies_o::value_c::set(types::options e) break; case types::enhanced_coverage_restricted: break; + case types::nrue_security_cap: + c.init(); + break; case types::ce_mode_brestricted: break; + case types::aerial_uesubscription_info: + break; case types::pending_data_ind: break; + case types::subscription_based_ue_differentiation_info: + c.init(); + break; + case types::add_rrm_prio_idx: + c.init >(); + break; case types::nulltype: break; default: @@ -29140,12 +34743,24 @@ init_context_setup_request_ies_o::value_c::value_c(const init_context_setup_requ case types::enhanced_coverage_restricted: c.init(other.c.get()); break; + case types::nrue_security_cap: + c.init(other.c.get()); + break; case types::ce_mode_brestricted: c.init(other.c.get()); break; + case types::aerial_uesubscription_info: + c.init(other.c.get()); + break; case types::pending_data_ind: c.init(other.c.get()); break; + case types::subscription_based_ue_differentiation_info: + c.init(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -29238,12 +34853,24 @@ init_context_setup_request_ies_o::value_c::operator=(const init_context_setup_re case types::enhanced_coverage_restricted: c.set(other.c.get()); break; + case types::nrue_security_cap: + c.set(other.c.get()); + break; case types::ce_mode_brestricted: c.set(other.c.get()); break; + case types::aerial_uesubscription_info: + c.set(other.c.get()); + break; case types::pending_data_ind: c.set(other.c.get()); break; + case types::subscription_based_ue_differentiation_info: + c.set(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -29352,12 +34979,26 @@ void init_context_setup_request_ies_o::value_c::to_json(json_writer& j) const case types::enhanced_coverage_restricted: j.write_str("EnhancedCoverageRestricted", "restricted"); break; + case types::nrue_security_cap: + j.write_fieldname("NRUESecurityCapabilities"); + c.get().to_json(j); + break; case types::ce_mode_brestricted: j.write_str("CE-ModeBRestricted", c.get().to_string()); break; + case types::aerial_uesubscription_info: + j.write_str("AerialUEsubscriptionInformation", c.get().to_string()); + break; case types::pending_data_ind: j.write_str("PendingDataIndication", "true"); break; + case types::subscription_based_ue_differentiation_info: + j.write_fieldname("Subscription-Based-UE-DifferentiationInfo"); + c.get().to_json(j); + break; + case types::add_rrm_prio_idx: + j.write_str("BIT STRING", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "init_context_setup_request_ies_o::value_c"); } @@ -29445,12 +35086,24 @@ SRSASN_CODE init_context_setup_request_ies_o::value_c::pack(bit_ref& bref) const case types::enhanced_coverage_restricted: HANDLE_CODE(c.get().pack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().pack(bref)); + break; case types::ce_mode_brestricted: HANDLE_CODE(c.get().pack(bref)); break; + case types::aerial_uesubscription_info: + HANDLE_CODE(c.get().pack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().pack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().pack(bref))); + break; default: log_invalid_choice_id(type_, "init_context_setup_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -29539,12 +35192,24 @@ SRSASN_CODE init_context_setup_request_ies_o::value_c::unpack(cbit_ref& bref) case types::enhanced_coverage_restricted: HANDLE_CODE(c.get().unpack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::ce_mode_brestricted: HANDLE_CODE(c.get().unpack(bref)); break; + case types::aerial_uesubscription_info: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().unpack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().unpack(bref))); + break; default: log_invalid_choice_id(type_, "init_context_setup_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -29580,9 +35245,13 @@ std::string init_context_setup_request_ies_o::value_c::types_opts::to_string() c "V2XServicesAuthorized", "UESidelinkAggregateMaximumBitrate", "EnhancedCoverageRestricted", + "NRUESecurityCapabilities", "CE-ModeBRestricted", - "PendingDataIndication"}; - return convert_enum_idx(options, 28, value, "init_context_setup_request_ies_o::value_c::types"); + "AerialUEsubscriptionInformation", + "PendingDataIndication", + "Subscription-Based-UE-DifferentiationInfo", + "BIT STRING"}; + return convert_enum_idx(options, 32, value, "init_context_setup_request_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -29614,8 +35283,12 @@ init_context_setup_request_ies_container::init_context_setup_request_ies_contain v2xservices_authorized(240, crit_e::ignore), ue_sidelink_aggregate_maximum_bitrate(248, crit_e::ignore), enhanced_coverage_restricted(251, crit_e::ignore), + nrue_security_cap(269, crit_e::ignore), ce_mode_brestricted(271, crit_e::ignore), - pending_data_ind(283, crit_e::ignore) + aerial_uesubscription_info(277, crit_e::ignore), + pending_data_ind(283, crit_e::ignore), + subscription_based_ue_differentiation_info(278, crit_e::ignore), + add_rrm_prio_idx(299, crit_e::ignore) {} SRSASN_CODE init_context_setup_request_ies_container::pack(bit_ref& bref) const { @@ -29640,8 +35313,12 @@ SRSASN_CODE init_context_setup_request_ies_container::pack(bit_ref& bref) const nof_ies += v2xservices_authorized_present ? 1 : 0; nof_ies += ue_sidelink_aggregate_maximum_bitrate_present ? 1 : 0; nof_ies += enhanced_coverage_restricted_present ? 1 : 0; + nof_ies += nrue_security_cap_present ? 1 : 0; nof_ies += ce_mode_brestricted_present ? 1 : 0; + nof_ies += aerial_uesubscription_info_present ? 1 : 0; nof_ies += pending_data_ind_present ? 1 : 0; + nof_ies += subscription_based_ue_differentiation_info_present ? 1 : 0; + nof_ies += add_rrm_prio_idx_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -29710,12 +35387,24 @@ SRSASN_CODE init_context_setup_request_ies_container::pack(bit_ref& bref) const if (enhanced_coverage_restricted_present) { HANDLE_CODE(enhanced_coverage_restricted.pack(bref)); } + if (nrue_security_cap_present) { + HANDLE_CODE(nrue_security_cap.pack(bref)); + } if (ce_mode_brestricted_present) { HANDLE_CODE(ce_mode_brestricted.pack(bref)); } + if (aerial_uesubscription_info_present) { + HANDLE_CODE(aerial_uesubscription_info.pack(bref)); + } if (pending_data_ind_present) { HANDLE_CODE(pending_data_ind.pack(bref)); } + if (subscription_based_ue_differentiation_info_present) { + HANDLE_CODE(subscription_based_ue_differentiation_info.pack(bref)); + } + if (add_rrm_prio_idx_present) { + HANDLE_CODE(add_rrm_prio_idx.pack(bref)); + } return SRSASN_SUCCESS; } @@ -29886,18 +35575,42 @@ SRSASN_CODE init_context_setup_request_ies_container::unpack(cbit_ref& bref) enhanced_coverage_restricted.crit = c.crit; enhanced_coverage_restricted.value = c.value.enhanced_coverage_restricted(); break; + case 269: + nrue_security_cap_present = true; + nrue_security_cap.id = c.id; + nrue_security_cap.crit = c.crit; + nrue_security_cap.value = c.value.nrue_security_cap(); + break; case 271: ce_mode_brestricted_present = true; ce_mode_brestricted.id = c.id; ce_mode_brestricted.crit = c.crit; ce_mode_brestricted.value = c.value.ce_mode_brestricted(); break; + case 277: + aerial_uesubscription_info_present = true; + aerial_uesubscription_info.id = c.id; + aerial_uesubscription_info.crit = c.crit; + aerial_uesubscription_info.value = c.value.aerial_uesubscription_info(); + break; case 283: pending_data_ind_present = true; pending_data_ind.id = c.id; pending_data_ind.crit = c.crit; pending_data_ind.value = c.value.pending_data_ind(); break; + case 278: + subscription_based_ue_differentiation_info_present = true; + subscription_based_ue_differentiation_info.id = c.id; + subscription_based_ue_differentiation_info.crit = c.crit; + subscription_based_ue_differentiation_info.value = c.value.subscription_based_ue_differentiation_info(); + break; + case 299: + add_rrm_prio_idx_present = true; + add_rrm_prio_idx.id = c.id; + add_rrm_prio_idx.crit = c.crit; + add_rrm_prio_idx.value = c.value.add_rrm_prio_idx(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -30005,14 +35718,30 @@ void init_context_setup_request_ies_container::to_json(json_writer& j) const j.write_fieldname(""); enhanced_coverage_restricted.to_json(j); } + if (nrue_security_cap_present) { + j.write_fieldname(""); + nrue_security_cap.to_json(j); + } if (ce_mode_brestricted_present) { j.write_fieldname(""); ce_mode_brestricted.to_json(j); } + if (aerial_uesubscription_info_present) { + j.write_fieldname(""); + aerial_uesubscription_info.to_json(j); + } if (pending_data_ind_present) { j.write_fieldname(""); pending_data_ind.to_json(j); } + if (subscription_based_ue_differentiation_info_present) { + j.write_fieldname(""); + subscription_based_ue_differentiation_info.to_json(j); + } + if (add_rrm_prio_idx_present) { + j.write_fieldname(""); + add_rrm_prio_idx.to_json(j); + } j.end_obj(); } @@ -30488,11 +36217,26 @@ std::string coverage_level_opts::to_string() const return convert_enum_idx(options, 1, value, "coverage_level_e"); } +// EDT-Session ::= ENUMERATED +std::string edt_session_opts::to_string() const +{ + static const char* options[] = {"true"}; + return convert_enum_idx(options, 1, value, "edt_session_e"); +} + // GUMMEIType ::= ENUMERATED std::string gummei_type_opts::to_string() const { - static const char* options[] = {"native", "mapped"}; - return convert_enum_idx(options, 2, value, "gummei_type_e"); + static const char* options[] = {"native", "mapped", "mappedFrom5G"}; + return convert_enum_idx(options, 3, value, "gummei_type_e"); +} +uint8_t gummei_type_opts::to_number() const +{ + if (value == mapped_from5_g) { + return 5; + } + invalid_enum_number(value, "gummei_type_e"); + return 0; } // RRC-Establishment-Cause ::= ENUMERATED @@ -30519,14 +36263,14 @@ std::string relay_node_ind_opts::to_string() const // InitialUEMessage-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t init_ue_msg_ies_o::idx_to_id(uint32_t idx) { - 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"); + 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, 263, 281}; + return map_enum_number(options, 22, idx, "id"); } bool init_ue_msg_ies_o::is_id_valid(const uint32_t& 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}; + 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, 263, 281}; for (const auto& o : options) { if (o == id) { return true; @@ -30577,6 +36321,10 @@ crit_e init_ue_msg_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 250: return crit_e::ignore; + case 263: + return crit_e::ignore; + case 281: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -30646,6 +36394,12 @@ init_ue_msg_ies_o::value_c init_ue_msg_ies_o::get_value(const uint32_t& id) case 250: ret.set(value_c::types::coverage_level); break; + case 263: + ret.set(value_c::types::ue_application_layer_meas_cap); + break; + case 281: + ret.set(value_c::types::edt_session); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -30694,6 +36448,10 @@ presence_e init_ue_msg_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 250: return presence_e::optional; + case 263: + return presence_e::optional; + case 281: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -30801,6 +36559,16 @@ coverage_level_e& init_ue_msg_ies_o::value_c::coverage_level() assert_choice_type("Coverage-Level", type_.to_string(), "Value"); return c.get(); } +fixed_bitstring<8, false, true>& init_ue_msg_ies_o::value_c::ue_application_layer_meas_cap() +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} +edt_session_e& init_ue_msg_ies_o::value_c::edt_session() +{ + assert_choice_type("EDT-Session", type_.to_string(), "Value"); + return c.get(); +} const uint32_t& init_ue_msg_ies_o::value_c::enb_ue_s1ap_id() const { assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); @@ -30901,6 +36669,16 @@ const coverage_level_e& init_ue_msg_ies_o::value_c::coverage_level() const assert_choice_type("Coverage-Level", type_.to_string(), "Value"); return c.get(); } +const fixed_bitstring<8, false, true>& init_ue_msg_ies_o::value_c::ue_application_layer_meas_cap() const +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} +const edt_session_e& init_ue_msg_ies_o::value_c::edt_session() const +{ + assert_choice_type("EDT-Session", type_.to_string(), "Value"); + return c.get(); +} void init_ue_msg_ies_o::value_c::destroy_() { switch (type_) { @@ -30937,6 +36715,9 @@ void init_ue_msg_ies_o::value_c::destroy_() case types::mme_group_id: c.destroy >(); break; + case types::ue_application_layer_meas_cap: + c.destroy >(); + break; default: break; } @@ -30997,6 +36778,11 @@ void init_ue_msg_ies_o::value_c::set(types::options e) break; case types::coverage_level: break; + case types::ue_application_layer_meas_cap: + c.init >(); + break; + case types::edt_session: + break; case types::nulltype: break; default: @@ -31067,6 +36853,12 @@ init_ue_msg_ies_o::value_c::value_c(const init_ue_msg_ies_o::value_c& other) case types::coverage_level: c.init(other.c.get()); break; + case types::ue_application_layer_meas_cap: + c.init(other.c.get >()); + break; + case types::edt_session: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -31140,6 +36932,12 @@ init_ue_msg_ies_o::value_c& init_ue_msg_ies_o::value_c::operator=(const init_ue_ case types::coverage_level: c.set(other.c.get()); break; + case types::ue_application_layer_meas_cap: + c.set(other.c.get >()); + break; + case types::edt_session: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -31217,6 +37015,12 @@ void init_ue_msg_ies_o::value_c::to_json(json_writer& j) const case types::coverage_level: j.write_str("Coverage-Level", "extendedcoverage"); break; + case types::ue_application_layer_meas_cap: + j.write_str("BIT STRING", c.get >().to_string()); + break; + case types::edt_session: + j.write_str("EDT-Session", "true"); + break; default: log_invalid_choice_id(type_, "init_ue_msg_ies_o::value_c"); } @@ -31286,6 +37090,12 @@ SRSASN_CODE init_ue_msg_ies_o::value_c::pack(bit_ref& bref) const case types::coverage_level: HANDLE_CODE(c.get().pack(bref)); break; + case types::ue_application_layer_meas_cap: + HANDLE_CODE((c.get >().pack(bref))); + break; + case types::edt_session: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "init_ue_msg_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -31356,6 +37166,12 @@ SRSASN_CODE init_ue_msg_ies_o::value_c::unpack(cbit_ref& bref) case types::coverage_level: HANDLE_CODE(c.get().unpack(bref)); break; + case types::ue_application_layer_meas_cap: + HANDLE_CODE((c.get >().unpack(bref))); + break; + case types::edt_session: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "init_ue_msg_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -31384,8 +37200,10 @@ std::string init_ue_msg_ies_o::value_c::types_opts::to_string() const "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"); + "Coverage-Level", + "BIT STRING", + "EDT-Session"}; + return convert_enum_idx(options, 22, value, "init_ue_msg_ies_o::value_c::types"); } template struct asn1::s1ap::protocol_ie_field_s; @@ -31410,7 +37228,9 @@ init_ue_msg_ies_container::init_ue_msg_ies_container() : ue_usage_type(230, crit_e::ignore), ce_mode_b_support_ind(242, crit_e::ignore), dcn_id(246, crit_e::ignore), - coverage_level(250, crit_e::ignore) + coverage_level(250, crit_e::ignore), + ue_application_layer_meas_cap(263, crit_e::ignore), + edt_session(281, crit_e::ignore) {} SRSASN_CODE init_ue_msg_ies_container::pack(bit_ref& bref) const { @@ -31430,6 +37250,8 @@ SRSASN_CODE init_ue_msg_ies_container::pack(bit_ref& bref) const nof_ies += ce_mode_b_support_ind_present ? 1 : 0; nof_ies += dcn_id_present ? 1 : 0; nof_ies += coverage_level_present ? 1 : 0; + nof_ies += ue_application_layer_meas_cap_present ? 1 : 0; + nof_ies += edt_session_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(enb_ue_s1ap_id.pack(bref)); @@ -31482,6 +37304,12 @@ SRSASN_CODE init_ue_msg_ies_container::pack(bit_ref& bref) const if (coverage_level_present) { HANDLE_CODE(coverage_level.pack(bref)); } + if (ue_application_layer_meas_cap_present) { + HANDLE_CODE(ue_application_layer_meas_cap.pack(bref)); + } + if (edt_session_present) { + HANDLE_CODE(edt_session.pack(bref)); + } return SRSASN_SUCCESS; } @@ -31616,6 +37444,18 @@ SRSASN_CODE init_ue_msg_ies_container::unpack(cbit_ref& bref) coverage_level.crit = c.crit; coverage_level.value = c.value.coverage_level(); break; + case 263: + ue_application_layer_meas_cap_present = true; + ue_application_layer_meas_cap.id = c.id; + ue_application_layer_meas_cap.crit = c.crit; + ue_application_layer_meas_cap.value = c.value.ue_application_layer_meas_cap(); + break; + case 281: + edt_session_present = true; + edt_session.id = c.id; + edt_session.crit = c.crit; + edt_session.value = c.value.edt_session(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -31701,6 +37541,14 @@ void init_ue_msg_ies_container::to_json(json_writer& j) const j.write_fieldname(""); coverage_level.to_json(j); } + if (ue_application_layer_meas_cap_present) { + j.write_fieldname(""); + ue_application_layer_meas_cap.to_json(j); + } + if (edt_session_present) { + j.write_fieldname(""); + edt_session.to_json(j); + } j.end_obj(); } @@ -31790,6 +37638,67 @@ void ue_associated_lc_s1_conn_item_s::to_json(json_writer& j) const j.end_obj(); } +// ServedGUMMEIsItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION +uint32_t served_gummeis_item_ext_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {170}; + return map_enum_number(options, 1, idx, "id"); +} +bool served_gummeis_item_ext_ies_o::is_id_valid(const uint32_t& id) +{ + return 170 == id; +} +crit_e served_gummeis_item_ext_ies_o::get_crit(const uint32_t& id) +{ + if (id == 170) { + return crit_e::ignore; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} +served_gummeis_item_ext_ies_o::ext_c served_gummeis_item_ext_ies_o::get_ext(const uint32_t& id) +{ + ext_c ret{}; + if (id != 170) { + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e served_gummeis_item_ext_ies_o::get_presence(const uint32_t& id) +{ + if (id == 170) { + return presence_e::optional; + } + asn1::log_error("The id=%d is not recognized", id); + return {}; +} + +// Extension ::= OPEN TYPE +void served_gummeis_item_ext_ies_o::ext_c::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("GUMMEIType", c.to_string()); + j.end_obj(); +} +SRSASN_CODE served_gummeis_item_ext_ies_o::ext_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE served_gummeis_item_ext_ies_o::ext_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +std::string served_gummeis_item_ext_ies_o::ext_c::types_opts::to_string() const +{ + static const char* options[] = {"GUMMEIType"}; + return convert_enum_idx(options, 1, value, "served_gummeis_item_ext_ies_o::ext_c::types"); +} + // TAIItem ::= SEQUENCE SRSASN_CODE tai_item_s::pack(bit_ref& bref) const { @@ -32021,7 +37930,7 @@ SRSASN_CODE served_gummeis_item_s::pack(bit_ref& bref) const HANDLE_CODE(pack_dyn_seq_of(bref, served_group_ids, 1, 65535, true)); HANDLE_CODE(pack_dyn_seq_of(bref, served_mmecs, 1, 256, true)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -32035,7 +37944,7 @@ SRSASN_CODE served_gummeis_item_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_dyn_seq_of(served_group_ids, bref, 1, 65535, true)); HANDLE_CODE(unpack_dyn_seq_of(served_mmecs, bref, 1, 256, true)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -32060,7 +37969,6 @@ void served_gummeis_item_s::to_json(json_writer& j) const j.end_array(); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -32263,6 +38171,13 @@ std::string gw_context_release_ind_opts::to_string() const return convert_enum_idx(options, 1, value, "gw_context_release_ind_e"); } +// HandoverFlag ::= ENUMERATED +std::string ho_flag_opts::to_string() const +{ + static const char* options[] = {"handoverPreparation"}; + return convert_enum_idx(options, 1, value, "ho_flag_e"); +} + // KillAllWarningMessages ::= ENUMERATED std::string kill_all_warning_msgs_opts::to_string() const { @@ -32270,6 +38185,13 @@ std::string kill_all_warning_msgs_opts::to_string() const return convert_enum_idx(options, 1, value, "kill_all_warning_msgs_e"); } +// LTE-M-Indication ::= ENUMERATED +std::string lte_m_ind_opts::to_string() const +{ + static const char* options[] = {"lte-m"}; + return convert_enum_idx(options, 1, value, "lte_m_ind_e"); +} + // MMERelaySupportIndicator ::= ENUMERATED std::string mme_relay_support_ind_opts::to_string() const { @@ -33517,12 +39439,12 @@ std::string kill_resp_ies_o::value_c::types_opts::to_string() const // LocationReportIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t location_report_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {0, 8, 100, 67, 98}; - return map_enum_number(options, 5, idx, "id"); + static const uint32_t options[] = {0, 8, 100, 67, 98, 288}; + return map_enum_number(options, 6, idx, "id"); } bool location_report_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 100, 67, 98}; + static const uint32_t options[] = {0, 8, 100, 67, 98, 288}; for (const auto& o : options) { if (o == id) { return true; @@ -33543,6 +39465,8 @@ crit_e location_report_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 98: return crit_e::ignore; + case 288: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -33567,6 +39491,9 @@ location_report_ies_o::value_c location_report_ies_o::get_value(const uint32_t& case 98: ret.set(value_c::types::request_type); break; + case 288: + ret.set(value_c::types::ps_cell_info); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -33585,6 +39512,8 @@ presence_e location_report_ies_o::get_presence(const uint32_t& id) return presence_e::mandatory; case 98: return presence_e::mandatory; + case 288: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -33617,6 +39546,11 @@ request_type_s& location_report_ies_o::value_c::request_type() assert_choice_type("RequestType", type_.to_string(), "Value"); return c.get(); } +ps_cell_info_s& location_report_ies_o::value_c::ps_cell_info() +{ + assert_choice_type("PSCellInformation", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& location_report_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -33642,6 +39576,11 @@ const request_type_s& location_report_ies_o::value_c::request_type() const assert_choice_type("RequestType", type_.to_string(), "Value"); return c.get(); } +const ps_cell_info_s& location_report_ies_o::value_c::ps_cell_info() const +{ + assert_choice_type("PSCellInformation", type_.to_string(), "Value"); + return c.get(); +} void location_report_ies_o::value_c::destroy_() { switch (type_) { @@ -33654,6 +39593,9 @@ void location_report_ies_o::value_c::destroy_() case types::request_type: c.destroy(); break; + case types::ps_cell_info: + c.destroy(); + break; default: break; } @@ -33676,6 +39618,9 @@ void location_report_ies_o::value_c::set(types::options e) case types::request_type: c.init(); break; + case types::ps_cell_info: + c.init(); + break; case types::nulltype: break; default: @@ -33701,6 +39646,9 @@ location_report_ies_o::value_c::value_c(const location_report_ies_o::value_c& ot case types::request_type: c.init(other.c.get()); break; + case types::ps_cell_info: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -33729,6 +39677,9 @@ location_report_ies_o::value_c& location_report_ies_o::value_c::operator=(const case types::request_type: c.set(other.c.get()); break; + case types::ps_cell_info: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -33759,6 +39710,10 @@ void location_report_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("RequestType"); c.get().to_json(j); break; + case types::ps_cell_info: + j.write_fieldname("PSCellInformation"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "location_report_ies_o::value_c"); } @@ -33783,6 +39738,9 @@ SRSASN_CODE location_report_ies_o::value_c::pack(bit_ref& bref) const case types::request_type: HANDLE_CODE(c.get().pack(bref)); break; + case types::ps_cell_info: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "location_report_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -33808,6 +39766,9 @@ SRSASN_CODE location_report_ies_o::value_c::unpack(cbit_ref& bref) case types::request_type: HANDLE_CODE(c.get().unpack(bref)); break; + case types::ps_cell_info: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "location_report_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -33818,8 +39779,8 @@ 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 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"); + "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "EUTRAN-CGI", "TAI", "RequestType", "PSCellInformation"}; + return convert_enum_idx(options, 6, value, "location_report_ies_o::value_c::types"); } // LocationReportingControlIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -34460,63 +40421,202 @@ std::string mmecp_relocation_ind_ies_o::value_c::types_opts::to_string() const // MMEConfigurationTransferIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mme_cfg_transfer_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {130}; - return map_enum_number(options, 1, idx, "id"); + static const uint32_t options[] = {130, 295}; + return map_enum_number(options, 2, idx, "id"); } bool mme_cfg_transfer_ies_o::is_id_valid(const uint32_t& id) { - return 130 == id; + static const uint32_t options[] = {130, 295}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; } crit_e mme_cfg_transfer_ies_o::get_crit(const uint32_t& id) { - if (id == 130) { - return crit_e::ignore; + switch (id) { + case 130: + return crit_e::ignore; + case 295: + return crit_e::ignore; + default: + asn1::log_error("The id=%d is not recognized", id); } - asn1::log_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{}; - if (id != 130) { - asn1::log_error("The id=%d is not recognized", id); + switch (id) { + case 130: + ret.set(value_c::types::son_cfg_transfer_mct); + break; + case 295: + ret.set(value_c::types::en_dcson_cfg_transfer_mct); + break; + default: + asn1::log_error("The id=%d is not recognized", id); } return ret; } presence_e mme_cfg_transfer_ies_o::get_presence(const uint32_t& id) { - if (id == 130) { - return presence_e::optional; + switch (id) { + case 130: + return presence_e::optional; + case 295: + return presence_e::optional; + default: + asn1::log_error("The id=%d is not recognized", id); } - asn1::log_error("The id=%d is not recognized", id); return {}; } // Value ::= OPEN TYPE +son_cfg_transfer_s& mme_cfg_transfer_ies_o::value_c::son_cfg_transfer_mct() +{ + assert_choice_type("SONConfigurationTransfer", type_.to_string(), "Value"); + return c.get(); +} +en_dcson_cfg_transfer_s& mme_cfg_transfer_ies_o::value_c::en_dcson_cfg_transfer_mct() +{ + assert_choice_type("EN-DCSONConfigurationTransfer", type_.to_string(), "Value"); + return c.get(); +} +const son_cfg_transfer_s& mme_cfg_transfer_ies_o::value_c::son_cfg_transfer_mct() const +{ + assert_choice_type("SONConfigurationTransfer", type_.to_string(), "Value"); + return c.get(); +} +const en_dcson_cfg_transfer_s& mme_cfg_transfer_ies_o::value_c::en_dcson_cfg_transfer_mct() const +{ + assert_choice_type("EN-DCSONConfigurationTransfer", type_.to_string(), "Value"); + return c.get(); +} +void mme_cfg_transfer_ies_o::value_c::destroy_() +{ + switch (type_) { + case types::son_cfg_transfer_mct: + c.destroy(); + break; + case types::en_dcson_cfg_transfer_mct: + c.destroy(); + break; + default: + break; + } +} +void mme_cfg_transfer_ies_o::value_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::son_cfg_transfer_mct: + c.init(); + break; + case types::en_dcson_cfg_transfer_mct: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mme_cfg_transfer_ies_o::value_c"); + } +} +mme_cfg_transfer_ies_o::value_c::value_c(const mme_cfg_transfer_ies_o::value_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::son_cfg_transfer_mct: + c.init(other.c.get()); + break; + case types::en_dcson_cfg_transfer_mct: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mme_cfg_transfer_ies_o::value_c"); + } +} +mme_cfg_transfer_ies_o::value_c& +mme_cfg_transfer_ies_o::value_c::operator=(const mme_cfg_transfer_ies_o::value_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::son_cfg_transfer_mct: + c.set(other.c.get()); + break; + case types::en_dcson_cfg_transfer_mct: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mme_cfg_transfer_ies_o::value_c"); + } + + return *this; +} void mme_cfg_transfer_ies_o::value_c::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("SONConfigurationTransfer"); - c.to_json(j); + switch (type_) { + case types::son_cfg_transfer_mct: + j.write_fieldname("SONConfigurationTransfer"); + c.get().to_json(j); + break; + case types::en_dcson_cfg_transfer_mct: + j.write_fieldname("EN-DCSONConfigurationTransfer"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "mme_cfg_transfer_ies_o::value_c"); + } j.end_obj(); } SRSASN_CODE mme_cfg_transfer_ies_o::value_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE(c.pack(bref)); + switch (type_) { + case types::son_cfg_transfer_mct: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::en_dcson_cfg_transfer_mct: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mme_cfg_transfer_ies_o::value_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } return SRSASN_SUCCESS; } SRSASN_CODE mme_cfg_transfer_ies_o::value_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE(c.unpack(bref)); + switch (type_) { + case types::son_cfg_transfer_mct: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::en_dcson_cfg_transfer_mct: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mme_cfg_transfer_ies_o::value_c"); + return SRSASN_ERROR_DECODE_FAIL; + } return SRSASN_SUCCESS; } std::string mme_cfg_transfer_ies_o::value_c::types_opts::to_string() const { - static const char* options[] = {"SONConfigurationTransfer"}; - return convert_enum_idx(options, 1, value, "mme_cfg_transfer_ies_o::value_c::types"); + static const char* options[] = {"SONConfigurationTransfer", "EN-DCSONConfigurationTransfer"}; + return convert_enum_idx(options, 2, value, "mme_cfg_transfer_ies_o::value_c::types"); } // MMEConfigurationUpdateAcknowledgeIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -37342,12 +43442,14 @@ std::string paging_ies_o::value_c::types_opts::to_string() const // PathSwitchRequestAcknowledgeIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t path_switch_request_ack_ies_o::idx_to_id(uint32_t idx) { - 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"); + static const uint32_t options[] = {0, 8, 66, 95, 33, 40, 58, 158, 146, 195, 241, + 240, 248, 251, 269, 271, 277, 283, 278, 41, 299}; + return map_enum_number(options, 21, idx, "id"); } bool path_switch_request_ack_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 66, 95, 33, 40, 58, 158, 146, 195, 241, 240, 248, 251, 271, 283}; + static const uint32_t options[] = {0, 8, 66, 95, 33, 40, 58, 158, 146, 195, 241, + 240, 248, 251, 269, 271, 277, 283, 278, 41, 299}; for (const auto& o : options) { if (o == id) { return true; @@ -37386,10 +43488,20 @@ crit_e path_switch_request_ack_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 251: return crit_e::ignore; + case 269: + return crit_e::ignore; case 271: return crit_e::ignore; + case 277: + return crit_e::ignore; case 283: return crit_e::ignore; + case 278: + return crit_e::ignore; + case 41: + return crit_e::ignore; + case 299: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -37441,12 +43553,27 @@ path_switch_request_ack_ies_o::value_c path_switch_request_ack_ies_o::get_value( case 251: ret.set(value_c::types::enhanced_coverage_restricted); break; + case 269: + ret.set(value_c::types::nrue_security_cap); + break; case 271: ret.set(value_c::types::ce_mode_brestricted); break; + case 277: + ret.set(value_c::types::aerial_uesubscription_info); + break; case 283: ret.set(value_c::types::pending_data_ind); break; + case 278: + ret.set(value_c::types::subscription_based_ue_differentiation_info); + break; + case 41: + ret.set(value_c::types::ho_restrict_list); + break; + case 299: + ret.set(value_c::types::add_rrm_prio_idx); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -37483,10 +43610,20 @@ presence_e path_switch_request_ack_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 251: return presence_e::optional; + case 269: + return presence_e::optional; case 271: return presence_e::optional; + case 277: + return presence_e::optional; case 283: return presence_e::optional; + case 278: + return presence_e::optional; + case 41: + return presence_e::optional; + case 299: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -37565,16 +43702,42 @@ enhanced_coverage_restricted_e& path_switch_request_ack_ies_o::value_c::enhanced assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); return c.get(); } +nrue_security_cap_s& path_switch_request_ack_ies_o::value_c::nrue_security_cap() +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} ce_mode_brestricted_e& path_switch_request_ack_ies_o::value_c::ce_mode_brestricted() { assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); return c.get(); } +aerial_uesubscription_info_e& path_switch_request_ack_ies_o::value_c::aerial_uesubscription_info() +{ + assert_choice_type("AerialUEsubscriptionInformation", type_.to_string(), "Value"); + return c.get(); +} pending_data_ind_e& path_switch_request_ack_ies_o::value_c::pending_data_ind() { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); return c.get(); } +subscription_based_ue_differentiation_info_s& +path_switch_request_ack_ies_o::value_c::subscription_based_ue_differentiation_info() +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +ho_restrict_list_s& path_switch_request_ack_ies_o::value_c::ho_restrict_list() +{ + assert_choice_type("HandoverRestrictionList", type_.to_string(), "Value"); + return c.get(); +} +fixed_bitstring<32, false, true>& path_switch_request_ack_ies_o::value_c::add_rrm_prio_idx() +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} const uint64_t& path_switch_request_ack_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -37647,16 +43810,42 @@ const enhanced_coverage_restricted_e& path_switch_request_ack_ies_o::value_c::en assert_choice_type("EnhancedCoverageRestricted", type_.to_string(), "Value"); return c.get(); } +const nrue_security_cap_s& path_switch_request_ack_ies_o::value_c::nrue_security_cap() const +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} const ce_mode_brestricted_e& path_switch_request_ack_ies_o::value_c::ce_mode_brestricted() const { assert_choice_type("CE-ModeBRestricted", type_.to_string(), "Value"); return c.get(); } +const aerial_uesubscription_info_e& path_switch_request_ack_ies_o::value_c::aerial_uesubscription_info() const +{ + assert_choice_type("AerialUEsubscriptionInformation", type_.to_string(), "Value"); + return c.get(); +} const pending_data_ind_e& path_switch_request_ack_ies_o::value_c::pending_data_ind() const { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); return c.get(); } +const subscription_based_ue_differentiation_info_s& +path_switch_request_ack_ies_o::value_c::subscription_based_ue_differentiation_info() const +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} +const ho_restrict_list_s& path_switch_request_ack_ies_o::value_c::ho_restrict_list() const +{ + assert_choice_type("HandoverRestrictionList", type_.to_string(), "Value"); + return c.get(); +} +const fixed_bitstring<32, false, true>& path_switch_request_ack_ies_o::value_c::add_rrm_prio_idx() const +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} void path_switch_request_ack_ies_o::value_c::destroy_() { switch (type_) { @@ -37684,6 +43873,18 @@ void path_switch_request_ack_ies_o::value_c::destroy_() case types::ue_sidelink_aggregate_maximum_bitrate: c.destroy(); break; + case types::nrue_security_cap: + c.destroy(); + break; + case types::subscription_based_ue_differentiation_info: + c.destroy(); + break; + case types::ho_restrict_list: + c.destroy(); + break; + case types::add_rrm_prio_idx: + c.destroy >(); + break; default: break; } @@ -37729,10 +43930,24 @@ void path_switch_request_ack_ies_o::value_c::set(types::options e) break; case types::enhanced_coverage_restricted: break; + case types::nrue_security_cap: + c.init(); + break; case types::ce_mode_brestricted: break; + case types::aerial_uesubscription_info: + break; case types::pending_data_ind: break; + case types::subscription_based_ue_differentiation_info: + c.init(); + break; + case types::ho_restrict_list: + c.init(); + break; + case types::add_rrm_prio_idx: + c.init >(); + break; case types::nulltype: break; default: @@ -37785,12 +44000,27 @@ path_switch_request_ack_ies_o::value_c::value_c(const path_switch_request_ack_ie case types::enhanced_coverage_restricted: c.init(other.c.get()); break; + case types::nrue_security_cap: + c.init(other.c.get()); + break; case types::ce_mode_brestricted: c.init(other.c.get()); break; + case types::aerial_uesubscription_info: + c.init(other.c.get()); + break; case types::pending_data_ind: c.init(other.c.get()); break; + case types::subscription_based_ue_differentiation_info: + c.init(other.c.get()); + break; + case types::ho_restrict_list: + c.init(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -37847,12 +44077,27 @@ path_switch_request_ack_ies_o::value_c::operator=(const path_switch_request_ack_ case types::enhanced_coverage_restricted: c.set(other.c.get()); break; + case types::nrue_security_cap: + c.set(other.c.get()); + break; case types::ce_mode_brestricted: c.set(other.c.get()); break; + case types::aerial_uesubscription_info: + c.set(other.c.get()); + break; case types::pending_data_ind: c.set(other.c.get()); break; + case types::subscription_based_ue_differentiation_info: + c.set(other.c.get()); + break; + case types::ho_restrict_list: + c.set(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -37917,12 +44162,30 @@ void path_switch_request_ack_ies_o::value_c::to_json(json_writer& j) const case types::enhanced_coverage_restricted: j.write_str("EnhancedCoverageRestricted", "restricted"); break; + case types::nrue_security_cap: + j.write_fieldname("NRUESecurityCapabilities"); + c.get().to_json(j); + break; case types::ce_mode_brestricted: j.write_str("CE-ModeBRestricted", c.get().to_string()); break; + case types::aerial_uesubscription_info: + j.write_str("AerialUEsubscriptionInformation", c.get().to_string()); + break; case types::pending_data_ind: j.write_str("PendingDataIndication", "true"); break; + case types::subscription_based_ue_differentiation_info: + j.write_fieldname("Subscription-Based-UE-DifferentiationInfo"); + c.get().to_json(j); + break; + case types::ho_restrict_list: + j.write_fieldname("HandoverRestrictionList"); + c.get().to_json(j); + break; + case types::add_rrm_prio_idx: + j.write_str("BIT STRING", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "path_switch_request_ack_ies_o::value_c"); } @@ -37975,12 +44238,27 @@ SRSASN_CODE path_switch_request_ack_ies_o::value_c::pack(bit_ref& bref) const case types::enhanced_coverage_restricted: HANDLE_CODE(c.get().pack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().pack(bref)); + break; case types::ce_mode_brestricted: HANDLE_CODE(c.get().pack(bref)); break; + case types::aerial_uesubscription_info: + HANDLE_CODE(c.get().pack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().pack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ho_restrict_list: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().pack(bref))); + break; default: log_invalid_choice_id(type_, "path_switch_request_ack_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -38034,12 +44312,27 @@ SRSASN_CODE path_switch_request_ack_ies_o::value_c::unpack(cbit_ref& bref) case types::enhanced_coverage_restricted: HANDLE_CODE(c.get().unpack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::ce_mode_brestricted: HANDLE_CODE(c.get().unpack(bref)); break; + case types::aerial_uesubscription_info: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().unpack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ho_restrict_list: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().unpack(bref))); + break; default: log_invalid_choice_id(type_, "path_switch_request_ack_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -38063,9 +44356,14 @@ std::string path_switch_request_ack_ies_o::value_c::types_opts::to_string() cons "V2XServicesAuthorized", "UESidelinkAggregateMaximumBitrate", "EnhancedCoverageRestricted", + "NRUESecurityCapabilities", "CE-ModeBRestricted", - "PendingDataIndication"}; - return convert_enum_idx(options, 16, value, "path_switch_request_ack_ies_o::value_c::types"); + "AerialUEsubscriptionInformation", + "PendingDataIndication", + "Subscription-Based-UE-DifferentiationInfo", + "HandoverRestrictionList", + "BIT STRING"}; + return convert_enum_idx(options, 21, value, "path_switch_request_ack_ies_o::value_c::types"); } // PathSwitchRequestFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -38341,12 +44639,12 @@ 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 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"); + static const uint32_t options[] = {8, 22, 88, 100, 67, 107, 127, 145, 157, 146, 176, 186, 245, 269, 288}; + return map_enum_number(options, 15, idx, "id"); } bool path_switch_request_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {8, 22, 88, 100, 67, 107, 127, 145, 157, 146, 176, 186, 245}; + static const uint32_t options[] = {8, 22, 88, 100, 67, 107, 127, 145, 157, 146, 176, 186, 245, 269, 288}; for (const auto& o : options) { if (o == id) { return true; @@ -38383,6 +44681,10 @@ crit_e path_switch_request_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 245: return crit_e::ignore; + case 269: + return crit_e::ignore; + case 288: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -38431,6 +44733,12 @@ path_switch_request_ies_o::value_c path_switch_request_ies_o::get_value(const ui case 245: ret.set(value_c::types::rrc_resume_cause); break; + case 269: + ret.set(value_c::types::nrue_security_cap); + break; + case 288: + ret.set(value_c::types::ps_cell_info); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -38465,6 +44773,10 @@ presence_e path_switch_request_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 245: return presence_e::optional; + case 269: + return presence_e::optional; + case 288: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -38538,6 +44850,16 @@ rrc_establishment_cause_e& path_switch_request_ies_o::value_c::rrc_resume_cause( assert_choice_type("RRC-Establishment-Cause", type_.to_string(), "Value"); return c.get(); } +nrue_security_cap_s& path_switch_request_ies_o::value_c::nrue_security_cap() +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} +ps_cell_info_s& path_switch_request_ies_o::value_c::ps_cell_info() +{ + assert_choice_type("PSCellInformation", type_.to_string(), "Value"); + return c.get(); +} const uint32_t& path_switch_request_ies_o::value_c::enb_ue_s1ap_id() const { assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); @@ -38604,6 +44926,16 @@ const rrc_establishment_cause_e& path_switch_request_ies_o::value_c::rrc_resume_ assert_choice_type("RRC-Establishment-Cause", type_.to_string(), "Value"); return c.get(); } +const nrue_security_cap_s& path_switch_request_ies_o::value_c::nrue_security_cap() const +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} +const ps_cell_info_s& path_switch_request_ies_o::value_c::ps_cell_info() const +{ + assert_choice_type("PSCellInformation", type_.to_string(), "Value"); + return c.get(); +} void path_switch_request_ies_o::value_c::destroy_() { switch (type_) { @@ -38631,6 +44963,12 @@ void path_switch_request_ies_o::value_c::destroy_() case types::lhn_id: c.destroy >(); break; + case types::nrue_security_cap: + c.destroy(); + break; + case types::ps_cell_info: + c.destroy(); + break; default: break; } @@ -38674,6 +45012,12 @@ void path_switch_request_ies_o::value_c::set(types::options e) break; case types::rrc_resume_cause: break; + case types::nrue_security_cap: + c.init(); + break; + case types::ps_cell_info: + c.init(); + break; case types::nulltype: break; default: @@ -38723,6 +45067,12 @@ path_switch_request_ies_o::value_c::value_c(const path_switch_request_ies_o::val case types::rrc_resume_cause: c.init(other.c.get()); break; + case types::nrue_security_cap: + c.init(other.c.get()); + break; + case types::ps_cell_info: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -38776,6 +45126,12 @@ path_switch_request_ies_o::value_c::operator=(const path_switch_request_ies_o::v case types::rrc_resume_cause: c.set(other.c.get()); break; + case types::nrue_security_cap: + c.set(other.c.get()); + break; + case types::ps_cell_info: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -38832,6 +45188,14 @@ void path_switch_request_ies_o::value_c::to_json(json_writer& j) const case types::rrc_resume_cause: j.write_str("RRC-Establishment-Cause", c.get().to_string()); break; + case types::nrue_security_cap: + j.write_fieldname("NRUESecurityCapabilities"); + c.get().to_json(j); + break; + case types::ps_cell_info: + j.write_fieldname("PSCellInformation"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "path_switch_request_ies_o::value_c"); } @@ -38881,6 +45245,12 @@ SRSASN_CODE path_switch_request_ies_o::value_c::pack(bit_ref& bref) const case types::rrc_resume_cause: HANDLE_CODE(c.get().pack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ps_cell_info: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "path_switch_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -38931,6 +45301,12 @@ SRSASN_CODE path_switch_request_ies_o::value_c::unpack(cbit_ref& bref) case types::rrc_resume_cause: HANDLE_CODE(c.get().unpack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ps_cell_info: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "path_switch_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -38952,8 +45328,10 @@ std::string path_switch_request_ies_o::value_c::types_opts::to_string() const "CSGMembershipStatus", "TunnelInformation", "OCTET STRING", - "RRC-Establishment-Cause"}; - return convert_enum_idx(options, 13, value, "path_switch_request_ies_o::value_c::types"); + "RRC-Establishment-Cause", + "NRUESecurityCapabilities", + "PSCellInformation"}; + return convert_enum_idx(options, 15, value, "path_switch_request_ies_o::value_c::types"); } // Value ::= OPEN TYPE @@ -40031,12 +46409,12 @@ std::string s1_setup_fail_ies_o::value_c::types_opts::to_string() const // S1SetupRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t s1_setup_request_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {59, 60, 64, 137, 128, 228, 234}; - return map_enum_number(options, 7, idx, "id"); + static const uint32_t options[] = {59, 60, 64, 137, 128, 228, 234, 291}; + return map_enum_number(options, 8, idx, "id"); } bool s1_setup_request_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {59, 60, 64, 137, 128, 228, 234}; + static const uint32_t options[] = {59, 60, 64, 137, 128, 228, 234, 291}; for (const auto& o : options) { if (o == id) { return true; @@ -40061,6 +46439,8 @@ crit_e s1_setup_request_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 234: return crit_e::ignore; + case 291: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -40091,6 +46471,9 @@ s1_setup_request_ies_o::value_c s1_setup_request_ies_o::get_value(const uint32_t case 234: ret.set(value_c::types::nb_io_t_default_paging_drx); break; + case 291: + ret.set(value_c::types::connectedeng_nb_list); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -40113,6 +46496,8 @@ presence_e s1_setup_request_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 234: return presence_e::optional; + case 291: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -40155,6 +46540,11 @@ nb_io_t_default_paging_drx_e& s1_setup_request_ies_o::value_c::nb_io_t_default_p assert_choice_type("NB-IoT-DefaultPagingDRX", type_.to_string(), "Value"); return c.get(); } +connectedeng_nb_list_l& s1_setup_request_ies_o::value_c::connectedeng_nb_list() +{ + assert_choice_type("ConnectedengNBList", type_.to_string(), "Value"); + return c.get(); +} const global_enb_id_s& s1_setup_request_ies_o::value_c::global_enb_id() const { assert_choice_type("Global-ENB-ID", type_.to_string(), "Value"); @@ -40190,6 +46580,11 @@ const nb_io_t_default_paging_drx_e& s1_setup_request_ies_o::value_c::nb_io_t_def assert_choice_type("NB-IoT-DefaultPagingDRX", type_.to_string(), "Value"); return c.get(); } +const connectedeng_nb_list_l& s1_setup_request_ies_o::value_c::connectedeng_nb_list() const +{ + assert_choice_type("ConnectedengNBList", type_.to_string(), "Value"); + return c.get(); +} void s1_setup_request_ies_o::value_c::destroy_() { switch (type_) { @@ -40205,6 +46600,9 @@ void s1_setup_request_ies_o::value_c::destroy_() case types::csg_id_list: c.destroy(); break; + case types::connectedeng_nb_list: + c.destroy(); + break; default: break; } @@ -40232,6 +46630,9 @@ void s1_setup_request_ies_o::value_c::set(types::options e) break; case types::nb_io_t_default_paging_drx: break; + case types::connectedeng_nb_list: + c.init(); + break; case types::nulltype: break; default: @@ -40263,6 +46664,9 @@ s1_setup_request_ies_o::value_c::value_c(const s1_setup_request_ies_o::value_c& case types::nb_io_t_default_paging_drx: c.init(other.c.get()); break; + case types::connectedeng_nb_list: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -40298,6 +46702,9 @@ s1_setup_request_ies_o::value_c::operator=(const s1_setup_request_ies_o::value_c case types::nb_io_t_default_paging_drx: c.set(other.c.get()); break; + case types::connectedeng_nb_list: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -40340,6 +46747,13 @@ void s1_setup_request_ies_o::value_c::to_json(json_writer& j) const case types::nb_io_t_default_paging_drx: j.write_str("NB-IoT-DefaultPagingDRX", c.get().to_string()); break; + case types::connectedeng_nb_list: + j.start_array("ConnectedengNBList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; default: log_invalid_choice_id(type_, "s1_setup_request_ies_o::value_c"); } @@ -40370,6 +46784,9 @@ SRSASN_CODE s1_setup_request_ies_o::value_c::pack(bit_ref& bref) const case types::nb_io_t_default_paging_drx: HANDLE_CODE(c.get().pack(bref)); break; + case types::connectedeng_nb_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; default: log_invalid_choice_id(type_, "s1_setup_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -40401,6 +46818,9 @@ SRSASN_CODE s1_setup_request_ies_o::value_c::unpack(cbit_ref& bref) case types::nb_io_t_default_paging_drx: HANDLE_CODE(c.get().unpack(bref)); break; + case types::connectedeng_nb_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; default: log_invalid_choice_id(type_, "s1_setup_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -40416,8 +46836,9 @@ std::string s1_setup_request_ies_o::value_c::types_opts::to_string() const "PagingDRX", "CSG-IdList", "UE-RetentionInformation", - "NB-IoT-DefaultPagingDRX"}; - return convert_enum_idx(options, 7, value, "s1_setup_request_ies_o::value_c::types"); + "NB-IoT-DefaultPagingDRX", + "ConnectedengNBList"}; + return convert_enum_idx(options, 8, value, "s1_setup_request_ies_o::value_c::types"); } // S1SetupResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -40819,6 +47240,358 @@ uint8_t s1_setup_resp_ies_o::value_c::types_opts::to_number() const return 0; } +// SecondaryRATDataUsageReportIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES +uint32_t secondary_rat_data_usage_report_ies_o::idx_to_id(uint32_t idx) +{ + static const uint32_t options[] = {0, 8, 264, 266, 189, 297}; + return map_enum_number(options, 6, idx, "id"); +} +bool secondary_rat_data_usage_report_ies_o::is_id_valid(const uint32_t& id) +{ + static const uint32_t options[] = {0, 8, 264, 266, 189, 297}; + for (const auto& o : options) { + if (o == id) { + return true; + } + } + return false; +} +crit_e secondary_rat_data_usage_report_ies_o::get_crit(const uint32_t& id) +{ + switch (id) { + case 0: + return crit_e::ignore; + case 8: + return crit_e::ignore; + case 264: + return crit_e::ignore; + case 266: + return crit_e::ignore; + case 189: + return crit_e::ignore; + case 297: + return crit_e::ignore; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} +secondary_rat_data_usage_report_ies_o::value_c secondary_rat_data_usage_report_ies_o::get_value(const uint32_t& id) +{ + value_c ret{}; + switch (id) { + case 0: + ret.set(value_c::types::mme_ue_s1ap_id); + break; + case 8: + ret.set(value_c::types::enb_ue_s1ap_id); + break; + case 264: + ret.set(value_c::types::secondary_rat_data_usage_report_list); + break; + case 266: + ret.set(value_c::types::ho_flag); + break; + case 189: + ret.set(value_c::types::user_location_info); + break; + case 297: + ret.set(value_c::types::time_since_secondary_node_release); + break; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return ret; +} +presence_e secondary_rat_data_usage_report_ies_o::get_presence(const uint32_t& id) +{ + switch (id) { + case 0: + return presence_e::mandatory; + case 8: + return presence_e::mandatory; + case 264: + return presence_e::mandatory; + case 266: + return presence_e::optional; + case 189: + return presence_e::optional; + case 297: + return presence_e::optional; + default: + asn1::log_error("The id=%d is not recognized", id); + } + return {}; +} + +// Value ::= OPEN TYPE +uint64_t& secondary_rat_data_usage_report_ies_o::value_c::mme_ue_s1ap_id() +{ + assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); + return c.get(); +} +uint32_t& secondary_rat_data_usage_report_ies_o::value_c::enb_ue_s1ap_id() +{ + assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); + return c.get(); +} +secondary_rat_data_usage_report_list_l& +secondary_rat_data_usage_report_ies_o::value_c::secondary_rat_data_usage_report_list() +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} +ho_flag_e& secondary_rat_data_usage_report_ies_o::value_c::ho_flag() +{ + assert_choice_type("HandoverFlag", type_.to_string(), "Value"); + return c.get(); +} +user_location_info_s& secondary_rat_data_usage_report_ies_o::value_c::user_location_info() +{ + assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); + return c.get(); +} +fixed_octstring<4, true>& secondary_rat_data_usage_report_ies_o::value_c::time_since_secondary_node_release() +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} +const uint64_t& secondary_rat_data_usage_report_ies_o::value_c::mme_ue_s1ap_id() const +{ + assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); + return c.get(); +} +const uint32_t& secondary_rat_data_usage_report_ies_o::value_c::enb_ue_s1ap_id() const +{ + assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); + return c.get(); +} +const secondary_rat_data_usage_report_list_l& +secondary_rat_data_usage_report_ies_o::value_c::secondary_rat_data_usage_report_list() const +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} +const ho_flag_e& secondary_rat_data_usage_report_ies_o::value_c::ho_flag() const +{ + assert_choice_type("HandoverFlag", type_.to_string(), "Value"); + return c.get(); +} +const user_location_info_s& secondary_rat_data_usage_report_ies_o::value_c::user_location_info() const +{ + assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); + return c.get(); +} +const fixed_octstring<4, true>& +secondary_rat_data_usage_report_ies_o::value_c::time_since_secondary_node_release() const +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} +void secondary_rat_data_usage_report_ies_o::value_c::destroy_() +{ + switch (type_) { + case types::secondary_rat_data_usage_report_list: + c.destroy(); + break; + case types::user_location_info: + c.destroy(); + break; + case types::time_since_secondary_node_release: + c.destroy >(); + break; + default: + break; + } +} +void secondary_rat_data_usage_report_ies_o::value_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::mme_ue_s1ap_id: + break; + case types::enb_ue_s1ap_id: + break; + case types::secondary_rat_data_usage_report_list: + c.init(); + break; + case types::ho_flag: + break; + case types::user_location_info: + c.init(); + break; + case types::time_since_secondary_node_release: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "secondary_rat_data_usage_report_ies_o::value_c"); + } +} +secondary_rat_data_usage_report_ies_o::value_c::value_c(const secondary_rat_data_usage_report_ies_o::value_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::mme_ue_s1ap_id: + c.init(other.c.get()); + break; + case types::enb_ue_s1ap_id: + c.init(other.c.get()); + break; + case types::secondary_rat_data_usage_report_list: + c.init(other.c.get()); + break; + case types::ho_flag: + c.init(other.c.get()); + break; + case types::user_location_info: + c.init(other.c.get()); + break; + case types::time_since_secondary_node_release: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "secondary_rat_data_usage_report_ies_o::value_c"); + } +} +secondary_rat_data_usage_report_ies_o::value_c& +secondary_rat_data_usage_report_ies_o::value_c::operator=(const secondary_rat_data_usage_report_ies_o::value_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::mme_ue_s1ap_id: + c.set(other.c.get()); + break; + case types::enb_ue_s1ap_id: + c.set(other.c.get()); + break; + case types::secondary_rat_data_usage_report_list: + c.set(other.c.get()); + break; + case types::ho_flag: + c.set(other.c.get()); + break; + case types::user_location_info: + c.set(other.c.get()); + break; + case types::time_since_secondary_node_release: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "secondary_rat_data_usage_report_ies_o::value_c"); + } + + return *this; +} +void secondary_rat_data_usage_report_ies_o::value_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mme_ue_s1ap_id: + j.write_int("INTEGER (0..4294967295)", c.get()); + break; + case types::enb_ue_s1ap_id: + j.write_int("INTEGER (0..16777215)", c.get()); + break; + case types::secondary_rat_data_usage_report_list: + j.start_array("SecondaryRATDataUsageReportList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::ho_flag: + j.write_str("HandoverFlag", "handoverPreparation"); + break; + case types::user_location_info: + j.write_fieldname("UserLocationInformation"); + c.get().to_json(j); + break; + case types::time_since_secondary_node_release: + j.write_str("OCTET STRING", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "secondary_rat_data_usage_report_ies_o::value_c"); + } + j.end_obj(); +} +SRSASN_CODE secondary_rat_data_usage_report_ies_o::value_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + switch (type_) { + case types::mme_ue_s1ap_id: + HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)0u, (uint64_t)4294967295u, false, true)); + break; + case types::enb_ue_s1ap_id: + HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); + break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; + case types::ho_flag: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::user_location_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::time_since_secondary_node_release: + HANDLE_CODE((c.get >().pack(bref))); + break; + default: + log_invalid_choice_id(type_, "secondary_rat_data_usage_report_ies_o::value_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE secondary_rat_data_usage_report_ies_o::value_c::unpack(cbit_ref& bref) +{ + varlength_field_unpack_guard varlen_scope(bref, true); + switch (type_) { + case types::mme_ue_s1ap_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint64_t)0u, (uint64_t)4294967295u, false, true)); + break; + case types::enb_ue_s1ap_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); + break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; + case types::ho_flag: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::user_location_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::time_since_secondary_node_release: + HANDLE_CODE((c.get >().unpack(bref))); + break; + default: + log_invalid_choice_id(type_, "secondary_rat_data_usage_report_ies_o::value_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +std::string secondary_rat_data_usage_report_ies_o::value_c::types_opts::to_string() const +{ + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "SecondaryRATDataUsageReportList", + "HandoverFlag", + "UserLocationInformation", + "OCTET STRING"}; + return convert_enum_idx(options, 6, value, "secondary_rat_data_usage_report_ies_o::value_c::types"); +} + // TraceFailureIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t trace_fail_ind_ies_o::idx_to_id(uint32_t idx) { @@ -41318,12 +48091,12 @@ std::string trace_start_ies_o::value_c::types_opts::to_string() const // UECapabilityInfoIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_cap_info_ind_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {0, 8, 74, 198}; - return map_enum_number(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 74, 198, 263, 272}; + return map_enum_number(options, 6, idx, "id"); } bool ue_cap_info_ind_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 74, 198}; + static const uint32_t options[] = {0, 8, 74, 198, 263, 272}; for (const auto& o : options) { if (o == id) { return true; @@ -41342,6 +48115,10 @@ crit_e ue_cap_info_ind_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 198: return crit_e::ignore; + case 263: + return crit_e::ignore; + case 272: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -41363,6 +48140,12 @@ ue_cap_info_ind_ies_o::value_c ue_cap_info_ind_ies_o::get_value(const uint32_t& case 198: ret.set(value_c::types::ue_radio_cap_for_paging); break; + case 263: + ret.set(value_c::types::ue_application_layer_meas_cap); + break; + case 272: + ret.set(value_c::types::lte_m_ind); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -41379,6 +48162,10 @@ presence_e ue_cap_info_ind_ies_o::get_presence(const uint32_t& id) return presence_e::mandatory; case 198: return presence_e::optional; + case 263: + return presence_e::optional; + case 272: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -41406,6 +48193,16 @@ unbounded_octstring& ue_cap_info_ind_ies_o::value_c::ue_radio_cap_for_pagi assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } +fixed_bitstring<8, false, true>& ue_cap_info_ind_ies_o::value_c::ue_application_layer_meas_cap() +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} +lte_m_ind_e& ue_cap_info_ind_ies_o::value_c::lte_m_ind() +{ + assert_choice_type("LTE-M-Indication", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& ue_cap_info_ind_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -41426,6 +48223,16 @@ const unbounded_octstring& ue_cap_info_ind_ies_o::value_c::ue_radio_cap_fo assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } +const fixed_bitstring<8, false, true>& ue_cap_info_ind_ies_o::value_c::ue_application_layer_meas_cap() const +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} +const lte_m_ind_e& ue_cap_info_ind_ies_o::value_c::lte_m_ind() const +{ + assert_choice_type("LTE-M-Indication", type_.to_string(), "Value"); + return c.get(); +} void ue_cap_info_ind_ies_o::value_c::destroy_() { switch (type_) { @@ -41435,6 +48242,9 @@ void ue_cap_info_ind_ies_o::value_c::destroy_() case types::ue_radio_cap_for_paging: c.destroy >(); break; + case types::ue_application_layer_meas_cap: + c.destroy >(); + break; default: break; } @@ -41454,6 +48264,11 @@ void ue_cap_info_ind_ies_o::value_c::set(types::options e) case types::ue_radio_cap_for_paging: c.init >(); break; + case types::ue_application_layer_meas_cap: + c.init >(); + break; + case types::lte_m_ind: + break; case types::nulltype: break; default: @@ -41476,6 +48291,12 @@ ue_cap_info_ind_ies_o::value_c::value_c(const ue_cap_info_ind_ies_o::value_c& ot case types::ue_radio_cap_for_paging: c.init(other.c.get >()); break; + case types::ue_application_layer_meas_cap: + c.init(other.c.get >()); + break; + case types::lte_m_ind: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -41501,6 +48322,12 @@ ue_cap_info_ind_ies_o::value_c& ue_cap_info_ind_ies_o::value_c::operator=(const case types::ue_radio_cap_for_paging: c.set(other.c.get >()); break; + case types::ue_application_layer_meas_cap: + c.set(other.c.get >()); + break; + case types::lte_m_ind: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -41525,6 +48352,12 @@ void ue_cap_info_ind_ies_o::value_c::to_json(json_writer& j) const case types::ue_radio_cap_for_paging: j.write_str("OCTET STRING", c.get >().to_string()); break; + case types::ue_application_layer_meas_cap: + j.write_str("BIT STRING", c.get >().to_string()); + break; + case types::lte_m_ind: + j.write_str("LTE-M-Indication", "lte-m"); + break; default: log_invalid_choice_id(type_, "ue_cap_info_ind_ies_o::value_c"); } @@ -41546,6 +48379,12 @@ SRSASN_CODE ue_cap_info_ind_ies_o::value_c::pack(bit_ref& bref) const case types::ue_radio_cap_for_paging: HANDLE_CODE(c.get >().pack(bref)); break; + case types::ue_application_layer_meas_cap: + HANDLE_CODE((c.get >().pack(bref))); + break; + case types::lte_m_ind: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "ue_cap_info_ind_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -41568,6 +48407,12 @@ SRSASN_CODE ue_cap_info_ind_ies_o::value_c::unpack(cbit_ref& bref) case types::ue_radio_cap_for_paging: HANDLE_CODE(c.get >().unpack(bref)); break; + case types::ue_application_layer_meas_cap: + HANDLE_CODE((c.get >().unpack(bref))); + break; + case types::lte_m_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "ue_cap_info_ind_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -41577,8 +48422,13 @@ 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 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"); + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "OCTET STRING", + "OCTET STRING", + "BIT STRING", + "LTE-M-Indication"}; + return convert_enum_idx(options, 6, value, "ue_cap_info_ind_ies_o::value_c::types"); } // UEContextModificationConfirmIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -42349,12 +49199,14 @@ std::string ue_context_mod_ind_ies_o::value_c::types_opts::to_string() const // UEContextModificationRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_mod_request_ies_o::idx_to_id(uint32_t idx) { - 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"); + static const uint32_t options[] = { + 0, 8, 73, 106, 66, 108, 107, 146, 159, 187, 195, 124, 243, 240, 248, 269, 277, 299}; + return map_enum_number(options, 18, idx, "id"); } bool ue_context_mod_request_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 73, 106, 66, 108, 107, 146, 159, 187, 195, 124, 243, 240, 248}; + static const uint32_t options[] = { + 0, 8, 73, 106, 66, 108, 107, 146, 159, 187, 195, 124, 243, 240, 248, 269, 277, 299}; for (const auto& o : options) { if (o == id) { return true; @@ -42395,6 +49247,12 @@ crit_e ue_context_mod_request_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 248: return crit_e::ignore; + case 269: + return crit_e::ignore; + case 277: + return crit_e::ignore; + case 299: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -42449,6 +49307,15 @@ ue_context_mod_request_ies_o::value_c ue_context_mod_request_ies_o::get_value(co case 248: ret.set(value_c::types::ue_sidelink_aggregate_maximum_bitrate); break; + case 269: + ret.set(value_c::types::nrue_security_cap); + break; + case 277: + ret.set(value_c::types::aerial_uesubscription_info); + break; + case 299: + ret.set(value_c::types::add_rrm_prio_idx); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -42487,6 +49354,12 @@ presence_e ue_context_mod_request_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 248: return presence_e::optional; + case 269: + return presence_e::optional; + case 277: + return presence_e::optional; + case 299: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -42569,6 +49442,21 @@ ue_sidelink_aggregate_maximum_bitrate_s& ue_context_mod_request_ies_o::value_c:: assert_choice_type("UESidelinkAggregateMaximumBitrate", type_.to_string(), "Value"); return c.get(); } +nrue_security_cap_s& ue_context_mod_request_ies_o::value_c::nrue_security_cap() +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} +aerial_uesubscription_info_e& ue_context_mod_request_ies_o::value_c::aerial_uesubscription_info() +{ + assert_choice_type("AerialUEsubscriptionInformation", type_.to_string(), "Value"); + return c.get(); +} +fixed_bitstring<32, false, true>& ue_context_mod_request_ies_o::value_c::add_rrm_prio_idx() +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} const uint64_t& ue_context_mod_request_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -42645,6 +49533,21 @@ ue_context_mod_request_ies_o::value_c::ue_sidelink_aggregate_maximum_bitrate() c assert_choice_type("UESidelinkAggregateMaximumBitrate", type_.to_string(), "Value"); return c.get(); } +const nrue_security_cap_s& ue_context_mod_request_ies_o::value_c::nrue_security_cap() const +{ + assert_choice_type("NRUESecurityCapabilities", type_.to_string(), "Value"); + return c.get(); +} +const aerial_uesubscription_info_e& ue_context_mod_request_ies_o::value_c::aerial_uesubscription_info() const +{ + assert_choice_type("AerialUEsubscriptionInformation", type_.to_string(), "Value"); + return c.get(); +} +const fixed_bitstring<32, false, true>& ue_context_mod_request_ies_o::value_c::add_rrm_prio_idx() const +{ + assert_choice_type("BIT STRING", type_.to_string(), "Value"); + return c.get >(); +} void ue_context_mod_request_ies_o::value_c::destroy_() { switch (type_) { @@ -42669,6 +49572,12 @@ void ue_context_mod_request_ies_o::value_c::destroy_() case types::ue_sidelink_aggregate_maximum_bitrate: c.destroy(); break; + case types::nrue_security_cap: + c.destroy(); + break; + case types::add_rrm_prio_idx: + c.destroy >(); + break; default: break; } @@ -42715,6 +49624,14 @@ void ue_context_mod_request_ies_o::value_c::set(types::options e) case types::ue_sidelink_aggregate_maximum_bitrate: c.init(); break; + case types::nrue_security_cap: + c.init(); + break; + case types::aerial_uesubscription_info: + break; + case types::add_rrm_prio_idx: + c.init >(); + break; case types::nulltype: break; default: @@ -42770,6 +49687,15 @@ ue_context_mod_request_ies_o::value_c::value_c(const ue_context_mod_request_ies_ case types::ue_sidelink_aggregate_maximum_bitrate: c.init(other.c.get()); break; + case types::nrue_security_cap: + c.init(other.c.get()); + break; + case types::aerial_uesubscription_info: + c.init(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -42829,6 +49755,15 @@ ue_context_mod_request_ies_o::value_c::operator=(const ue_context_mod_request_ie case types::ue_sidelink_aggregate_maximum_bitrate: c.set(other.c.get()); break; + case types::nrue_security_cap: + c.set(other.c.get()); + break; + case types::aerial_uesubscription_info: + c.set(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -42892,6 +49827,16 @@ void ue_context_mod_request_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("UESidelinkAggregateMaximumBitrate"); c.get().to_json(j); break; + case types::nrue_security_cap: + j.write_fieldname("NRUESecurityCapabilities"); + c.get().to_json(j); + break; + case types::aerial_uesubscription_info: + j.write_str("AerialUEsubscriptionInformation", c.get().to_string()); + break; + case types::add_rrm_prio_idx: + j.write_str("BIT STRING", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "ue_context_mod_request_ies_o::value_c"); } @@ -42946,6 +49891,15 @@ SRSASN_CODE ue_context_mod_request_ies_o::value_c::pack(bit_ref& bref) const case types::ue_sidelink_aggregate_maximum_bitrate: HANDLE_CODE(c.get().pack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::aerial_uesubscription_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().pack(bref))); + break; default: log_invalid_choice_id(type_, "ue_context_mod_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -43001,6 +49955,15 @@ SRSASN_CODE ue_context_mod_request_ies_o::value_c::unpack(cbit_ref& bref) case types::ue_sidelink_aggregate_maximum_bitrate: HANDLE_CODE(c.get().unpack(bref)); break; + case types::nrue_security_cap: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::aerial_uesubscription_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().unpack(bref))); + break; default: log_invalid_choice_id(type_, "ue_context_mod_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -43024,8 +49987,11 @@ std::string ue_context_mod_request_ies_o::value_c::types_opts::to_string() const "SRVCCOperationPossible", "SRVCCOperationNotPossible", "V2XServicesAuthorized", - "UESidelinkAggregateMaximumBitrate"}; - return convert_enum_idx(options, 15, value, "ue_context_mod_request_ies_o::value_c::types"); + "UESidelinkAggregateMaximumBitrate", + "NRUESecurityCapabilities", + "AerialUEsubscriptionInformation", + "BIT STRING"}; + return convert_enum_idx(options, 18, value, "ue_context_mod_request_ies_o::value_c::types"); } // UEContextModificationResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -43467,12 +50433,12 @@ uint8_t ue_context_release_cmd_ies_o::value_c::types_opts::to_number() const // UEContextReleaseComplete-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_release_complete_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {0, 8, 58, 189, 213, 212}; - return map_enum_number(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 58, 189, 213, 212, 264, 297}; + return map_enum_number(options, 8, idx, "id"); } bool ue_context_release_complete_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 58, 189, 213, 212}; + static const uint32_t options[] = {0, 8, 58, 189, 213, 212, 264, 297}; for (const auto& o : options) { if (o == id) { return true; @@ -43495,6 +50461,10 @@ crit_e ue_context_release_complete_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 212: return crit_e::ignore; + case 264: + return crit_e::ignore; + case 297: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -43522,6 +50492,12 @@ ue_context_release_complete_ies_o::value_c ue_context_release_complete_ies_o::ge case 212: ret.set(value_c::types::cell_id_and_ce_level_for_ce_capable_ues); break; + case 264: + ret.set(value_c::types::secondary_rat_data_usage_report_list); + break; + case 297: + ret.set(value_c::types::time_since_secondary_node_release); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -43542,6 +50518,10 @@ presence_e ue_context_release_complete_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 212: return presence_e::optional; + case 264: + return presence_e::optional; + case 297: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -43581,6 +50561,17 @@ ue_context_release_complete_ies_o::value_c::cell_id_and_ce_level_for_ce_capable_ assert_choice_type("CellIdentifierAndCELevelForCECapableUEs", type_.to_string(), "Value"); return c.get(); } +secondary_rat_data_usage_report_list_l& +ue_context_release_complete_ies_o::value_c::secondary_rat_data_usage_report_list() +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} +fixed_octstring<4, true>& ue_context_release_complete_ies_o::value_c::time_since_secondary_node_release() +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} const uint64_t& ue_context_release_complete_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -43613,6 +50604,17 @@ ue_context_release_complete_ies_o::value_c::cell_id_and_ce_level_for_ce_capable_ assert_choice_type("CellIdentifierAndCELevelForCECapableUEs", type_.to_string(), "Value"); return c.get(); } +const secondary_rat_data_usage_report_list_l& +ue_context_release_complete_ies_o::value_c::secondary_rat_data_usage_report_list() const +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} +const fixed_octstring<4, true>& ue_context_release_complete_ies_o::value_c::time_since_secondary_node_release() const +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} void ue_context_release_complete_ies_o::value_c::destroy_() { switch (type_) { @@ -43628,6 +50630,12 @@ void ue_context_release_complete_ies_o::value_c::destroy_() case types::cell_id_and_ce_level_for_ce_capable_ues: c.destroy(); break; + case types::secondary_rat_data_usage_report_list: + c.destroy(); + break; + case types::time_since_secondary_node_release: + c.destroy >(); + break; default: break; } @@ -43653,6 +50661,12 @@ void ue_context_release_complete_ies_o::value_c::set(types::options e) case types::cell_id_and_ce_level_for_ce_capable_ues: c.init(); break; + case types::secondary_rat_data_usage_report_list: + c.init(); + break; + case types::time_since_secondary_node_release: + c.init >(); + break; case types::nulltype: break; default: @@ -43681,6 +50695,12 @@ ue_context_release_complete_ies_o::value_c::value_c(const ue_context_release_com case types::cell_id_and_ce_level_for_ce_capable_ues: c.init(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.init(other.c.get()); + break; + case types::time_since_secondary_node_release: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -43713,6 +50733,12 @@ ue_context_release_complete_ies_o::value_c::operator=(const ue_context_release_c case types::cell_id_and_ce_level_for_ce_capable_ues: c.set(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.set(other.c.get()); + break; + case types::time_since_secondary_node_release: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -43747,6 +50773,16 @@ void ue_context_release_complete_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("CellIdentifierAndCELevelForCECapableUEs"); c.get().to_json(j); break; + case types::secondary_rat_data_usage_report_list: + j.start_array("SecondaryRATDataUsageReportList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::time_since_secondary_node_release: + j.write_str("OCTET STRING", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "ue_context_release_complete_ies_o::value_c"); } @@ -43774,6 +50810,12 @@ SRSASN_CODE ue_context_release_complete_ies_o::value_c::pack(bit_ref& bref) cons case types::cell_id_and_ce_level_for_ce_capable_ues: HANDLE_CODE(c.get().pack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; + case types::time_since_secondary_node_release: + HANDLE_CODE((c.get >().pack(bref))); + break; default: log_invalid_choice_id(type_, "ue_context_release_complete_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -43802,6 +50844,12 @@ SRSASN_CODE ue_context_release_complete_ies_o::value_c::unpack(cbit_ref& bref) case types::cell_id_and_ce_level_for_ce_capable_ues: HANDLE_CODE(c.get().unpack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; + case types::time_since_secondary_node_release: + HANDLE_CODE((c.get >().unpack(bref))); + break; default: log_invalid_choice_id(type_, "ue_context_release_complete_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -43816,19 +50864,21 @@ std::string ue_context_release_complete_ies_o::value_c::types_opts::to_string() "CriticalityDiagnostics", "UserLocationInformation", "InformationOnRecommendedCellsAndENBsForPaging", - "CellIdentifierAndCELevelForCECapableUEs"}; - return convert_enum_idx(options, 6, value, "ue_context_release_complete_ies_o::value_c::types"); + "CellIdentifierAndCELevelForCECapableUEs", + "SecondaryRATDataUsageReportList", + "OCTET STRING"}; + return convert_enum_idx(options, 8, 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 const uint32_t options[] = {0, 8, 2, 164}; - return map_enum_number(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 164, 264}; + return map_enum_number(options, 5, idx, "id"); } bool ue_context_release_request_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 2, 164}; + static const uint32_t options[] = {0, 8, 2, 164, 264}; for (const auto& o : options) { if (o == id) { return true; @@ -43847,6 +50897,8 @@ crit_e ue_context_release_request_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 164: return crit_e::reject; + case 264: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -43868,6 +50920,9 @@ ue_context_release_request_ies_o::value_c ue_context_release_request_ies_o::get_ case 164: ret.set(value_c::types::gw_context_release_ind); break; + case 264: + ret.set(value_c::types::secondary_rat_data_usage_report_list); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -43884,6 +50939,8 @@ presence_e ue_context_release_request_ies_o::get_presence(const uint32_t& id) return presence_e::mandatory; case 164: return presence_e::optional; + case 264: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -43911,6 +50968,12 @@ gw_context_release_ind_e& ue_context_release_request_ies_o::value_c::gw_context_ assert_choice_type("GWContextReleaseIndication", type_.to_string(), "Value"); return c.get(); } +secondary_rat_data_usage_report_list_l& +ue_context_release_request_ies_o::value_c::secondary_rat_data_usage_report_list() +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& ue_context_release_request_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -43931,12 +50994,21 @@ const gw_context_release_ind_e& ue_context_release_request_ies_o::value_c::gw_co assert_choice_type("GWContextReleaseIndication", type_.to_string(), "Value"); return c.get(); } +const secondary_rat_data_usage_report_list_l& +ue_context_release_request_ies_o::value_c::secondary_rat_data_usage_report_list() const +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} void ue_context_release_request_ies_o::value_c::destroy_() { switch (type_) { case types::cause: c.destroy(); break; + case types::secondary_rat_data_usage_report_list: + c.destroy(); + break; default: break; } @@ -43955,6 +51027,9 @@ void ue_context_release_request_ies_o::value_c::set(types::options e) break; case types::gw_context_release_ind: break; + case types::secondary_rat_data_usage_report_list: + c.init(); + break; case types::nulltype: break; default: @@ -43977,6 +51052,9 @@ ue_context_release_request_ies_o::value_c::value_c(const ue_context_release_requ case types::gw_context_release_ind: c.init(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -44003,6 +51081,9 @@ ue_context_release_request_ies_o::value_c::operator=(const ue_context_release_re case types::gw_context_release_ind: c.set(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -44028,6 +51109,13 @@ void ue_context_release_request_ies_o::value_c::to_json(json_writer& j) const case types::gw_context_release_ind: j.write_str("GWContextReleaseIndication", "true"); break; + case types::secondary_rat_data_usage_report_list: + j.start_array("SecondaryRATDataUsageReportList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; default: log_invalid_choice_id(type_, "ue_context_release_request_ies_o::value_c"); } @@ -44049,6 +51137,9 @@ SRSASN_CODE ue_context_release_request_ies_o::value_c::pack(bit_ref& bref) const case types::gw_context_release_ind: HANDLE_CODE(c.get().pack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; default: log_invalid_choice_id(type_, "ue_context_release_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -44071,6 +51162,9 @@ SRSASN_CODE ue_context_release_request_ies_o::value_c::unpack(cbit_ref& bref) case types::gw_context_release_ind: HANDLE_CODE(c.get().unpack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; default: log_invalid_choice_id(type_, "ue_context_release_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -44080,9 +51174,12 @@ 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 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"); + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "Cause", + "GWContextReleaseIndication", + "SecondaryRATDataUsageReportList"}; + return convert_enum_idx(options, 5, value, "ue_context_release_request_ies_o::value_c::types"); } // UEContextResumeFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -44978,12 +52075,12 @@ std::string ue_context_resume_resp_ies_o::value_c::types_opts::to_string() const // UEContextSuspendRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_suspend_request_ies_o::idx_to_id(uint32_t idx) { - static const uint32_t options[] = {0, 8, 213, 212}; - return map_enum_number(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 213, 212, 264, 189, 297}; + return map_enum_number(options, 7, idx, "id"); } bool ue_context_suspend_request_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 213, 212}; + static const uint32_t options[] = {0, 8, 213, 212, 264, 189, 297}; for (const auto& o : options) { if (o == id) { return true; @@ -45002,6 +52099,12 @@ crit_e ue_context_suspend_request_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 212: return crit_e::ignore; + case 264: + return crit_e::ignore; + case 189: + return crit_e::ignore; + case 297: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -45023,6 +52126,15 @@ ue_context_suspend_request_ies_o::value_c ue_context_suspend_request_ies_o::get_ case 212: ret.set(value_c::types::cell_id_and_ce_level_for_ce_capable_ues); break; + case 264: + ret.set(value_c::types::secondary_rat_data_usage_report_list); + break; + case 189: + ret.set(value_c::types::user_location_info); + break; + case 297: + ret.set(value_c::types::time_since_secondary_node_release); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -45039,6 +52151,12 @@ presence_e ue_context_suspend_request_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 212: return presence_e::optional; + case 264: + return presence_e::optional; + case 189: + return presence_e::optional; + case 297: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -45068,6 +52186,22 @@ ue_context_suspend_request_ies_o::value_c::cell_id_and_ce_level_for_ce_capable_u assert_choice_type("CellIdentifierAndCELevelForCECapableUEs", type_.to_string(), "Value"); return c.get(); } +secondary_rat_data_usage_report_list_l& +ue_context_suspend_request_ies_o::value_c::secondary_rat_data_usage_report_list() +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} +user_location_info_s& ue_context_suspend_request_ies_o::value_c::user_location_info() +{ + assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); + return c.get(); +} +fixed_octstring<4, true>& ue_context_suspend_request_ies_o::value_c::time_since_secondary_node_release() +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} const uint64_t& ue_context_suspend_request_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -45090,6 +52224,22 @@ ue_context_suspend_request_ies_o::value_c::cell_id_and_ce_level_for_ce_capable_u assert_choice_type("CellIdentifierAndCELevelForCECapableUEs", type_.to_string(), "Value"); return c.get(); } +const secondary_rat_data_usage_report_list_l& +ue_context_suspend_request_ies_o::value_c::secondary_rat_data_usage_report_list() const +{ + assert_choice_type("SecondaryRATDataUsageReportList", type_.to_string(), "Value"); + return c.get(); +} +const user_location_info_s& ue_context_suspend_request_ies_o::value_c::user_location_info() const +{ + assert_choice_type("UserLocationInformation", type_.to_string(), "Value"); + return c.get(); +} +const fixed_octstring<4, true>& ue_context_suspend_request_ies_o::value_c::time_since_secondary_node_release() const +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} void ue_context_suspend_request_ies_o::value_c::destroy_() { switch (type_) { @@ -45099,6 +52249,15 @@ void ue_context_suspend_request_ies_o::value_c::destroy_() case types::cell_id_and_ce_level_for_ce_capable_ues: c.destroy(); break; + case types::secondary_rat_data_usage_report_list: + c.destroy(); + break; + case types::user_location_info: + c.destroy(); + break; + case types::time_since_secondary_node_release: + c.destroy >(); + break; default: break; } @@ -45118,6 +52277,15 @@ void ue_context_suspend_request_ies_o::value_c::set(types::options e) case types::cell_id_and_ce_level_for_ce_capable_ues: c.init(); break; + case types::secondary_rat_data_usage_report_list: + c.init(); + break; + case types::user_location_info: + c.init(); + break; + case types::time_since_secondary_node_release: + c.init >(); + break; case types::nulltype: break; default: @@ -45140,6 +52308,15 @@ ue_context_suspend_request_ies_o::value_c::value_c(const ue_context_suspend_requ case types::cell_id_and_ce_level_for_ce_capable_ues: c.init(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.init(other.c.get()); + break; + case types::user_location_info: + c.init(other.c.get()); + break; + case types::time_since_secondary_node_release: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -45166,6 +52343,15 @@ ue_context_suspend_request_ies_o::value_c::operator=(const ue_context_suspend_re case types::cell_id_and_ce_level_for_ce_capable_ues: c.set(other.c.get()); break; + case types::secondary_rat_data_usage_report_list: + c.set(other.c.get()); + break; + case types::user_location_info: + c.set(other.c.get()); + break; + case types::time_since_secondary_node_release: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -45192,6 +52378,20 @@ void ue_context_suspend_request_ies_o::value_c::to_json(json_writer& j) const j.write_fieldname("CellIdentifierAndCELevelForCECapableUEs"); c.get().to_json(j); break; + case types::secondary_rat_data_usage_report_list: + j.start_array("SecondaryRATDataUsageReportList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::user_location_info: + j.write_fieldname("UserLocationInformation"); + c.get().to_json(j); + break; + case types::time_since_secondary_node_release: + j.write_str("OCTET STRING", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "ue_context_suspend_request_ies_o::value_c"); } @@ -45213,6 +52413,15 @@ SRSASN_CODE ue_context_suspend_request_ies_o::value_c::pack(bit_ref& bref) const case types::cell_id_and_ce_level_for_ce_capable_ues: HANDLE_CODE(c.get().pack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); + break; + case types::user_location_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::time_since_secondary_node_release: + HANDLE_CODE((c.get >().pack(bref))); + break; default: log_invalid_choice_id(type_, "ue_context_suspend_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -45235,6 +52444,15 @@ SRSASN_CODE ue_context_suspend_request_ies_o::value_c::unpack(cbit_ref& bref) case types::cell_id_and_ce_level_for_ce_capable_ues: HANDLE_CODE(c.get().unpack(bref)); break; + case types::secondary_rat_data_usage_report_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); + break; + case types::user_location_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::time_since_secondary_node_release: + HANDLE_CODE((c.get >().unpack(bref))); + break; default: log_invalid_choice_id(type_, "ue_context_suspend_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -45247,8 +52465,11 @@ std::string ue_context_suspend_request_ies_o::value_c::types_opts::to_string() c 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"); + "CellIdentifierAndCELevelForCECapableUEs", + "SecondaryRATDataUsageReportList", + "UserLocationInformation", + "OCTET STRING"}; + return convert_enum_idx(options, 7, value, "ue_context_suspend_request_ies_o::value_c::types"); } // UEContextSuspendResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -45524,12 +52745,12 @@ 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 const uint32_t options[] = {96, 252, 74, 283}; - return map_enum_number(options, 4, idx, "id"); + static const uint32_t options[] = {96, 252, 74, 278, 283}; + return map_enum_number(options, 5, idx, "id"); } bool ue_info_transfer_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {96, 252, 74, 283}; + static const uint32_t options[] = {96, 252, 74, 278, 283}; for (const auto& o : options) { if (o == id) { return true; @@ -45546,6 +52767,8 @@ crit_e ue_info_transfer_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 74: return crit_e::ignore; + case 278: + return crit_e::ignore; case 283: return crit_e::ignore; default: @@ -45566,6 +52789,9 @@ ue_info_transfer_ies_o::value_c ue_info_transfer_ies_o::get_value(const uint32_t case 74: ret.set(value_c::types::ue_radio_cap); break; + case 278: + ret.set(value_c::types::subscription_based_ue_differentiation_info); + break; case 283: ret.set(value_c::types::pending_data_ind); break; @@ -45583,6 +52809,8 @@ presence_e ue_info_transfer_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 74: return presence_e::optional; + case 278: + return presence_e::optional; case 283: return presence_e::optional; default: @@ -45607,6 +52835,12 @@ unbounded_octstring& ue_info_transfer_ies_o::value_c::ue_radio_cap() assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } +subscription_based_ue_differentiation_info_s& +ue_info_transfer_ies_o::value_c::subscription_based_ue_differentiation_info() +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} pending_data_ind_e& ue_info_transfer_ies_o::value_c::pending_data_ind() { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); @@ -45627,6 +52861,12 @@ const unbounded_octstring& ue_info_transfer_ies_o::value_c::ue_radio_cap() assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } +const subscription_based_ue_differentiation_info_s& +ue_info_transfer_ies_o::value_c::subscription_based_ue_differentiation_info() const +{ + assert_choice_type("Subscription-Based-UE-DifferentiationInfo", type_.to_string(), "Value"); + return c.get(); +} const pending_data_ind_e& ue_info_transfer_ies_o::value_c::pending_data_ind() const { assert_choice_type("PendingDataIndication", type_.to_string(), "Value"); @@ -45644,6 +52884,9 @@ void ue_info_transfer_ies_o::value_c::destroy_() case types::ue_radio_cap: c.destroy >(); break; + case types::subscription_based_ue_differentiation_info: + c.destroy(); + break; default: break; } @@ -45662,6 +52905,9 @@ void ue_info_transfer_ies_o::value_c::set(types::options e) case types::ue_radio_cap: c.init >(); break; + case types::subscription_based_ue_differentiation_info: + c.init(); + break; case types::pending_data_ind: break; case types::nulltype: @@ -45683,6 +52929,9 @@ ue_info_transfer_ies_o::value_c::value_c(const ue_info_transfer_ies_o::value_c& case types::ue_radio_cap: c.init(other.c.get >()); break; + case types::subscription_based_ue_differentiation_info: + c.init(other.c.get()); + break; case types::pending_data_ind: c.init(other.c.get()); break; @@ -45709,6 +52958,9 @@ ue_info_transfer_ies_o::value_c::operator=(const ue_info_transfer_ies_o::value_c case types::ue_radio_cap: c.set(other.c.get >()); break; + case types::subscription_based_ue_differentiation_info: + c.set(other.c.get()); + break; case types::pending_data_ind: c.set(other.c.get()); break; @@ -45735,6 +52987,10 @@ void ue_info_transfer_ies_o::value_c::to_json(json_writer& j) const case types::ue_radio_cap: j.write_str("OCTET STRING", c.get >().to_string()); break; + case types::subscription_based_ue_differentiation_info: + j.write_fieldname("Subscription-Based-UE-DifferentiationInfo"); + c.get().to_json(j); + break; case types::pending_data_ind: j.write_str("PendingDataIndication", "true"); break; @@ -45756,6 +53012,9 @@ SRSASN_CODE ue_info_transfer_ies_o::value_c::pack(bit_ref& bref) const case types::ue_radio_cap: HANDLE_CODE(c.get >().pack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().pack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().pack(bref)); break; @@ -45778,6 +53037,9 @@ SRSASN_CODE ue_info_transfer_ies_o::value_c::unpack(cbit_ref& bref) case types::ue_radio_cap: HANDLE_CODE(c.get >().unpack(bref)); break; + case types::subscription_based_ue_differentiation_info: + HANDLE_CODE(c.get().unpack(bref)); + break; case types::pending_data_ind: HANDLE_CODE(c.get().unpack(bref)); break; @@ -45790,8 +53052,12 @@ 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 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"); + static const char* options[] = {"S-TMSI", + "E-RABLevelQoSParameters", + "OCTET STRING", + "Subscription-Based-UE-DifferentiationInfo", + "PendingDataIndication"}; + return convert_enum_idx(options, 5, value, "ue_info_transfer_ies_o::value_c::types"); } // UERadioCapabilityMatchRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -46291,12 +53557,12 @@ 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 const uint32_t options[] = {0, 8, 26, 100, 67, 155, 184, 186}; - return map_enum_number(options, 8, idx, "id"); + static const uint32_t options[] = {0, 8, 26, 100, 67, 155, 184, 186, 288}; + return map_enum_number(options, 9, idx, "id"); } bool ul_nas_transport_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {0, 8, 26, 100, 67, 155, 184, 186}; + static const uint32_t options[] = {0, 8, 26, 100, 67, 155, 184, 186, 288}; for (const auto& o : options) { if (o == id) { return true; @@ -46323,6 +53589,8 @@ crit_e ul_nas_transport_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 186: return crit_e::ignore; + case 288: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -46356,6 +53624,9 @@ ul_nas_transport_ies_o::value_c ul_nas_transport_ies_o::get_value(const uint32_t case 186: ret.set(value_c::types::lhn_id); break; + case 288: + ret.set(value_c::types::ps_cell_info); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -46380,6 +53651,8 @@ presence_e ul_nas_transport_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 186: return presence_e::optional; + case 288: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -46427,6 +53700,11 @@ bounded_octstring<32, 256, true>& ul_nas_transport_ies_o::value_c::lhn_id() assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } +ps_cell_info_s& ul_nas_transport_ies_o::value_c::ps_cell_info() +{ + assert_choice_type("PSCellInformation", type_.to_string(), "Value"); + return c.get(); +} const uint64_t& ul_nas_transport_ies_o::value_c::mme_ue_s1ap_id() const { assert_choice_type("INTEGER (0..4294967295)", type_.to_string(), "Value"); @@ -46467,6 +53745,11 @@ const bounded_octstring<32, 256, true>& ul_nas_transport_ies_o::value_c::lhn_id( assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } +const ps_cell_info_s& ul_nas_transport_ies_o::value_c::ps_cell_info() const +{ + assert_choice_type("PSCellInformation", type_.to_string(), "Value"); + return c.get(); +} void ul_nas_transport_ies_o::value_c::destroy_() { switch (type_) { @@ -46488,6 +53771,9 @@ void ul_nas_transport_ies_o::value_c::destroy_() case types::lhn_id: c.destroy >(); break; + case types::ps_cell_info: + c.destroy(); + break; default: break; } @@ -46519,6 +53805,9 @@ void ul_nas_transport_ies_o::value_c::set(types::options e) case types::lhn_id: c.init >(); break; + case types::ps_cell_info: + c.init(); + break; case types::nulltype: break; default: @@ -46553,6 +53842,9 @@ ul_nas_transport_ies_o::value_c::value_c(const ul_nas_transport_ies_o::value_c& case types::lhn_id: c.init(other.c.get >()); break; + case types::ps_cell_info: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -46591,6 +53883,9 @@ ul_nas_transport_ies_o::value_c::operator=(const ul_nas_transport_ies_o::value_c case types::lhn_id: c.set(other.c.get >()); break; + case types::ps_cell_info: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -46629,6 +53924,10 @@ void ul_nas_transport_ies_o::value_c::to_json(json_writer& j) const case types::lhn_id: j.write_str("OCTET STRING", c.get >().to_string()); break; + case types::ps_cell_info: + j.write_fieldname("PSCellInformation"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "ul_nas_transport_ies_o::value_c"); } @@ -46662,6 +53961,9 @@ SRSASN_CODE ul_nas_transport_ies_o::value_c::pack(bit_ref& bref) const case types::lhn_id: HANDLE_CODE((c.get >().pack(bref))); break; + case types::ps_cell_info: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "ul_nas_transport_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -46696,6 +53998,9 @@ SRSASN_CODE ul_nas_transport_ies_o::value_c::unpack(cbit_ref& bref) case types::lhn_id: HANDLE_CODE((c.get >().unpack(bref))); break; + case types::ps_cell_info: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "ul_nas_transport_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -46712,8 +54017,9 @@ std::string ul_nas_transport_ies_o::value_c::types_opts::to_string() const "TAI", "BIT STRING", "BIT STRING", - "OCTET STRING"}; - return convert_enum_idx(options, 8, value, "ul_nas_transport_ies_o::value_c::types"); + "OCTET STRING", + "PSCellInformation"}; + return convert_enum_idx(options, 9, value, "ul_nas_transport_ies_o::value_c::types"); } // UplinkNonUEAssociatedLPPaTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -47639,12 +54945,12 @@ 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 const uint32_t options[] = {111, 112, 113, 114, 144, 115, 116, 117, 118, 119, 142}; - return map_enum_number(options, 11, idx, "id"); + static const uint32_t options[] = {111, 112, 113, 114, 144, 115, 116, 117, 118, 119, 142, 286}; + return map_enum_number(options, 12, idx, "id"); } bool write_replace_warning_request_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {111, 112, 113, 114, 144, 115, 116, 117, 118, 119, 142}; + static const uint32_t options[] = {111, 112, 113, 114, 144, 115, 116, 117, 118, 119, 142, 286}; for (const auto& o : options) { if (o == id) { return true; @@ -47677,6 +54983,8 @@ crit_e write_replace_warning_request_ies_o::get_crit(const uint32_t& id) return crit_e::ignore; case 142: return crit_e::reject; + case 286: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -47719,6 +55027,9 @@ write_replace_warning_request_ies_o::value_c write_replace_warning_request_ies_o case 142: ret.set(value_c::types::concurrent_warning_msg_ind); break; + case 286: + ret.set(value_c::types::warning_area_coordinates); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -47749,6 +55060,8 @@ presence_e write_replace_warning_request_ies_o::get_presence(const uint32_t& id) return presence_e::optional; case 142: return presence_e::optional; + case 286: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -47811,6 +55124,11 @@ concurrent_warning_msg_ind_e& write_replace_warning_request_ies_o::value_c::conc assert_choice_type("ConcurrentWarningMessageIndicator", type_.to_string(), "Value"); return c.get(); } +bounded_octstring<1, 1024, true>& write_replace_warning_request_ies_o::value_c::warning_area_coordinates() +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} const fixed_bitstring<16, false, true>& write_replace_warning_request_ies_o::value_c::msg_id() const { assert_choice_type("BIT STRING", type_.to_string(), "Value"); @@ -47866,6 +55184,11 @@ const concurrent_warning_msg_ind_e& write_replace_warning_request_ies_o::value_c assert_choice_type("ConcurrentWarningMessageIndicator", type_.to_string(), "Value"); return c.get(); } +const bounded_octstring<1, 1024, true>& write_replace_warning_request_ies_o::value_c::warning_area_coordinates() const +{ + assert_choice_type("OCTET STRING", type_.to_string(), "Value"); + return c.get >(); +} void write_replace_warning_request_ies_o::value_c::destroy_() { switch (type_) { @@ -47890,6 +55213,9 @@ void write_replace_warning_request_ies_o::value_c::destroy_() case types::warning_msg_contents: c.destroy >(); break; + case types::warning_area_coordinates: + c.destroy >(); + break; default: break; } @@ -47928,6 +55254,9 @@ void write_replace_warning_request_ies_o::value_c::set(types::options e) break; case types::concurrent_warning_msg_ind: break; + case types::warning_area_coordinates: + c.init >(); + break; case types::nulltype: break; default: @@ -47971,6 +55300,9 @@ write_replace_warning_request_ies_o::value_c::value_c(const write_replace_warnin case types::concurrent_warning_msg_ind: c.init(other.c.get()); break; + case types::warning_area_coordinates: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -48018,6 +55350,9 @@ write_replace_warning_request_ies_o::value_c::operator=(const write_replace_warn case types::concurrent_warning_msg_ind: c.set(other.c.get()); break; + case types::warning_area_coordinates: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -48064,6 +55399,9 @@ void write_replace_warning_request_ies_o::value_c::to_json(json_writer& j) const case types::concurrent_warning_msg_ind: j.write_str("ConcurrentWarningMessageIndicator", "true"); break; + case types::warning_area_coordinates: + j.write_str("OCTET STRING", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "write_replace_warning_request_ies_o::value_c"); } @@ -48106,6 +55444,9 @@ SRSASN_CODE write_replace_warning_request_ies_o::value_c::pack(bit_ref& bref) co case types::concurrent_warning_msg_ind: HANDLE_CODE(c.get().pack(bref)); break; + case types::warning_area_coordinates: + HANDLE_CODE((c.get >().pack(bref))); + break; default: log_invalid_choice_id(type_, "write_replace_warning_request_ies_o::value_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -48149,6 +55490,9 @@ SRSASN_CODE write_replace_warning_request_ies_o::value_c::unpack(cbit_ref& bref) case types::concurrent_warning_msg_ind: HANDLE_CODE(c.get().unpack(bref)); break; + case types::warning_area_coordinates: + HANDLE_CODE((c.get >().unpack(bref))); + break; default: log_invalid_choice_id(type_, "write_replace_warning_request_ies_o::value_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -48168,8 +55512,9 @@ std::string write_replace_warning_request_ies_o::value_c::types_opts::to_string( "OCTET STRING", "BIT STRING", "OCTET STRING", - "ConcurrentWarningMessageIndicator"}; - return convert_enum_idx(options, 11, value, "write_replace_warning_request_ies_o::value_c::types"); + "ConcurrentWarningMessageIndicator", + "OCTET STRING"}; + return convert_enum_idx(options, 12, value, "write_replace_warning_request_ies_o::value_c::types"); } // WriteReplaceWarningResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES @@ -48684,11 +56029,13 @@ location_report_ies_container::location_report_ies_container() : enb_ue_s1ap_id(8, crit_e::reject), eutran_cgi(100, crit_e::ignore), tai(67, crit_e::ignore), - request_type(98, crit_e::ignore) + request_type(98, crit_e::ignore), + ps_cell_info(288, crit_e::ignore) {} SRSASN_CODE location_report_ies_container::pack(bit_ref& bref) const { uint32_t nof_ies = 5; + nof_ies += ps_cell_info_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -48696,6 +56043,9 @@ SRSASN_CODE location_report_ies_container::pack(bit_ref& bref) const HANDLE_CODE(eutran_cgi.pack(bref)); HANDLE_CODE(tai.pack(bref)); HANDLE_CODE(request_type.pack(bref)); + if (ps_cell_info_present) { + HANDLE_CODE(ps_cell_info.pack(bref)); + } return SRSASN_SUCCESS; } @@ -48740,6 +56090,12 @@ SRSASN_CODE location_report_ies_container::unpack(cbit_ref& bref) request_type.crit = c.crit; request_type.value = c.value.request_type(); break; + case 288: + ps_cell_info_present = true; + ps_cell_info.id = c.id; + ps_cell_info.crit = c.crit; + ps_cell_info.value = c.value.ps_cell_info(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -48765,6 +56121,10 @@ void location_report_ies_container::to_json(json_writer& j) const tai.to_json(j); j.write_fieldname(""); request_type.to_json(j); + if (ps_cell_info_present) { + j.write_fieldname(""); + ps_cell_info.to_json(j); + } j.end_obj(); } @@ -49058,18 +56418,82 @@ void mmecp_relocation_ind_s::to_json(json_writer& j) const j.end_obj(); } +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), en_dcson_cfg_transfer_mct(295, crit_e::ignore) +{} +SRSASN_CODE mme_cfg_transfer_ies_container::pack(bit_ref& bref) const +{ + uint32_t nof_ies = 0; + nof_ies += son_cfg_transfer_mct_present ? 1 : 0; + nof_ies += en_dcson_cfg_transfer_mct_present ? 1 : 0; + pack_length(bref, nof_ies, 0u, 65535u, true); + + if (son_cfg_transfer_mct_present) { + HANDLE_CODE(son_cfg_transfer_mct.pack(bref)); + } + if (en_dcson_cfg_transfer_mct_present) { + HANDLE_CODE(en_dcson_cfg_transfer_mct.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mme_cfg_transfer_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 0u, 65535u, true); + + 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; + case 295: + en_dcson_cfg_transfer_mct_present = true; + en_dcson_cfg_transfer_mct.id = c.id; + en_dcson_cfg_transfer_mct.crit = c.crit; + en_dcson_cfg_transfer_mct.value = c.value.en_dcson_cfg_transfer_mct(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + + return SRSASN_SUCCESS; +} +void mme_cfg_transfer_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + if (son_cfg_transfer_mct_present) { + j.write_fieldname(""); + son_cfg_transfer_mct.to_json(j); + } + if (en_dcson_cfg_transfer_mct_present) { + j.write_fieldname(""); + en_dcson_cfg_transfer_mct.to_json(j); + } + j.end_obj(); +} + // MMEConfigurationTransfer ::= SEQUENCE SRSASN_CODE mme_cfg_transfer_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); + HANDLE_CODE(protocol_ies.pack(bref)); return SRSASN_SUCCESS; } SRSASN_CODE mme_cfg_transfer_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); + HANDLE_CODE(protocol_ies.unpack(bref)); return SRSASN_SUCCESS; } @@ -49077,6 +56501,7 @@ void mme_cfg_transfer_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); + protocol_ies.to_json(j); j.end_obj(); } @@ -50225,7 +57650,9 @@ path_switch_request_ies_container::path_switch_request_ies_container() : csg_membership_status(146, crit_e::ignore), tunnel_info_for_bbf(176, crit_e::ignore), lhn_id(186, crit_e::ignore), - rrc_resume_cause(245, crit_e::ignore) + rrc_resume_cause(245, crit_e::ignore), + nrue_security_cap(269, crit_e::ignore), + ps_cell_info(288, crit_e::ignore) {} SRSASN_CODE path_switch_request_ies_container::pack(bit_ref& bref) const { @@ -50237,6 +57664,8 @@ SRSASN_CODE path_switch_request_ies_container::pack(bit_ref& bref) const nof_ies += tunnel_info_for_bbf_present ? 1 : 0; nof_ies += lhn_id_present ? 1 : 0; nof_ies += rrc_resume_cause_present ? 1 : 0; + nof_ies += nrue_security_cap_present ? 1 : 0; + nof_ies += ps_cell_info_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(enb_ue_s1ap_id.pack(bref)); @@ -50266,6 +57695,12 @@ SRSASN_CODE path_switch_request_ies_container::pack(bit_ref& bref) const if (rrc_resume_cause_present) { HANDLE_CODE(rrc_resume_cause.pack(bref)); } + if (nrue_security_cap_present) { + HANDLE_CODE(nrue_security_cap.pack(bref)); + } + if (ps_cell_info_present) { + HANDLE_CODE(ps_cell_info.pack(bref)); + } return SRSASN_SUCCESS; } @@ -50358,6 +57793,18 @@ SRSASN_CODE path_switch_request_ies_container::unpack(cbit_ref& bref) rrc_resume_cause.crit = c.crit; rrc_resume_cause.value = c.value.rrc_resume_cause(); break; + case 269: + nrue_security_cap_present = true; + nrue_security_cap.id = c.id; + nrue_security_cap.crit = c.crit; + nrue_security_cap.value = c.value.nrue_security_cap(); + break; + case 288: + ps_cell_info_present = true; + ps_cell_info.id = c.id; + ps_cell_info.crit = c.crit; + ps_cell_info.value = c.value.ps_cell_info(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -50413,6 +57860,14 @@ void path_switch_request_ies_container::to_json(json_writer& j) const j.write_fieldname(""); rrc_resume_cause.to_json(j); } + if (nrue_security_cap_present) { + j.write_fieldname(""); + nrue_security_cap.to_json(j); + } + if (ps_cell_info_present) { + j.write_fieldname(""); + ps_cell_info.to_json(j); + } j.end_obj(); } @@ -50456,8 +57911,13 @@ path_switch_request_ack_ies_container::path_switch_request_ack_ies_container() : v2xservices_authorized(240, crit_e::ignore), ue_sidelink_aggregate_maximum_bitrate(248, crit_e::ignore), enhanced_coverage_restricted(251, crit_e::ignore), + nrue_security_cap(269, crit_e::ignore), ce_mode_brestricted(271, crit_e::ignore), - pending_data_ind(283, crit_e::ignore) + aerial_uesubscription_info(277, crit_e::ignore), + pending_data_ind(283, crit_e::ignore), + subscription_based_ue_differentiation_info(278, crit_e::ignore), + ho_restrict_list(41, crit_e::ignore), + add_rrm_prio_idx(299, crit_e::ignore) {} SRSASN_CODE path_switch_request_ack_ies_container::pack(bit_ref& bref) const { @@ -50473,8 +57933,13 @@ SRSASN_CODE path_switch_request_ack_ies_container::pack(bit_ref& bref) const nof_ies += v2xservices_authorized_present ? 1 : 0; nof_ies += ue_sidelink_aggregate_maximum_bitrate_present ? 1 : 0; nof_ies += enhanced_coverage_restricted_present ? 1 : 0; + nof_ies += nrue_security_cap_present ? 1 : 0; nof_ies += ce_mode_brestricted_present ? 1 : 0; + nof_ies += aerial_uesubscription_info_present ? 1 : 0; nof_ies += pending_data_ind_present ? 1 : 0; + nof_ies += subscription_based_ue_differentiation_info_present ? 1 : 0; + nof_ies += ho_restrict_list_present ? 1 : 0; + nof_ies += add_rrm_prio_idx_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -50513,12 +57978,27 @@ SRSASN_CODE path_switch_request_ack_ies_container::pack(bit_ref& bref) const if (enhanced_coverage_restricted_present) { HANDLE_CODE(enhanced_coverage_restricted.pack(bref)); } + if (nrue_security_cap_present) { + HANDLE_CODE(nrue_security_cap.pack(bref)); + } if (ce_mode_brestricted_present) { HANDLE_CODE(ce_mode_brestricted.pack(bref)); } + if (aerial_uesubscription_info_present) { + HANDLE_CODE(aerial_uesubscription_info.pack(bref)); + } if (pending_data_ind_present) { HANDLE_CODE(pending_data_ind.pack(bref)); } + if (subscription_based_ue_differentiation_info_present) { + HANDLE_CODE(subscription_based_ue_differentiation_info.pack(bref)); + } + if (ho_restrict_list_present) { + HANDLE_CODE(ho_restrict_list.pack(bref)); + } + if (add_rrm_prio_idx_present) { + HANDLE_CODE(add_rrm_prio_idx.pack(bref)); + } return SRSASN_SUCCESS; } @@ -50617,18 +58097,48 @@ SRSASN_CODE path_switch_request_ack_ies_container::unpack(cbit_ref& bref) enhanced_coverage_restricted.crit = c.crit; enhanced_coverage_restricted.value = c.value.enhanced_coverage_restricted(); break; + case 269: + nrue_security_cap_present = true; + nrue_security_cap.id = c.id; + nrue_security_cap.crit = c.crit; + nrue_security_cap.value = c.value.nrue_security_cap(); + break; case 271: ce_mode_brestricted_present = true; ce_mode_brestricted.id = c.id; ce_mode_brestricted.crit = c.crit; ce_mode_brestricted.value = c.value.ce_mode_brestricted(); break; + case 277: + aerial_uesubscription_info_present = true; + aerial_uesubscription_info.id = c.id; + aerial_uesubscription_info.crit = c.crit; + aerial_uesubscription_info.value = c.value.aerial_uesubscription_info(); + break; case 283: pending_data_ind_present = true; pending_data_ind.id = c.id; pending_data_ind.crit = c.crit; pending_data_ind.value = c.value.pending_data_ind(); break; + case 278: + subscription_based_ue_differentiation_info_present = true; + subscription_based_ue_differentiation_info.id = c.id; + subscription_based_ue_differentiation_info.crit = c.crit; + subscription_based_ue_differentiation_info.value = c.value.subscription_based_ue_differentiation_info(); + break; + case 41: + ho_restrict_list_present = true; + ho_restrict_list.id = c.id; + ho_restrict_list.crit = c.crit; + ho_restrict_list.value = c.value.ho_restrict_list(); + break; + case 299: + add_rrm_prio_idx_present = true; + add_rrm_prio_idx.id = c.id; + add_rrm_prio_idx.crit = c.crit; + add_rrm_prio_idx.value = c.value.add_rrm_prio_idx(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -50694,14 +58204,34 @@ void path_switch_request_ack_ies_container::to_json(json_writer& j) const j.write_fieldname(""); enhanced_coverage_restricted.to_json(j); } + if (nrue_security_cap_present) { + j.write_fieldname(""); + nrue_security_cap.to_json(j); + } if (ce_mode_brestricted_present) { j.write_fieldname(""); ce_mode_brestricted.to_json(j); } + if (aerial_uesubscription_info_present) { + j.write_fieldname(""); + aerial_uesubscription_info.to_json(j); + } if (pending_data_ind_present) { j.write_fieldname(""); pending_data_ind.to_json(j); } + if (subscription_based_ue_differentiation_info_present) { + j.write_fieldname(""); + subscription_based_ue_differentiation_info.to_json(j); + } + if (ho_restrict_list_present) { + j.write_fieldname(""); + ho_restrict_list.to_json(j); + } + if (add_rrm_prio_idx_present) { + j.write_fieldname(""); + add_rrm_prio_idx.to_json(j); + } j.end_obj(); } @@ -51367,7 +58897,8 @@ s1_setup_request_ies_container::s1_setup_request_ies_container() : default_paging_drx(137, crit_e::ignore), csg_id_list(128, crit_e::reject), ue_retention_info(228, crit_e::ignore), - nb_io_t_default_paging_drx(234, crit_e::ignore) + nb_io_t_default_paging_drx(234, crit_e::ignore), + connectedeng_nb_list(291, crit_e::ignore) {} SRSASN_CODE s1_setup_request_ies_container::pack(bit_ref& bref) const { @@ -51376,6 +58907,7 @@ SRSASN_CODE s1_setup_request_ies_container::pack(bit_ref& bref) const nof_ies += csg_id_list_present ? 1 : 0; nof_ies += ue_retention_info_present ? 1 : 0; nof_ies += nb_io_t_default_paging_drx_present ? 1 : 0; + nof_ies += connectedeng_nb_list_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(global_enb_id.pack(bref)); @@ -51393,6 +58925,9 @@ SRSASN_CODE s1_setup_request_ies_container::pack(bit_ref& bref) const if (nb_io_t_default_paging_drx_present) { HANDLE_CODE(nb_io_t_default_paging_drx.pack(bref)); } + if (connectedeng_nb_list_present) { + HANDLE_CODE(connectedeng_nb_list.pack(bref)); + } return SRSASN_SUCCESS; } @@ -51449,6 +58984,12 @@ SRSASN_CODE s1_setup_request_ies_container::unpack(cbit_ref& bref) nb_io_t_default_paging_drx.crit = c.crit; nb_io_t_default_paging_drx.value = c.value.nb_io_t_default_paging_drx(); break; + case 291: + connectedeng_nb_list_present = true; + connectedeng_nb_list.id = c.id; + connectedeng_nb_list.crit = c.crit; + connectedeng_nb_list.value = c.value.connectedeng_nb_list(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -51486,6 +59027,10 @@ void s1_setup_request_ies_container::to_json(json_writer& j) const j.write_fieldname(""); nb_io_t_default_paging_drx.to_json(j); } + if (connectedeng_nb_list_present) { + j.write_fieldname(""); + connectedeng_nb_list.to_json(j); + } j.end_obj(); } @@ -51671,6 +59216,145 @@ void s1_setup_resp_s::to_json(json_writer& j) const j.end_obj(); } +template struct asn1::s1ap::protocol_ie_field_s; + +secondary_rat_data_usage_report_ies_container::secondary_rat_data_usage_report_ies_container() : + mme_ue_s1ap_id(0, crit_e::ignore), + enb_ue_s1ap_id(8, crit_e::ignore), + secondary_rat_data_usage_report_list(264, crit_e::ignore), + ho_flag(266, crit_e::ignore), + user_location_info(189, crit_e::ignore), + time_since_secondary_node_release(297, crit_e::ignore) +{} +SRSASN_CODE secondary_rat_data_usage_report_ies_container::pack(bit_ref& bref) const +{ + uint32_t nof_ies = 3; + nof_ies += ho_flag_present ? 1 : 0; + nof_ies += user_location_info_present ? 1 : 0; + nof_ies += time_since_secondary_node_release_present ? 1 : 0; + pack_length(bref, nof_ies, 0u, 65535u, true); + + HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); + HANDLE_CODE(enb_ue_s1ap_id.pack(bref)); + HANDLE_CODE(secondary_rat_data_usage_report_list.pack(bref)); + if (ho_flag_present) { + HANDLE_CODE(ho_flag.pack(bref)); + } + if (user_location_info_present) { + HANDLE_CODE(user_location_info.pack(bref)); + } + if (time_since_secondary_node_release_present) { + HANDLE_CODE(time_since_secondary_node_release.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE secondary_rat_data_usage_report_ies_container::unpack(cbit_ref& bref) +{ + uint32_t nof_ies = 0; + unpack_length(nof_ies, bref, 0u, 65535u, true); + + uint32_t nof_mandatory_ies = 3; + + for (; nof_ies > 0; --nof_ies) { + protocol_ie_field_s c; + HANDLE_CODE(c.unpack(bref)); + switch (c.id) { + case 0: + nof_mandatory_ies--; + mme_ue_s1ap_id.id = c.id; + mme_ue_s1ap_id.crit = c.crit; + mme_ue_s1ap_id.value = c.value.mme_ue_s1ap_id(); + break; + case 8: + nof_mandatory_ies--; + enb_ue_s1ap_id.id = c.id; + enb_ue_s1ap_id.crit = c.crit; + enb_ue_s1ap_id.value = c.value.enb_ue_s1ap_id(); + break; + case 264: + nof_mandatory_ies--; + secondary_rat_data_usage_report_list.id = c.id; + secondary_rat_data_usage_report_list.crit = c.crit; + secondary_rat_data_usage_report_list.value = c.value.secondary_rat_data_usage_report_list(); + break; + case 266: + ho_flag_present = true; + ho_flag.id = c.id; + ho_flag.crit = c.crit; + ho_flag.value = c.value.ho_flag(); + break; + case 189: + user_location_info_present = true; + user_location_info.id = c.id; + user_location_info.crit = c.crit; + user_location_info.value = c.value.user_location_info(); + break; + case 297: + time_since_secondary_node_release_present = true; + time_since_secondary_node_release.id = c.id; + time_since_secondary_node_release.crit = c.crit; + time_since_secondary_node_release.value = c.value.time_since_secondary_node_release(); + break; + default: + asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; + } + } + if (nof_mandatory_ies > 0) { + asn1::log_error("Mandatory fields are missing\n"); + + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} +void secondary_rat_data_usage_report_ies_container::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname(""); + mme_ue_s1ap_id.to_json(j); + j.write_fieldname(""); + enb_ue_s1ap_id.to_json(j); + j.write_fieldname(""); + secondary_rat_data_usage_report_list.to_json(j); + if (ho_flag_present) { + j.write_fieldname(""); + ho_flag.to_json(j); + } + if (user_location_info_present) { + j.write_fieldname(""); + user_location_info.to_json(j); + } + if (time_since_secondary_node_release_present) { + j.write_fieldname(""); + time_since_secondary_node_release.to_json(j); + } + j.end_obj(); +} + +// SecondaryRATDataUsageReport ::= SEQUENCE +SRSASN_CODE secondary_rat_data_usage_report_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(protocol_ies.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE secondary_rat_data_usage_report_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(protocol_ies.unpack(bref)); + + return SRSASN_SUCCESS; +} +void secondary_rat_data_usage_report_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("protocolIEs"); + protocol_ies.to_json(j); + j.end_obj(); +} + template struct asn1::s1ap::protocol_ie_field_s; trace_fail_ind_ies_container::trace_fail_ind_ies_container() : @@ -51873,12 +59557,16 @@ ue_cap_info_ind_ies_container::ue_cap_info_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), enb_ue_s1ap_id(8, crit_e::reject), ue_radio_cap(74, crit_e::ignore), - ue_radio_cap_for_paging(198, crit_e::ignore) + ue_radio_cap_for_paging(198, crit_e::ignore), + ue_application_layer_meas_cap(263, crit_e::ignore), + lte_m_ind(272, crit_e::ignore) {} SRSASN_CODE ue_cap_info_ind_ies_container::pack(bit_ref& bref) const { uint32_t nof_ies = 3; nof_ies += ue_radio_cap_for_paging_present ? 1 : 0; + nof_ies += ue_application_layer_meas_cap_present ? 1 : 0; + nof_ies += lte_m_ind_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -51887,6 +59575,12 @@ SRSASN_CODE ue_cap_info_ind_ies_container::pack(bit_ref& bref) const if (ue_radio_cap_for_paging_present) { HANDLE_CODE(ue_radio_cap_for_paging.pack(bref)); } + if (ue_application_layer_meas_cap_present) { + HANDLE_CODE(ue_application_layer_meas_cap.pack(bref)); + } + if (lte_m_ind_present) { + HANDLE_CODE(lte_m_ind.pack(bref)); + } return SRSASN_SUCCESS; } @@ -51925,6 +59619,18 @@ SRSASN_CODE ue_cap_info_ind_ies_container::unpack(cbit_ref& bref) ue_radio_cap_for_paging.crit = c.crit; ue_radio_cap_for_paging.value = c.value.ue_radio_cap_for_paging(); break; + case 263: + ue_application_layer_meas_cap_present = true; + ue_application_layer_meas_cap.id = c.id; + ue_application_layer_meas_cap.crit = c.crit; + ue_application_layer_meas_cap.value = c.value.ue_application_layer_meas_cap(); + break; + case 272: + lte_m_ind_present = true; + lte_m_ind.id = c.id; + lte_m_ind.crit = c.crit; + lte_m_ind.value = c.value.lte_m_ind(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -51950,6 +59656,14 @@ void ue_cap_info_ind_ies_container::to_json(json_writer& j) const j.write_fieldname(""); ue_radio_cap_for_paging.to_json(j); } + if (ue_application_layer_meas_cap_present) { + j.write_fieldname(""); + ue_application_layer_meas_cap.to_json(j); + } + if (lte_m_ind_present) { + j.write_fieldname(""); + lte_m_ind.to_json(j); + } j.end_obj(); } @@ -52313,7 +60027,10 @@ ue_context_mod_request_ies_container::ue_context_mod_request_ies_container() : srvcc_operation_possible(124, crit_e::ignore), srvcc_operation_not_possible(243, crit_e::ignore), v2xservices_authorized(240, crit_e::ignore), - ue_sidelink_aggregate_maximum_bitrate(248, crit_e::ignore) + ue_sidelink_aggregate_maximum_bitrate(248, crit_e::ignore), + nrue_security_cap(269, crit_e::ignore), + aerial_uesubscription_info(277, crit_e::ignore), + add_rrm_prio_idx(299, crit_e::ignore) {} SRSASN_CODE ue_context_mod_request_ies_container::pack(bit_ref& bref) const { @@ -52331,6 +60048,9 @@ SRSASN_CODE ue_context_mod_request_ies_container::pack(bit_ref& bref) const nof_ies += srvcc_operation_not_possible_present ? 1 : 0; nof_ies += v2xservices_authorized_present ? 1 : 0; nof_ies += ue_sidelink_aggregate_maximum_bitrate_present ? 1 : 0; + nof_ies += nrue_security_cap_present ? 1 : 0; + nof_ies += aerial_uesubscription_info_present ? 1 : 0; + nof_ies += add_rrm_prio_idx_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -52374,6 +60094,15 @@ SRSASN_CODE ue_context_mod_request_ies_container::pack(bit_ref& bref) const if (ue_sidelink_aggregate_maximum_bitrate_present) { HANDLE_CODE(ue_sidelink_aggregate_maximum_bitrate.pack(bref)); } + if (nrue_security_cap_present) { + HANDLE_CODE(nrue_security_cap.pack(bref)); + } + if (aerial_uesubscription_info_present) { + HANDLE_CODE(aerial_uesubscription_info.pack(bref)); + } + if (add_rrm_prio_idx_present) { + HANDLE_CODE(add_rrm_prio_idx.pack(bref)); + } return SRSASN_SUCCESS; } @@ -52478,6 +60207,24 @@ SRSASN_CODE ue_context_mod_request_ies_container::unpack(cbit_ref& bref) ue_sidelink_aggregate_maximum_bitrate.crit = c.crit; ue_sidelink_aggregate_maximum_bitrate.value = c.value.ue_sidelink_aggregate_maximum_bitrate(); break; + case 269: + nrue_security_cap_present = true; + nrue_security_cap.id = c.id; + nrue_security_cap.crit = c.crit; + nrue_security_cap.value = c.value.nrue_security_cap(); + break; + case 277: + aerial_uesubscription_info_present = true; + aerial_uesubscription_info.id = c.id; + aerial_uesubscription_info.crit = c.crit; + aerial_uesubscription_info.value = c.value.aerial_uesubscription_info(); + break; + case 299: + add_rrm_prio_idx_present = true; + add_rrm_prio_idx.id = c.id; + add_rrm_prio_idx.crit = c.crit; + add_rrm_prio_idx.value = c.value.add_rrm_prio_idx(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -52549,6 +60296,18 @@ void ue_context_mod_request_ies_container::to_json(json_writer& j) const j.write_fieldname(""); ue_sidelink_aggregate_maximum_bitrate.to_json(j); } + if (nrue_security_cap_present) { + j.write_fieldname(""); + nrue_security_cap.to_json(j); + } + if (aerial_uesubscription_info_present) { + j.write_fieldname(""); + aerial_uesubscription_info.to_json(j); + } + if (add_rrm_prio_idx_present) { + j.write_fieldname(""); + add_rrm_prio_idx.to_json(j); + } j.end_obj(); } @@ -52763,7 +60522,9 @@ ue_context_release_complete_ies_container::ue_context_release_complete_ies_conta crit_diagnostics(58, crit_e::ignore), user_location_info(189, crit_e::ignore), info_on_recommended_cells_and_enbs_for_paging(213, crit_e::ignore), - cell_id_and_ce_level_for_ce_capable_ues(212, crit_e::ignore) + cell_id_and_ce_level_for_ce_capable_ues(212, crit_e::ignore), + secondary_rat_data_usage_report_list(264, crit_e::ignore), + time_since_secondary_node_release(297, crit_e::ignore) {} SRSASN_CODE ue_context_release_complete_ies_container::pack(bit_ref& bref) const { @@ -52772,6 +60533,8 @@ SRSASN_CODE ue_context_release_complete_ies_container::pack(bit_ref& bref) const nof_ies += user_location_info_present ? 1 : 0; nof_ies += info_on_recommended_cells_and_enbs_for_paging_present ? 1 : 0; nof_ies += cell_id_and_ce_level_for_ce_capable_ues_present ? 1 : 0; + nof_ies += secondary_rat_data_usage_report_list_present ? 1 : 0; + nof_ies += time_since_secondary_node_release_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -52788,6 +60551,12 @@ SRSASN_CODE ue_context_release_complete_ies_container::pack(bit_ref& bref) const if (cell_id_and_ce_level_for_ce_capable_ues_present) { HANDLE_CODE(cell_id_and_ce_level_for_ce_capable_ues.pack(bref)); } + if (secondary_rat_data_usage_report_list_present) { + HANDLE_CODE(secondary_rat_data_usage_report_list.pack(bref)); + } + if (time_since_secondary_node_release_present) { + HANDLE_CODE(time_since_secondary_node_release.pack(bref)); + } return SRSASN_SUCCESS; } @@ -52838,6 +60607,18 @@ SRSASN_CODE ue_context_release_complete_ies_container::unpack(cbit_ref& bref) cell_id_and_ce_level_for_ce_capable_ues.crit = c.crit; cell_id_and_ce_level_for_ce_capable_ues.value = c.value.cell_id_and_ce_level_for_ce_capable_ues(); break; + case 264: + secondary_rat_data_usage_report_list_present = true; + secondary_rat_data_usage_report_list.id = c.id; + secondary_rat_data_usage_report_list.crit = c.crit; + secondary_rat_data_usage_report_list.value = c.value.secondary_rat_data_usage_report_list(); + break; + case 297: + time_since_secondary_node_release_present = true; + time_since_secondary_node_release.id = c.id; + time_since_secondary_node_release.crit = c.crit; + time_since_secondary_node_release.value = c.value.time_since_secondary_node_release(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -52873,6 +60654,14 @@ void ue_context_release_complete_ies_container::to_json(json_writer& j) const j.write_fieldname(""); cell_id_and_ce_level_for_ce_capable_ues.to_json(j); } + if (secondary_rat_data_usage_report_list_present) { + j.write_fieldname(""); + secondary_rat_data_usage_report_list.to_json(j); + } + if (time_since_secondary_node_release_present) { + j.write_fieldname(""); + time_since_secondary_node_release.to_json(j); + } j.end_obj(); } @@ -52905,12 +60694,14 @@ ue_context_release_request_ies_container::ue_context_release_request_ies_contain mme_ue_s1ap_id(0, crit_e::reject), enb_ue_s1ap_id(8, crit_e::reject), cause(2, crit_e::ignore), - gw_context_release_ind(164, crit_e::reject) + gw_context_release_ind(164, crit_e::reject), + secondary_rat_data_usage_report_list(264, crit_e::ignore) {} SRSASN_CODE ue_context_release_request_ies_container::pack(bit_ref& bref) const { uint32_t nof_ies = 3; nof_ies += gw_context_release_ind_present ? 1 : 0; + nof_ies += secondary_rat_data_usage_report_list_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -52919,6 +60710,9 @@ SRSASN_CODE ue_context_release_request_ies_container::pack(bit_ref& bref) const if (gw_context_release_ind_present) { HANDLE_CODE(gw_context_release_ind.pack(bref)); } + if (secondary_rat_data_usage_report_list_present) { + HANDLE_CODE(secondary_rat_data_usage_report_list.pack(bref)); + } return SRSASN_SUCCESS; } @@ -52957,6 +60751,12 @@ SRSASN_CODE ue_context_release_request_ies_container::unpack(cbit_ref& bref) gw_context_release_ind.crit = c.crit; gw_context_release_ind.value = c.value.gw_context_release_ind(); break; + case 264: + secondary_rat_data_usage_report_list_present = true; + secondary_rat_data_usage_report_list.id = c.id; + secondary_rat_data_usage_report_list.crit = c.crit; + secondary_rat_data_usage_report_list.value = c.value.secondary_rat_data_usage_report_list(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -52982,6 +60782,10 @@ void ue_context_release_request_ies_container::to_json(json_writer& j) const j.write_fieldname(""); gw_context_release_ind.to_json(j); } + if (secondary_rat_data_usage_report_list_present) { + j.write_fieldname(""); + secondary_rat_data_usage_report_list.to_json(j); + } j.end_obj(); } @@ -53381,13 +61185,19 @@ ue_context_suspend_request_ies_container::ue_context_suspend_request_ies_contain mme_ue_s1ap_id(0, crit_e::reject), enb_ue_s1ap_id(8, crit_e::reject), info_on_recommended_cells_and_enbs_for_paging(213, crit_e::ignore), - cell_id_and_ce_level_for_ce_capable_ues(212, crit_e::ignore) + cell_id_and_ce_level_for_ce_capable_ues(212, crit_e::ignore), + secondary_rat_data_usage_report_list(264, crit_e::ignore), + user_location_info(189, crit_e::ignore), + time_since_secondary_node_release(297, crit_e::ignore) {} SRSASN_CODE ue_context_suspend_request_ies_container::pack(bit_ref& bref) const { uint32_t nof_ies = 2; nof_ies += info_on_recommended_cells_and_enbs_for_paging_present ? 1 : 0; nof_ies += cell_id_and_ce_level_for_ce_capable_ues_present ? 1 : 0; + nof_ies += secondary_rat_data_usage_report_list_present ? 1 : 0; + nof_ies += user_location_info_present ? 1 : 0; + nof_ies += time_since_secondary_node_release_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -53398,6 +61208,15 @@ SRSASN_CODE ue_context_suspend_request_ies_container::pack(bit_ref& bref) const if (cell_id_and_ce_level_for_ce_capable_ues_present) { HANDLE_CODE(cell_id_and_ce_level_for_ce_capable_ues.pack(bref)); } + if (secondary_rat_data_usage_report_list_present) { + HANDLE_CODE(secondary_rat_data_usage_report_list.pack(bref)); + } + if (user_location_info_present) { + HANDLE_CODE(user_location_info.pack(bref)); + } + if (time_since_secondary_node_release_present) { + HANDLE_CODE(time_since_secondary_node_release.pack(bref)); + } return SRSASN_SUCCESS; } @@ -53436,6 +61255,24 @@ SRSASN_CODE ue_context_suspend_request_ies_container::unpack(cbit_ref& bref) cell_id_and_ce_level_for_ce_capable_ues.crit = c.crit; cell_id_and_ce_level_for_ce_capable_ues.value = c.value.cell_id_and_ce_level_for_ce_capable_ues(); break; + case 264: + secondary_rat_data_usage_report_list_present = true; + secondary_rat_data_usage_report_list.id = c.id; + secondary_rat_data_usage_report_list.crit = c.crit; + secondary_rat_data_usage_report_list.value = c.value.secondary_rat_data_usage_report_list(); + break; + case 189: + user_location_info_present = true; + user_location_info.id = c.id; + user_location_info.crit = c.crit; + user_location_info.value = c.value.user_location_info(); + break; + case 297: + time_since_secondary_node_release_present = true; + time_since_secondary_node_release.id = c.id; + time_since_secondary_node_release.crit = c.crit; + time_since_secondary_node_release.value = c.value.time_since_secondary_node_release(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -53463,6 +61300,18 @@ void ue_context_suspend_request_ies_container::to_json(json_writer& j) const j.write_fieldname(""); cell_id_and_ce_level_for_ce_capable_ues.to_json(j); } + if (secondary_rat_data_usage_report_list_present) { + j.write_fieldname(""); + secondary_rat_data_usage_report_list.to_json(j); + } + if (user_location_info_present) { + j.write_fieldname(""); + user_location_info.to_json(j); + } + if (time_since_secondary_node_release_present) { + j.write_fieldname(""); + time_since_secondary_node_release.to_json(j); + } j.end_obj(); } @@ -53609,6 +61458,7 @@ ue_info_transfer_ies_container::ue_info_transfer_ies_container() : s_tmsi(96, crit_e::reject), ue_level_qos_params(252, crit_e::ignore), ue_radio_cap(74, crit_e::ignore), + subscription_based_ue_differentiation_info(278, crit_e::ignore), pending_data_ind(283, crit_e::ignore) {} SRSASN_CODE ue_info_transfer_ies_container::pack(bit_ref& bref) const @@ -53616,6 +61466,7 @@ SRSASN_CODE ue_info_transfer_ies_container::pack(bit_ref& bref) const uint32_t nof_ies = 1; nof_ies += ue_level_qos_params_present ? 1 : 0; nof_ies += ue_radio_cap_present ? 1 : 0; + nof_ies += subscription_based_ue_differentiation_info_present ? 1 : 0; nof_ies += pending_data_ind_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); @@ -53626,6 +61477,9 @@ SRSASN_CODE ue_info_transfer_ies_container::pack(bit_ref& bref) const if (ue_radio_cap_present) { HANDLE_CODE(ue_radio_cap.pack(bref)); } + if (subscription_based_ue_differentiation_info_present) { + HANDLE_CODE(subscription_based_ue_differentiation_info.pack(bref)); + } if (pending_data_ind_present) { HANDLE_CODE(pending_data_ind.pack(bref)); } @@ -53661,6 +61515,12 @@ SRSASN_CODE ue_info_transfer_ies_container::unpack(cbit_ref& bref) ue_radio_cap.crit = c.crit; ue_radio_cap.value = c.value.ue_radio_cap(); break; + case 278: + subscription_based_ue_differentiation_info_present = true; + subscription_based_ue_differentiation_info.id = c.id; + subscription_based_ue_differentiation_info.crit = c.crit; + subscription_based_ue_differentiation_info.value = c.value.subscription_based_ue_differentiation_info(); + break; case 283: pending_data_ind_present = true; pending_data_ind.id = c.id; @@ -53692,6 +61552,10 @@ void ue_info_transfer_ies_container::to_json(json_writer& j) const j.write_fieldname(""); ue_radio_cap.to_json(j); } + if (subscription_based_ue_differentiation_info_present) { + j.write_fieldname(""); + subscription_based_ue_differentiation_info.to_json(j); + } if (pending_data_ind_present) { j.write_fieldname(""); pending_data_ind.to_json(j); @@ -53938,7 +61802,8 @@ ul_nas_transport_ies_container::ul_nas_transport_ies_container() : tai(67, crit_e::ignore), gw_transport_layer_address(155, crit_e::ignore), sipto_l_gw_transport_layer_address(184, crit_e::ignore), - lhn_id(186, crit_e::ignore) + lhn_id(186, crit_e::ignore), + ps_cell_info(288, crit_e::ignore) {} SRSASN_CODE ul_nas_transport_ies_container::pack(bit_ref& bref) const { @@ -53946,6 +61811,7 @@ SRSASN_CODE ul_nas_transport_ies_container::pack(bit_ref& bref) const nof_ies += gw_transport_layer_address_present ? 1 : 0; nof_ies += sipto_l_gw_transport_layer_address_present ? 1 : 0; nof_ies += lhn_id_present ? 1 : 0; + nof_ies += ps_cell_info_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(mme_ue_s1ap_id.pack(bref)); @@ -53962,6 +61828,9 @@ SRSASN_CODE ul_nas_transport_ies_container::pack(bit_ref& bref) const if (lhn_id_present) { HANDLE_CODE(lhn_id.pack(bref)); } + if (ps_cell_info_present) { + HANDLE_CODE(ps_cell_info.pack(bref)); + } return SRSASN_SUCCESS; } @@ -54024,6 +61893,12 @@ SRSASN_CODE ul_nas_transport_ies_container::unpack(cbit_ref& bref) lhn_id.crit = c.crit; lhn_id.value = c.value.lhn_id(); break; + case 288: + ps_cell_info_present = true; + ps_cell_info.id = c.id; + ps_cell_info.crit = c.crit; + ps_cell_info.value = c.value.ps_cell_info(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -54061,6 +61936,10 @@ void ul_nas_transport_ies_container::to_json(json_writer& j) const j.write_fieldname(""); lhn_id.to_json(j); } + if (ps_cell_info_present) { + j.write_fieldname(""); + ps_cell_info.to_json(j); + } j.end_obj(); } @@ -54461,7 +62340,8 @@ write_replace_warning_request_ies_container::write_replace_warning_request_ies_c warning_security_info(117, crit_e::ignore), data_coding_scheme(118, crit_e::ignore), warning_msg_contents(119, crit_e::ignore), - concurrent_warning_msg_ind(142, crit_e::reject) + concurrent_warning_msg_ind(142, crit_e::reject), + warning_area_coordinates(286, crit_e::ignore) {} SRSASN_CODE write_replace_warning_request_ies_container::pack(bit_ref& bref) const { @@ -54473,6 +62353,7 @@ SRSASN_CODE write_replace_warning_request_ies_container::pack(bit_ref& bref) con nof_ies += data_coding_scheme_present ? 1 : 0; nof_ies += warning_msg_contents_present ? 1 : 0; nof_ies += concurrent_warning_msg_ind_present ? 1 : 0; + nof_ies += warning_area_coordinates_present ? 1 : 0; pack_length(bref, nof_ies, 0u, 65535u, true); HANDLE_CODE(msg_id.pack(bref)); @@ -54500,6 +62381,9 @@ SRSASN_CODE write_replace_warning_request_ies_container::pack(bit_ref& bref) con if (concurrent_warning_msg_ind_present) { HANDLE_CODE(concurrent_warning_msg_ind.pack(bref)); } + if (warning_area_coordinates_present) { + HANDLE_CODE(warning_area_coordinates.pack(bref)); + } return SRSASN_SUCCESS; } @@ -54580,6 +62464,12 @@ SRSASN_CODE write_replace_warning_request_ies_container::unpack(cbit_ref& bref) concurrent_warning_msg_ind.crit = c.crit; concurrent_warning_msg_ind.value = c.value.concurrent_warning_msg_ind(); break; + case 286: + warning_area_coordinates_present = true; + warning_area_coordinates.id = c.id; + warning_area_coordinates.crit = c.crit; + warning_area_coordinates.value = c.value.warning_area_coordinates(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -54631,6 +62521,10 @@ void write_replace_warning_request_ies_container::to_json(json_writer& j) const j.write_fieldname(""); concurrent_warning_msg_ind.to_json(j); } + if (warning_area_coordinates_present) { + j.write_fieldname(""); + warning_area_coordinates.to_json(j); + } j.end_obj(); } @@ -58008,6 +65902,9 @@ void last_visited_cell_item_c::destroy_() case types::geran_cell: c.destroy(); break; + case types::ng_ran_cell: + c.destroy >(); + break; default: break; } @@ -58026,6 +65923,9 @@ void last_visited_cell_item_c::set(types::options e) case types::geran_cell: c.init(); break; + case types::ng_ran_cell: + c.init >(); + break; case types::nulltype: break; default: @@ -58045,6 +65945,9 @@ last_visited_cell_item_c::last_visited_cell_item_c(const last_visited_cell_item_ case types::geran_cell: c.init(other.c.get()); break; + case types::ng_ran_cell: + c.init(other.c.get >()); + break; case types::nulltype: break; default: @@ -58067,6 +65970,9 @@ last_visited_cell_item_c& last_visited_cell_item_c::operator=(const last_visited case types::geran_cell: c.set(other.c.get()); break; + case types::ng_ran_cell: + c.set(other.c.get >()); + break; case types::nulltype: break; default: @@ -58090,6 +65996,9 @@ void last_visited_cell_item_c::to_json(json_writer& j) const j.write_fieldname("gERAN-Cell"); c.get().to_json(j); break; + case types::ng_ran_cell: + j.write_str("nG-RAN-Cell", c.get >().to_string()); + break; default: log_invalid_choice_id(type_, "last_visited_cell_item_c"); } @@ -58108,6 +66017,10 @@ SRSASN_CODE last_visited_cell_item_c::pack(bit_ref& bref) const case types::geran_cell: HANDLE_CODE(c.get().pack(bref)); break; + case types::ng_ran_cell: { + varlength_field_pack_guard varlen_scope(bref, true); + HANDLE_CODE(c.get >().pack(bref)); + } break; default: log_invalid_choice_id(type_, "last_visited_cell_item_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -58129,6 +66042,10 @@ SRSASN_CODE last_visited_cell_item_c::unpack(cbit_ref& bref) case types::geran_cell: HANDLE_CODE(c.get().unpack(bref)); break; + case types::ng_ran_cell: { + varlength_field_unpack_guard varlen_scope(bref, true); + HANDLE_CODE(c.get >().unpack(bref)); + } break; default: log_invalid_choice_id(type_, "last_visited_cell_item_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -58138,8 +66055,8 @@ SRSASN_CODE last_visited_cell_item_c::unpack(cbit_ref& bref) std::string last_visited_cell_item_c::types_opts::to_string() const { - static const char* options[] = {"e-UTRAN-Cell", "uTRAN-Cell", "gERAN-Cell"}; - return convert_enum_idx(options, 3, value, "last_visited_cell_item_c::types"); + static const char* options[] = {"e-UTRAN-Cell", "uTRAN-Cell", "gERAN-Cell", "nG-RAN-Cell"}; + return convert_enum_idx(options, 4, value, "last_visited_cell_item_c::types"); } // MultiCellLoadReportingRequest ::= SEQUENCE @@ -59287,15 +67204,22 @@ std::string so_ntransfer_resp_container_c::types_opts::to_string() const return convert_enum_idx(options, 7, value, "so_ntransfer_resp_container_c::types"); } +// IMSvoiceEPSfallbackfrom5G ::= ENUMERATED +std::string im_svoice_ep_sfallbackfrom5_g_opts::to_string() const +{ + static const char* options[] = {"true"}; + return convert_enum_idx(options, 1, value, "im_svoice_ep_sfallbackfrom5_g_e"); +} + // 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 const uint32_t options[] = {175, 194}; - return map_enum_number(options, 2, idx, "id"); + static const uint32_t options[] = {175, 194, 296, 299, 300}; + return map_enum_number(options, 5, idx, "id"); } bool sourceenb_to_targetenb_transparent_container_ext_ies_o::is_id_valid(const uint32_t& id) { - static const uint32_t options[] = {175, 194}; + static const uint32_t options[] = {175, 194, 296, 299, 300}; for (const auto& o : options) { if (o == id) { return true; @@ -59310,6 +67234,12 @@ crit_e sourceenb_to_targetenb_transparent_container_ext_ies_o::get_crit(const ui return crit_e::ignore; case 194: return crit_e::ignore; + case 296: + return crit_e::ignore; + case 299: + return crit_e::ignore; + case 300: + return crit_e::ignore; default: asn1::log_error("The id=%d is not recognized", id); } @@ -59326,6 +67256,15 @@ sourceenb_to_targetenb_transparent_container_ext_ies_o::get_ext(const uint32_t& case 194: ret.set(ext_c::types::ue_history_info_from_the_ue); break; + case 296: + ret.set(ext_c::types::im_svoice_ep_sfallbackfrom5_g); + break; + case 299: + ret.set(ext_c::types::add_rrm_prio_idx); + break; + case 300: + ret.set(ext_c::types::contextat_source); + break; default: asn1::log_error("The id=%d is not recognized", id); } @@ -59338,6 +67277,12 @@ presence_e sourceenb_to_targetenb_transparent_container_ext_ies_o::get_presence( return presence_e::optional; case 194: return presence_e::optional; + case 296: + return presence_e::optional; + case 299: + return presence_e::optional; + case 300: + return presence_e::optional; default: asn1::log_error("The id=%d is not recognized", id); } @@ -59355,6 +67300,22 @@ unbounded_octstring& sourceenb_to_targetenb_transparent_container_ext_ies_ assert_choice_type("OCTET STRING", type_.to_string(), "Extension"); return c.get >(); } +im_svoice_ep_sfallbackfrom5_g_e& +sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::im_svoice_ep_sfallbackfrom5_g() +{ + assert_choice_type("IMSvoiceEPSfallbackfrom5G", type_.to_string(), "Extension"); + return c.get(); +} +fixed_bitstring<32, false, true>& sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::add_rrm_prio_idx() +{ + assert_choice_type("BIT STRING", type_.to_string(), "Extension"); + return c.get >(); +} +contextat_source_s& sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::contextat_source() +{ + assert_choice_type("ContextatSource", type_.to_string(), "Extension"); + return c.get(); +} const fixed_bitstring<32, false, true>& sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::mob_info() const { assert_choice_type("BIT STRING", type_.to_string(), "Extension"); @@ -59366,6 +67327,23 @@ sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::ue_history_info_f assert_choice_type("OCTET STRING", type_.to_string(), "Extension"); return c.get >(); } +const im_svoice_ep_sfallbackfrom5_g_e& +sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::im_svoice_ep_sfallbackfrom5_g() const +{ + assert_choice_type("IMSvoiceEPSfallbackfrom5G", type_.to_string(), "Extension"); + return c.get(); +} +const fixed_bitstring<32, false, true>& +sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::add_rrm_prio_idx() const +{ + assert_choice_type("BIT STRING", type_.to_string(), "Extension"); + return c.get >(); +} +const contextat_source_s& sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::contextat_source() const +{ + assert_choice_type("ContextatSource", type_.to_string(), "Extension"); + return c.get(); +} void sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::destroy_() { switch (type_) { @@ -59375,6 +67353,12 @@ void sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::destroy_() case types::ue_history_info_from_the_ue: c.destroy >(); break; + case types::add_rrm_prio_idx: + c.destroy >(); + break; + case types::contextat_source: + c.destroy(); + break; default: break; } @@ -59390,6 +67374,14 @@ void sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::set(types::o case types::ue_history_info_from_the_ue: c.init >(); break; + case types::im_svoice_ep_sfallbackfrom5_g: + break; + case types::add_rrm_prio_idx: + c.init >(); + break; + case types::contextat_source: + c.init(); + break; case types::nulltype: break; default: @@ -59407,6 +67399,15 @@ sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::ext_c( case types::ue_history_info_from_the_ue: c.init(other.c.get >()); break; + case types::im_svoice_ep_sfallbackfrom5_g: + c.init(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.init(other.c.get >()); + break; + case types::contextat_source: + c.init(other.c.get()); + break; case types::nulltype: break; default: @@ -59428,6 +67429,15 @@ sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::operator=( case types::ue_history_info_from_the_ue: c.set(other.c.get >()); break; + case types::im_svoice_ep_sfallbackfrom5_g: + c.set(other.c.get()); + break; + case types::add_rrm_prio_idx: + c.set(other.c.get >()); + break; + case types::contextat_source: + c.set(other.c.get()); + break; case types::nulltype: break; default: @@ -59446,6 +67456,16 @@ void sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::to_json(json case types::ue_history_info_from_the_ue: j.write_str("OCTET STRING", c.get >().to_string()); break; + case types::im_svoice_ep_sfallbackfrom5_g: + j.write_str("IMSvoiceEPSfallbackfrom5G", "true"); + break; + case types::add_rrm_prio_idx: + j.write_str("BIT STRING", c.get >().to_string()); + break; + case types::contextat_source: + j.write_fieldname("ContextatSource"); + c.get().to_json(j); + break; default: log_invalid_choice_id(type_, "sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c"); } @@ -59461,6 +67481,15 @@ SRSASN_CODE sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::pack( case types::ue_history_info_from_the_ue: HANDLE_CODE(c.get >().pack(bref)); break; + case types::im_svoice_ep_sfallbackfrom5_g: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().pack(bref))); + break; + case types::contextat_source: + HANDLE_CODE(c.get().pack(bref)); + break; default: log_invalid_choice_id(type_, "sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -59477,6 +67506,15 @@ SRSASN_CODE sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::unpac case types::ue_history_info_from_the_ue: HANDLE_CODE(c.get >().unpack(bref)); break; + case types::im_svoice_ep_sfallbackfrom5_g: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::add_rrm_prio_idx: + HANDLE_CODE((c.get >().unpack(bref))); + break; + case types::contextat_source: + HANDLE_CODE(c.get().unpack(bref)); + break; default: log_invalid_choice_id(type_, "sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c"); return SRSASN_ERROR_DECODE_FAIL; @@ -59486,21 +67524,37 @@ 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 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"); + static const char* options[] = { + "BIT STRING", "OCTET STRING", "IMSvoiceEPSfallbackfrom5G", "BIT STRING", "ContextatSource"}; + return convert_enum_idx(options, 5, value, "sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::types"); +} +uint8_t sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::types_opts::to_number() const +{ + if (value == im_svoice_ep_sfallbackfrom5_g) { + return 5; + } + invalid_enum_number(value, "sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::types"); + return 0; } template struct asn1::s1ap::protocol_ext_field_s; sourceenb_to_targetenb_transparent_container_ext_ies_container:: sourceenb_to_targetenb_transparent_container_ext_ies_container() : - mob_info(175, crit_e::ignore), ue_history_info_from_the_ue(194, crit_e::ignore) + mob_info(175, crit_e::ignore), + ue_history_info_from_the_ue(194, crit_e::ignore), + im_svoice_ep_sfallbackfrom5_g(296, crit_e::ignore), + add_rrm_prio_idx(299, crit_e::ignore), + contextat_source(300, crit_e::ignore) {} SRSASN_CODE sourceenb_to_targetenb_transparent_container_ext_ies_container::pack(bit_ref& bref) const { uint32_t nof_ies = 0; nof_ies += mob_info_present ? 1 : 0; nof_ies += ue_history_info_from_the_ue_present ? 1 : 0; + nof_ies += im_svoice_ep_sfallbackfrom5_g_present ? 1 : 0; + nof_ies += add_rrm_prio_idx_present ? 1 : 0; + nof_ies += contextat_source_present ? 1 : 0; pack_length(bref, nof_ies, 1u, 65535u, true); if (mob_info_present) { @@ -59509,6 +67563,15 @@ SRSASN_CODE sourceenb_to_targetenb_transparent_container_ext_ies_container::pack if (ue_history_info_from_the_ue_present) { HANDLE_CODE(ue_history_info_from_the_ue.pack(bref)); } + if (im_svoice_ep_sfallbackfrom5_g_present) { + HANDLE_CODE(im_svoice_ep_sfallbackfrom5_g.pack(bref)); + } + if (add_rrm_prio_idx_present) { + HANDLE_CODE(add_rrm_prio_idx.pack(bref)); + } + if (contextat_source_present) { + HANDLE_CODE(contextat_source.pack(bref)); + } return SRSASN_SUCCESS; } @@ -59533,6 +67596,24 @@ SRSASN_CODE sourceenb_to_targetenb_transparent_container_ext_ies_container::unpa ue_history_info_from_the_ue.crit = c.crit; ue_history_info_from_the_ue.ext = c.ext_value.ue_history_info_from_the_ue(); break; + case 296: + im_svoice_ep_sfallbackfrom5_g_present = true; + im_svoice_ep_sfallbackfrom5_g.id = c.id; + im_svoice_ep_sfallbackfrom5_g.crit = c.crit; + im_svoice_ep_sfallbackfrom5_g.ext = c.ext_value.im_svoice_ep_sfallbackfrom5_g(); + break; + case 299: + add_rrm_prio_idx_present = true; + add_rrm_prio_idx.id = c.id; + add_rrm_prio_idx.crit = c.crit; + add_rrm_prio_idx.ext = c.ext_value.add_rrm_prio_idx(); + break; + case 300: + contextat_source_present = true; + contextat_source.id = c.id; + contextat_source.crit = c.crit; + contextat_source.ext = c.ext_value.contextat_source(); + break; default: asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; @@ -59552,6 +67633,18 @@ void sourceenb_to_targetenb_transparent_container_ext_ies_container::to_json(jso j.write_fieldname(""); ue_history_info_from_the_ue.to_json(j); } + if (im_svoice_ep_sfallbackfrom5_g_present) { + j.write_fieldname(""); + im_svoice_ep_sfallbackfrom5_g.to_json(j); + } + if (add_rrm_prio_idx_present) { + j.write_fieldname(""); + add_rrm_prio_idx.to_json(j); + } + if (contextat_source_present) { + j.write_fieldname(""); + contextat_source.to_json(j); + } j.end_obj(); } diff --git a/lib/test/asn1/CMakeLists.txt b/lib/test/asn1/CMakeLists.txt index ca33b7377..05c297dd4 100644 --- a/lib/test/asn1/CMakeLists.txt +++ b/lib/test/asn1/CMakeLists.txt @@ -6,9 +6,9 @@ # the distribution. # -add_executable(s1ap_test s1ap_test.cc) -target_link_libraries(s1ap_test srslte_common srslte_asn1 s1ap_asn1) -add_test(s1ap_test s1ap_test) +add_executable(s1ap_asn1_test s1ap_test.cc) +target_link_libraries(s1ap_asn1_test srslte_common srslte_asn1 s1ap_asn1) +add_test(s1ap_asn1_test s1ap_asn1_test) add_executable(srslte_asn1_rrc_mcch_test srslte_asn1_rrc_mcch_test.cc) target_link_libraries(srslte_asn1_rrc_mcch_test rrc_asn1 srslte_common)